Fixed buff stacks

Stackable buffs will no longer have their stack count reset when
exceeding the cap.
This commit is contained in:
Ziggeh
2013-12-10 20:06:56 +01:00
parent 9bfe52763e
commit bd7bb1a01b
+3 -1
View File
@@ -66,7 +66,7 @@ public class BuffService implements INetworkDispatch {
//System.out.println("Buff script doesnt exist for: " + buffName);
return;
}*/
final Buff buff = new Buff(buffName, creature.getObjectID());
if(buff.isGroupBuff()) {
addGroupBuff(creature, buffName);
@@ -92,6 +92,8 @@ public class BuffService implements INetworkDispatch {
if(creature.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack
creature.getDotByBuff(otherBuff).setStartTime(buff.getStartTime());
} else {
buff.setStacks(buff.getMaxStacks());
}
if (otherBuff.getRemainingDuration() > buff.getDuration() && otherBuff.getStacks() >= otherBuff.getMaxStacks()) {