Beispiel #1
0
 private void doExcuteZhansha(Units target, Dictionary <int, float> damage_ids, float damage)
 {
     if (target == null || damage_ids == null)
     {
         return;
     }
     Dictionary <int, float> .Enumerator enumerator = damage_ids.GetEnumerator();
     while (enumerator.MoveNext())
     {
         DamageDataManager         arg_33_0 = Singleton <DamageDataManager> .Instance;
         KeyValuePair <int, float> current  = enumerator.Current;
         DamageData vo = arg_33_0.GetVo(current.Key);
         if (vo != null)
         {
             if (vo.damageCalType == 10)
             {
                 float num = target.hp + damage;
                 if ((int)vo.damageParam2 == 0)
                 {
                     if (target.hp < vo.damageParam1)
                     {
                         damage = target.hp * -1f;
                         this.AddDamage(AttrType.Hp, damage);
                     }
                 }
                 else if (target.hp < target.hp_max * vo.damageParam1)
                 {
                     damage = target.hp * -1f;
                     this.AddDamage(AttrType.Hp, damage);
                 }
             }
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 人物数据管理
 /// </summary>
 private DamageDataManager()
 {
     _instance = this;
 }