diff --git a/game/modules/tome/data/talents/spells/advanced-golemancy.lua b/game/modules/tome/data/talents/spells/advanced-golemancy.lua index a18750a6347d4d95764413b9cf6af65acfa3a286..5ea85ee780fc7659bd182bf376b6acc6a50680e1 100644 --- a/game/modules/tome/data/talents/spells/advanced-golemancy.lua +++ b/game/modules/tome/data/talents/spells/advanced-golemancy.lua @@ -132,6 +132,7 @@ newTalent{ points = 5, no_unlearn_last = true, on_learn = function(self, t) + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem.life_regen = self.alchemy_golem.life_regen + 1 self.alchemy_golem.mana_regen = self.alchemy_golem.mana_regen + 1 self.alchemy_golem.stamina_regen = self.alchemy_golem.stamina_regen + 1 @@ -142,6 +143,7 @@ newTalent{ end end, on_unlearn = function(self, t) + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem.life_regen = self.alchemy_golem.life_regen - 1 self.alchemy_golem.mana_regen = self.alchemy_golem.mana_regen - 1 self.alchemy_golem.stamina_regen = self.alchemy_golem.stamina_regen - 1 diff --git a/game/modules/tome/data/talents/spells/golemancy.lua b/game/modules/tome/data/talents/spells/golemancy.lua index 30daa409f874468a9d0e6854ca4d4acb45122d4f..176ecabf84f1a837b192a5b5ca813753d5b47656 100644 --- a/game/modules/tome/data/talents/spells/golemancy.lua +++ b/game/modules/tome/data/talents/spells/golemancy.lua @@ -341,7 +341,7 @@ newTalent{ if self:getTalentLevelRaw(t) == 1 and not self.innate_alchemy_golem then self:learnTalent(self.T_REFIT_GOLEM, true) end - + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem:learnTalent(Talents.T_WEAPON_COMBAT, true, nil, {no_unlearn=true}) self.alchemy_golem:learnTalent(Talents.T_STAFF_MASTERY, true, nil, {no_unlearn=true}) self.alchemy_golem:learnTalent(Talents.T_KNIFE_MASTERY, true, nil, {no_unlearn=true}) @@ -349,6 +349,7 @@ newTalent{ self.alchemy_golem:learnTalent(Talents.T_EXOTIC_WEAPONS_MASTERY, true, nil, {no_unlearn=true}) end, on_unlearn = function(self, t) + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem:unlearnTalent(Talents.T_WEAPON_COMBAT, nil, nil, {no_unlearn=true}) self.alchemy_golem:unlearnTalent(Talents.T_STAFF_MASTERY, nil, nil, {no_unlearn=true}) self.alchemy_golem:unlearnTalent(Talents.T_KNIFE_MASTERY, nil, nil, {no_unlearn=true}) @@ -381,11 +382,13 @@ newTalent{ require = spells_req2, points = 5, on_learn = function(self, t) + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem:learnTalent(Talents.T_THICK_SKIN, true, nil, {no_unlearn=true}) self.alchemy_golem:learnTalent(Talents.T_GOLEM_ARMOUR, true, nil, {no_unlearn=true}) self.alchemy_golem.healing_factor = (self.alchemy_golem.healing_factor or 1) + 0.1 end, on_unlearn = function(self, t) + if not self.alchemy_golem then return end -- Safety net self.alchemy_golem:unlearnTalent(Talents.T_THICK_SKIN, nil, nil, {no_unlearn=true}) self.alchemy_golem:unlearnTalent(Talents.T_GOLEM_ARMOUR, nil, nil, {no_unlearn=true}) self.alchemy_golem.healing_factor = (self.alchemy_golem.healing_factor or 1) - 0.1