package mapped;

import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSHealthBarUpdate;

@ObfuscatedName("dv")
public class HealthBarUpdate extends Node implements RSHealthBarUpdate {
   @ObfuscatedName("at")
   @ObfuscatedGetter(
      intValue = 1554126669
   )
   int cycle;
   @ObfuscatedName("ah")
   @ObfuscatedGetter(
      intValue = 382633399
   )
   int health;
   @ObfuscatedName("ar")
   @ObfuscatedGetter(
      intValue = -799727255
   )
   int health2;
   @ObfuscatedName("ao")
   @ObfuscatedGetter(
      intValue = 2048455369
   )
   int cycleOffset;

   HealthBarUpdate(int var1, int var2, int var3, int var4) {
      this.cycle = var1;
      this.health = var2;
      this.health2 = var3;
      this.cycleOffset = var4;
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(IIIII)V",
      garbageValue = "857709911"
   )
   void set_base(int var1, int var2, int var3, int var4) {
      this.cycle = var1;
      this.health = var2;
      this.health2 = var3;
      this.cycleOffset = var4;
   }

   public int getHealthRatio() {
      return this.health;
   }

   public int getHealth() {
      return this.health2;
   }

   @ObfuscatedName("at")
   @ObfuscatedSignature(
      descriptor = "(II)Ldt;",
      garbageValue = "-1907419429"
   )
   static Script method2501(int var0) {
      Script var1 = (Script)Script.Script_cached.get((long)var0);
      if(var1 != null) {
         return var1;
      } else {
         byte[] var2 = class47.archive12.takeFile_base(var0, 0);
         if(var2 == null) {
            return null;
         } else {
            var1 = NpcOverrides.method3690(var2);
            Script.Script_cached.put(var1, (long)var0);
            return var1;
         }
      }
   }
}
