Invisibility.lua 743 B

1234567891011121314151617181920212223242526272829303132
  1. --[[
  2. Script Name : Spells/Mage/Summoner/Invisibility.lua
  3. Script Author : theFoof
  4. Script Date : 2013.1.16 08:08:28
  5. Script Purpose :
  6. :
  7. --]]
  8. function precast(Caster)
  9. return not IsInCombat(Caster)
  10. end
  11. function cast(Caster, Target)
  12. -- Grants invisibility to target
  13. -- Suspends target's movement speed enhancements
  14. -- Grants invisibility to pet
  15. -- Suspends pet's movement speed enhancements
  16. -- Dispelled when target takes damage
  17. -- This effect cancels during combat
  18. Stealth(2)
  19. if GetPet(Target) ~= nil then
  20. Stealth(2, GetPet(Target))
  21. elseif GetCharmedPet(Target) then
  22. Stealth(2, GetCharmedPet(Target))
  23. end
  24. end
  25. function remove(Caster, Target)
  26. RemoveInvis()
  27. end