mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user