Core: Codestyle clean-up
"pl"->"player" Note: codestyle methods needs maintained, Player* player. still to do properly clean-up chat.cpp.
This commit is contained in:
@@ -436,8 +436,8 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
|
||||
roundRobinPlayer = lootOwner->GetGUID();
|
||||
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
if (Player* pl = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
|
||||
FillNotNormalLootFor(pl, pl->IsAtGroupRewardDistance(lootOwner));
|
||||
if (Player* player = itr->getSource()) // should actually be looted object instead of lootOwner but looter has to be really close so doesnt really matter
|
||||
FillNotNormalLootFor(player, player->IsAtGroupRewardDistance(lootOwner));
|
||||
|
||||
for (uint8 i = 0; i < items.size(); ++i)
|
||||
{
|
||||
@@ -453,28 +453,28 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
|
||||
return true;
|
||||
}
|
||||
|
||||
void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting)
|
||||
void Loot::FillNotNormalLootFor(Player* player, bool presentAtLooting)
|
||||
{
|
||||
uint32 plguid = pl->GetGUIDLow();
|
||||
uint32 plguid = player->GetGUIDLow();
|
||||
|
||||
QuestItemMap::const_iterator qmapitr = PlayerQuestItems.find(plguid);
|
||||
if (qmapitr == PlayerQuestItems.end())
|
||||
FillQuestLoot(pl);
|
||||
FillQuestLoot(player);
|
||||
|
||||
qmapitr = PlayerFFAItems.find(plguid);
|
||||
if (qmapitr == PlayerFFAItems.end())
|
||||
FillFFALoot(pl);
|
||||
FillFFALoot(player);
|
||||
|
||||
qmapitr = PlayerNonQuestNonFFAConditionalItems.find(plguid);
|
||||
if (qmapitr == PlayerNonQuestNonFFAConditionalItems.end())
|
||||
FillNonQuestNonFFAConditionalLoot(pl, presentAtLooting);
|
||||
FillNonQuestNonFFAConditionalLoot(player, presentAtLooting);
|
||||
|
||||
// if not auto-processed player will have to come and pick it up manually
|
||||
if (!presentAtLooting)
|
||||
return;
|
||||
|
||||
// Process currency items
|
||||
uint32 max_slot = GetMaxSlotInLootFor(pl);
|
||||
uint32 max_slot = GetMaxSlotInLootFor(player);
|
||||
LootItem const* item = NULL;
|
||||
uint32 itemsSize = uint32(items.size());
|
||||
for (uint32 i = 0; i < max_slot; ++i)
|
||||
@@ -484,10 +484,10 @@ void Loot::FillNotNormalLootFor(Player* pl, bool presentAtLooting)
|
||||
else
|
||||
item = &quest_items[i-itemsSize];
|
||||
|
||||
if (!item->is_looted && item->freeforall && item->AllowedForPlayer(pl))
|
||||
if (!item->is_looted && item->freeforall && item->AllowedForPlayer(player))
|
||||
if (ItemTemplate const* proto = sObjectMgr->GetItemTemplate(item->itemid))
|
||||
if (proto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
pl->StoreLootItem(i, this);
|
||||
player->StoreLootItem(i, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,8 +592,8 @@ void Loot::NotifyItemRemoved(uint8 lootIndex)
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
if (Player* pl = ObjectAccessor::FindPlayer(*i))
|
||||
pl->SendNotifyLootItemRemoved(lootIndex);
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*i))
|
||||
player->SendNotifyLootItemRemoved(lootIndex);
|
||||
else
|
||||
PlayersLooting.erase(i);
|
||||
}
|
||||
@@ -607,8 +607,8 @@ void Loot::NotifyMoneyRemoved()
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
if (Player* pl = ObjectAccessor::FindPlayer(*i))
|
||||
pl->SendNotifyLootMoneyRemoved();
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*i))
|
||||
player->SendNotifyLootMoneyRemoved();
|
||||
else
|
||||
PlayersLooting.erase(i);
|
||||
}
|
||||
@@ -626,9 +626,9 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
|
||||
{
|
||||
i_next = i;
|
||||
++i_next;
|
||||
if (Player* pl = ObjectAccessor::FindPlayer(*i))
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*i))
|
||||
{
|
||||
QuestItemMap::const_iterator pq = PlayerQuestItems.find(pl->GetGUIDLow());
|
||||
QuestItemMap::const_iterator pq = PlayerQuestItems.find(player->GetGUIDLow());
|
||||
if (pq != PlayerQuestItems.end() && pq->second)
|
||||
{
|
||||
// find where/if the player has the given item in it's vector
|
||||
@@ -640,7 +640,7 @@ void Loot::NotifyQuestItemRemoved(uint8 questIndex)
|
||||
break;
|
||||
|
||||
if (j < pql.size())
|
||||
pl->SendNotifyLootItemRemoved(items.size()+j);
|
||||
player->SendNotifyLootItemRemoved(items.size()+j);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user