public void NotifyInteractiveUsed(InteractiveUsedMessage message)
        {
            var actor = Map.GetActor(message.entityId);
            var skill = EnabledSkills.Concat(DisabledSkills).FirstOrDefault(x => x.JobSkill != null && x.JobSkill.id == message.skillId);

            var evnt = Used;

            if (evnt != null)
            {
                evnt(this, actor, skill, message.duration);
            }

            if (actor != null)
            {
                actor.NotifyUseInteractive(this, skill, message.duration);

                if (message.duration > 0)
                {
                    UsedBy = actor;
                }
            }
        }
Beispiel #2
0
 public InteractiveElement GetInteractiveElement()
 {
     return(new InteractiveElement(Id, Record.ElementType, Array.ConvertAll(EnabledSkills.ToArray(), x => x.GetInteractiveElementSkill()),
                                   Array.ConvertAll(DisabledSkills.ToArray(), x => x.GetInteractiveElementSkill()), true));
 }
Beispiel #3
0
 public MapInteractiveElementSkill GetSkill(uint uid)
 {
     return(EnabledSkills.Find(x => x.UId == uid));
 }