Exemplo n.º 1
0
        void ApplyPointerUpdate(StoryPointerUpdate pointerUpdate)
        {
            // Right now the only update we send for pointers is when they are killed.

            StoryPointer pointer = GENERAL.GetPointerForStoryline(pointerUpdate.StoryLineName);

            Log("Server says kill pointer: " + pointerUpdate.StoryLineName);

            if (pointer != null)
            {
                // We remove it instantly. No need to mark it as deleted, nothing else to do with it.

                GENERAL.ALLPOINTERS.Remove(pointer);
                Log("Removing pointer: " + pointer.currentPoint.StoryLine);

                // Remove tasks for pointer
                // Server passes tasks, so if it is faster, client may be processing more than one task for a storyline. (Even if the deus dash would show it)

                for (int i = GENERAL.ALLTASKS.Count - 1; i >= 0; i--)
                {
                    StoryTask task = GENERAL.ALLTASKS[i];

                    if (task.Point != null && task.Point.StoryLine == pointerUpdate.StoryLineName)
                    {
                        Log("Removing task: " + task.Instruction);

                        GENERAL.ALLTASKS.Remove(task);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public StoryPointerUpdate GetUpdate()

        {
            // bundled approach.
            // Generate a network update message for this pointer. Only case is KILL, so only a name is needed.


            StoryPointerUpdate updateMessageSend = new StoryPointerUpdate();

            updateMessageSend.StoryLineName = currentPoint.StoryLine;

            return(updateMessageSend);
        }