aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <none@none>2010-06-25 15:22:06 +0200
committerMachiavelli <none@none>2010-06-25 15:22:06 +0200
commit66535c37001e9d59715aa989a52bae1859ae7416 (patch)
tree84db5f14e2627dc620d397c87ac3f388cf6345da /src
parent456c6291ab70f2f3182a4d63408c45099eedbbdd (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Item/Item.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp
index 60957b66e32..52d9daeb4c8 100644
--- a/src/server/game/Entities/Item/Item.cpp
+++ b/src/server/game/Entities/Item/Item.cpp
@@ -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