aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_mob.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-01 18:36:21 -0400
committerhistoria <[not public]>2026-07-01 18:36:21 -0400
commit78b522d57a9ebc691e075523910d7cdaa06b6493 (patch)
treeb2a68397e0cecc5abb56e5ae451c05a9435cc5fe /internal/game/combat_mob.go
parente6b4cb9f5816c6ee239233bc85f74ee446a161c2 (diff)
downloadthehouseoficarus-78b522d57a9ebc691e075523910d7cdaa06b6493.tar.gz
feat: shop system removed from talk system, added per-item restock and variable pricing
Diffstat (limited to 'internal/game/combat_mob.go')
-rw-r--r--internal/game/combat_mob.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/game/combat_mob.go b/internal/game/combat_mob.go
index 4cdd27b..c64e393 100644
--- a/internal/game/combat_mob.go
+++ b/internal/game/combat_mob.go
@@ -192,8 +192,10 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
}
if len(mob.Drops.Loot) > 0 {
- entry := behavior.ResolveDrop(g.DataDir, mob.Drops.Loot)
- if entry != nil && entry.ItemID != "" {
+ for _, entry := range behavior.ResolveDropList(g.DataDir, mob.Drops.Loot) {
+ if entry.ItemID == "" {
+ continue
+ }
qty := entry.Quantity
if qty <= 0 {
qty = 1