Beispiel #1
0
        public static ConsumableScript Resolve(XmlReader reader, Database database)
        {
            var type = reader.ReadString().Trim();
            ConsumableScript script;

            switch (type)
            {
            case "Extinguisher":
                script = new ExtinguisherScript(database);
                break;

            case "Repairkit":
                script = new RepairkitScript(database);
                break;

            case "Fuel":
                script = new FuelScript(database);
                break;

            case "Stimulator":
                script = new StimulatorScript(database);
                break;

            case "RemovedRpmLimiter":
                script = new RemovedRpmLimiterScript(database);
                break;

            case "Artillery":
                script = new ArtilleryScript(database);
                break;

            case "Bomber":
                script = new BomberScript(database);
                break;

            case "Afterburning":
                script = new AfterburningScript(database);
                break;

            default:
                throw new NotSupportedException();
            }

            script.Deserialize(reader);

            return(script);
        }
Beispiel #2
0
        public static ConsumableScript Resolve(XmlReader reader, Database database)
        {
            var type = reader.ReadString().Trim();
            ConsumableScript script;

            switch (type)
            {
            case "Extinguisher":
                script = new ExtinguisherScript(database);
                break;

            case "Repairkit":
                script = new RepairkitScript(database);
                break;

            case "Fuel":
                script = new FuelScript(database);
                break;

            case "Stimulator":
                script = new StimulatorScript(database);
                break;

            case "RemovedRpmLimiter":
                script = new RemovedRpmLimiterScript(database);
                break;

            case "RageArtillery":
            case "ConsumableArtillery":
                script = new ArtilleryScript(database);
                break;

            case "RageBomber":
            case "ConsumableBomber":
                script = new BomberScript(database);
                break;

            case "EpicRecon":
            case "ConsumableRecon":
                script = new ReconScript(database);
                break;

            case "Afterburning":
                script = new AfterburningScript(database);
                break;

            case "FactorBattleBooster":
                script = new FactorBattleBoosterScript(database);
                break;

            case "AdditiveBattleBooster":
                script = new AdditiveBattleBoosterScript(database);
                break;

            case "FactorSkillBattleBooster":
                script = new FactorSkillBattleBoosterScript(database);
                break;

            case "FactorPerLevelBattleBooster":
                script = new FactorPerLevelBattleBoosterScript(database);
                break;

            case "SixthSenseBattleBooster":
                script = new SixthSenseBattleBoosterScript(database);
                break;

            case "RancorousBattleBooster":
                script = new RancorousBattleBoosterScript(database);
                break;

            case "PedantBattleBooster":
                script = new PedantBattleBoosterScript(database);
                break;

            case "LastEffortBattleBooster":
                script = new LastEffortBattleBoosterScript(database);
                break;

            default:
                script = new DefaultScript(database, type);
                break;
                //TODO throw new NotSupportedException();
            }

            script.Deserialize(reader);

            return(script);
        }