コード例 #1
0
        public void HandleInteractiveUsedMessage(Bot bot, InteractiveUsedMessage message)
        {
            var interactive = bot.Character.Map.GetInteractive(message.elemId);

            if (interactive != null)
            {
                interactive.NotifyInteractiveUsed(message);
            }
        }
コード例 #2
0
ファイル: GathersManager.cs プロジェクト: Kuh4ku/Mercybot
        private Task HandleInteractiveUsedMessage(Account account, InteractiveUsedMessage message)
        => Task.Run(() =>
        {
            if (_elementToGather == null || _elementToGather.Id != message.ElemId)
            {
                return;
            }

            // Check if the element has been stolen
            if (message.EntityId != _account.Game.Character.Id)
            {
                _stolen = true;
            }
            else
            {
                _account.State = Enums.AccountStates.GATHERING;
                GatherStarted?.Invoke();
            }
        });
コード例 #3
0
        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;
                }
            }
        }
コード例 #4
0
 private void InteractiveUsedMessageHandler(DofusClient client, InteractiveUsedMessage message)
 {
     //
 }