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:
Machiavelli
2010-06-25 15:22:06 +02:00
parent 456c6291ab
commit 66535c3700
+5 -14
View File
@@ -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