Esempio n. 1
0
        public void Execute(EventResults result, Game game, EventContext context)
        {
            Dictionary<string, object> computedParameters = new Dictionary<string, object>();
            foreach (var pair in parameters)
            {
                computedParameters.Add(pair.Key, context.GetScopedObjectByName(pair.Value));
            }
            EventContext newContext = new EventContext(context.CurrentCharacter, computedParameters);
            game.GetEventById(eventid).Execute(result, game, newContext);

            //We need to commit any changes that were performed on the new context to our old one.
            newContext.CommitTo(context);
        }