void HostileReference::addThreatPercent(int32 percent) { // Xinef: Do not allow to modify threat by percent if threat is negative (forced to big value < 0 by spells adding temporary threat) // Xinef: When the temporary effect ends, temporary threat is added back which results in huge additional amount of threat if (iThreat <= 0) return; float tmpThreat = iThreat; AddPct(tmpThreat, percent); addThreat(tmpThreat - iThreat); }
void HostileReference::addThreatPercent(int32 percent) { float tmpThreat = iThreat; AddPctN(tmpThreat, percent); addThreat(tmpThreat - iThreat); }
void HostileReference::addThreatPercent(int32 percent) { addThreat(CalculatePct(iThreat, percent)); }