Exemple #1
0
        private void UpdateHitTalent(CharacterInfo character, long hit_count_id)
        {
            if (character == null)
            {
                return;
            }
            HitAddDamageRate attr = character.TalentManager.GetTalentAttribute(AttributeId.kHitAddDamageRate) as HitAddDamageRate;

            if (attr != null)
            {
                attr.OnHit(hit_count_id);
            }
        }
Exemple #2
0
        private int TalentAdjustDamage(CharacterInfo sender, CharacterInfo target, int damage)
        {
            if (sender == null)
            {
                return(damage);
            }
            HitAddDamageRate attr = sender.TalentManager.GetTalentAttribute(AttributeId.kHitAddDamageRate) as HitAddDamageRate;

            if (attr != null && attr.IsTriggered())
            {
                damage = (int)(damage * (1 + attr.RateAdd));
                //LogSystem.Error("----HitAddDamage: damage {0} rate {1} ", damage, attr.RateAdd);
            }
            return(damage);
        }