void setStatBase(const int id, const int value, const bool notify) { const int old = mData.mStats[id].base; mData.mStats[id].base = value; if (notify) triggerStat(id, "base", old); }
void setStatMod(const int id, const int value, const bool notify) { const int old = mData.mStats[id].mod; mData.mStats[id].mod = value; if (notify) triggerStat(id, "mod", old); }
void setStatExperience(int id, int have, int need, bool notify) { int oldExp = mData.mStats[id].exp; int oldExpNeed = mData.mStats[id].expNeed; mData.mStats[id].exp = have; mData.mStats[id].expNeed = need; if (notify) triggerStat(id, "exp", oldExp, oldExpNeed); }
void setStatExperience(const int id, const int have, const int need, const bool notify) { Stat &stat = mData.mStats[id]; const int oldExp = stat.exp; const int oldExpNeed = stat.expNeed; stat.exp = have; stat.expNeed = need; if (notify) triggerStat(id, "exp", oldExp, oldExpNeed); }