What do these parameters mean? (addStatusEffect)

Post Reply
Volgin
Posts: 32
Joined: Sun Oct 13, 2013 10:27 pm

What do these parameters mean? (addStatusEffect)

Post by Volgin » Sat Dec 07, 2013 5:13 pm

Looking through luas, I've come across the method addStatusEffect. I am wondering what exactly the parameters mean for this method.

addStatusEffect(EFFECT_AGGRESSOR,1,0,180);

For this, I understand 180 is duration. But what I don't understand is the 1 and 0. Same thing for Tabula Rasa:

addStatusEffect(EFFECT_TABULA_RASA,math.floor(helixbonus*1.5),0,180,0,math.floor(regenbonus*1.5));

I understand the 180 and effects. But how are the parameters set up? is it:

addStatusEffect(effect, (first mod), (idk what 0 is), (duration), (again, 0), (second mod), (0 I assume?), (third mod),...); ?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: What do these parameters mean? (addStatusEffect)

Post by kjLotus » Sat Dec 07, 2013 8:15 pm

Code: Select all

	CStatusEffect(
		 EFFECT id,
         uint16 icon,
		 uint16 power,
		 uint32 tick,
		 uint32 duration,
		 uint32 subid = 0,
         uint16 subPower = 0,
         uint16 tier = 0);
skip icon because it's just the same as id

thus

Code: Select all

addStatusEffect(EFFECT_TABULA_RASA,math.floor(helixbonus*1.5),0,180,0,math.floor(regenbonus*1.5));
is effectID = EFFECT_TABULA_RASA (which determines the icon and text on client), power (a variable of anything), tick (how often it ticks, zero in this cause because TR doesn't do anything on ticks), duration (in seconds from lua), subid is zero (basically don't use subid for anything except food and corsair rolls, otherwise annoying bugs happen), subpower (another variable of anything), and one more variable for tier (basically just bard songs use that)

Post Reply