mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 19:04:40 +01:00
Implement food heal function
Co-authored-by: pris <lilch1022@hotmail.com>
This commit is contained in:
@@ -937,10 +937,20 @@ public class InventoryManager {
|
||||
if (target == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
used = player.getTeamManager().reviveAvatar(target) ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case MATERIAL_NOTICE_ADD_HP:
|
||||
if (useItem.getItemData().getUseTarget().equals("ITEM_USE_TARGET_SPECIFY_ALIVE_AVATAR")) {
|
||||
if (target == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
int[] SatiationParams = useItem.getItemData().getSatiationParams();
|
||||
used = player.getTeamManager().healAvatar(target, SatiationParams[0], SatiationParams[1]) ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case MATERIAL_CHEST:
|
||||
if (useItem.getRewardBoxId() > 0) {
|
||||
used = handleRewardBox(player, useItem) ? 1 : 0;
|
||||
|
||||
Reference in New Issue
Block a user