Advertisement
Guest User

Untitled

a guest
Mar 26th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. Position const sifBlizzardPositions[] =
  2. {
  3. {2133.124756f, -238.407730f, 419.471741f, 0},
  4. {2162.743164f, -263.396606f, 419.401672f, 0},
  5. {2133.811768f, -281.451660f, 419.606934f, 0},
  6. {2104.913330f, -258.550201f, 419.361877f, 0},
  7. };
  8.  
  9. class spell_sifs_blizzard : public SpellScriptLoader
  10. {
  11. public:
  12. spell_sifs_blizzard() : SpellScriptLoader("spell_sifs_blizzard") { }
  13.  
  14. class spell_sifs_blizzardAuraScript : public AuraScript
  15. {
  16. PrepareAuraScript(spell_sifs_blizzardAuraScript);
  17.  
  18. Position startPosition;
  19.  
  20. bool Load()
  21. {
  22. if(Unit* caster = GetCaster())
  23. if(caster->GetMapId() != 603) // Ulduar
  24. return false;
  25.  
  26. startPosition = sifBlizzardPositions[urand(0,3)];
  27. return true;
  28. }
  29.  
  30. void HandleEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
  31. {
  32. if(WorldObject* owner = GetOwner())
  33. {
  34. sLog->outError("got owner");
  35.  
  36. startPosition.Relocate(owner);
  37. }
  38.  
  39. // Debug
  40. if(Unit* owner = GetCaster())
  41. owner->MonsterSay("test",0,0);
  42.  
  43. sLog->outError("siftest erfolgreich");
  44. }
  45.  
  46. void Register()
  47. {
  48. OnEffectApply += AuraEffectApplyFn(spell_sifs_blizzardAuraScript::HandleEffectApply, EFFECT_1, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL);
  49. }
  50. };
  51.  
  52. AuraScript* GetAuraScript() const
  53. {
  54. return new spell_sifs_blizzardAuraScript();
  55. }
  56. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement