Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Position const sifBlizzardPositions[] =
- {
- {2133.124756f, -238.407730f, 419.471741f, 0},
- {2162.743164f, -263.396606f, 419.401672f, 0},
- {2133.811768f, -281.451660f, 419.606934f, 0},
- {2104.913330f, -258.550201f, 419.361877f, 0},
- };
- class spell_sifs_blizzard : public SpellScriptLoader
- {
- public:
- spell_sifs_blizzard() : SpellScriptLoader("spell_sifs_blizzard") { }
- class spell_sifs_blizzardAuraScript : public AuraScript
- {
- PrepareAuraScript(spell_sifs_blizzardAuraScript);
- Position startPosition;
- bool Load()
- {
- if(Unit* caster = GetCaster())
- if(caster->GetMapId() != 603) // Ulduar
- return false;
- startPosition = sifBlizzardPositions[urand(0,3)];
- return true;
- }
- void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
- {
- if(WorldObject* owner = GetOwner())
- {
- sLog->outError("got owner");
- startPosition.Relocate(owner);
- }
- // Debug
- if(Unit* owner = GetCaster())
- owner->MonsterSay("test",0,0);
- sLog->outError("siftest erfolgreich");
- }
- void Register()
- {
- OnEffectApply += AuraEffectApplyFn(spell_sifs_blizzardAuraScript::HandleEffectApply, EFFECT_1, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL);
- }
- };
- AuraScript* GetAuraScript() const
- {
- return new spell_sifs_blizzardAuraScript();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement