aboutsummaryrefslogtreecommitdiff
path: root/internal/game/combat_mob.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/combat_mob.go')
-rw-r--r--internal/game/combat_mob.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/game/combat_mob.go b/internal/game/combat_mob.go
index a3fc040..0395049 100644
--- a/internal/game/combat_mob.go
+++ b/internal/game/combat_mob.go
@@ -217,6 +217,11 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
g.announceKill(sess, p, mob, isTask)
g.awardKillDrops(sess, p, mob, isTask)
+ // On Kill fires for both combat kills and task-mob completion (draining a
+ // task mob's HP to zero is the "kill" that completes the work). itemMatch
+ // is the "wielding" gate — on_kill entries with an item_id only fire if
+ // the player currently has that item equipped in a weapon-hand slot.
+ g.applyInteraction(sess, p, mob.OnKill, p.RoomID, true, p.IsWielding)
g.scheduleMobRespawn(mob)
g.writePrompt(sess)
}