feat(Scripts/Spells): Move to spell scripts Deathbolt (#11100)
* . * Update zone_sholazar_basin.cpp * Update SpellEffects.cpp
This commit is contained in:
committed by
GitHub
parent
43709f0120
commit
395eed4045
@@ -0,0 +1,4 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1647862471388543345');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_q12611_deathbolt';
|
||||||
|
INSERT INTO `spell_script_names` VALUES (51854,'spell_q12611_deathbolt');
|
||||||
@@ -3923,19 +3923,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
|||||||
m_caster->TextEmote(buf);
|
m_caster->TextEmote(buf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Deathbolt from Thalgran Blightbringer
|
|
||||||
// reflected by Freya's Ward
|
|
||||||
// Retribution by Sevenfold Retribution
|
|
||||||
case 51854:
|
|
||||||
{
|
|
||||||
if (!unitTarget)
|
|
||||||
return;
|
|
||||||
if (unitTarget->HasAura(51845))
|
|
||||||
unitTarget->CastSpell(m_caster, 51856, true);
|
|
||||||
else
|
|
||||||
m_caster->CastSpell(unitTarget, 51855, true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 52173: // Coyote Spirit Despawn
|
case 52173: // Coyote Spirit Despawn
|
||||||
case 60243: // Blood Parrot Despawn
|
case 60243: // Blood Parrot Despawn
|
||||||
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
|
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
|
||||||
|
|||||||
@@ -15,19 +15,6 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Sholazar_Basin
|
|
||||||
SD%Complete: 100
|
|
||||||
SDComment: Quest support: 12570, 12573, 12621.
|
|
||||||
SDCategory: Sholazar_Basin
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
/* ContentData
|
|
||||||
npc_injured_rainspeaker_oracle
|
|
||||||
npc_vekjik
|
|
||||||
avatar_of_freya
|
|
||||||
EndContentData */
|
|
||||||
|
|
||||||
#include "CombatAI.h"
|
#include "CombatAI.h"
|
||||||
#include "PassiveAI.h"
|
#include "PassiveAI.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
@@ -1505,6 +1492,38 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ReturnedSevenfold
|
||||||
|
{
|
||||||
|
SPELL_FREYAS_WARD = 51845,
|
||||||
|
SPELL_SEVENFOLD_RETRIBUTION = 51856,
|
||||||
|
SPELL_DEATHBOLT = 51855
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_q12611_deathbolt : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_q12611_deathbolt);
|
||||||
|
|
||||||
|
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||||
|
{
|
||||||
|
Unit* caster = GetCaster();
|
||||||
|
Unit* target = GetHitUnit();
|
||||||
|
|
||||||
|
if (target->HasAura(SPELL_FREYAS_WARD))
|
||||||
|
{
|
||||||
|
target->CastSpell(caster, SPELL_SEVENFOLD_RETRIBUTION, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
caster->CastSpell(target, SPELL_DEATHBOLT, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_q12611_deathbolt::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_sholazar_basin()
|
void AddSC_sholazar_basin()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -1526,4 +1545,6 @@ void AddSC_sholazar_basin()
|
|||||||
new spell_q12589_shoot_rjr();
|
new spell_q12589_shoot_rjr();
|
||||||
new npc_vics_flying_machine();
|
new npc_vics_flying_machine();
|
||||||
new spell_shango_tracks();
|
new spell_shango_tracks();
|
||||||
|
|
||||||
|
RegisterSpellScript(spell_q12611_deathbolt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user