Inheritance: ObjectChange
Beispiel #1
0
        void HandleActionDone(ActionState state)
        {
            var e = new ActionDoneEvent()
            {
                GUID  = this.CurrentAction.GUID,
                State = state,
            };

            if (m_ai != null)
            {
                m_ai.ActionDone(e);
            }

            var c = new ActionDoneChange(this)
            {
                ActionDoneEvent = e,
            };

            this.CurrentAction    = null;
            this.ActionPriority   = Dwarrowdelf.ActionPriority.Undefined;
            this.ActionTotalTicks = this.ActionTicksUsed = 0;

            this.World.AddChange(c);
        }
Beispiel #2
0
        void HandleActionDone(ActionState state)
        {
            var e = new ActionDoneEvent()
            {
                MagicNumber = this.CurrentAction.MagicNumber,
                UserID = this.ActionUserID,
                State = state,
                Action = this.CurrentAction,
            };

            if (m_ai != null)
                m_ai.ActionDone(e);

            var c = new ActionDoneChange(this)
            {
                ActionDoneEvent = e,
            };

            this.CurrentAction = null;
            this.ActionPriority = Dwarrowdelf.ActionPriority.Undefined;
            this.ActionTotalTicks = this.ActionTicksUsed = 0;
            this.ActionUserID = 0;

            this.World.AddChange(c);
        }