aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LootHandler.cpp
diff options
context:
space:
mode:
authorleak <leak@bitmx.net>2012-03-14 18:51:51 +0100
committerleak <leak@bitmx.net>2012-03-14 18:51:51 +0100
commit2a5caef4a64645f788f6d3e33d6159725358f1dd (patch)
tree82978b70c72e756d5252bbce68fdec359e71f423 /src/server/game/Handlers/LootHandler.cpp
parentb02a012b4784e2073593a75315616e093327e738 (diff)
Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee6336610daab304959909b2f6397287.
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rwxr-xr-xsrc/server/game/Handlers/LootHandler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index b4d6db5e80c..8e4b41a9be4 100755
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -55,15 +55,15 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
}
else if (IS_ITEM_GUID(lguid))
{
- Item* item = player->GetItemByGuid(lguid);
+ Item* pItem = player->GetItemByGuid(lguid);
- if (!item)
+ if (!pItem)
{
player->SendLootRelease(lguid);
return;
}
- loot = &item->loot;
+ loot = &pItem->loot;
}
else if (IS_CORPSE_GUID(lguid))
{
@@ -357,29 +357,29 @@ void WorldSession::DoLootRelease(uint64 lguid)
}
else if (IS_ITEM_GUID(lguid))
{
- Item* item = player->GetItemByGuid(lguid);
- if (!item)
+ Item* pItem = player->GetItemByGuid(lguid);
+ if (!pItem)
return;
- ItemTemplate const* proto = item->GetTemplate();
+ ItemTemplate const* proto = pItem->GetTemplate();
// destroy only 5 items from stack in case prospecting and milling
if (proto->Flags & (ITEM_PROTO_FLAG_PROSPECTABLE | ITEM_PROTO_FLAG_MILLABLE))
{
- item->m_lootGenerated = false;
- item->loot.clear();
+ pItem->m_lootGenerated = false;
+ pItem->loot.clear();
- uint32 count = item->GetCount();
+ uint32 count = pItem->GetCount();
// >=5 checked in spell code, but will work for cheating cases also with removing from another stacks.
if (count > 5)
count = 5;
- player->DestroyItemCount(item, count, true);
+ player->DestroyItemCount(pItem, count, true);
}
else
// FIXME: item must not be deleted in case not fully looted state. But this pre-request implement loot saving in DB at item save. Or cheating possible.
- player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
+ player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
return; // item can be looted only single player
}
else