/// <summary> /// Initializes the <see cref="Globals"/> class. /// </summary> internal static void Init() { if (Globals.Initialized) { return; } Globals.StartingGold = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_GOLD")).NumberValue; Globals.StartingDiamonds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_DIAMONDS")).NumberValue; Globals.EnergyRegenateSeconds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("ENERGY_REGENERATE_SECONDS")).NumberValue; Globals.StartingCharacter = (LogicHeroData)CSV.Tables.Get(Gamefile.Heroes).GetDataByName(((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_CHARACTER")).TextValue); Globals.StartingQuest = (LogicQuestData)CSV.Tables.Get(Gamefile.Quests).GetDataByName(((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_QUEST")).TextValue); Globals.SpeedUpDiamondCost1Min = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_MIN")).NumberValue; Globals.SpeedUpDiamondCost1Hour = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_HOUR")).NumberValue; Globals.SpeedUpDiamondCost24Hours = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_24_HOURS")).NumberValue; Globals.SpeedUpDiamondCost1Week = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_WEEK")).NumberValue; Globals.ResourceDiamondCost10 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_10")).NumberValue; Globals.ResourceDiamondCost100 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_100")).NumberValue; Globals.ResourceDiamondCost1000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_1000")).NumberValue; Globals.ResourceDiamondCost10000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_10000")).NumberValue; Globals.ResourceDiamondCost50000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_50000")).NumberValue; Globals.ResourceDiamondCost100000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_100000")).NumberValue; Globals.ResourceDiamondCost500000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_500000")).NumberValue; Globals.ResourceDiamondCost1000000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_1000000")).NumberValue; LogicCharacters.Init(); LogicQuests.Init(); Globals.Initialized = true; }
/// <summary> /// Initializes the <see cref="Globals"/> class. /// </summary> internal static void Init() { if (Globals.Initialized) { return; } Globals.StartingGold = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_GOLD")).NumberValue; Globals.StartingDiamonds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_DIAMONDS")).NumberValue; Globals.EnergyRegenateSeconds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("ENERGY_REGENERATE_SECONDS")).NumberValue; Globals.StartingCharacter = (LogicHeroData)CSV.Tables.Get(Gamefile.Heroes).GetDataByName(((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_CHARACTER")).TextValue); Globals.StartingQuest = (LogicQuestData)CSV.Tables.Get(Gamefile.Quests).GetDataByName(((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("STARTING_QUEST")).TextValue); Globals.ShipSailDurationHours = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SHIP_SAIL_DURATION_HOURS")).NumberValue; Globals.TeamGoalSeasonDurationHours = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("TEAM_GOAL_SEASON_DURATION_HOURS")).NumberValue; Globals.SpeedUpDiamondCost1Min = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_MIN")).NumberValue; Globals.SpeedUpDiamondCost1Hour = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_HOUR")).NumberValue; Globals.SpeedUpDiamondCost24Hours = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_24_HOURS")).NumberValue; Globals.SpeedUpDiamondCost1Week = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("SPEED_UP_DIAMOND_COST_1_WEEK")).NumberValue; Globals.ResourceDiamondCost10 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_10")).NumberValue; Globals.ResourceDiamondCost100 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_100")).NumberValue; Globals.ResourceDiamondCost1000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_1000")).NumberValue; Globals.ResourceDiamondCost10000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_10000")).NumberValue; Globals.ResourceDiamondCost50000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_50000")).NumberValue; Globals.ResourceDiamondCost100000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_100000")).NumberValue; Globals.ResourceDiamondCost500000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_500000")).NumberValue; Globals.ResourceDiamondCost1000000 = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("RESOURCE_DIAMOND_COST_1000000")).NumberValue; Globals.PVPFirstTurnTimeSeconds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("PVP_FIRST_TURN_MAX_TURN_TIME_SECONDS")).NumberValue; Globals.PVPMaxTurnTimeSeconds = ((LogicGlobalData)CSV.Tables.Get(Gamefile.Globals).GetDataByName("PVP_MAX_TURN_TIME_SECONDS")).NumberValue; LogicCharacters.Init(); LogicQuests.Init(); Globals.Initialized = true; }
/// <summary> /// Initializes a new instance of the <see cref="LogicQuest"/> class. /// </summary> internal LogicQuest(LogicClientAvatar avatar, LogicQuestData data) { this.Avatar = avatar; this.Data = data; this.Levels = new LogicArrayList <LogicLevel>(); }
internal override void Decode() { this.Quest = this.Stream.ReadDataReference <LogicQuestData>(); this.ReadHeader(); }
/// <summary> /// Creates the data for the specified row. /// </summary> internal LogicData Create(Row row) { LogicData data; switch (this.Index) { case 1: { data = new LogicLocaleData(row, this); break; } case 2: { data = new LogicResourceData(row, this); break; } case 3: { data = new LogicEffectData(row, this); break; } case 4: { data = new LogicParticleEmitterData(row, this); break; } case 5: { data = new LogicGlobalData(row, this); break; } case 6: { data = new LogicQuestData(row, this); break; } case 8: { data = new LogicAchievementData(row, this); break; } case 10: { data = new LogicWorldData(row, this); break; } case 11: { data = new LogicHeroData(row, this); break; } case 12: { data = new LogicExperienceLevelData(row, this); break; } case 13: { data = new LogicLeagueData(row, this); break; } case 21: { data = new LogicAllianceBadgeData(row, this); break; } case 24: { data = new LogicTauntData(row, this); break; } case 25: { data = new LogicDecoData(row, this); break; } case 26: { data = new LogicVariableData(row, this); break; } case 28: { data = new LogicBoosterData(row, this); break; } case 32: { data = new LogicEnergyPackageData(row, this); break; } case 35: { data = new LogicSpellData(row, this); break; } case 36: { data = new LogicObstacleData(row, this); break; } case 37: { data = new LogicItemsData(row, this); break; } default: { data = new LogicData(row, this); break; } } return(data); }