War3Source/War3Source — pull request #120 by War3Evo (2013-09-03 09:16:19+00:00)
Title: Updated Aura System

For what ever reason i would never understand, is that since the early version of the aura system it has only allowed level 1 auras due to this:

new bool:AuraOriginLevel[MAXPLAYERSCUSTOM][MAXAURAS];

That is right! Its a boolean!

I've changed it so that it now allows levels to be compared correctly.

I've kept the system backwards compatible so that Luna could continue to use Easy Buffs. I have not updated the Easy Buff system for the updated new Aura system. The easy buff system still uses the backwards compatible system which only handles one distance value.

The new system can handle distance changes.

Three new natives:

// Use below to register, set, and remove your auras for the new system.
// you can "reregister the aura to switch the trackotherteam" using this system
native W3RegisterChangingDistanceAura(String:auraShortName[],bool:trackotherteam=false);

//removed if player disconnects
//level (optional) is a integer for a priority system, such as teammate has level 1 heal wave and another teammate has level 4 heal wave
//the player recieves the level 4 heal wave and does not stack with level 1 heal wave
//the distance for the aura of the client
native W3SetPlayerAura(tAuraID,client,Float:distance,level=0);

// A Simple Way to remove an aura from the player you had used SetAuraFromPlayer
native W3RemovePlayerAura(tAuraID,client);

I've updated ShadowHunter, Scout, and Fluttershy to handle the new system if you need examples on how to use it, just refer to those races.