updated plugin again...
This commit is contained in:
parent
25ccc33252
commit
b3bb34974f
@ -859,7 +859,7 @@ end
|
||||
|
||||
|
||||
function HandleRemoveXp(a_Split, a_Player)
|
||||
a_Player:SetExperience(0);
|
||||
a_Player:SetCurrentExperience(0);
|
||||
|
||||
return true;
|
||||
end
|
||||
|
@ -336,15 +336,15 @@ float cPlayer::GetXpPercentage()
|
||||
|
||||
|
||||
|
||||
bool cPlayer::SetCurrentExperience(short int a_XpTotal)
|
||||
bool cPlayer::SetCurrentExperience(short int a_CurrentXp)
|
||||
{
|
||||
if(!(a_XpTotal >= 0) || (a_XpTotal > (SHRT_MAX - m_LifetimeTotalXp)))
|
||||
if(!(a_CurrentXp >= 0) || (a_CurrentXp > (SHRT_MAX - m_LifetimeTotalXp)))
|
||||
{
|
||||
LOGWARNING("Tried to update experiece with an invalid Xp value: %d", a_XpTotal);
|
||||
LOGWARNING("Tried to update experiece with an invalid Xp value: %d", a_CurrentXp);
|
||||
return false; //oops, they gave us a dodgey number
|
||||
}
|
||||
|
||||
m_CurrentXp = a_XpTotal;
|
||||
m_CurrentXp = a_CurrentXp;
|
||||
|
||||
// Set experience to be updated
|
||||
m_bDirtyExperience = true;
|
||||
|
@ -429,7 +429,7 @@ protected:
|
||||
static short XpForLevel(short int a_Level);
|
||||
|
||||
/// inverse of XpAtLevel, ref: http://minecraft.gamepedia.com/XP values are as per this with pre-calculations
|
||||
static short CalcLevelFromXp(short int a_XpCurrent);
|
||||
static short CalcLevelFromXp(short int a_CurrentXp);
|
||||
|
||||
bool m_IsChargingBow;
|
||||
int m_BowCharge;
|
||||
|
Loading…
Reference in New Issue
Block a user