PDA

View Full Version : Adjusting XP loss


provocating
01-31-2015, 02:55 PM
Is there a server rule out there to adjust death xp loss? We have Character:DeathExpLossLevel and Character:DeathExpLossMultiplier

Character:DeathExpLossMultiplier has a default of 3, what is this indicative of? That is 3 of what?

Kingly_Krab
01-31-2015, 03:09 PM
Here you go (attack.cpp): if(RuleB(Character, UseDeathExpLossMult)){
float GetNum [] = {0.005f,0.015f,0.025f,0.035f,0.045f,0.055f,0.065f, 0.075f,0.085f,0.095f,0.110f };
int Num = RuleI(Character, DeathExpLossMultiplier);
if((Num < 0) || (Num > 10))
Num = 3;
float loss = GetNum[Num];
exploss=(int)((float)GetEXP() * (loss)); //loose % of total XP pending rule (choose 0-10)
}

provocating
01-31-2015, 03:22 PM
Dude you are awesome. So percentage of total.

Kingly_Krab
01-31-2015, 04:41 PM
Yeah, that's what the comment says. //loose % of total XP pending rule (choose 0-10)