diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index eedda022b74e29d82c843028c2377aef3aefd5c4..4673ea720f9140a2b844ee6bc72fd18563ed8e9a 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 9569d931184ac94073b41f4c071fb48aed45d7e8..120fd0f028a545de03753cc791139541a56f9639 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"}