Core/Loot: Fixed currency items being automatically distributed to players outside the instance, now if player is outside he will still be able to claim his emblems but will have to loot it manually

Closes issue #4005.

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-09-14 16:56:30 +02:00
parent 61bbd284de
commit 74ca173923
2 changed files with 9 additions and 5 deletions
+8 -4
View File
@@ -437,8 +437,8 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
roundRobinPlayer = lootOwner->GetGUID();
for (GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
if (Player* pl = itr->getSource())
FillNotNormalLootFor(pl);
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));
for (uint8 i = 0; i < items.size(); ++i)
{
@@ -449,12 +449,12 @@ bool Loot::FillLoot(uint32 lootId, LootStore const& store, Player* lootOwner, bo
}
// ... for personal loot
else
FillNotNormalLootFor(lootOwner);
FillNotNormalLootFor(lootOwner, true);
return true;
}
void Loot::FillNotNormalLootFor(Player* pl)
void Loot::FillNotNormalLootFor(Player* pl, bool withCurrency)
{
uint32 plguid = pl->GetGUIDLow();
@@ -470,6 +470,10 @@ void Loot::FillNotNormalLootFor(Player* pl)
if (qmapitr == PlayerNonQuestNonFFAConditionalItems.end())
FillNonQuestNonFFAConditionalLoot(pl);
// if not auto-processed player will have to come and pick it up manually
if (!withCurrency)
return;
// Process currency items
uint32 max_slot = GetMaxSlotInLootFor(pl);
uint32 itemId = 0;
+1 -1
View File
@@ -333,7 +333,7 @@ struct Loot
bool hasOverThresholdItem() const;
private:
void FillNotNormalLootFor(Player* player);
void FillNotNormalLootFor(Player* player, bool withCurrency);
QuestItemList* FillFFALoot(Player* player);
QuestItemList* FillQuestLoot(Player* player);
QuestItemList* FillNonQuestNonFFAConditionalLoot(Player* player);