diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-08-15 00:49:30 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-08-15 00:49:30 +0200 |
commit | fefc7192631764245396cd2622aa11f649411946 (patch) | |
tree | 07bfafdd01b478d4aa2632f9d3d065a425835595 /src/server/game/Handlers/SpellHandler.cpp | |
parent | 792f8041bb5abb962383d42589e7a6ac0c6c8135 (diff) |
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
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/SpellHandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp index ef29453aa15..198094d6a93 100644 --- a/src/server/game/Handlers/SpellHandler.cpp +++ b/src/server/game/Handlers/SpellHandler.cpp @@ -38,7 +38,7 @@ #include "SpellAuraEffects.h" #include "SpellMgr.h" #include "SpellPackets.h" -#include "Totem.h" +#include "TemporarySummon.h" #include "TotemPackets.h" #include "World.h" @@ -533,8 +533,8 @@ void WorldSession::HandleTotemDestroyed(WorldPackets::Totem::TotemDestroyed& tot return; Creature* totem = ObjectAccessor::GetCreature(*_player, _player->m_SummonSlot[slotId]); - if (totem && totem->IsTotem() && totem->GetGUID() == totemDestroyed.TotemGUID) - totem->ToTotem()->UnSummon(); + if (totem && totem->IsTotem() && (totemDestroyed.TotemGUID.IsEmpty() || totem->GetGUID() == totemDestroyed.TotemGUID)) + totem->DespawnOrUnsummon(); } void WorldSession::HandleSelfResOpcode(WorldPackets::Spells::SelfRes& selfRes) |