Core/Battleground: Implemented blizzlike script for Isle of Conquest, written by gyullo and me, based on Socolin's and Josh's patch -BIG THANKS TO THEM-
Anyway the map is not yet playable, there are issues not related with the script. I also want to thanks to QAston, linencloth, Shauren and Machiavelli to be so patient with my questions.
This commit is contained in:
@@ -635,6 +635,76 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_gunship_portal : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_gunship_portal() : SpellScriptLoader("spell_gen_gunship_portal") { }
|
||||
|
||||
class spell_gen_gunship_portalSpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_gunship_portalSpellScript)
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster->ToPlayer())
|
||||
return;
|
||||
|
||||
if (Battleground *bg = caster->ToPlayer()->GetBattleground())
|
||||
{
|
||||
if (bg->GetTypeID(true) == BATTLEGROUND_IC)
|
||||
bg->DoAction(1,caster->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_gen_gunship_portalSpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_gen_gunship_portalSpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum parachuteIC
|
||||
{
|
||||
SPELL_PARACHUTE_IC = 66657
|
||||
};
|
||||
|
||||
class spell_gen_parachute_ic : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_parachute_ic() : SpellScriptLoader("spell_gen_parachute_ic") { }
|
||||
|
||||
class spell_gen_parachute_icAuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_parachute_icAuraScript)
|
||||
|
||||
void HandleTriggerSpell(AuraEffect const * /*aurEff*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
|
||||
if (!target->ToPlayer())
|
||||
return;
|
||||
|
||||
if (target->ToPlayer()->m_movementInfo.fallTime > 2000)
|
||||
target->CastSpell(target,SPELL_PARACHUTE_IC,true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_parachute_icAuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript *GetAuraScript() const
|
||||
{
|
||||
return new spell_gen_parachute_icAuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -651,4 +721,6 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_animal_blood();
|
||||
new spell_gen_shroud_of_death();
|
||||
new spell_gen_divine_storm_cd_reset();
|
||||
new spell_gen_parachute_ic();
|
||||
new spell_gen_gunship_portal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user