ServUO Loot Generation: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
#** If random failed to create, do another check against players luck | #** If random failed to create, do another check against players luck | ||
#** If random succeeds to create, call LootPackEntry.Construct (from, luckchance, spawning) | #** If random succeeds to create, call LootPackEntry.Construct (from, luckchance, spawning) | ||
587 | |||
# Lootpack.cs LootPackEntry.Construct (Mobile from, int luckChance, bool spawning) | |||
#* Choose an item type to make from LootPackEntry.items[] | |||
#* calls Mutate(from, luckChance, item.Construct(SEE BELOW)) | |||
1000 | |||
# Lootpack.cs LootPackItem.Construct (bool inTokuno, bool isMondain, bool isStygian) | |||
#* will pick a random item from the BaseType depending on if it's Tokuno, Mondain, or Stygian | |||
Revision as of 23:56, 3 January 2024
Loot Generation Order
- BaseCreature.cs, OnBeforeDeath()
- calls GenerateLoot(false)
- BaseCreature.cs, GenerateLoot(bool spawning)
- If !spawning then m_KillersLuck = killer/highest-damage-dealers luck
- calls BaseCreature.cs GenerateLoot()
- MOBILE.cs has public override void GenerateLoot() which will AddLoot() all LootPack
- if m_Paragon (mobile is paragon) then add extra AddLoot() based on fame (from Meager to UltraRich)
- BaseCreature.cs, AddLoot(LootPack pack)
- calls LootPack.cs pack.Generate(this, backpack, m_spawning, m_KillersLuck)
- LootPack.cs, Generate (Mobile from, Container cont, bool spawning, int luckChance)
- for each item (LootPackEntry) in the LootPack check if we should create the item. If Items spawn chance * 100 > random(10000 ) create item
- If random failed to create, do another check against players luck
- If random succeeds to create, call LootPackEntry.Construct (from, luckchance, spawning)
- for each item (LootPackEntry) in the LootPack check if we should create the item. If Items spawn chance * 100 > random(10000 ) create item
587
- Lootpack.cs LootPackEntry.Construct (Mobile from, int luckChance, bool spawning)
- Choose an item type to make from LootPackEntry.items[]
- calls Mutate(from, luckChance, item.Construct(SEE BELOW))
1000
- Lootpack.cs LootPackItem.Construct (bool inTokuno, bool isMondain, bool isStygian)
- will pick a random item from the BaseType depending on if it's Tokuno, Mondain, or Stygian