mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9171] Update pet and minipet monster move flag at player toggle walk/run
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
83bd854030
commit
12096177e2
2 changed files with 24 additions and 1 deletions
|
|
@ -299,6 +299,29 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->isInFlight())
|
||||
plMover->HandleFall(movementInfo);
|
||||
|
||||
if ((opcode == MSG_MOVE_SET_WALK_MODE || opcode == MSG_MOVE_SET_RUN_MODE) && plMover)
|
||||
{
|
||||
Pet* pPet = plMover->GetPet();
|
||||
Pet* pMiniPet = plMover->GetMiniPet();
|
||||
|
||||
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_WALK_MODE))
|
||||
{
|
||||
if (pPet && !pPet->isInCombat())
|
||||
pPet->SetMonsterMoveFlags(MONSTER_MOVE_WALK);
|
||||
|
||||
if (pMiniPet)
|
||||
pMiniPet->SetMonsterMoveFlags(MONSTER_MOVE_WALK);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pPet)
|
||||
pPet->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
|
||||
if (pMiniPet)
|
||||
pMiniPet->RemoveMonsterMoveFlag(MONSTER_MOVE_WALK);
|
||||
}
|
||||
}
|
||||
|
||||
if (plMover && (movementInfo.HasMovementFlag(MOVEMENTFLAG_SWIMMING) != plMover->IsInWater()))
|
||||
{
|
||||
// now client not include swimming flag in case jumping under water
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue