Core/Creatures: Updated totem slot assignment logic

* Implemented SUMMON_SLOT_ANY_TOTEM
* Fixed showing totems on player frames
* Fixed removing totems from player frames
* Fixed being able to summon unlimited windfury totems
Port From (https://github.com/TrinityCore/TrinityCore/commit/fefc7192631764245396cd2622aa11f649411946)
This commit is contained in:
hondacrx
2023-09-14 03:27:06 -04:00
parent 0449c88951
commit 45c95d22ed
4 changed files with 80 additions and 17 deletions
+2 -2
View File
@@ -527,8 +527,8 @@ namespace Game
return;
Creature totem = ObjectAccessor.GetCreature(GetPlayer(), _player.m_SummonSlot[slotId]);
if (totem != null && totem.IsTotem())// && totem.GetGUID() == packet.TotemGUID) Unknown why blizz doesnt send the guid when you right click it.
totem.ToTotem().UnSummon();
if (totem != null && totem.IsTotem() && (totemDestroyed.TotemGUID.IsEmpty() || totem.GetGUID() == totemDestroyed.TotemGUID))
totem.DespawnOrUnsummon();
}
[WorldPacketHandler(ClientOpcodes.SelfRes)]