mirror of
https://bitbucket.org/projectswg/holocore.git
synced 2026-01-16 23:04:20 -05:00
#196: Fix combat exploit where modifying health or action during combat would replenish the pools to 100%
This commit is contained in:
@@ -213,12 +213,20 @@ public class SkillModService extends Service {
|
||||
|
||||
if (newHealth != 0){
|
||||
creature.setMaxHealth(creature.getMaxHealth() + newHealth);
|
||||
creature.setHealth(creature.getMaxHealth());
|
||||
|
||||
if (!creature.isInCombat()) {
|
||||
// Don't replenish health to 100% if creature is in combat
|
||||
creature.setHealth(creature.getMaxHealth());
|
||||
}
|
||||
}
|
||||
|
||||
if (newAction !=0){
|
||||
creature.setMaxAction(creature.getMaxAction() + newAction);
|
||||
creature.setAction(creature.getMaxAction());
|
||||
|
||||
if (!creature.isInCombat()) {
|
||||
// Don't replenish action to 100% if creature is in combat
|
||||
creature.setAction(creature.getMaxAction());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user