Esempio n. 1
0
 public virtual void Activate(SkillActor actor, Character[] allies, Character enemy, Character[] enemies)
 {
     this.actor   = actor;
     this.allies  = allies;
     this.enemy   = enemy;
     this.enemies = enemies;
     OnActivate.Invoke(actor, enemies);
     SkillEffect();
 }
Esempio n. 2
0
        private void OnMessageReceived(Message obj)
        {
            var message = _messageFactory.Create(obj);

            _entityTracker.Update(message);

            var skillResultMessage = message as EachSkillResultServerMessage;

            if (skillResultMessage?.IsUseless == false)
            {
                var skillResult = new SkillResult(skillResultMessage, _entityTracker, _playerTracker,
                                                  _teraData.SkillDatabase);

                if (skillResult.Skill != null)
                {
                    var args = new SkillEventArgs {
                        SkillResult = skillResult
                    };

                    SkillEvent?.Invoke(this, args);
                    Console.WriteLine($@"Skill: {skillResult.Skill.Name} did {skillResult.Damage} to {skillResult.Target} from {skillResult.Source}");
                }
            }
        }