Beispiel #1
0
        private void CalculateAggression(CombatAction pendingAction, List<CombatActionResult> results)
        {
            // Increase aggro as required
            foreach (var result in results)
            {

                var victim = Zone.ZoneCharacters.FirstOrDefault(x => x.Id == (ulong)result.TargetId);
                if (victim != null && victim.CurrentAi != null)
                    victim.CurrentAi.AgressionTracker.IncreaseAgression(pendingAction.ExecutingCharacter, 1);
            }
        }
Beispiel #2
0
        private void SendActionResult(CombatAction action, List<CombatActionResult> results)
        {
            foreach (var result in results)
            {
                if (result.TargetId != -1)
                {
                    var packet = new ServerSkillUseResult(action.ExecutingCharacter.Id, (ulong)result.TargetId,
                        result.Damage, action.Skill.Id);
                    Zone.SendToEntitiesInRange(packet, action.ExecutingCharacter);
                }

            }
        }
Beispiel #3
0
        private void ActivateSkill(CombatAction pendingAction)
        {
            // Execute the skill and reset the character state
            var results = pendingAction.PerformAction(GetCombatCharactersInRange());
            pendingAction.ExecutingCharacter.CharacterState = CharacterState.Idle;

            SendActionResult(pendingAction, results);

            CalculateAggression(pendingAction, results);

            // Force skill onto cooldown
            pendingAction.Skill.ResetCooldown();
        }