public static void GameFightLeaveMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameFightLeaveMessage msg = (GameFightLeaveMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (msg.CharId == account.CharacterBaseInformations.ObjectID) { account.FightData.FightStop(); } }
public static void GameFightLeaveMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameFightLeaveMessage msg = (GameFightLeaveMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } /* TODO : HANDLE IT */ if (msg.charId == account.CharacterBaseInformations.id) { account.FightData.FightStop(); } //else //{ // BFighter fighter = account.Fight.GetFighter(msg.charId); // if (fighter != null) // account.Fight.Fighters.Remove(fighter); //} }
public static void GameFightLeaveMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameFightLeaveMessage msg = (GameFightLeaveMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (msg.charId == account.CharacterBaseInformations.id) { account.Fight.IsFightStarted = false; account.Fight.WaitForReady = false; } else { BFighter fighter = account.Fight.GetFighter(msg.charId); if (fighter != null) { account.Fight.Fighters.Remove(fighter); } } }