Ejemplo n.º 1
0
        private Action ParseAction(string text)
        {
            var action = text.Split('/');

            switch (action[0])
            {
            case "ChangeArmor": return(() => EventResult_ChangeArmor(int.Parse(action[1])));

            case "ReceiveGold": return(() => EventResult_ReceiveGold(int.Parse(action[1])));

            case "HealthChange": return(() => EventResult_HealthChange(int.Parse(action[1])));

            case "ReceiveLoot": return(() => EventResult_ReceiveLoot(Getters.ParseLoot(action.Skip(1))));
            }
            return(null);
        }