Fixes and cleanups in loot code. Author: VladimirMangos

* Move not-normal loot tables generation in single place (Loot::FillLoot function) for group and non group case.
    * Simplify LootView code.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-08 21:45:31 -06:00
parent a908f8d002
commit 11b9bd42f7
6 changed files with 86 additions and 99 deletions

View File

@@ -487,7 +487,7 @@ void GameObject::Delete()
AddObjectToRemoveList();
}
void GameObject::getFishLoot(Loot *fishloot)
void GameObject::getFishLoot(Loot *fishloot, Player* loot_owner)
{
fishloot->clear();
@@ -495,10 +495,10 @@ void GameObject::getFishLoot(Loot *fishloot)
// if subzone loot exist use it
if(LootTemplates_Fishing.HaveLootFor(subzone))
fishloot->FillLoot(subzone, LootTemplates_Fishing, NULL);
fishloot->FillLoot(subzone, LootTemplates_Fishing, loot_owner,true);
// else use zone loot
else
fishloot->FillLoot(GetZoneId(), LootTemplates_Fishing, NULL);
fishloot->FillLoot(GetZoneId(), LootTemplates_Fishing, loot_owner,true);
}
void GameObject::SaveToDB()