mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons)
This commit is contained in:
@@ -1120,7 +1120,7 @@ void GameObject::Use(Unit* user)
|
||||
|
||||
if (itr->second)
|
||||
{
|
||||
if (Player* ChairUser = sObjectMgr->GetPlayer(itr->second))
|
||||
if (Player* ChairUser = ObjectAccessor::FindPlayer(itr->second))
|
||||
if (ChairUser->IsSitState() && ChairUser->getStandState() != UNIT_STAND_STATE_SIT && ChairUser->GetExactDist2d(x_i, y_i) < 0.1f)
|
||||
continue; // This seat is already occupied by ChairUser. NOTE: Not sure if the ChairUser->getStandState() != UNIT_STAND_STATE_SIT check is required.
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user