aboutsummaryrefslogtreecommitdiff
path: root/internal/game/tick.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/tick.go')
-rw-r--r--internal/game/tick.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/game/tick.go b/internal/game/tick.go
index f326ad8..7567ca7 100644
--- a/internal/game/tick.go
+++ b/internal/game/tick.go
@@ -198,3 +198,18 @@ func (g *Game) legalMobExits(inst *world.MobInstance) []int {
}
return legal
}
+
+func (g *Game) ConsumeTick() {
+ if g.Hub == nil {
+ return
+ }
+ for _, sess := range g.Hub.AllSessions() {
+ p, ok := sess.Player.(*player.Player)
+ if !ok || p == nil {
+ continue
+ }
+ if p.ConsumeCooldown > 0 {
+ p.ConsumeCooldown--
+ }
+ }
+}