From 26a38bee45c768e1f4fab8521cb0b831e60ba075 Mon Sep 17 00:00:00 2001 From: DarkGod <darkgod@net-core.org> Date: Sun, 20 Oct 2019 00:32:10 +0200 Subject: [PATCH] callbackOnCloned --- game/modules/tome/class/Actor.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index c32e80fb15..f14def0ce8 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2905,8 +2905,14 @@ end function _M:cloneActor(post_copy, alt_nodes) local a, post_copy = engine.Actor.cloneActor(self, post_copy, alt_nodes) a.immune_possession = 1 + a:fireTalentCheck("callbackOnCloned", "actor", self, post_copy, alt_nodes) return a, post_copy end +function _M:cloneFull(post_copy) + local a = engine.Actor.cloneFull(self, post_copy) + a:fireTalentCheck("callbackOnCloned", "full", self, post_copy) + return a +end --- Remove certain effects when cloned function _M:removeTimedEffectsOnClone() @@ -5812,6 +5818,7 @@ local sustainCallbackCheck = { callbackOnPartyAdd = "talents_on_party_add", callbackOnPartyRemove = "talents_on_party_remove", callbackOnTargeted = "talents_on_targeted", + callbackOnCloned = "talents_on_cloned", } _M.sustainCallbackCheck = sustainCallbackCheck -- GitLab