Example #1
0
 /// <summary>
 /// 添加属性Item
 /// </summary>
 private void AddData()
 {
     if (m_HeroNextT.getInitMaxHP() > m_HeroT.getInitMaxHP())//生命
     {
         int    poor = m_HeroNextT.getInitMaxHP() - m_HeroT.getInitMaxHP();
         string hp   = GameUtils.GetAttriName(1);
         m_AttrDic.Add(hp, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getInitPhysicalAttack() > m_HeroT.getInitPhysicalAttack())//攻击力
     {
         int    poor   = m_HeroNextT.getInitPhysicalAttack() - m_HeroT.getInitPhysicalAttack();
         string attack = GameUtils.GetAttriName(3);
         m_AttrDic.Add(attack, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getInitPhysicalDefence() > m_HeroT.getInitPhysicalDefence())//防御
     {
         int    poor = m_HeroNextT.getInitPhysicalDefence() - m_HeroT.getInitPhysicalDefence();
         string def  = GameUtils.GetAttriName(5);
         m_AttrDic.Add(def, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBaseHit() > m_HeroT.getBaseHit())//命中率
     {
         int    poor = m_HeroNextT.getBaseHit() - m_HeroT.getBaseHit();
         string hit  = GameUtils.GetAttriName(23);
         m_AttrDic.Add(hit, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBaseDodge() > m_HeroT.getBaseDodge())//闪避率
     {
         int    poor  = m_HeroNextT.getBaseDodge() - m_HeroT.getBaseDodge();
         string dodge = GameUtils.GetAttriName(24);
         m_AttrDic.Add(dodge, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBaseCritical() > m_HeroT.getBaseCritical())//暴击率
     {
         int    poor = m_HeroNextT.getBaseCritical() - m_HeroT.getBaseCritical();
         string crit = GameUtils.GetAttriName(25);
         m_AttrDic.Add(crit, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBaseTenacity() > m_HeroT.getBaseTenacity())//韧性率
     {
         int    poor = m_HeroNextT.getBaseTenacity() - m_HeroT.getBaseTenacity();
         string ten  = GameUtils.GetAttriName(26);
         m_AttrDic.Add(ten, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getDamageBonusHit() > m_HeroT.getDamageBonusHit())//伤害加深率
     {
         int    poor    = m_HeroNextT.getDamageBonusHit() - m_HeroT.getDamageBonusHit();
         string damageB = GameUtils.GetAttriName(31);
         m_AttrDic.Add(damageB, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getDamageReductionHit() > m_HeroT.getDamageReductionHit())//伤害减免率
     {
         int    poor    = m_HeroNextT.getDamageReductionHit() - m_HeroT.getDamageReductionHit();
         string damageR = GameUtils.GetAttriName(32);
         m_AttrDic.Add(damageR, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBaseCriticalDamage() > m_HeroT.getBaseCriticalDamage())//暴击伤害率
     {
         int    poor      = m_HeroNextT.getBaseCriticalDamage() - m_HeroT.getBaseCriticalDamage();
         string criticalD = GameUtils.GetAttriName(33);
         m_AttrDic.Add(criticalD, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getBlockHit() > m_HeroT.getBlockHit())//格挡率
     {
         int    poor  = m_HeroNextT.getBlockHit() - m_HeroT.getBlockHit();
         string block = GameUtils.GetAttriName(56);
         m_AttrDic.Add(block, string.Format("+{0}", poor));
     }
     if (m_HeroNextT.getSabotageHit() > m_HeroT.getSabotageHit())//破甲率
     {
         int    poor     = m_HeroNextT.getSabotageHit() - m_HeroT.getSabotageHit();
         string sabotage = GameUtils.GetAttriName(57);
         m_AttrDic.Add(sabotage, string.Format("+{0}", poor));
     }
 }