private void LaunchSpell(int spellId, int cellId) { //foreach (BFighter fighter in Fighters) //{ // if (fighter.CellId == cellId) // { // GameActionFightCastOnTargetRequestMessage msg = new GameActionFightCastOnTargetRequestMessage((short)spellId, fighter.Id); // m_Account.SocketManager.Send(msg); // m_Account.Log(new ActionTextInformation("Lancement d'un sort en " + cellId), 5); // return; // } //} using (BigEndianWriter writer = new BigEndianWriter()) { GameActionFightCastRequestMessage msg = new GameActionFightCastRequestMessage((short)spellId, (short)cellId); msg.Serialize(writer); writer.Content = m_Account.HumanCheck.hash_function(writer.Content); MessagePackaging pack = new MessagePackaging(writer); pack.Pack((int)msg.ProtocolID); m_Account.SocketManager.Send(pack.Writer.Content); m_Account.Log(new ActionTextInformation("Lancement d'un sort en " + cellId), 5); if (m_Account.DebugMode.Checked) { m_Account.Log(new BotTextInformation("[SND] 1005 (GameActionFightCastRequestMessage)"), 0); } } }
/// <summary> /// LaunchSpell() permet de lancer un sort. /// </summary> /// <param name="spellId">ID du sort à lancer</param> /// <param name="cellId">Cell ID cible</param> private void LaunchSpell(int spellId, int cellId) { using (BigEndianWriter writer = new BigEndianWriter()) { GameActionFightCastRequestMessage msg = new GameActionFightCastRequestMessage((short)spellId, (short)cellId); msg.Serialize(writer); writer.Content = Account.HumanCheck.hash_function(writer.Content); MessagePackaging pack = new MessagePackaging(writer); pack.Pack((int)msg.ProtocolID); Account.SocketManager.Send(pack.Writer.Content); Account.Log(new ActionTextInformation("Lancement d'un sort en " + cellId), 5); if (Account.DebugMode.Checked) { Account.Log(new BotTextInformation("[SND] 1005 (GameActionFightCastRequestMessage)"), 0); } } }