public InteractiveSkill(InteractiveObject interactive, InteractiveElementSkill skill)
        {
            Id = skill.skillInstanceUid;
            Interactive = interactive;
            JobSkill = ObjectDataManager.Instance.Get<Skill>(skill.skillId);

            if (skill is InteractiveElementNamedSkill)
                NameId = (int?) ObjectDataManager.Instance.Get<SkillName>((skill as InteractiveElementNamedSkill).nameId).nameId;
        }
Exemplo n.º 2
0
        public virtual void NotifyUseInteractive(InteractiveObject interactive, InteractiveSkill skill, int duration)
        {
            if (duration > 0)
            {
                UsingInteractive = interactive;
                UsingSkill = skill;
                UsageEndTime = DateTime.Now + TimeSpan.FromMilliseconds(duration);
            }

            UseInteractiveHandler handler = StartUsingInteractive;
            if (handler != null) handler(this, interactive, skill, UsageEndTime);
        }