Skip to content
Snippets Groups Projects
Commit 00953ae2 authored by DarkGod's avatar DarkGod
Browse files

New talent/effect fields "callbackOnDeath" and "callbackOnKill"

parent 403d2dae
No related branches found
No related tags found
No related merge requests found
......@@ -2397,6 +2397,8 @@ function _M:die(src, death_note)
return
end
if self:fireTalentCheck("callbackOnDeath", src, death_note) then return end
mod.class.interface.ActorLife.die(self, src, death_note)
-- Trigegr on_die effects if any
......@@ -2658,6 +2660,8 @@ function _M:die(src, death_note)
end)
end
if src.fireTalentCheck then src:fireTalentCheck("callbackOnKill", self, death_note) end
if src and ((src.resolveSource and src:resolveSource().player) or src.player) then
-- Achievements
local p = game.party:findMember{main=true}
......@@ -4070,6 +4074,8 @@ local sustainCallbackCheck = {
callbackOnActBase = "talents_on_act_base",
callbackOnMove = "talents_on_move",
callbackOnRest = "talents_on_rest",
callbackOnDeath = "talents_on_death",
callbackOnKill = "talents_on_kill",
callbackOnMeleeAttack = "talents_on_melee_attack",
callbackOnMeleeHit = "talents_on_melee_hit",
callbackOnMeleeMiss = "talents_on_melee_miss",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment