public static void HandleEmotePlay(EmotePlayRequestMessage message, WorldClient client) { if (!client.Character.Fighting) { client.Character.PlayEmote(message.emoteId); } }
public static void HandleEmotePlayRequestMessage(Client client, EmotePlayRequestMessage message) { if (Enum.IsDefined(typeof(EmoteEnum), message.emoteId)) { client.Character.CurrentMap.Send(new EmotePlayMessage(message.emoteId, 0, client.Character.Id)); } }
public void PulseRegen() { if (((m_Account.CharacterStats.LifePoints / m_Account.CharacterStats.MaxLifePoints) * 100) < m_Account.RegenChoice.Value) { m_Account.SetStatus(Status.Regenerating); List <Item> items = GetRegenItems(); if (items.Count > 0) { if (UseItems(items)) { m_Account.Wait(500, 1000); PulseRegen(); return; } } int maxLife = Convert.ToInt32(m_Account.CharacterStats.MaxLifePoints); int life = Convert.ToInt32(m_Account.CharacterStats.LifePoints); int time = Convert.ToInt32(Math.Round(Convert.ToDecimal(maxLife - life) / 2)); EmotePlayRequestMessage msg = new EmotePlayRequestMessage(1); m_Account.SocketManager.Send(msg); m_Account.Log(new GeneralTextInformation(String.Format("Régénération pendant {0} secondes.", time)), 2); m_Account.Wait(time * 1000, (time + 1) * 1000); if (m_Account.Path != null && m_Account.Path.Launched) { m_Account.Path.ParsePath(); } } }
public static void HandleEmotePlayRequestMessage(WorldClient client, EmotePlayRequestMessage message) { if (!client.Character.HasEmote((EmotesEnum)message.emoteId)) { return; } client.Character.PlayEmote((EmotesEnum)message.emoteId); }
public static void HandleEmotePlay(EmotePlayRequestMessage message, WorldClient client) { EmoteRecord template = EmoteRecord.GetEmote(message.emoteId); if (template.IsAura) { client.Character.PlayAura(message.emoteId); } else { client.Character.Look.UnsetAura(); client.Character.RefreshOnMapInstance(); client.Character.SendMap(new EmotePlayMessage(message.emoteId, 12, client.Character.Id, client.Account.Id)); } }
public void PulseRegen() { if ((m_Account.CharacterStats.lifePoints / m_Account.CharacterStats.maxLifePoints) < m_Account.RegenChoice.Value) { m_Account.SetStatus(Status.Regenerating); int maxLife = Convert.ToInt32(m_Account.CharacterStats.maxLifePoints); int life = Convert.ToInt32(m_Account.CharacterStats.lifePoints); int time = Convert.ToInt32(Math.Round(Convert.ToDecimal(maxLife - life) / 2)); using (BigEndianWriter writer = new BigEndianWriter()) { EmotePlayRequestMessage msg2 = new EmotePlayRequestMessage(1); msg2.Serialize(writer); MessagePackaging pack = new MessagePackaging(writer); pack.Pack((int)msg2.ProtocolID); m_Account.SocketManager.Send(pack.Writer.Content); } m_Account.Log(new GeneralTextInformation(String.Format("Régénération pendant {0} secondes.", time)), 2); m_Account.Wait(time * 1000, (time + 1) * 1000); } // TODO : Continue path after this. }