mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[8113] Fixed setting mover for Posses/Charm auras and Vehicle enter/exit.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
d17a49f6dc
commit
7c5f254012
5 changed files with 7 additions and 4 deletions
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8112"
|
||||
#define REVISION_NR "8113"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue