Beispiel #1
0
        public static void CurrentMapMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            CurrentMapMessage currentMapMessage = (CurrentMapMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                currentMapMessage.Deserialize(reader);
            }

            account.MapID = currentMapMessage.mapId;
            if (account.MapID == account.Map.LastMapId && account.Fight != null)
            {
                account.Fight.winLoseDic["Gagné"]++;
                account.ActualizeFightStats(account.Fight.winLoseDic, account.Fight.xpWon);
            }
            if (!account.IsMITM)
            {
                MapInformationsRequestMessage mapInformationsRequestMessage
                = new MapInformationsRequestMessage(account.MapID);
                account.SocketManager.Send(mapInformationsRequestMessage);
            }
        }
Beispiel #2
0
        public static void QuestListMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            if (!account.IsMITM)
            {
                MapInformationsRequestMessage mapInformationsRequestMessage
                    = new MapInformationsRequestMessage(account.MapID);

                account.SocketManager.Send(mapInformationsRequestMessage);
            }
        }