Core/PacketIO: Updated packet structures to 9.0.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/f2202869f71f5a1a35191de303ee5166e4275884)
This commit is contained in:
hondacrx
2021-04-12 14:02:46 -04:00
parent d62ca82d30
commit 13631f6b4c
20 changed files with 458 additions and 400 deletions
+10 -2
View File
@@ -195,6 +195,7 @@ namespace Game.Entities
UpdateSplineMovement(diff);
GetMotionMaster().UpdateMotion(diff);
}
void _UpdateSpells(uint diff)
{
if (GetCurrentSpell(CurrentSpellTypes.AutoRepeat) != null)
@@ -250,13 +251,20 @@ namespace Game.Entities
_spellHistory.Update();
}
public void HandleEmoteCommand(Emote anim_id)
public void HandleEmoteCommand(Emote animId, uint[] spellVisualKitIds = null)
{
EmoteMessage packet = new();
packet.Guid = GetGUID();
packet.EmoteID = (int)anim_id;
packet.EmoteID = (uint)animId;
var emotesEntry = CliDB.EmotesStorage.LookupByKey(animId);
if (emotesEntry != null && spellVisualKitIds != null)
if (emotesEntry.AnimId == (uint)Anim.MountSpecial || emotesEntry.AnimId == (uint)Anim.MountSelfSpecial)
packet.SpellVisualKitIDs.AddRange(spellVisualKitIds);
SendMessageToSet(packet, true);
}
public void SendDurabilityLoss(Player receiver, uint percent)
{
DurabilityDamageDeath packet = new();