View Single Post
  #13  
Old 07-22-2008, 03:12 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

This might work for testing if the player is on a mount (untested):

Code:
        if(GetBuffSlotFromType(SE_SummonHorse) != -1) {
		// We are on a mount ... your code here
		
        }
GetBuffSlotFromType looks at the buff slots for a spell with the given effect and returns a slot number if such a buff is on the player, or -1 otherwise.

zone/spdat.h has all the Spell Effect types you can use.

Another way (probably more efficient) could be:

Code:
if(GetHorseId()) {
      // We are on a mount
}
Reply With Quote