Merge pull request #66 from H0zen/develop21
Fix Unit::SetConfused to work on players.
This commit is contained in:
commit
7b3e65f5c6
@ -8553,7 +8553,7 @@ void Unit::SetFeared(bool apply, ObjectGuid casterGuid, uint32 spellID, uint32 t
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (GetTypeId() == TYPEID_PLAYER)
|
if (GetTypeId() == TYPEID_PLAYER)
|
||||||
{ ((Player*)this)->SetClientControl(this, apply ? 0 : 1); }
|
{ ((Player*)this)->SetClientControl(this, !apply); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
||||||
@ -8566,11 +8566,10 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
|||||||
CastStop(GetObjectGuid() == casterGuid ? spellID : 0);
|
CastStop(GetObjectGuid() == casterGuid ? spellID : 0);
|
||||||
|
|
||||||
if (GetTypeId() == TYPEID_UNIT)
|
if (GetTypeId() == TYPEID_UNIT)
|
||||||
{
|
|
||||||
SetTargetGuid(ObjectGuid());
|
SetTargetGuid(ObjectGuid());
|
||||||
|
|
||||||
GetMotionMaster()->MoveConfused();
|
GetMotionMaster()->MoveConfused();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
|
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED);
|
||||||
@ -8593,7 +8592,7 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (GetTypeId() == TYPEID_PLAYER)
|
if (GetTypeId() == TYPEID_PLAYER)
|
||||||
{ ((Player*)this)->SetClientControl(this, apply ? 0 : 1); }
|
{ ((Player*)this)->SetClientControl(this, !apply); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SetFeignDeath(bool apply, ObjectGuid casterGuid /*= ObjectGuid()*/)
|
void Unit::SetFeignDeath(bool apply, ObjectGuid casterGuid /*= ObjectGuid()*/)
|
||||||
|
@ -385,6 +385,7 @@ void WorldSession::HandleMoveNotActiveMoverOpcode(WorldPacket& recv_data)
|
|||||||
|
|
||||||
if (_player->GetMover()->GetObjectGuid() == old_mover_guid)
|
if (_player->GetMover()->GetObjectGuid() == old_mover_guid)
|
||||||
{
|
{
|
||||||
|
if (_player->GetObjectGuid() != old_mover_guid )
|
||||||
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is %s and should be %s instead of %s",
|
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is %s and should be %s instead of %s",
|
||||||
_player->GetMover()->GetGuidStr().c_str(),
|
_player->GetMover()->GetGuidStr().c_str(),
|
||||||
_player->GetGuidStr().c_str(),
|
_player->GetGuidStr().c_str(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user