public int setNewSlotHost(Account player,int slot,int oldSlot,int host_status) { CLogger.getInstance().info(string.Concat(new object[] { "[Slot] slot[", slot, "] state = ", this._slots[slot].state.ToString() })); SLOT_STATE state = this._slots[slot].state; this.changeSlotState2(slot,SLOT_STATE.SLOT_STATE_NORMAL); this._slots[slot]._playerId = player.player_id; player.setSlot(slot); this.changeSlotState2(oldSlot,state); bool flag = oldSlot == this._leader && host_status == 1; int result; if (flag) { this._leader = slot; result = 2; } else { result = 1; } return(result); }
public ItemSlotSaveData(string _id, int _amount, SLOT_STATE _slotState, int _rememberInventoryIndex = 0) { itemID = _id; amount = _amount; slotState = _slotState; rememberInventoryIndex = _rememberInventoryIndex; }
public void SetInUse(string _itemCode) { // 슬롯 사용중으로 바꾸기 m_slotState = SLOT_STATE.inUse; // 색상 파란색 SetColor(Color.blue); prevColor = frontImg.color; itemCode = _itemCode; }
public void changeSlotState2(int slot,SLOT_STATE state) { this._slots[slot].state = state; bool flag = state == SLOT_STATE.SLOT_STATE_EMPTY || state == SLOT_STATE.SLOT_STATE_CLOSE; if (flag) { this._slots[slot].allDeaths = 0; this._slots[slot].allKills = 0; this._slots[slot]._playerId = 0; } }
public void SetNotUse() { // 사용하지 않는 상태로 바꾸기 m_slotState = SLOT_STATE.notUse; // 색상 하얀색 SetColor(Color.white); prevColor = frontImg.color; // 아이템 코드 초기화 itemCode = null; }
public void changeSlotState(int slot,SLOT_STATE state,bool sendinfo) { this._slots[slot].state = state; if (state == SLOT_STATE.SLOT_STATE_EMPTY || state == SLOT_STATE.SLOT_STATE_CLOSE) { this._slots[slot].allDeaths = 0; this._slots[slot].allKills = 0; this._slots[slot]._playerId = 0; } if (!sendinfo) { return; } this.updateInfo(); }
public override void WriteImpl() { WriteH(0xF25); WriteC(0); WriteC((byte)leaderSlot.getId()); WriteC(1);//(byte)slotcount if (slotcount > 1) { foreach (int slot in Room.RED_TEAM) { SLOT oldSlot = room.getRoomSlots()[slot]; SLOT newSlot = room.getRoomSlots()[slot + 1]; SLOT_STATE oldState = oldSlot.getState(); oldSlot.setState(newSlot.getState()); newSlot.setState(oldState); Player oldPlayer = oldSlot.getPlayer(); oldSlot.setPlayer(newSlot.getPlayer()); newSlot.setPlayer(oldPlayer); WriteC((byte)oldSlot.getId()); WriteC((byte)newSlot.getId()); WriteC((byte)(int)oldSlot.getState()); WriteC((byte)(int)newSlot.getState()); } } else { SLOT oldSlot = room.getRoomSlotByPlayer(sender); SLOT newSlot = room.changeTeam(sender,newTeam); WriteC((byte)oldSlot.getId()); WriteC((byte)newSlot.getId()); WriteC((byte)(int)oldSlot.getState()); WriteC((byte)(int)newSlot.getState()); } }
public void setState(SLOT_STATE _state) { this.state = _state; }
public bool hasSlotState(SLOT_STATE state) { return(this.slotState == state); }
public void setSlotState(SLOT_STATE state) { this.slotState = state; }