void tauntApply(Unit taunter) { HostileReference refe = threatContainer.getReferenceByTarget(taunter); if (getCurrentVictim() != null && refe != null && (refe.getThreat() < getCurrentVictim().getThreat())) { if (refe.getTempThreatModifier() == 0.0f) // Ok, temp threat is unused { refe.setTempThreat(getCurrentVictim().getThreat()); } } }
public void addTempThreat(float threat, bool apply) { HostileReference refe = getFirst(); while (refe != null) { if (apply) { if (refe.getTempThreatModifier() == 0.0f) { refe.addTempThreat(threat); } } else { refe.resetTempThreat(); } refe = refe.next(); } }