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())
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