Beispiel #1
0
 public Match(Clan clan)
 {
     this.clan = clan;
     for (int index = 0; index < 8; ++index)
     {
         _slots[index] = new SLOT_MATCH(index);
     }
 }
Beispiel #2
0
 public bool getSlot(int slotId, out SLOT_MATCH slot)
 {
     lock (this._slots)
     {
         slot = (SLOT_MATCH)null;
         if (slotId >= 0 && slotId < 16)
         {
             slot = this._slots[slotId];
         }
         return(slot != null);
     }
 }
Beispiel #3
0
 public Account getPlayerBySlot(SLOT_MATCH slot)
 {
     try
     {
         long playerId = slot._playerId;
         return(playerId > 0L ? AccountManager.getAccount(playerId, true) : (Account)null);
     }
     catch
     {
         return((Account)null);
     }
 }
Beispiel #4
0
 public Account getPlayerBySlot(SLOT_MATCH slot)
 {
     try
     {
         long id = slot._playerId;
         return(id > 0 ? AccountManager.getAccount(id, true) : null);
     }
     catch
     {
         return(null);
     }
 }
Beispiel #5
0
 public bool addPlayer(Account player)
 {
     lock (_slots)
         for (int i = 0; i < formação; i++)
         {
             SLOT_MATCH slot = _slots[i];
             if (slot._playerId == 0 && (int)slot.state == 0)
             {
                 slot._playerId   = player.player_id;
                 slot.state       = SlotMatchState.Normal;
                 player._match    = this;
                 player.matchSlot = i;
                 player._status.updateClanMatch((byte)friendId);
                 AllUtils.syncPlayerToClanMembers(player);
                 return(true);
             }
         }
     return(false);
 }
Beispiel #6
0
 public bool addPlayer(Account player)
 {
     lock (this._slots)
     {
         for (int index = 0; index < this.formação; ++index)
         {
             SLOT_MATCH slot = this._slots[index];
             if (slot._playerId == 0L && slot.state == SlotMatchState.Empty)
             {
                 slot._playerId   = player.player_id;
                 slot.state       = SlotMatchState.Normal;
                 player._match    = this;
                 player.matchSlot = index;
                 player._status.updateClanMatch((byte)this.friendId);
                 AllUtils.syncPlayerToClanMembers(player);
                 return(true);
             }
         }
     }
     return(false);
 }