Remove redundant accountid check in Item::IsBindedNotWith. Fixes the issue that BOA items would get stuck in the mail when original sender had deleted their character before the recipient could pick it up.
--HG-- branch : trunk
This commit is contained in:
@@ -1037,20 +1037,11 @@ bool Item::IsBindedNotWith(Player const* player) const
|
|||||||
if (GetOwnerGUID() == player->GetGUID())
|
if (GetOwnerGUID() == player->GetGUID())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// not BOA item case
|
// BOA item case
|
||||||
if (!IsBoundAccountWide())
|
if (IsBoundAccountWide())
|
||||||
return true;
|
return false;
|
||||||
|
|
||||||
// online
|
return true;
|
||||||
if (Player* owner = objmgr.GetPlayer(GetOwnerGUID()))
|
|
||||||
{
|
|
||||||
return owner->GetSession()->GetAccountId() != player->GetSession()->GetAccountId();
|
|
||||||
}
|
|
||||||
// offline slow case
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return objmgr.GetPlayerAccountIdByGUID(GetOwnerGUID()) != player->GetSession()->GetAccountId();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
|
bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
|
||||||
|
|||||||
Reference in New Issue
Block a user