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.go15
1 files changed, 11 insertions, 4 deletions
diff --git a/internal/game/combat_mob.go b/internal/game/combat_mob.go
index e06e307..5558578 100644
--- a/internal/game/combat_mob.go
+++ b/internal/game/combat_mob.go
@@ -212,10 +212,17 @@ func (g *Game) endCombat(sess *net.Session, p *player.Player, mob *world.MobInst
respawnTicks = engine.ToTicks(30)
}
instanceID := mob.InstanceID
- g.Ticks.Subscribe(respawnTicks, func() bool {
- g.respawnMob(instanceID)
- return false
- })
+ if mob.SpawnedByTrigger {
+ g.Ticks.Subscribe(10, func() bool {
+ g.MobStore.RemoveInstance(instanceID)
+ return false
+ })
+ } else {
+ g.Ticks.Subscribe(respawnTicks, func() bool {
+ g.respawnMob(instanceID)
+ return false
+ })
+ }
g.writePrompt(sess)
}
}