private void GameFightShowFighterMessageHandler(DofusClient client, GameFightShowFighterMessage message) { if (message.Informations.ContextualId == client.Account.Character.Id) { client.Logger.Log("Vous êtes entré dans un combat !", LogMessageType.Info); } }
private void HandleGameFightShowFighterMessage(IAccount account, GameFightShowFighterMessage message) { lock (CheckLock) { AddFighter(message.Informations); } }
private void HandleCharacterSelectedSuccessMessages(GameFightShowFighterMessage message, ConnectedHost source) { if (source.Bot.Game.Player.PlayerBaseInformations.Id == message.informations.contextualId) { Stats = message.informations.stats; } OnUpdated(); }
public void HandleGameFightShowFighterMessage(Bot bot, GameFightShowFighterMessage message) { if (bot == null || bot.Character == null || bot.Character.Fight == null) { logger.Error("Fight is not properly initialized."); return; // Can't handle the message } bot.Character.Fight.AddActor(message.informations); }
public static void GameFightShowFighterMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameFightShowFighterMessage msg = (GameFightShowFighterMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } account.FightData.AddFighter(msg.informations); }
public static void HandleGameFightShowFighterMessage(Bot bot, GameFightShowFighterMessage message) { if (!bot.Character.IsFighting()) { logger.Error("Received GameFightShowFighterMessage but character is not in fight !"); } else { bot.Character.Fight.AddFighter(message.informations); } }
public void Update(GameFightShowFighterMessage message) { if (message.Informations.ContextualId == _account.Game.Character.Id) { PlayedFighter = new FightPlayerEntry(message.Informations); } else { AddFighter(message.Informations); } SortFighters(); FightersUpdated?.Invoke(); }
public static void GameFightShowFighterMessageTreatment(Message message, byte[] packetDatas, AccountUC account) { GameFightShowFighterMessage msg = (GameFightShowFighterMessage)message; using (BigEndianReader reader = new BigEndianReader(packetDatas)) { msg.Deserialize(reader); } if (account.Fight == null) { return; } if (msg.informations is GameFightMonsterInformations) { GameFightMonsterInformations infos = (GameFightMonsterInformations)msg.informations; account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, infos.creatureGenericId)); } else { account.Fight.Fighters.Add(new BFighter(msg.informations.contextualId, msg.informations.disposition.cellId, msg.informations.stats.actionPoints, msg.informations.stats, msg.informations.alive, msg.informations.stats.lifePoints, msg.informations.stats.maxLifePoints, msg.informations.stats.movementPoints, (uint)msg.informations.teamId, 0)); } }
public async Task Update(GameFightShowFighterMessage message) { // Avoid kicking monsters or ourselves.. if (_account.Game.Fight.Allies.FirstOrDefault(a => a.ContextualId == message.Informations.ContextualId) == null) { return; } // If this account is a group chief and a non-member joins the fight if (_account.HasGroup && _account.IsGroupChief) { if (!_account.Group.IsGroupMember(message.Informations.ContextualId)) { await Task.Delay(800); await _account.Network.SendMessageAsync(new GameContextKickMessage(message.Informations.ContextualId)); _account.Logger.LogWarning(LanguageManager.Translate("472"), LanguageManager.Translate("393")); // If this person took a member's place, send a group signal so that the member joins again _account.Group.SignalMembersToJoinFight(); } } }
public static Task HandleGameFightShowFighterMessage(Account account, GameFightShowFighterMessage message) => Task.Run(async() => { account.Game.Fight.Update(message); await account.Extensions.Fights.Update(message); });
private void HandleMapComplementaryInformationsDataMessage(GameFightShowFighterMessage message, ConnectedHost source) { fight.AddFighter(message.informations); }