From d01f5af2f2c268797688c630fe4d32bcf6158166 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sun, 20 Sep 2015 14:52:28 +0200 Subject: [PATCH] new callback callbackOnDeathbox --- game/modules/tome/class/Actor.lua | 1 + game/modules/tome/dialogs/DeathDialog.lua | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index eedda022b7..4673ea720f 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -4820,6 +4820,7 @@ local sustainCallbackCheck = { callbackOnRun = "talents_on_run", callbackOnLevelup = "talents_on_levelup", callbackOnDeath = "talents_on_death", + callbackOnDeathbox = "talents_on_deathbox", callbackOnSummonDeath = "talents_on_summon_death", callbackOnKill = "talents_on_kill", callbackOnMeleeAttack = "talents_on_melee_attack", diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua index 9569d93118..120fd0f028 100644 --- a/game/modules/tome/dialogs/DeathDialog.lua +++ b/game/modules/tome/dialogs/DeathDialog.lua @@ -191,7 +191,9 @@ function _M:use(item) if not item then return end local act = item.action - if act == "exit" then + if type(act) == "function" then + act() + elseif act == "exit" then if item.subaction == "none" then util.showMainMenu() elseif item.subaction == "restart" then @@ -311,6 +313,8 @@ function _M:generateList() self.possible_items.consume = true end end) + + self.actor:fireTalentCheck("callbackOnDeathbox", self, list) end list[#list+1] = {name=(not profile.auth and "Message Log" or "Message/Chat log (allows to talk)"), action="log"} -- GitLab