Core/Items: fix compile error from previous commit. use item instead of bag.
This commit is contained in:
@@ -17606,7 +17606,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
|
|||||||
uint32 zoneId = GetZoneId();
|
uint32 zoneId = GetZoneId();
|
||||||
|
|
||||||
std::map<uint64, Bag*> bagMap; // fast guid lookup for bags
|
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;
|
std::list<Item*> problematicItems;
|
||||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||||
|
|
||||||
@@ -17659,7 +17659,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
|
|||||||
else
|
else
|
||||||
if (IsBagPos(item->GetPos()))
|
if (IsBagPos(item->GetPos()))
|
||||||
if (Bag* pBag = item->ToBag())
|
if (Bag* pBag = item->ToBag())
|
||||||
invalidBagMap[item->GetGUIDLow()] = pBag;
|
invalidBagMap[item->GetGUIDLow()] = item;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -17673,8 +17673,12 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
|
|||||||
if (err == EQUIP_ERR_OK)
|
if (err == EQUIP_ERR_OK)
|
||||||
item = StoreItem(dest, item, true);
|
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;
|
err = EQUIP_ERR_INT_BAG_ERROR;
|
||||||
|
}
|
||||||
else
|
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?",
|
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?",
|
||||||
|
|||||||
Reference in New Issue
Block a user