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)
|
||||
{ ((Player*)this)->SetClientControl(this, apply ? 0 : 1); }
|
||||
{ ((Player*)this)->SetClientControl(this, !apply); }
|
||||
}
|
||||
|
||||
void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
||||
@ -8566,10 +8566,9 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
||||
CastStop(GetObjectGuid() == casterGuid ? spellID : 0);
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
SetTargetGuid(ObjectGuid());
|
||||
GetMotionMaster()->MoveConfused();
|
||||
}
|
||||
SetTargetGuid(ObjectGuid());
|
||||
|
||||
GetMotionMaster()->MoveConfused();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -8593,7 +8592,7 @@ void Unit::SetConfused(bool apply, ObjectGuid casterGuid, uint32 spellID)
|
||||
}
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{ ((Player*)this)->SetClientControl(this, apply ? 0 : 1); }
|
||||
{ ((Player*)this)->SetClientControl(this, !apply); }
|
||||
}
|
||||
|
||||
void Unit::SetFeignDeath(bool apply, ObjectGuid casterGuid /*= ObjectGuid()*/)
|
||||
|
@ -385,10 +385,11 @@ void WorldSession::HandleMoveNotActiveMoverOpcode(WorldPacket& recv_data)
|
||||
|
||||
if (_player->GetMover()->GetObjectGuid() == old_mover_guid)
|
||||
{
|
||||
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is %s and should be %s instead of %s",
|
||||
_player->GetMover()->GetGuidStr().c_str(),
|
||||
_player->GetGuidStr().c_str(),
|
||||
old_mover_guid.GetString().c_str());
|
||||
if (_player->GetObjectGuid() != old_mover_guid )
|
||||
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is %s and should be %s instead of %s",
|
||||
_player->GetMover()->GetGuidStr().c_str(),
|
||||
_player->GetGuidStr().c_str(),
|
||||
old_mover_guid.GetString().c_str());
|
||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user