refactor(Core/Packets): Totem (#9451)

* Totem

* Update WorldSession.h
This commit is contained in:
IntelligentQuantum
2021-12-31 16:53:38 +03:30
committed by GitHub
parent f2a5a12bd0
commit 0556f0b3d5
6 changed files with 106 additions and 15 deletions

View File

@@ -28,6 +28,7 @@
#include "SpellMgr.h"
#include "TemporarySummon.h"
#include "Totem.h"
#include "TotemPackets.h"
#include "Vehicle.h"
#include "WorldPacket.h"
#include "WorldSession.h"
@@ -578,17 +579,15 @@ void WorldSession::HandleCancelChanneling(WorldPacket& recvData)
mover->InterruptSpell(CURRENT_CHANNELED_SPELL, true, true, true);
}
void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
void WorldSession::HandleTotemDestroyed(WorldPackets::Totem::TotemDestroyed& totemDestroyed)
{
// ignore for remote control state
if (_player->m_mover != _player)
return;
uint8 slotId;
uint8 slotId = totemDestroyed.Slot;
slotId += SUMMON_SLOT_TOTEM;
recvPacket >> slotId;
++slotId;
if (slotId >= MAX_TOTEM_SLOT)
return;