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())
|
||||
return false;
|
||||
|
||||
// not BOA item case
|
||||
if (!IsBoundAccountWide())
|
||||
return true;
|
||||
|
||||
// online
|
||||
if (Player* owner = objmgr.GetPlayer(GetOwnerGUID()))
|
||||
{
|
||||
return owner->GetSession()->GetAccountId() != player->GetSession()->GetAccountId();
|
||||
}
|
||||
// offline slow case
|
||||
else
|
||||
{
|
||||
return objmgr.GetPlayerAccountIdByGUID(GetOwnerGUID()) != player->GetSession()->GetAccountId();
|
||||
}
|
||||
// BOA item case
|
||||
if (IsBoundAccountWide())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ItemRequiredTarget::IsFitToRequirements(Unit* pUnitTarget) const
|
||||
|
||||
Reference in New Issue
Block a user