示例#1
0
文件: Monster.cs 项目: pv42/MHW_DPS
 //public Collection<MonsterPart> parts;
 public Monster(ulong address, string id, float max_hp, float c_hp, float size, MainWindow window)
 {
     this.memory_address = address;
     this.id             = id;
     this.health         = new HealthInfo();
     this.health.max     = max_hp;
     this.health.current = c_hp;
     this.size           = size;
     this.window         = window;
     spezies             = MonsterDataHelper.getSpeziesById(id);
     crown = MonsterDataHelper.getCrown(size, spezies);
     Console.WriteLine("" + name + " hp:" + c_hp + "/" + max_hp + " size: " + size + " c: " + crown.ToString());
     valid = true;
 }
示例#2
0
文件: Monster.cs 项目: pv42/MHW_DPS
 public void update(string id, float max_hp, float c_hp, float size)
 {
     if (c_hp != health.current)
     {
         window.logFile.writeMonsterHP(memory_address, c_hp);
         if (c_hp == 0)
         {
             window.log("Monster slayed");
         }
     }
     this.health.current = c_hp;
     valid = true;
     if (this.size != size || this.health.max != max_hp || this.id != id)
     {
         this.size       = size;
         crown           = MonsterDataHelper.getCrown(size, spezies);
         this.health.max = max_hp;
         this.id         = id;
         Console.WriteLine("MONSTER info changed for " + id + " mhp: " + max_hp);
         window.logFile.writeMonsterInfo(memory_address, id, max_hp, size);
     }
 }