mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 21:32:52 +01:00
Scripts/Spells: Moved creature script to spell script
This commit is contained in:
1
sql/updates/world/master/2023_08_20_00_world.sql
Normal file
1
sql/updates/world/master/2023_08_20_00_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=47649;
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "Containers.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "PassiveAI.h"
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
@@ -514,21 +513,18 @@ class spell_dru_efflorescence : public SpellScript
|
||||
GetCaster()->RemoveAreaTrigger(GetSpellInfo()->Id);
|
||||
}
|
||||
|
||||
void InitSummon()
|
||||
{
|
||||
for (SpellLogEffectGenericVictimParams const& summonedObject : GetSpell()->GetExecuteLogEffectTargets(SPELL_EFFECT_SUMMON, &SpellLogEffect::GenericVictimTargets))
|
||||
if (Unit* summon = ObjectAccessor::GetCreature(*GetCaster(), summonedObject.Victim))
|
||||
summon->CastSpell(summon, SPELL_DRUID_EFFLORESCENCE_AURA,
|
||||
CastSpellExtraArgs().SetTriggeringSpell(GetSpell()));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectLaunch += SpellEffectFn(spell_dru_efflorescence::RemoveOldAreaTrigger, EFFECT_2, SPELL_EFFECT_CREATE_AREATRIGGER);
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_dru_efflorescence : public NullCreatureAI
|
||||
{
|
||||
explicit npc_dru_efflorescence(Creature* creature) : NullCreatureAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
me->CastSpell(me, SPELL_DRUID_EFFLORESCENCE_AURA);
|
||||
AfterCast += SpellCastFn(spell_dru_efflorescence::InitSummon);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1942,7 +1938,6 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterSpellScript(spell_dru_eclipse_aura);
|
||||
RegisterSpellScript(spell_dru_eclipse_dummy);
|
||||
RegisterSpellScript(spell_dru_eclipse_ooc);
|
||||
RegisterCreatureAI(npc_dru_efflorescence);
|
||||
RegisterSpellScript(spell_dru_efflorescence);
|
||||
RegisterSpellScript(spell_dru_efflorescence_dummy);
|
||||
RegisterSpellScript(spell_dru_efflorescence_heal);
|
||||
|
||||
Reference in New Issue
Block a user