fix(Scripts/Spells): - Weapon Coating Enchant (#22060)

Righteous and Blessed Weapon Coating will now properly proc.
This commit is contained in:
avarishd
2025-05-24 21:49:59 +03:00
committed by GitHub
parent 440ffc3b03
commit ae48c37914
2 changed files with 35 additions and 16 deletions

View File

@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "PassiveAI.h"
#include "Pet.h"
@@ -23,19 +24,6 @@
#include "SpellInfo.h"
#include "SpellScript.h"
#include "SpellScriptLoader.h"
/* ScriptData
SDName: Isle_of_Queldanas
SD%Complete: 100
SDComment: Quest support: 11524, 11525, 11532, 11533, 11542, 11543, 11541
SDCategory: Isle Of Quel'Danas
EndScriptData */
/* ContentData
npc_converted_sentry
npc_greengill_slave
EndContentData */
/*###### OUR: ######*/
enum ThalorienNpcs
{
@@ -677,13 +665,31 @@ public:
};
};
// 45396, 45398 - Weapon Coating Enchant
class spell_gen_weapon_coating_enchant : public AuraScript
{
PrepareAuraScript(spell_gen_weapon_coating_enchant);
bool CheckProc(ProcEventInfo& eventInfo)
{
Unit* caster = eventInfo.GetActor();
if (!caster)
return false;
return (caster->GetZoneId() == AREA_ISLE_OF_QUEL_DANAS || caster->GetZoneId() == AREA_SUNWELL_PLATEAU || caster->GetZoneId() == AREA_MAGISTERS_TERRACE);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_gen_weapon_coating_enchant::CheckProc);
}
};
void AddSC_isle_of_queldanas()
{
// OUR:
new npc_bh_thalorien_dawnseeker();
RegisterSpellScript(spell_bh_cleanse_quel_delar);
new npc_grand_magister_rommath();
// THEIR:
new npc_greengill_slave();
RegisterSpellScript(spell_gen_weapon_coating_enchant);
}