mirror of
https://bitbucket.org/projectswg/holocore.git
synced 2026-01-16 23:04:20 -05:00
Merged in M4SS/holocore/196 (pull request #671)
#196: Fix combat exploit where modifying health or action during combat would replenish the pools to 100%
This commit is contained in:
@@ -216,12 +216,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