mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-21 03:15:59 +01:00
Improved satiation (#2055)
* Natural satiation decreasing Graphic showing satiation when eating (usually) * Reworking values to match original * Little fixes * Satiation bar matches real values Revival correctly updates bar * Greatly simplify handling Some fixes * Inline variables Add TODO for bug * Satiation works correctly Finally it all works as intended * Remove unnecessary packets * Improve satiation reduction handling
This commit is contained in:
@@ -785,7 +785,7 @@ public class InventorySystem extends BaseGameSystem {
|
||||
if (event.isCanceled()) return false;
|
||||
|
||||
float satiationIncrease = satiationParams[0] + ((float)satiationParams[1])/params.targetAvatar.getFightProperty(FightProperty.FIGHT_PROP_MAX_HP);
|
||||
if (!params.targetAvatar.addSatiation(satiationIncrease)) { // Make sure avatar can eat
|
||||
if (!params.player.getSatiationManager().addSatiation(params.targetAvatar, satiationIncrease, itemData.getId())) { // Make sure avatar can eat
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user