コード例 #1
0
        /// <summary>
        ///     Creates references.
        /// </summary>
        public void CreateReferences()
        {
            this._speedUpDiamondCostPerMin          = this.GetIntValue("SPEED_UP_DIAMOND_COST_1_MIN");
            this._speedUpDiamondCostPerHour         = this.GetIntValue("SPEED_UP_DIAMOND_COST_1_HOUR");
            this._speedUpDiamondCostPerDay          = this.GetIntValue("SPEED_UP_DIAMOND_COST_24_HOURS");
            this._speedUpDiamondCostPerWeek         = this.GetIntValue("SPEED_UP_DIAMOND_COST_1_WEEK");
            this._speedUpDiamondCostPerMinVillage2  = this.GetIntValue("VILLAGE2_SPEED_UP_DIAMOND_COST_1_MIN");
            this._speedUpDiamondCostPerHourVillage2 = this.GetIntValue("VILLAGE2_SPEED_UP_DIAMOND_COST_1_HOUR");
            this._speedUpDiamondCostPerDayVillage2  = this.GetIntValue("VILLAGE2_SPEED_UP_DIAMOND_COST_24_HOURS");
            this._speedUpDiamondCostPerWeekVillage2 = this.GetIntValue("VILLAGE2_SPEED_UP_DIAMOND_COST_1_WEEK");

            this._resourceDiamondCost100              = this.GetIntValue("RESOURCE_DIAMOND_COST_100");
            this._resourceDiamondCost1000             = this.GetIntValue("RESOURCE_DIAMOND_COST_1000");
            this._resourceDiamondCost10000            = this.GetIntValue("RESOURCE_DIAMOND_COST_10000");
            this._resourceDiamondCost100000           = this.GetIntValue("RESOURCE_DIAMOND_COST_100000");
            this._resourceDiamondCost1000000          = this.GetIntValue("RESOURCE_DIAMOND_COST_1000000");
            this._resourceDiamondCost10000000         = this.GetIntValue("RESOURCE_DIAMOND_COST_10000000");
            this._village2ResourceDiamondCost100      = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_100");
            this._village2ResourceDiamondCost1000     = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_1000");
            this._village2ResourceDiamondCost10000    = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_10000");
            this._village2resourceDiamondCost100000   = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_100000");
            this._village2resourceDiamondCost1000000  = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_1000000");
            this._village2ResourceDiamondCost10000000 = this.GetIntValue("VILLAGE2_RESOURCE_DIAMOND_COST_10000000");
            this._darkElixirDiamondCost1              = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_1");
            this._darkElixirDiamondCost10             = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_10");
            this._darkElixirDiamondCost100            = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_100");
            this._darkElixirDiamondCost1000           = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_1000");
            this._darkElixirDiamondCost10000          = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_10000");
            this._darkElixirDiamondCost100000         = this.GetIntValue("DARK_ELIXIR_DIAMOND_COST_100000");

            this._startingDiamonds                            = this.GetIntValue("STARTING_DIAMONDS");
            this._startingGold                                = this.GetIntValue("STARTING_GOLD");
            this._startingElixir                              = this.GetIntValue("STARTING_ELIXIR");
            this._startingGold2                               = this.GetIntValue("STARTING_GOLD2");
            this._startingElixir2                             = this.GetIntValue("STARTING_ELIXIR2");
            this._liveReplayFrequencySecs                     = this.GetIntValue("LIVE_REPLAY_UPDATE_FREQUENCY_SECONDS");
            this._challengeBaseSaveCooldown                   = this.GetIntValue("CHALLENGE_BASE_SAVE_COOLDOWN");
            this._allianceCreateCost                          = this.GetIntValue("ALLIANCE_CREATE_COST");
            this._clockTowerBoostCooldownSecs                 = 60 * this.GetIntValue("CLOCK_TOWER_BOOST_COOLDOWN_MINS");
            this._clampLongTimeStampsToDays                   = this.GetIntValue("CLAMP_LONG_TIME_STAMPS_TO_DAYS");
            this._workerCostSecondBuildCost                   = this.GetIntValue("WORKER_COST_2ND");
            this._workerCostThirdBuildCost                    = this.GetIntValue("WORKER_COST_3RD");
            this._workerCostFourthBuildCost                   = this.GetIntValue("WORKER_COST_4TH");
            this._workerCostFifthBuildCost                    = this.GetIntValue("WORKER_COST_5TH");
            this._challengeBaseCooldownEnabledOnTh            = this.GetIntValue("CHALLENGE_BASE_COOLDOWN_ENABLED_ON_TH");
            this._obstacleRespawnSecs                         = this.GetIntValue("OBSTACLE_RESPAWN_SECONDS");
            this._obstacleMaxCount                            = this.GetIntValue("OBSTACLE_COUNT_MAX");
            this._resourceProductionLootPercentage            = this.GetIntValue("RESOURCE_PRODUCTION_LOOT_PERCENTAGE");
            this._darkElixirProductionLootPercentage          = this.GetIntValue("RESOURCE_PRODUCTION_LOOT_PERCENTAGE_DARK_ELIXIR");
            this._village2MinTownHallLevelForDestructObstacle = this.GetIntValue("VILLAGE2_DO_NOT_ALLOW_CLEAR_OBSTACLE_TH");
            this._attackVillage2PreparationLengthSecs         = this.GetIntValue("ATTACK_PREPARATION_LENGTH_VILLAGE2_SEC");
            this._attackPreparationLengthSecs                 = this.GetIntValue("ATTACK_PREPARATION_LENGTH_SEC");
            this._attackLengthSecs                            = this.GetIntValue("ATTACK_LENGTH_SEC");
            this._village2StartUnitLevel                      = this.GetIntValue("VILLAGE2_START_UNIT_LEVEL");
            this._resourceProductionBoostSecs                 = 60 * this.GetIntValue("RESOURCE_PRODUCTION_BOOST_MINS");
            this._barracksBoostSecs                           = 60 * this.GetIntValue("BARRACKS_BOOST_MINS");
            this._spellFactoryBoostSecs                       = 60 * this.GetIntValue("SPELL_FACTORY_BOOST_MINS");
            this._troopTrainingSpeedUpCostTutorial            = this.GetIntValue("TROOP_TRAINING_SPEED_UP_COST_TUTORIAL");
            this._newTrainingBoostBarracksCost                = this.GetIntValue("NEW_TRAINING_BOOST_BARRACKS_COST");
            this._newTrainingBoostLaboratoryCost              = this.GetIntValue("NEW_TRAINING_BOOST_LABORATORY_COST");
            this._personalBreakLimitSeconds                   = this.GetIntValue("PERSONAL_BREAK_LIMIT_SECONDS");

            this._clockTowerBoostMultiplier          = this.GetIntValue("CLOCK_TOWER_BOOST_MULTIPLIER");
            this._resourceProductionBoostMultiplier  = this.GetIntValue("RESOURCE_PRODUCTION_BOOST_MULTIPLIER");
            this._spellTrainingCostMultiplier        = this.GetIntValue("SPELL_TRAINING_COST_MULTIPLIER");
            this._spellSpeedUpCostMultiplier         = this.GetIntValue("SPELL_SPEED_UP_COST_MULTIPLIER");
            this._heroHealthSpeedUpCostMultipler     = this.GetIntValue("HERO_HEALTH_SPEED_UP_COST_MULTIPLIER");
            this._troopRequestSpeedUpCostMultiplier  = this.GetIntValue("TROOP_REQUEST_SPEED_UP_COST_MULTIPLIER");
            this._troopTrainingCostMultiplier        = this.GetIntValue("TROOP_TRAINING_COST_MULTIPLIER");
            this._speedUpBoostCooldownCostMultiplier = this.GetIntValue("SPEEDUP_BOOST_COOLDOWN_COST_MULTIPLIER");
            this._clockTowerSpeedUpMultiplier        = this.GetIntValue("CHALLENGE_BASE_COOLDOWN_ENABLED_ON_TH");
            this._barracksBoostMultiplier            = this.GetIntValue("BARRACKS_BOOST_MULTIPLIER");
            this._barracksBoostNewMultiplier         = this.GetIntValue("BARRACKS_BOOST_MULTIPLIER_NEW");
            this._spellFactoryBoostNewMultiplier     = this.GetIntValue("SPELL_FACTORY_BOOST_MULTIPLIER_NEW");
            this._spellFactoryBoostMultiplier        = this.GetIntValue("SPELL_FACTORY_BOOST_MULTIPLIER");
            this._heroRestBoostMultiplier            = this.GetIntValue("HERO_REST_BOOST_MULTIPLIER");
            this._buildCancelMultiplier = this.GetIntValue("BUILD_CANCEL_MULTIPLIER");
            this._trainCancelMultiplier = this.GetIntValue("TRAIN_CANCEL_MULTIPLIER");
            this._spellCancelMultiplier = this.GetIntValue("SPELL_CANCEL_MULTIPLIER");

            this._useNewPathFinder             = this.GetBoolValue("USE_NEW_PATH_FINDER");
            this._useTroopWalksOutFromTraining = this.GetBoolValue("USE_TROOP_WALKS_OUT_FROM_TRAINING");
            this._useVillageObjects            = this.GetBoolValue("USE_VILLAGE_OBJECTS");
            this._moreAccurateTime             = this.GetBoolValue("MORE_ACCURATE_TIME");
            this._useNewTraining                        = this.GetBoolValue("USE_NEW_TRAINING");
            this._dragInTraining                        = this.GetBoolValue("DRAG_IN_TRAINING");
            this._dragInTrainingFix                     = this.GetBoolValue("DRAG_IN_TRAINING_FIX");
            this._dragInTrainingFix2                    = this.GetBoolValue("DRAG_IN_TRAINING_FIX2");
            this._revertBrokenWarLayouts                = this.GetBoolValue("REVERT_BROKEN_WAR_LAYOUTS");
            this._liveReplayEnabled                     = this.GetBoolValue("LIVE_REPLAY_ENABLED");
            this._removeRevengeWhenBattleIsLoaded       = this.GetBoolValue("REMOVE_REVENGE_WHEN_BATTLE_IS_LOADED");
            this._completeConstructionOnlyHome          = this.GetBoolValue("COMPLETE_CONSTRUCTIONS_ONLY_HOME");
            this._useNewSpeedUpCalculation              = this.GetBoolValue("USE_NEW_SPEEDUP_CALCULATION");
            this._clampBuildingTimes                    = this.GetBoolValue("CLAMP_BUILDING_TIMES");
            this._stopBoostPauseWhenBoostTimeZeroOnLoad = this.GetBoolValue("STOP_BOOST_PAUSE_WHEN_BOOST_TIME_ZERO_ON_LOAD");
            this._fixMergeOldBarrackBoostPausing        = this.GetBoolValue("FIX_MERGE_OLD_BARRACK_BOOST_PAUSING");
            this._saveVillageObjects                    = this.GetBoolValue("SAVE_VILLAGE_OBJECTS");
            this._workerForZeroBuildingTime             = this.GetBoolValue("WORKER_FOR_ZERO_BUILD_TIME");
            this._adjustEndSubtickUseCurrentTime        = this.GetBoolValue("ADJUST_END_SUBTICK_USE_CURRENT_TIME");
            this._collectAllResourcesAtOnce             = this.GetBoolValue("COLLECT_ALL_RESOURCES_AT_ONCE");
            this._useSwapBuildings                      = this.GetBoolValue("USE_SWAP_BUILDINGS");
            this._treasurySizeBasedOnTawnHall           = this.GetBoolValue("TREASURY_SIZE_BASED_ON_TH");
            this._startInLastUsedVillage                = this.GetBoolValue("START_IN_LAST_USED_VILLAGE");
            this._useTeslaTriggerCommand                = this.GetBoolValue("USE_TESLA_TRIGGER_CMD");
            this._useTrapTriggerCommand                 = this.GetBoolValue("USE_TRAP_TRIGGER_CMD");
            this._validateTroopUpgradeLevels            = this.GetBoolValue("VALIDATE_TROOP_UPGRADE_LEVELS");
            this._allowCancelBuildingConstruction       = this.GetBoolValue("ALLOW_CANCEL_BUILDING_CONSTRUCTION");
            this._village2TrainingOnlyUseRegularStorage = this.GetBoolValue("V2_TRAINING_ONLY_USE_REGULAR_STORAGE");
            this._enableTroopDeletion                   = this.GetBoolValue("ENABLE_TROOP_DELETION");

            this._allianceCreateResourceData = LogicDataTables.GetResourceByName(this.GetGlobalData("ALLIANCE_CREATE_RESOURCE").TextValue);

            LogicGlobalData village2TroopHousingBuildCostData = this.GetGlobalData("TROOP_HOUSING_V2_COST");

            this._village2TroopHousingBuildCost = new int[village2TroopHousingBuildCostData.GetNumberArraySize()];

            for (int i = 0; i < this._village2TroopHousingBuildCost.Length; i++)
            {
                this._village2TroopHousingBuildCost[i] = village2TroopHousingBuildCostData.GetNumberArray(i);
            }

            LogicGlobalData village2TroopHousingBuildTimeSecsData = this.GetGlobalData("TROOP_HOUSING_V2_BUILD_TIME_SECONDS");

            this._village2TroopHousingBuildTimeSecs = new int[village2TroopHousingBuildTimeSecsData.GetNumberArraySize()];

            for (int i = 0; i < this._village2TroopHousingBuildTimeSecs.Length; i++)
            {
                this._village2TroopHousingBuildTimeSecs[i] = village2TroopHousingBuildTimeSecsData.GetNumberArray(i);
            }

            LogicGlobalData lootMultiplierByTownHallDifferenceObject = this.GetGlobalData("LOOT_MULTIPLIER_BY_TH_DIFF");

            this._lootMultiplierByTownHallDifference = new int[lootMultiplierByTownHallDifferenceObject.GetNumberArraySize()];

            for (int i = 0; i < this._lootMultiplierByTownHallDifference.Length; i++)
            {
                this._lootMultiplierByTownHallDifference[i] = lootMultiplierByTownHallDifferenceObject.GetNumberArray(i);
            }

            LogicGlobalData barrackReduceTrainingDivisorObject = this.GetGlobalData("BARRACK_REDUCE_TRAINING_DIVISOR");

            this._barrackReduceTrainingDivisor = new int[barrackReduceTrainingDivisorObject.GetNumberArraySize()];

            for (int i = 0; i < this._barrackReduceTrainingDivisor.Length; i++)
            {
                this._barrackReduceTrainingDivisor[i] = barrackReduceTrainingDivisorObject.GetNumberArray(i);
            }

            LogicGlobalData darkBarrackReduceTrainingDivisorObject = this.GetGlobalData("DARK_BARRACK_REDUCE_TRAINING_DIVISOR");

            this._darkBarrackReduceTrainingDivisor = new int[darkBarrackReduceTrainingDivisorObject.GetNumberArraySize()];

            for (int i = 0; i < this._darkBarrackReduceTrainingDivisor.Length; i++)
            {
                this._darkBarrackReduceTrainingDivisor[i] = darkBarrackReduceTrainingDivisorObject.GetNumberArray(i);
            }

            LogicGlobalData clockTowerBoostObject = this.GetGlobalData("CLOCK_TOWER_BOOST_MINS");

            this._clockTowerBoostSecs = new int[clockTowerBoostObject.GetNumberArraySize()];

            for (int i = 0; i < this._clockTowerBoostSecs.Length; i++)
            {
                this._clockTowerBoostSecs[i] = clockTowerBoostObject.GetNumberArray(i);
            }
        }
コード例 #2
0
        /// <summary>
        ///     Creates a new data item.
        /// </summary>
        public LogicData CreateItem(CSVRow row)
        {
            LogicData data = null;

            switch (this._tableIndex)
            {
            case 0:
            {
                data = new LogicBuildingData(row, this);
                break;
            }

            case 1:
            {
                data = new LogicLocaleData(row, this);
                break;
            }

            case 2:
            {
                data = new LogicResourceData(row, this);
                break;
            }

            case 3:
            {
                data = new LogicCharacterData(row, this);
                break;
            }

            case 5:
            {
                data = new LogicProjectileData(row, this);
                break;
            }

            case 6:
            {
                data = new LogicBuildingClassData(row, this);
                break;
            }

            case 7:
            {
                data = new LogicObstacleData(row, this);
                break;
            }

            case 8:
            {
                data = new LogicEffectData(row, this);
                break;
            }

            case 9:
            {
                data = new LogicParticleEmitterData(row, this);
                break;
            }

            case 10:
            {
                data = new LogicExperienceLevelData(row, this);
                break;
            }

            case 11:
            {
                data = new LogicTrapData(row, this);
                break;
            }

            case 12:
            {
                data = new LogicAllianceBadgeData(row, this);
                break;
            }

            case 13:
            {
                data = new LogicGlobalData(row, this);
                break;
            }

            case 14:
            {
                data = new LogicTownhallLevelData(row, this);
                break;
            }

            case 15:
            {
                data = new LogicAlliancePortalData(row, this);
                break;
            }

            case 16:
            {
                data = new LogicNpcData(row, this);
                break;
            }

            case 17:
            {
                data = new LogicDecoData(row, this);
                break;
            }

            case 18:
            {
                data = new LogicResourcePackData(row, this);
                break;
            }

            case 19:
            {
                data = new LogicShieldData(row, this);
                break;
            }

            case 20:
            {
                data = new LogicMissionData(row, this);
                break;
            }

            case 21:
            {
                data = new LogicBillingPackageData(row, this);
                break;
            }

            case 22:
            {
                data = new LogicAchievementData(row, this);
                break;
            }

            case 23:
            {
                data = new LogicFaqData(row, this);
                break;
            }

            case 25:
            {
                data = new LogicSpellData(row, this);
                break;
            }

            case 26:
            {
                data = new LogicHintData(row, this);
                break;
            }

            case 27:
            {
                data = new LogicHeroData(row, this);
                break;
            }

            case 28:
            {
                data = new LogicLeagueData(row, this);
                break;
            }

            case 29:
            {
                data = new LogicNewsData(row, this);
                break;
            }

            case 30:
            {
                data = new LogicWarData(row, this);
                break;
            }

            case 31:
            {
                data = new LogicRegionData(row, this);
                break;
            }

            case 32:
            {
                data = new LogicGlobalData(row, this);
                break;
            }

            case 33:
            {
                data = new LogicAllianceBadgeLayerData(row, this);
                break;
            }

            case 34:
            {
                data = new LogicAllianceLevelData(row, this);
                break;
            }

            case 36:
            {
                data = new LogicVariableData(row, this);
                break;
            }

            case 37:
            {
                data = new LogicGemBundleData(row, this);
                break;
            }

            case 38:
            {
                data = new LogicVillageObjectData(row, this);
                break;
            }

            case 39:
            {
                data = new LogicCalendarEventFunctionData(row, this);
                break;
            }

            case 40:
            {
                data = new LogicBoomboxData(row, this);
                break;
            }

            case 41:
            {
                data = new LogicEventEntryData(row, this);
                break;
            }

            case 42:
            {
                data = new LogicDeeplinkData(row, this);
                break;
            }

            case 43:
            {
                data = new LogicLeague2Data(row, this);
                break;
            }

            default:
            {
                Debugger.Error("Invalid data table id: " + this._tableIndex);
                break;
            }
            }

            return(data);
        }