diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 72b2a7062..9465946e0 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19386,6 +19386,7 @@ void Player::EnterVehicle(Vehicle *vehicle) SetFarSightGUID(vehicle->GetGUID()); // set view SetClientControl(vehicle, 1); // redirect controls to vehicle + SetMover(vehicle); WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0); GetSession()->SendPacket(&data); @@ -19437,6 +19438,7 @@ void Player::ExitVehicle(Vehicle *vehicle) SetFarSightGUID(0); SetClientControl(vehicle, 0); + SetMover(NULL); WorldPacket data(MSG_MOVE_TELEPORT_ACK, 30); data.append(GetPackGUID()); diff --git a/src/game/Player.h b/src/game/Player.h index 714766cdd..d1dc50f95 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -2028,6 +2028,7 @@ class MANGOS_DLL_SPEC Player : public Unit bool IsAllowUseFlyMountsHere() const; void SetClientControl(Unit* target, uint8 allowMove); + void SetMover(Unit* target) { m_mover = target ? target : this; } void EnterVehicle(Vehicle *vehicle); void ExitVehicle(Vehicle *vehicle); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 6963655c1..67ece8a60 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3087,6 +3087,7 @@ void Aura::HandleModPossess(bool apply, bool Real) { ((Player*)caster)->SetFarSightGUID(m_target->GetGUID()); ((Player*)caster)->SetClientControl(m_target, 1); + ((Player*)caster)->SetMover(m_target); } m_target->CombatStop(); @@ -3130,6 +3131,7 @@ void Aura::HandleModPossess(bool apply, bool Real) { ((Player*)caster)->SetFarSightGUID(0); ((Player*)caster)->SetClientControl(m_target, 0); + ((Player*)caster)->SetMover(NULL); WorldPacket data(SMSG_PET_SPELLS, 8); data << uint64(0); @@ -3167,6 +3169,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real) ((Player*)caster)->SetFarSightGUID(apply ? pet->GetGUID() : 0); ((Player*)caster)->SetCharm(apply ? pet : NULL); ((Player*)caster)->SetClientControl(pet, apply ? 1 : 0); + ((Player*)caster)->SetMover(apply ? pet : NULL); if(apply) { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f1b9909c8..234fdbdb0 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7564,9 +7564,6 @@ void Unit::SetPet(Pet* pet) void Unit::SetCharm(Unit* pet) { SetUInt64Value(UNIT_FIELD_CHARM, pet ? pet->GetGUID() : 0); - - if(GetTypeId() == TYPEID_PLAYER) - ((Player*)this)->m_mover = pet ? pet : this; } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c7244a3dc..973fb9e4c 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8112" + #define REVISION_NR "8113" #endif // __REVISION_NR_H__