aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-05-08 10:06:38 -0400
committerKandera <KanderaDev@gmail.com>2012-05-08 10:06:38 -0400
commit5fc2c8cda37151520cd1ac26def420c978dc54dd (patch)
tree8717e601badd281ac5723e6a57e6d04024157450 /src
parent6c15bee88415006efe7111b6f7febd70b9a2ca50 (diff)
Core/Items: fix compile error from previous commit. use item instead of bag.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index c285d8df788..d38489ef5a9 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -17606,7 +17606,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
uint32 zoneId = GetZoneId();
std::map<uint64, Bag*> bagMap; // fast guid lookup for bags
- std::map<uint64, Bag*> invalidBagMap; // fast guid lookup for bags
+ std::map<uint64, Item*> invalidBagMap; // fast guid lookup for bags
std::list<Item*> problematicItems;
SQLTransaction trans = CharacterDatabase.BeginTransaction();
@@ -17659,7 +17659,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
else
if (IsBagPos(item->GetPos()))
if (Bag* pBag = item->ToBag())
- invalidBagMap[item->GetGUIDLow()] = pBag;
+ invalidBagMap[item->GetGUIDLow()] = item;
}
else
{
@@ -17673,8 +17673,12 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
if (err == EQUIP_ERR_OK)
item = StoreItem(dest, item, true);
}
- else if (invalidBagMap.find(bagGuid) != invalidBagMap.end() && std::find(problematicItems.begin(),problematicItems.end(),(*invalidBagMap.find(bagGuid))))
+ else if (invalidBagMap.find(bagGuid) != invalidBagMap.end())
+ {
+ std::map<uint64, Item*>::iterator itr = invalidBagMap.find(bagGuid);
+ if (std::find(problematicItems.begin(),problematicItems.end(),itr->second) != problematicItems.end())
err = EQUIP_ERR_INT_BAG_ERROR;
+ }
else
{
sLog->outError("Player::_LoadInventory: player (GUID: %u, name: '%s') has item (GUID: %u, entry: %u) which doesnt have a valid bag (Bag GUID: %u, slot: %u). Possible cheat?",