View Single Post
07-29-08, 04:39 AM   #1
Mahiro
A Murloc Raider
 
Mahiro's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 9
Enemy or Friendly spell?

hi, im trying to seperate enemy from friendly spells with range, but the only way i found to do this is with inRange=IsSpellInRange(spellname/ID, unit) (0= out of range, 1= in range, nil= invalid target)

the idea was to check all the range spells wether inRange is nil or not and if they are nil they are declared as enemy spells, otherwise as friendly spells.

would this work or are there some problems with this method? or is there a function i missed to check if a spell can be casted on eney or on friendly units?
  Reply With Quote