More hooks for Scripts/Modules (#270)

This commit is contained in:
3ndos
2016-12-07 03:12:01 -05:00
committed by Francesco Borzì
parent 440b7e731f
commit b7ee1a9f12
8 changed files with 255 additions and 14 deletions

View File

@@ -23,6 +23,7 @@
#include "ArenaSpectator.h"
#include "Chat.h"
#include "BattlegroundMgr.h"
#include "ScriptMgr.h"
#define MOVEMENT_PACKET_TIME_DELAY 0
@@ -392,6 +393,8 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
// now client not include swimming flag in case jumping under water
plrMover->SetInWater(!plrMover->IsInWater() || plrMover->GetBaseMap()->IsUnderWater(movementInfo.pos.GetPositionX(), movementInfo.pos.GetPositionY(), movementInfo.pos.GetPositionZ()));
}
if (plrMover)//Hook for OnPlayerMove
sScriptMgr->OnPlayerMove(plrMover, movementInfo, opcode);
// Dont allow to turn on walking if charming other player
if (mover->GetGUID() != _player->GetGUID())
movementInfo.flags &= ~MOVEMENTFLAG_WALKING;