From 018c1c37907fd8ca0ca68e6fb8ed312d3ad62c45 Mon Sep 17 00:00:00 2001
From: DarkGod <darkgod@net-core.org>
Date: Wed, 5 Apr 2017 20:57:29 +0200
Subject: [PATCH] Fixed Chants and Hymns for escorts

---
 game/engines/default/engine/interface/ActorTalents.lua | 3 +++
 game/modules/tome/data/talents/celestial/celestial.lua | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/game/engines/default/engine/interface/ActorTalents.lua b/game/engines/default/engine/interface/ActorTalents.lua
index 02b6b339d2..5b21f8f95b 100644
--- a/game/engines/default/engine/interface/ActorTalents.lua
+++ b/game/engines/default/engine/interface/ActorTalents.lua
@@ -815,6 +815,9 @@ function _M:updateTalentTypeMastery(tt)
 			end
 		end
 	end
+	if self.talents_types_def[tt] and self.talents_types_def[tt].on_mastery_change then
+		self.talents_types_def[tt].on_mastery_change(self, self:getTalentTypeMastery(tt), tt)
+	end
 end
 
 --- Return talent definition from id
diff --git a/game/modules/tome/data/talents/celestial/celestial.lua b/game/modules/tome/data/talents/celestial/celestial.lua
index 88e4bf71c5..9d067e7c6b 100644
--- a/game/modules/tome/data/talents/celestial/celestial.lua
+++ b/game/modules/tome/data/talents/celestial/celestial.lua
@@ -20,7 +20,7 @@
 -- Corruptions
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/guardian", name = "guardian", min_lev = 10, description = "Your devotion grants you additional protection." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants", name = "chants", generic = true, description = "Chant the glory of the Sun." }
-newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants-chants", name = "chants", generic = true, description = "Chant the glory of the Sun." }
+newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/chants-chants", name = "chants", generic = true, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/chants") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/chants"] end end, description = "Chant the glory of the Sun." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/light", name = "light", generic = true, description = "Invoke the power of the light to heal and mend." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/combat", name = "combat", description = "Your devotion allows you to combat your foes with indomitable determination." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/radiance", name = "radiance", description = "You channel the light of the sun through your body." }
@@ -30,7 +30,7 @@ newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestia
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/glyphs", name = "glyphs", min_lev = 10, description = "Bind the brilliant powers into glyphs to trap your foes." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/twilight", name = "twilight", description = "Stand between the darkness and the light, harnessing both." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/star-fury", name = "star fury", description = "Call the fury of the Stars and the Moon to destroy your foes." }
-newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns", name = "hymns", generic = true, description = "Chant the glory of the Moon." }
+newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns", name = "hymns", generic = true,, on_mastery_change = function(self, m, tt) if self:knowTalentType("celestial/hymns") ~= nil then self.talents_types_mastery[tt] = self.talents_types_mastery["celestial/hymns"] end end, description = "Chant the glory of the Moon." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/hymns-hymns", name = "hymns", generic = true, description = "Chant the glory of the Moon." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/circles", name = "circles", min_lev = 10, description = "Bind the power of the Moon into circles at your feet." }
 newTalentType{ allow_random=true, no_silence=true, is_spell=true, type="celestial/eclipse", name = "eclipse", description = "The moment of the Eclipse is the moment of Truth, when Sun and Moon are in tandem and the energies of the world hang in the balance. Intense focus allows the greatest Anorithils to harness these energies to unleash devastating forces..." }
-- 
GitLab