mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Fixes and cleanups in loot code.
* Move not-normal loot tables generation in single place (Loot::FillLoot function) for group and non group case. * Simplify LootView code.
This commit is contained in:
parent
fb432a0f36
commit
7d63f4ce02
6 changed files with 86 additions and 99 deletions
|
|
@ -480,7 +480,7 @@ void GameObject::Delete()
|
|||
AddObjectToRemoveList();
|
||||
}
|
||||
|
||||
void GameObject::getFishLoot(Loot *fishloot)
|
||||
void GameObject::getFishLoot(Loot *fishloot, Player* loot_owner)
|
||||
{
|
||||
fishloot->clear();
|
||||
|
||||
|
|
@ -488,10 +488,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue