Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by sss ( 13 years ago )
/*########
#### spell_trow_torch_midsummer
#####*/
enum eTrowTorchSpell
{
SPELL_TROW_TORCH = 45819,
SPELL_TROW_TORCH_2 = 45276,
SPELL_GIVE_TORCH = 45280,
};
enum eTrowTorchNPC
{
NPC_TROW_TORCH_TRIGGER = 4581900,
};
class spell_trow_torch_midsummer : public SpellScriptLoader
{
public:
spell_trow_torch_midsummer() : SpellScriptLoader("spell_trow_torch_midsummer") {}
SpellScript* GetSpellScript() const
{
return new spell_trow_torch_midsummer_SpellScript();
}
class spell_trow_torch_midsummer_SpellScript : public SpellScript
{
PrepareSpellScript(spell_trow_torch_midsummer_SpellScript);
float x, y, z;
bool Load()
{
if (GetCaster()->GetTypeId() != TYPEID_PLAYER)
return false;
GetExplTargetDest()->GetPosition(x, y, z);
return true;
}
void HandleDummyLaunch(SpellEffIndex /*effIndex*/)
{
sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched!", GetSpellInfo()->Id);
}
void HandleDummyLaunchTarget(SpellEffIndex /*effIndex*/)
{
// we're handling SPELL_EFFECT_DUMMY in effIndex 0 here
sLog->outString("Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID);
}
void HandleDummyHit(SpellEffIndex /*effIndex*/)
{
sLog->outString("Spell %u with SPELL_EFFECT_DUMMY has hit!", GetSpellInfo()->Id);
}
void HandleDummyHitTarget(SpellEffIndex /*effIndex*/)
{
sLog->outString("SPELL_EFFECT_DUMMY is hits it's target!");
// make caster cast a spell on a unit target of effect
}
void Register()
{
OnEffectLaunch += SpellEffectFn(spell_trow_torch_midsummer_SpellScript::HandleDummyLaunch, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectLaunchTarget += SpellEffectFn(spell_ex_5581SpellScript::HandleDummyLaunchTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHit += SpellEffectFn(spell_ex_5581SpellScript::HandleDummyHit, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_ex_5581SpellScript::HandleDummyHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
};
Revise this Paste
Parent: 64822