コード例 #1
0
 public void ServerOnShot(PlayerCharacterSkills skills)
 {
     if (this.ExperienceAddedPerShot > 0)
     {
         skills.ServerAddSkillExperience(this, this.ExperienceAddedPerShot);
     }
 }
コード例 #2
0
        public void ServerOnKill(PlayerCharacterSkills skills, ICharacter killedCharacter)
        {
            var maxHealth = killedCharacter.SharedGetFinalStatValue(StatName.HealthMax);

            skills.ServerAddSkillExperience(
                this,
                experience: maxHealth * this.ExperienceAddedOnKillPerMaxEnemyHealthMultiplier);
        }
コード例 #3
0
 public void ServerOnDamageApplied(
     PlayerCharacterSkills skills,
     IWorldObject damagedObject,
     double damageApplied)
 {
     if (damagedObject is ICharacter)
     {
         // apply experience only when the damage is applied to a character
         skills.ServerAddSkillExperience(this, damageApplied * this.ExperienceAddedPerDamageDoneMultiplier);
     }
 }