public void ReadRow(Row row) { this.AssetName = row.TryGetString(CivilianTypeVO.COLUMN_assetName); this.BundleName = row.TryGetString(CivilianTypeVO.COLUMN_bundleName); this.Uid = row.Uid; this.Faction = StringUtils.ParseEnum <FactionType>(row.TryGetString(CivilianTypeVO.COLUMN_faction)); this.Credits = row.TryGetInt(CivilianTypeVO.COLUMN_credits); this.Materials = row.TryGetInt(CivilianTypeVO.COLUMN_materials); this.Contraband = row.TryGetInt(CivilianTypeVO.COLUMN_contraband); this.Health = row.TryGetInt(CivilianTypeVO.COLUMN_health); this.MaxSpeed = row.TryGetInt(CivilianTypeVO.COLUMN_maxSpeed); this.RotationSpeed = row.TryGetInt(CivilianTypeVO.COLUMN_newRotationSpeed); this.Size = row.TryGetInt(CivilianTypeVO.COLUMN_size); this.Xp = row.TryGetInt(CivilianTypeVO.COLUMN_xp); this.SizeX = row.TryGetInt(CivilianTypeVO.COLUMN_sizex); this.SizeY = row.TryGetInt(CivilianTypeVO.COLUMN_sizey); ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); this.AudioCharge = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(CivilianTypeVO.COLUMN_audioCharge)); this.AudioAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(CivilianTypeVO.COLUMN_audioAttack)); this.AudioDeath = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(CivilianTypeVO.COLUMN_audioDeath)); this.AudioPlacement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(CivilianTypeVO.COLUMN_audioPlacement)); if (this.RotationSpeed == 0) { Service.Get <StaRTSLogger>().ErrorFormat("Missing rotation speed for civilianTypeVO {0}", new object[] { this.Uid }); } }
public void ReadRow(Row row) { this.Uid = row.Uid; StaticDataController staticDataController = Service.StaticDataController; string value = row.TryGetString(SkinOverrideTypeVO.COLUMN_projectileType); if (!string.IsNullOrEmpty(value)) { this.ProjectileType = staticDataController.Get <ProjectileTypeVO>(row.TryGetString(SkinOverrideTypeVO.COLUMN_projectileType)); } this.WarmupDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_chargeTime); this.AnimationDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_animationDelay); this.ShotDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_shotDelay); this.CooldownDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_reload); this.ShotCount = row.TryGetUint(SkinOverrideTypeVO.COLUMN_shotCount); ValueObjectController valueObjectController = Service.ValueObjectController; SequencePair gunSequences = valueObjectController.GetGunSequences(this.Uid, row.TryGetString(SkinOverrideTypeVO.COLUMN_gunSequence)); this.GunSequence = gunSequences.GunSequence; this.Sequences = gunSequences.Sequences; this.ViewRange = row.TryGetUint(SkinOverrideTypeVO.COLUMN_viewRange); this.MinAttackRange = row.TryGetUint(SkinOverrideTypeVO.COLUMN_minAttackRange); this.MaxAttackRange = row.TryGetUint(SkinOverrideTypeVO.COLUMN_maxAttackRange); this.TroopRole = StringUtils.ParseEnum <TroopRole>(row.TryGetString(SkinOverrideTypeVO.COLUMN_role)); this.CrushesWalls = row.TryGetBool(SkinOverrideTypeVO.COLUMN_crushesWalls); this.IgnoresWalls = row.TryGetBool(SkinOverrideTypeVO.COLUMN_ignoresWalls); this.Preference = new int[24]; int i = 0; int num = 24; while (i < num) { this.Preference[i] = -1; i++; } this.Preference[1] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_wall, -1); this.Preference[2] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_building, -1); this.Preference[3] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_storage, -1); this.Preference[4] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_resource, -1); this.Preference[5] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_turret, -1); this.Preference[6] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_HQ, -1); this.Preference[7] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_shield, -1); this.Preference[8] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_shieldGenerator, -1); this.Preference[9] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_infantry, -1); this.Preference[10] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_bruiserInfantry, -1); this.Preference[11] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_vehicle, -1); this.Preference[12] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_bruiserVehicle, -1); this.Preference[13] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_heroInfantry, -1); this.Preference[14] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_heroVehicle, -1); this.Preference[15] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_heroBruiserInfantry, -1); this.Preference[16] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_heroBruiserVechicle, -1); this.Preference[17] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_flierInfantry, -1); this.Preference[18] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_flierVehicle, -1); this.Preference[19] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_healerInfantry, -1); this.Preference[20] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_trap, -1); this.Preference[21] = row.TryGetInt(SkinOverrideTypeVO.COLUMN_champion, -1); this.PreferencePercentile = row.TryGetInt(SkinOverrideTypeVO.COLUMN_targetPreferenceStrength, -1); }
public void ReadRow(Row row) { this.Uid = row.Uid; this.UnitId = row.TryGetString(SkinTypeVO.COLUMN_unitID); string text = row.TryGetString(SkinTypeVO.COLUMN_override); if (!string.IsNullOrEmpty(text)) { StaticDataController staticDataController = Service.StaticDataController; this.Override = staticDataController.Get <SkinOverrideTypeVO>(text); } this.AssetName = row.TryGetString(SkinTypeVO.COLUMN_assetName); this.BundleName = row.TryGetString(SkinTypeVO.COLUMN_bundleName); ValueObjectController valueObjectController = Service.ValueObjectController; this.AudioAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SkinTypeVO.COLUMN_audioAttack)); this.AudioDeath = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SkinTypeVO.COLUMN_audioDeath)); this.AudioPlacement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SkinTypeVO.COLUMN_audioPlacement)); this.AudioImpact = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SkinTypeVO.COLUMN_audioImpact)); this.AudioTrain = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SkinTypeVO.COLUMN_audioTrain)); this.IconCameraPosition = row.TryGetVector3(SkinTypeVO.COLUMN_iconCameraPosition); this.IconLookatPosition = row.TryGetVector3(SkinTypeVO.COLUMN_iconLookatPosition); this.IconCloseupCameraPosition = row.TryGetVector3(SkinTypeVO.COLUMN_iconCloseupCameraPosition); this.IconCloseupLookatPosition = row.TryGetVector3(SkinTypeVO.COLUMN_iconCloseupLookatPosition); this.IconAssetName = row.TryGetString(SkinTypeVO.COLUMN_iconAssetName, this.AssetName); this.IconBundleName = row.TryGetString(SkinTypeVO.COLUMN_iconBundleName, this.BundleName); this.IconRotationSpeed = row.TryGetFloat(SkinTypeVO.COLUMN_iconRotationSpeed); this.MaxSpeed = row.TryGetInt(SkinTypeVO.COLUMN_maxSpeed); this.RotationSpeed = row.TryGetInt(SkinTypeVO.COLUMN_rotationSpeed); string text2 = row.TryGetString(SkinTypeVO.COLUMN_hologramUid); if (!string.IsNullOrEmpty(text2)) { StaticDataController staticDataController2 = Service.StaticDataController; this.MobilizationHologram = staticDataController2.Get <MobilizationHologramVO>(text2); } string text3 = row.TryGetString(SkinTypeVO.COLUMN_textureUid); if (!string.IsNullOrEmpty(text3)) { StaticDataController staticDataController3 = Service.StaticDataController; this.CardTexture = staticDataController3.Get <TextureVO>(text3); } }
private Dictionary <string, int> GetData(Row row, int columnIndex) { ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); List <StrIntPair> strIntPairs = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(columnIndex)); if (strIntPairs == null) { return(null); } Dictionary <string, int> dictionary = new Dictionary <string, int>(); int i = 0; int count = strIntPairs.Count; while (i < count) { StrIntPair strIntPair = strIntPairs[i]; dictionary.Add(strIntPair.StrKey, strIntPair.IntVal); i++; } return(dictionary); }
public void ReadRow(Row row) { this.Uid = row.Uid; IDataController dataController = Service.Get <IDataController>(); string text = row.TryGetString(SkinOverrideTypeVO.COLUMN_projectileType); if (!string.IsNullOrEmpty(text)) { this.ProjectileType = dataController.Get <ProjectileTypeVO>(row.TryGetString(SkinOverrideTypeVO.COLUMN_projectileType)); } this.WarmupDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_chargeTime); this.AnimationDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_animationDelay); this.ShotDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_shotDelay); this.CooldownDelay = row.TryGetUint(SkinOverrideTypeVO.COLUMN_reload); this.ShotCount = row.TryGetUint(SkinOverrideTypeVO.COLUMN_shotCount); ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); SequencePair gunSequences = valueObjectController.GetGunSequences(this.Uid, row.TryGetString(SkinOverrideTypeVO.COLUMN_gunSequence)); this.GunSequence = gunSequences.GunSequence; this.Sequences = gunSequences.Sequences; }
public void ReadRow(Row row) { this.Uid = row.Uid; this.SoundName = row.TryGetString(NotificationTypeVO.COLUMN_soundName); if (this.SoundName.Equals("")) { this.SoundName = null; } this.Desc = row.TryGetString(NotificationTypeVO.COLUMN_desc); this.MinCompletionTime = row.TryGetInt(NotificationTypeVO.COLUMN_minCompletionTime); this.RepeatTime = row.TryGetInt(NotificationTypeVO.COLUMN_repeatTime); ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); List <StrIntPair> strIntPairs = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(NotificationTypeVO.COLUMN_validTimeRange)); int earliestValidTime = 10; int latestValidTime = 21; if (strIntPairs != null) { int i = 0; int count = strIntPairs.Count; while (i < count) { StrIntPair strIntPair = strIntPairs[i]; string strKey = strIntPair.StrKey; if (strKey == "earliest") { earliestValidTime = strIntPair.IntVal; } else if (strKey == "latest") { latestValidTime = strIntPair.IntVal; } i++; } } this.EarliestValidTime = earliestValidTime; this.LatestValidTime = latestValidTime; }
public void ReadRow(Row row) { this.Uid = row.Uid; this.TrackerName = row.TryGetString(TurretTypeVO.COLUMN_trackerName); this.Preference = new int[23]; int i = 0; int num = 23; while (i < num) { this.Preference[i] = 0; i++; } this.Preference[1] = row.TryGetInt(TurretTypeVO.COLUMN_wall); this.Preference[2] = row.TryGetInt(TurretTypeVO.COLUMN_building); this.Preference[3] = row.TryGetInt(TurretTypeVO.COLUMN_storage); this.Preference[4] = row.TryGetInt(TurretTypeVO.COLUMN_resource); this.Preference[5] = row.TryGetInt(TurretTypeVO.COLUMN_turret); this.Preference[6] = row.TryGetInt(TurretTypeVO.COLUMN_HQ); this.Preference[7] = row.TryGetInt(TurretTypeVO.COLUMN_shield); this.Preference[8] = row.TryGetInt(TurretTypeVO.COLUMN_shieldGenerator); this.Preference[9] = row.TryGetInt(TurretTypeVO.COLUMN_infantry); this.Preference[10] = row.TryGetInt(TurretTypeVO.COLUMN_bruiserInfantry); this.Preference[11] = row.TryGetInt(TurretTypeVO.COLUMN_vehicle); this.Preference[12] = row.TryGetInt(TurretTypeVO.COLUMN_bruiserVehicle); this.Preference[13] = row.TryGetInt(TurretTypeVO.COLUMN_heroInfantry); this.Preference[14] = row.TryGetInt(TurretTypeVO.COLUMN_heroVehicle); this.Preference[15] = row.TryGetInt(TurretTypeVO.COLUMN_heroBruiserInfantry); this.Preference[16] = row.TryGetInt(TurretTypeVO.COLUMN_heroBruiserVehicle); this.Preference[17] = row.TryGetInt(TurretTypeVO.COLUMN_flierInfantry); this.Preference[18] = row.TryGetInt(TurretTypeVO.COLUMN_flierVehicle); this.Preference[19] = row.TryGetInt(TurretTypeVO.COLUMN_healerInfantry); this.Preference[20] = row.TryGetInt(TurretTypeVO.COLUMN_trap); this.Preference[21] = row.TryGetInt(TurretTypeVO.COLUMN_champion); this.PreferencePercentile = row.TryGetInt(TurretTypeVO.COLUMN_targetPreferenceStrength); this.NearnessPercentile = 100 - this.PreferencePercentile; this.Damage = row.TryGetInt(TurretTypeVO.COLUMN_damage); this.DPS = row.TryGetInt(TurretTypeVO.COLUMN_dps); this.FavoriteTargetType = row.TryGetString(TurretTypeVO.COLUMN_favoriteTargetType); this.MinAttackRange = row.TryGetUint(TurretTypeVO.COLUMN_minAttackRange); this.MaxAttackRange = row.TryGetUint(TurretTypeVO.COLUMN_maxAttackRange); this.ShotCount = row.TryGetUint(TurretTypeVO.COLUMN_shotCount); this.WarmupDelay = row.TryGetUint(TurretTypeVO.COLUMN_chargeTime); this.AnimationDelay = row.TryGetUint(TurretTypeVO.COLUMN_animationDelay); this.ShotDelay = row.TryGetUint(TurretTypeVO.COLUMN_shotDelay); this.CooldownDelay = row.TryGetUint(TurretTypeVO.COLUMN_reload); this.StrictCooldown = row.TryGetBool(TurretTypeVO.COLUMN_strictCoolDown); this.ClipRetargeting = row.TryGetBool(TurretTypeVO.COLUMN_clipRetargeting); this.ProjectileType = Service.Get <IDataController>().Get <ProjectileTypeVO>(row.TryGetString(TurretTypeVO.COLUMN_projectileType)); if (this.ProjectileType.IsBeam && (long)this.ProjectileType.BeamDamageLength < (long)((ulong)this.MaxAttackRange)) { Service.Get <StaRTSLogger>().WarnFormat("Turret {0} can target something it can't damage", new object[] { this.Uid }); } ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); SequencePair gunSequences = valueObjectController.GetGunSequences(this.Uid, row.TryGetString(TurretTypeVO.COLUMN_gunSequence)); this.GunSequence = gunSequences.GunSequence; this.Sequences = gunSequences.Sequences; }
public void ReadRow(Row row) { this.Uid = row.Uid; this.SelfBuff = row.TryGetString(TroopAbilityVO.COLUMN_selfBuff); this.TargetSelf = row.TryGetBool(TroopAbilityVO.COLUMN_targetSelf); this.Duration = row.TryGetUint(TroopAbilityVO.COLUMN_duration); this.PersistentEffect = row.TryGetString(TroopAbilityVO.COLUMN_persistentEffect); this.PersistentScaling = (float)(100 + row.TryGetInt(TroopAbilityVO.COLUMN_persistentScaling)) * 0.01f; this.Damage = row.TryGetInt(TroopAbilityVO.COLUMN_damage); this.ViewRange = row.TryGetUint(TroopAbilityVO.COLUMN_viewRange); this.MinAttackRange = row.TryGetUint(TroopAbilityVO.COLUMN_minAttackRange); this.MaxAttackRange = row.TryGetUint(TroopAbilityVO.COLUMN_maxAttackRange); string text = row.TryGetString(TroopAbilityVO.COLUMN_projectileType); if (!string.IsNullOrEmpty(text)) { this.ProjectileType = Service.StaticDataController.Get <ProjectileTypeVO>(text); } this.OverWalls = row.TryGetBool(TroopAbilityVO.COLUMN_overWalls); this.FavoriteTargetType = row.TryGetString(TroopAbilityVO.COLUMN_favoriteTargetType); this.TargetLocking = row.TryGetBool(TroopAbilityVO.COLUMN_targetLocking); this.CoolDownTime = row.TryGetUint(TroopAbilityVO.COLUMN_cooldownTime); this.ArmingDelay = row.TryGetUint(TroopAbilityVO.COLUMN_armingDelay); this.WarmupDelay = row.TryGetUint(TroopAbilityVO.COLUMN_chargeTime); this.AnimationDelay = row.TryGetUint(TroopAbilityVO.COLUMN_animationDelay); this.ShotDelay = row.TryGetUint(TroopAbilityVO.COLUMN_shotDelay); this.CooldownDelay = row.TryGetUint(TroopAbilityVO.COLUMN_reload); this.ShotCount = row.TryGetUint(TroopAbilityVO.COLUMN_shotCount); this.PreferencePercentile = row.TryGetInt(TroopAbilityVO.COLUMN_targetPreferenceStrength); this.NearnessPercentile = 100 - this.PreferencePercentile; this.Preference = new int[24]; int i = 0; int num = 24; while (i < num) { this.Preference[i] = 0; i++; } this.Preference[1] = row.TryGetInt(TroopAbilityVO.COLUMN_wall); this.Preference[2] = row.TryGetInt(TroopAbilityVO.COLUMN_building); this.Preference[3] = row.TryGetInt(TroopAbilityVO.COLUMN_storage); this.Preference[4] = row.TryGetInt(TroopAbilityVO.COLUMN_resource); this.Preference[5] = row.TryGetInt(TroopAbilityVO.COLUMN_turret); this.Preference[6] = row.TryGetInt(TroopAbilityVO.COLUMN_HQ); this.Preference[7] = row.TryGetInt(TroopAbilityVO.COLUMN_shield); this.Preference[8] = row.TryGetInt(TroopAbilityVO.COLUMN_shieldGenerator); this.Preference[9] = row.TryGetInt(TroopAbilityVO.COLUMN_infantry); this.Preference[10] = row.TryGetInt(TroopAbilityVO.COLUMN_bruiserInfantry); this.Preference[11] = row.TryGetInt(TroopAbilityVO.COLUMN_vehicle); this.Preference[12] = row.TryGetInt(TroopAbilityVO.COLUMN_bruiserVehicle); this.Preference[13] = row.TryGetInt(TroopAbilityVO.COLUMN_heroInfantry); this.Preference[14] = row.TryGetInt(TroopAbilityVO.COLUMN_heroVehicle); this.Preference[15] = row.TryGetInt(TroopAbilityVO.COLUMN_heroBruiserInfantry); this.Preference[16] = row.TryGetInt(TroopAbilityVO.COLUMN_heroBruiserVehicle); this.Preference[17] = row.TryGetInt(TroopAbilityVO.COLUMN_flierInfantry); this.Preference[18] = row.TryGetInt(TroopAbilityVO.COLUMN_flierVehicle); this.Preference[19] = row.TryGetInt(TroopAbilityVO.COLUMN_healerInfantry); this.Preference[20] = row.TryGetInt(TroopAbilityVO.COLUMN_trap); this.Preference[21] = row.TryGetInt(TroopAbilityVO.COLUMN_champion); ValueObjectController valueObjectController = Service.ValueObjectController; this.AudioAbilityActivate = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopAbilityVO.COLUMN_audioAbilityActivate)); this.AudioAbilityAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopAbilityVO.COLUMN_audioAbilityAttack)); this.AudioAbilityLoop = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopAbilityVO.COLUMN_audioAbilityLoop)); this.RecastAbility = row.TryGetBool(TroopAbilityVO.COLUMN_recastAbility); SequencePair gunSequences = valueObjectController.GetGunSequences(this.Uid, row.TryGetString(TroopAbilityVO.COLUMN_gunSequence)); this.GunSequence = gunSequences.GunSequence; this.Sequences = gunSequences.Sequences; this.MaxSpeed = row.TryGetInt(TroopAbilityVO.COLUMN_maxSpeed); this.RotationSpeed = row.TryGetInt(TroopAbilityVO.COLUMN_newRotationSpeed); this.Auto = row.TryGetBool(TroopAbilityVO.COLUMN_auto); this.ClipCount = row.TryGetInt(TroopAbilityVO.COLUMN_clipCount); this.CooldownOnSpawn = row.TryGetBool(TroopAbilityVO.COLUMN_cooldownOnSpawn); this.WeaponTrailFxParams = row.TryGetFloatArray(TroopAbilityVO.COLUMN_weaponTrailFxParams); this.RetargetingOffset = row.TryGetUint(TroopAbilityVO.COLUMN_retargetingOffset); this.ClipRetargeting = row.TryGetBool(TroopAbilityVO.COLUMN_clipRetargeting); this.NewTargetOnReload = row.TryGetBool(TroopAbilityVO.COLUMN_newTargetOnReload); this.StrictCooldown = row.TryGetBool(TroopAbilityVO.COLUMN_strictCoolDown); this.DPS = row.TryGetInt(TroopAbilityVO.COLUMN_dps); this.AltGunLocators = row.TryGetIntArray(TroopAbilityVO.COLUMN_altGunLocators); string name = row.TryGetString(TroopAbilityVO.COLUMN_troopRole, "None"); this.TroopRole = StringUtils.ParseEnum <TroopRole>(name); this.CrushesWalls = row.TryGetBool(TroopAbilityVO.COLUMN_crushesWalls); this.IgnoresWalls = row.TryGetBool(TroopAbilityVO.COLUMN_ignoresWalls); }
public void ReadRow(Row row) { this.Uid = row.Uid; this.MissionType = StringUtils.ParseEnum <MissionType>(row.TryGetString(CampaignMissionVO.COLUMN_missionType)); this.Waves = row.TryGetString(CampaignMissionVO.COLUMN_waves); this.Map = row.TryGetString(CampaignMissionVO.COLUMN_map); this.CampaignUid = row.TryGetString(CampaignMissionVO.COLUMN_campaignUid); this.Title = row.TryGetString(CampaignMissionVO.COLUMN_title); this.UnlockOrder = row.TryGetInt(CampaignMissionVO.COLUMN_unlockOrder); this.Description = row.TryGetString(CampaignMissionVO.COLUMN_description); this.Rewards = row.TryGetString(CampaignMissionVO.COLUMN_rewards); this.MasteryStars = 3; this.IntroStory = row.TryGetString(CampaignMissionVO.COLUMN_introStory); this.SuccessStory = row.TryGetString(CampaignMissionVO.COLUMN_winStory); this.FailureStory = row.TryGetString(CampaignMissionVO.COLUMN_loseStory); this.GoalFailureStory = row.TryGetString(CampaignMissionVO.COLUMN_goalFailStory); this.OpponentName = row.TryGetString(CampaignMissionVO.COLUMN_opponentName); this.GoalString = row.TryGetString(CampaignMissionVO.COLUMN_goalString); this.GoalFailureString = row.TryGetString(CampaignMissionVO.COLUMN_goalFailString); this.ProgressString = row.TryGetString(CampaignMissionVO.COLUMN_progressString); this.Replayable = row.TryGetBool(CampaignMissionVO.COLUMN_replay); this.Grind = row.TryGetBool(CampaignMissionVO.COLUMN_grind); this.BattleMusic = row.TryGetString(CampaignMissionVO.COLUMN_battleMusic); this.AmbientMusic = row.TryGetString(CampaignMissionVO.COLUMN_ambientMusic); this.CampaignPoints = this.ParseCampaignPoints(row.TryGetString(CampaignMissionVO.COLUMN_campaignPoints)); this.FixedWaves = row.TryGetBool(CampaignMissionVO.COLUMN_fixedWaves); this.RaidDescriptionID = row.TryGetString(CampaignMissionVO.COLUMN_raidDesc); this.RaidBriefingBGTextureName = row.TryGetString(CampaignMissionVO.COLUMN_raidImage); this.TotalLoot = null; ValueObjectController valueObjectController = Service.ValueObjectController; List <StrIntPair> strIntPairs = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(CampaignMissionVO.COLUMN_totalLoot)); if (strIntPairs != null) { int num = 6; this.TotalLoot = new int[num]; for (int i = 0; i < num; i++) { this.TotalLoot[i] = -1; } int j = 0; int count = strIntPairs.Count; while (j < count) { StrIntPair strIntPair = strIntPairs[j]; this.TotalLoot[(int)StringUtils.ParseEnum <CurrencyType>(strIntPair.StrKey)] = strIntPair.IntVal; j++; } } StaticDataController staticDataController = Service.StaticDataController; this.Conditions = new List <ConditionVO>(); string[] array = row.TryGetStringArray(CampaignMissionVO.COLUMN_victoryConditions); for (int k = 0; k < array.Length; k++) { this.Conditions.Add(staticDataController.Get <ConditionVO>(array[k])); } if (!string.IsNullOrEmpty(this.CampaignUid)) { CampaignVO optional = staticDataController.GetOptional <CampaignVO>(this.CampaignUid); if (optional != null) { optional.TotalMissions++; optional.TotalMasteryStars += this.MasteryStars; } else { Service.Logger.ErrorFormat("CampaignMissionVO {0} that references a CampaignVO Uid {1} that doesn't exist", new object[] { this.Uid, this.CampaignUid }); } } this.FailureCondition = row.TryGetString(CampaignMissionVO.COLUMN_failureCondition); this.BIChapterId = row.TryGetString(CampaignMissionVO.COLUMN_bi_chap_id); this.BIContext = row.TryGetString(CampaignMissionVO.COLUMN_bi_context); this.BIEnemyTier = row.TryGetInt(CampaignMissionVO.COLUMN_bi_enemy_tier); this.BIMissionId = row.TryGetString(CampaignMissionVO.COLUMN_bi_mission_id); this.BIMissionName = row.TryGetString(CampaignMissionVO.COLUMN_bi_mission_name); }
public void ReadRow(Row row) { this.AssetName = row.TryGetString(BuildingTypeVO.COLUMN_assetName); this.BundleName = row.TryGetString(BuildingTypeVO.COLUMN_bundleName); this.IconAssetName = row.TryGetString(BuildingTypeVO.COLUMN_iconAssetName, this.AssetName); this.IconBundleName = row.TryGetString(BuildingTypeVO.COLUMN_iconBundleName, this.BundleName); this.ArmorType = StringUtils.ParseEnum <ArmorType>(row.TryGetString(BuildingTypeVO.COLUMN_armorType)); this.Uid = row.Uid; this.Faction = StringUtils.ParseEnum <FactionType>(row.TryGetString(BuildingTypeVO.COLUMN_faction)); this.BuildingID = row.TryGetString(BuildingTypeVO.COLUMN_buildingID); this.Type = StringUtils.ParseEnum <BuildingType>(row.TryGetString(BuildingTypeVO.COLUMN_type)); this.SubType = StringUtils.ParseEnum <BuildingSubType>(row.TryGetString(BuildingTypeVO.COLUMN_subType)); this.StoreTab = StringUtils.ParseEnum <StoreTab>(row.TryGetString(BuildingTypeVO.COLUMN_storeTab)); this.Credits = row.TryGetInt(BuildingTypeVO.COLUMN_credits); this.Materials = row.TryGetInt(BuildingTypeVO.COLUMN_materials); this.Contraband = row.TryGetInt(BuildingTypeVO.COLUMN_contraband); this.SwapCredits = row.TryGetInt(BuildingTypeVO.COLUMN_crossCredits); this.SwapMaterials = row.TryGetInt(BuildingTypeVO.COLUMN_crossMaterials); this.SwapContraband = row.TryGetInt(BuildingTypeVO.COLUMN_crossContraband); this.SwapTime = row.TryGetInt(BuildingTypeVO.COLUMN_crossTime); this.CycleTime = row.TryGetInt(BuildingTypeVO.COLUMN_cycleTime); this.CollectNotify = row.TryGetInt(BuildingTypeVO.COLUMN_collectNotify); this.Time = row.TryGetInt(BuildingTypeVO.COLUMN_time); this.Health = row.TryGetInt(BuildingTypeVO.COLUMN_health); this.ShieldHealthPoints = row.TryGetInt(BuildingTypeVO.COLUMN_shieldHealthPoints); this.ShieldRangePoints = row.TryGetInt(BuildingTypeVO.COLUMN_shieldRangePoints); this.Produce = row.TryGetInt(BuildingTypeVO.COLUMN_produce); this.HideIfLocked = row.TryGetBool(BuildingTypeVO.COLUMN_hideIfLocked); string[] array = row.TryGetStringArray(BuildingTypeVO.COLUMN_requirements); this.BuildingRequirement = ((array != null && array.Length != 0) ? array[0] : null); this.BuildingRequirement2 = row.TryGetString(BuildingTypeVO.COLUMN_requirements2); this.UnlockedByEvent = row.TryGetBool(BuildingTypeVO.COLUMN_unlockedByEvent); this.LinkedUnit = row.TryGetString(BuildingTypeVO.COLUMN_linkedUnit); this.MaxQuantity = row.TryGetInt(BuildingTypeVO.COLUMN_maxQuantity); this.IconCameraPosition = row.TryGetVector3(BuildingTypeVO.COLUMN_iconCameraPosition); this.IconLookatPosition = row.TryGetVector3(BuildingTypeVO.COLUMN_iconLookatPosition); this.IconCloseupCameraPosition = row.TryGetVector3(BuildingTypeVO.COLUMN_iconCloseupCameraPosition, this.IconCameraPosition); this.IconCloseupLookatPosition = row.TryGetVector3(BuildingTypeVO.COLUMN_iconCloseupLookatPosition, this.IconLookatPosition); this.Order = row.TryGetInt(BuildingTypeVO.COLUMN_order); this.StashOrder = row.TryGetInt(BuildingTypeVO.COLUMN_stashOrder); this.SizeX = row.TryGetInt(BuildingTypeVO.COLUMN_sizex); this.SizeY = row.TryGetInt(BuildingTypeVO.COLUMN_sizey); this.SpawnProtection = row.TryGetInt(BuildingTypeVO.COLUMN_spawnProtect); this.AllowDefensiveSpawn = row.TryGetBool(BuildingTypeVO.COLUMN_allowDefensiveSpawn); this.Xp = row.TryGetInt(BuildingTypeVO.COLUMN_xp); this.Storage = row.TryGetInt(BuildingTypeVO.COLUMN_storage); this.Currency = StringUtils.ParseEnum <CurrencyType>(row.TryGetString(BuildingTypeVO.COLUMN_currency)); ValueObjectController valueObjectController = Service.ValueObjectController; this.AudioDeath = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuildingTypeVO.COLUMN_audioDeath)); this.AudioPlacement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuildingTypeVO.COLUMN_audioPlacement)); this.AudioCharge = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuildingTypeVO.COLUMN_audioCharge)); this.AudioAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuildingTypeVO.COLUMN_audioAttack)); this.AudioImpact = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuildingTypeVO.COLUMN_audioImpact)); this.TurretUid = row.TryGetString(BuildingTypeVO.COLUMN_turretId); this.TrapUid = row.TryGetString(BuildingTypeVO.COLUMN_trapID); this.ActivationRadius = row.TryGetUint(BuildingTypeVO.COLUMN_activationRadius); this.FillStateAssetName = row.TryGetString(BuildingTypeVO.COLUMN_fillStateAssetName); this.FillStateBundleName = row.TryGetString(BuildingTypeVO.COLUMN_fillStateBundleName); this.DestructFX = row.TryGetString(BuildingTypeVO.COLUMN_destructFX); this.TooltipHeightOffset = row.TryGetFloat(BuildingTypeVO.COLUMN_tooltipHeightOffset); this.BuffAssetOffset = row.TryGetVector3(BuildingTypeVO.COLUMN_buffAssetOffset); this.BuffAssetBaseOffset = row.TryGetVector3(BuildingTypeVO.COLUMN_buffAssetBaseOffset, Vector3.zero); this.ShowReticleWhenTargeted = row.TryGetBool(BuildingTypeVO.COLUMN_forceShowReticle); this.Lvl = row.TryGetInt(BuildingTypeVO.COLUMN_lvl); this.UpgradeTime = ((this.Lvl != 1) ? this.Time : 0); BuildingType type = this.Type; if (type != BuildingType.Resource && type != BuildingType.Storage && type != BuildingType.HQ) { this.IsLootable = false; } else { this.IsLootable = true; } string text = row.TryGetString(BuildingTypeVO.COLUMN_connectors); if (!string.IsNullOrEmpty(text)) { this.Connectors = Service.StaticDataController.Get <BuildingConnectorTypeVO>(text); } this.IconUnlockScale = Vector3.one; this.IconUnlockRotation = Vector3.zero; this.IconUnlockPosition = Vector3.zero; }
public void ReadRow(Row row) { this.AssetName = row.TryGetString(TroopTypeVO.COLUMN_assetName); this.ShieldAssetName = row.TryGetString(TroopTypeVO.COLUMN_shieldAssetName); this.BundleName = row.TryGetString(TroopTypeVO.COLUMN_bundleName); this.IconAssetName = row.TryGetString(TroopTypeVO.COLUMN_iconAssetName, this.AssetName); this.IconBundleName = row.TryGetString(TroopTypeVO.COLUMN_iconBundleName, this.BundleName); this.DecalAssetName = row.TryGetString(TroopTypeVO.COLUMN_decalAssetName); this.UIDecalAssetName = row.TryGetString(TroopTypeVO.COLUMN_uiDecalAssetName); this.DecalBundleName = row.TryGetString(TroopTypeVO.COLUMN_decalBundleName); this.DecalSize = (float)row.TryGetInt(TroopTypeVO.COLUMN_decalSize) * 0.01f; this.ArmorType = StringUtils.ParseEnum <ArmorType>(row.TryGetString(TroopTypeVO.COLUMN_armorType)); this.Uid = row.Uid; this.Faction = StringUtils.ParseEnum <FactionType>(row.TryGetString(TroopTypeVO.COLUMN_faction)); this.TroopRole = StringUtils.ParseEnum <TroopRole>(row.TryGetString(TroopTypeVO.COLUMN_role)); this.TroopID = row.TryGetString(TroopTypeVO.COLUMN_unitID); this.Type = StringUtils.ParseEnum <TroopType>(row.TryGetString(TroopTypeVO.COLUMN_type)); this.InfoUIType = StringUtils.ParseEnum <InfoUIType>(row.TryGetString(TroopTypeVO.COLUMN_infoUIType)); this.OverWalls = row.TryGetBool(TroopTypeVO.COLUMN_overWalls); this.CrushesWalls = row.TryGetBool(TroopTypeVO.COLUMN_crushesWalls); this.IgnoresWalls = row.TryGetBool(TroopTypeVO.COLUMN_ignoresWalls); this.AttackShieldBorder = row.TryGetBool(TroopTypeVO.COLUMN_attackShieldBorder); this.Credits = row.TryGetInt(TroopTypeVO.COLUMN_credits); this.Materials = row.TryGetInt(TroopTypeVO.COLUMN_materials); this.Contraband = row.TryGetInt(TroopTypeVO.COLUMN_contraband); this.Health = row.TryGetInt(TroopTypeVO.COLUMN_health); this.ShieldHealth = row.TryGetInt(TroopTypeVO.COLUMN_shieldHealth); this.ShieldCooldown = row.TryGetUint(TroopTypeVO.COLUMN_shieldCooldown); this.MaxSpeed = row.TryGetInt(TroopTypeVO.COLUMN_maxSpeed); this.RunSpeed = row.TryGetInt(TroopTypeVO.COLUMN_runSpeed); this.RunThreshold = row.TryGetInt(TroopTypeVO.COLUMN_runThreshold); this.RotationSpeed = row.TryGetInt(TroopTypeVO.COLUMN_newRotationSpeed); this.Size = row.TryGetInt(TroopTypeVO.COLUMN_size); this.IsFlying = row.TryGetBool(TroopTypeVO.COLUMN_isFlying); this.TargetLocking = row.TryGetBool(TroopTypeVO.COLUMN_targetLocking); this.RetargetingOffset = row.TryGetUint(TroopTypeVO.COLUMN_retargetingOffset); this.SupportFollowDistance = row.TryGetUint(TroopTypeVO.COLUMN_supportFollowDistance); this.ClipRetargeting = row.TryGetBool(TroopTypeVO.COLUMN_clipRetargeting); this.NewTargetOnReload = row.TryGetBool(TroopTypeVO.COLUMN_newTargetOnReload); this.TargetInRangeModifier = row.TryGetUint(TroopTypeVO.COLUMN_targetInRangeModifier, 1u); this.PreventDonation = row.TryGetBool(TroopTypeVO.COLUMN_preventDonation); this.PlanetAttachmentId = row.TryGetString(TroopTypeVO.COLUMN_planetAttachmentId, string.Empty); if (this.TargetInRangeModifier == 0u) { this.TargetInRangeModifier = 1u; } if ((this.Type == TroopType.Hero || this.Type == TroopType.Champion) && this.Size != 1) { Service.Logger.Warn(this.Uid + " must have size 1. Please fix CMS."); this.Size = 1; } this.TrainingTime = row.TryGetInt(TroopTypeVO.COLUMN_trainingTime); this.Xp = row.TryGetInt(TroopTypeVO.COLUMN_xp); string[] array = row.TryGetStringArray(TroopTypeVO.COLUMN_requirements); this.BuildingRequirement = ((array != null && array.Length != 0) ? array[0] : null); this.UnlockedByEvent = row.TryGetBool(TroopTypeVO.COLUMN_unlockedByEvent); this.Ability = row.TryGetString(TroopTypeVO.COLUMN_ability); this.IconCameraPosition = row.TryGetVector3(TroopTypeVO.COLUMN_iconCameraPosition); this.IconLookatPosition = row.TryGetVector3(TroopTypeVO.COLUMN_iconLookatPosition); this.IconCloseupCameraPosition = row.TryGetVector3(TroopTypeVO.COLUMN_iconCloseupCameraPosition, this.IconCameraPosition); this.IconCloseupLookatPosition = row.TryGetVector3(TroopTypeVO.COLUMN_iconCloseupLookatPosition, this.IconLookatPosition); this.Order = row.TryGetInt(TroopTypeVO.COLUMN_order); this.SizeX = row.TryGetInt(TroopTypeVO.COLUMN_sizex); this.SizeY = row.TryGetInt(TroopTypeVO.COLUMN_sizey); ValueObjectController valueObjectController = Service.ValueObjectController; this.AudioCharge = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioCharge)); this.AudioAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioAttack)); this.AudioDeath = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioDeath)); this.AudioPlacement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioPlacement)); this.AudioImpact = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioImpact)); this.AudioTrain = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_audioTrain)); this.Preference = new int[24]; int i = 0; int num = 24; while (i < num) { this.Preference[i] = 0; i++; } this.Preference[1] = row.TryGetInt(TroopTypeVO.COLUMN_wall); this.Preference[2] = row.TryGetInt(TroopTypeVO.COLUMN_building); this.Preference[3] = row.TryGetInt(TroopTypeVO.COLUMN_storage); this.Preference[4] = row.TryGetInt(TroopTypeVO.COLUMN_resource); this.Preference[5] = row.TryGetInt(TroopTypeVO.COLUMN_turret); this.Preference[6] = row.TryGetInt(TroopTypeVO.COLUMN_HQ); this.Preference[7] = row.TryGetInt(TroopTypeVO.COLUMN_shield); this.Preference[8] = row.TryGetInt(TroopTypeVO.COLUMN_shieldGenerator); this.Preference[9] = row.TryGetInt(TroopTypeVO.COLUMN_infantry); this.Preference[10] = row.TryGetInt(TroopTypeVO.COLUMN_bruiserInfantry); this.Preference[11] = row.TryGetInt(TroopTypeVO.COLUMN_vehicle); this.Preference[12] = row.TryGetInt(TroopTypeVO.COLUMN_bruiserVehicle); this.Preference[13] = row.TryGetInt(TroopTypeVO.COLUMN_heroInfantry); this.Preference[14] = row.TryGetInt(TroopTypeVO.COLUMN_heroVehicle); this.Preference[15] = row.TryGetInt(TroopTypeVO.COLUMN_heroBruiserInfantry); this.Preference[16] = row.TryGetInt(TroopTypeVO.COLUMN_heroBruiserVechicle); this.Preference[17] = row.TryGetInt(TroopTypeVO.COLUMN_flierInfantry); this.Preference[18] = row.TryGetInt(TroopTypeVO.COLUMN_flierVehicle); this.Preference[19] = row.TryGetInt(TroopTypeVO.COLUMN_healerInfantry); this.Preference[20] = row.TryGetInt(TroopTypeVO.COLUMN_trap); this.Preference[21] = row.TryGetInt(TroopTypeVO.COLUMN_champion); this.PreferencePercentile = row.TryGetInt(TroopTypeVO.COLUMN_targetPreferenceStrength); this.NearnessPercentile = 100 - this.PreferencePercentile; this.Damage = row.TryGetInt(TroopTypeVO.COLUMN_damage); this.DPS = row.TryGetInt(TroopTypeVO.COLUMN_dps); this.FavoriteTargetType = row.TryGetString(TroopTypeVO.COLUMN_favoriteTargetType); this.ViewRange = row.TryGetUint(TroopTypeVO.COLUMN_viewRange); this.MinAttackRange = row.TryGetUint(TroopTypeVO.COLUMN_minAttackRange); this.MaxAttackRange = row.TryGetUint(TroopTypeVO.COLUMN_maxAttackRange); this.ShotCount = row.TryGetUint(TroopTypeVO.COLUMN_shotCount); this.PathSearchWidth = row.TryGetUint(TroopTypeVO.COLUMN_pathSearchWidth); this.Lvl = row.TryGetInt(TroopTypeVO.COLUMN_lvl); this.UpgradeTime = row.TryGetInt(TroopTypeVO.COLUMN_upgradeTime); this.UpgradeCredits = row.TryGetInt(TroopTypeVO.COLUMN_upgradeCredits); this.UpgradeMaterials = row.TryGetInt(TroopTypeVO.COLUMN_upgradeMaterials); this.UpgradeContraband = row.TryGetInt(TroopTypeVO.COLUMN_upgradeContraband); this.IsHealer = (this.TroopRole == TroopRole.Healer); this.WarmupDelay = row.TryGetUint(TroopTypeVO.COLUMN_chargeTime); this.AnimationDelay = row.TryGetUint(TroopTypeVO.COLUMN_animationDelay); this.ShotDelay = row.TryGetUint(TroopTypeVO.COLUMN_shotDelay); this.CooldownDelay = row.TryGetUint(TroopTypeVO.COLUMN_reload); this.PlayerFacing = row.TryGetBool(TroopTypeVO.COLUMN_playerFacing); this.TargetSelf = row.TryGetBool(TroopTypeVO.COLUMN_targetSelf); this.HologramUid = row.TryGetString(TroopTypeVO.COLUMN_hologramUid); this.FactoryScaleFactor = row.TryGetFloat(TroopTypeVO.COLUMN_factoryScaleFactor); this.FactoryRotation = row.TryGetFloat(TroopTypeVO.COLUMN_factoryRotation); this.StrictCooldown = row.TryGetBool(TroopTypeVO.COLUMN_strictCoolDown); this.AutoSpawnSpreadingScale = row.TryGetUint(TroopTypeVO.COLUMN_autoSpawnSpreadingScale, 1u); this.AutoSpawnRateScale = row.TryGetUint(TroopTypeVO.COLUMN_autoSpawnRateScale, 1u); StaticDataController staticDataController = Service.StaticDataController; this.ProjectileType = staticDataController.Get <ProjectileTypeVO>(row.TryGetString(TroopTypeVO.COLUMN_projectileType)); if (this.ProjectileType.IsBeam && (long)this.ProjectileType.BeamDamageLength < (long)((ulong)this.MaxAttackRange)) { Service.Logger.WarnFormat("Troop {0} can target something it can't damage", new object[] { this.Uid }); } string text = row.TryGetString(TroopTypeVO.COLUMN_deathProjectile); this.DeathProjectileType = ((!string.IsNullOrEmpty(text)) ? staticDataController.Get <ProjectileTypeVO>(text) : null); this.DeathProjectileDelay = row.TryGetUint(TroopTypeVO.COLUMN_deathProjectileDelay, 0u); this.DeathProjectileDistance = row.TryGetInt(TroopTypeVO.COLUMN_deathProjectileDistance, 0); this.DeathProjectileDamage = row.TryGetInt(TroopTypeVO.COLUMN_deathProjectileDamage, this.Damage); string text2 = row.TryGetString(TroopTypeVO.COLUMN_deathAnimation); if (!string.IsNullOrEmpty(text2)) { string[] array2 = text2.Split(new char[] { ',' }); int num2 = array2.Length; this.DeathAnimations = new List <KeyValuePair <string, int> >(num2); for (int j = 0; j < num2; j++) { string[] array3 = array2[j].Split(new char[] { ':' }); int value; if (array3.Length == 2 && int.TryParse(array3[1], out value)) { string key = array3[0]; this.DeathAnimations.Add(new KeyValuePair <string, int>(key, value)); } } } this.SpawnApplyBuffs = null; string text3 = row.TryGetString(TroopTypeVO.COLUMN_spawnApplyBuffs); if (!string.IsNullOrEmpty(text3)) { this.SpawnApplyBuffs = text3.Split(new char[] { ',' }); } this.SpawnEffectUid = row.TryGetString(TroopTypeVO.COLUMN_spawnEffectUid); this.TooltipHeightOffset = row.TryGetFloat(TroopTypeVO.COLUMN_tooltipHeightOffset); this.BuffAssetOffset = row.TryGetVector3(TroopTypeVO.COLUMN_buffAssetOffset); this.BuffAssetBaseOffset = row.TryGetVector3(TroopTypeVO.COLUMN_buffAssetBaseOffset, Vector3.zero); SequencePair gunSequences = valueObjectController.GetGunSequences(this.Uid, row.TryGetString(TroopTypeVO.COLUMN_gunSequence)); this.GunSequence = gunSequences.GunSequence; this.Sequences = gunSequences.Sequences; this.EventFeaturesString = row.TryGetString(TroopTypeVO.COLUMN_eventFeaturesString); this.EventButtonAction = row.TryGetString(TroopTypeVO.COLUMN_eventButtonAction); this.EventButtonData = row.TryGetString(TroopTypeVO.COLUMN_eventButtonData); this.EventButtonString = row.TryGetString(TroopTypeVO.COLUMN_eventButtonString); this.UpgradeShardCount = row.TryGetInt(TroopTypeVO.COLUMN_upgradeShards); this.UpgradeShardUid = row.TryGetString(TroopTypeVO.COLUMN_upgradeShardUid); this.IconUnlockScale = row.TryGetVector3(TroopTypeVO.COLUMN_iconUnlockScale, Vector3.one); this.IconUnlockRotation = row.TryGetVector3(TroopTypeVO.COLUMN_iconUnlockRotation, Vector3.zero); this.IconUnlockPosition = row.TryGetVector3(TroopTypeVO.COLUMN_iconUnlockPosition, Vector3.zero); if (this.RotationSpeed == 0) { Service.Logger.ErrorFormat("Missing rotation speed for troopTypeVO {0}", new object[] { this.Uid }); } }
public void ReadRow(Row row) { this.Uid = row.Uid; this.AssetName = row.TryGetString(BuffTypeVO.COLUMN_assetName); this.BundleName = row.TryGetString(BuffTypeVO.COLUMN_bundleName); this.ShaderName = row.TryGetString(BuffTypeVO.COLUMN_shaderOverride, ""); this.RebelMuzzleAssetName = row.TryGetString(BuffTypeVO.COLUMN_muzzleAssetNameRebel); this.RebelImpactAssetName = row.TryGetString(BuffTypeVO.COLUMN_impactAssetNameRebel); this.EmpireMuzzleAssetName = row.TryGetString(BuffTypeVO.COLUMN_muzzleAssetNameEmpire); this.EmpireImpactAssetName = row.TryGetString(BuffTypeVO.COLUMN_impactAssetNameEmpire); this.ProjectileAttachmentBundle = row.TryGetString(BuffTypeVO.COLUMN_projectileAttachmentBundle); this.BuffID = row.Uid; this.Lvl = row.TryGetInt(BuffTypeVO.COLUMN_lvl, 1); this.Modify = StringUtils.ParseEnum <BuffModify>(row.TryGetString(BuffTypeVO.COLUMN_modifier)); int num = row.TryGetInt(BuffTypeVO.COLUMN_value); this.Values = new int[23]; this.Values[0] = num; this.Values[1] = row.TryGetInt(BuffTypeVO.COLUMN_wall, num); this.Values[2] = row.TryGetInt(BuffTypeVO.COLUMN_building, num); this.Values[3] = row.TryGetInt(BuffTypeVO.COLUMN_storage, num); this.Values[4] = row.TryGetInt(BuffTypeVO.COLUMN_resource, num); this.Values[5] = row.TryGetInt(BuffTypeVO.COLUMN_turret, num); this.Values[6] = row.TryGetInt(BuffTypeVO.COLUMN_HQ, num); this.Values[7] = row.TryGetInt(BuffTypeVO.COLUMN_shield, num); this.Values[8] = row.TryGetInt(BuffTypeVO.COLUMN_shieldGenerator, num); this.Values[9] = row.TryGetInt(BuffTypeVO.COLUMN_infantry, num); this.Values[10] = row.TryGetInt(BuffTypeVO.COLUMN_bruiserInfantry, num); this.Values[11] = row.TryGetInt(BuffTypeVO.COLUMN_vehicle, num); this.Values[12] = row.TryGetInt(BuffTypeVO.COLUMN_bruiserVehicle, num); this.Values[13] = row.TryGetInt(BuffTypeVO.COLUMN_heroInfantry, num); this.Values[14] = row.TryGetInt(BuffTypeVO.COLUMN_heroVehicle, num); this.Values[15] = row.TryGetInt(BuffTypeVO.COLUMN_heroBruiserInfantry, num); this.Values[16] = row.TryGetInt(BuffTypeVO.COLUMN_heroBruiserVehicle, num); this.Values[17] = row.TryGetInt(BuffTypeVO.COLUMN_flierInfantry, num); this.Values[18] = row.TryGetInt(BuffTypeVO.COLUMN_flierVehicle, num); this.Values[19] = row.TryGetInt(BuffTypeVO.COLUMN_healerInfantry, num); this.Values[20] = row.TryGetInt(BuffTypeVO.COLUMN_trap, num); this.Values[21] = row.TryGetInt(BuffTypeVO.COLUMN_champion, num); this.Values[22] = num; this.ApplyAs = StringUtils.ParseEnum <BuffApplyAs>(row.TryGetString(BuffTypeVO.COLUMN_applyValueAs)); this.Duration = row.TryGetInt(BuffTypeVO.COLUMN_duration, -1); if (this.Duration < -1) { this.Duration = -1; } int num2 = row.TryGetInt(BuffTypeVO.COLUMN_stack, 0); if (num2 < 0) { num2 = 0; } this.MaxStacks = (uint)num2; this.MillisecondsToFirstProc = row.TryGetInt(BuffTypeVO.COLUMN_msFirstProc); this.MillisecondsPerProc = row.TryGetInt(BuffTypeVO.COLUMN_msPerProc); if (this.MillisecondsPerProc == 0) { this.MillisecondsPerProc = -1; } this.IsRefreshing = row.TryGetBool(BuffTypeVO.COLUMN_isRefreshing); this.ApplyToSelf = false; this.ApplyToAllies = false; this.ApplyToEnemies = false; string[] commaSeparatedStrings = this.GetCommaSeparatedStrings(row, BuffTypeVO.COLUMN_target); if (commaSeparatedStrings != null) { int i = 0; int num3 = commaSeparatedStrings.Length; while (i < num3) { switch (StringUtils.ParseEnum <BuffApplyTo>(commaSeparatedStrings[i])) { case BuffApplyTo.Self: this.ApplyToSelf = true; break; case BuffApplyTo.Allies: this.ApplyToAllies = true; break; case BuffApplyTo.Enemies: this.ApplyToEnemies = true; break; } i++; } } this.Tags = this.GetCommaSeparatedHashSet(row, BuffTypeVO.COLUMN_tags); this.CancelTags = this.GetCommaSeparatedHashSet(row, BuffTypeVO.COLUMN_cancelTags); this.PreventTags = this.GetCommaSeparatedHashSet(row, BuffTypeVO.COLUMN_preventTags); ValueObjectController valueObjectController = Service.Get <ValueObjectController>(); this.AudioAbilityEvent = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(BuffTypeVO.COLUMN_audioAbilityEvent)); this.OffsetType = StringUtils.ParseEnum <BuffAssetOffset>(row.TryGetString(BuffTypeVO.COLUMN_assetOffsetType, "Top")); this.IsDeflector = (this.Uid == "buffDeflect"); }
public void ReadRow(Row row) { this.AssetName = row.TryGetString(SpecialAttackTypeVO.COLUMN_assetName); this.BundleName = row.TryGetString(SpecialAttackTypeVO.COLUMN_bundleName); this.IconAssetName = row.TryGetString(SpecialAttackTypeVO.COLUMN_iconAssetName, this.AssetName); this.IconBundleName = row.TryGetString(SpecialAttackTypeVO.COLUMN_iconBundleName, this.BundleName); this.DropoffAttachedAssetName = row.TryGetString(SpecialAttackTypeVO.COLUMN_attachmentAsset); this.DropoffAttachedBundleName = row.TryGetString(SpecialAttackTypeVO.COLUMN_attachmentAssetBundle); this.Uid = row.Uid; this.Faction = StringUtils.ParseEnum <FactionType>(row.TryGetString(SpecialAttackTypeVO.COLUMN_faction)); this.SpecialAttackID = row.TryGetString(SpecialAttackTypeVO.COLUMN_specialAttackID); this.SpecialAttackName = row.TryGetString(SpecialAttackTypeVO.COLUMN_specialAttackName); this.Size = row.TryGetInt(SpecialAttackTypeVO.COLUMN_size); this.TrainingTime = row.TryGetInt(SpecialAttackTypeVO.COLUMN_trainingTime); this.Xp = row.TryGetInt(SpecialAttackTypeVO.COLUMN_xp); this.Credits = row.TryGetInt(SpecialAttackTypeVO.COLUMN_credits); this.Materials = row.TryGetInt(SpecialAttackTypeVO.COLUMN_materials); this.Contraband = row.TryGetInt(SpecialAttackTypeVO.COLUMN_contraband); this.Acceleration = row.TryGetInt(SpecialAttackTypeVO.COLUMN_acceleration); this.MaxSpeed = row.TryGetInt(SpecialAttackTypeVO.COLUMN_maxSpeed); ValueObjectController valueObjectController = Service.ValueObjectController; this.AudioCharge = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioCharge)); this.AudioAttack = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioAttack)); this.AudioPlacement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioPlacement)); this.AudioMovement = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioMovement)); this.AudioMovementAway = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioMovementAway)); this.AudioImpact = valueObjectController.GetStrIntPairs(this.Uid, row.TryGetString(SpecialAttackTypeVO.COLUMN_audioImpact)); this.Damage = row.TryGetInt(SpecialAttackTypeVO.COLUMN_damage); this.DPS = row.TryGetInt(SpecialAttackTypeVO.COLUMN_dps); this.InfoUIType = StringUtils.ParseEnum <InfoUIType>(row.TryGetString(SpecialAttackTypeVO.COLUMN_infoUIType)); string[] array = row.TryGetStringArray(SpecialAttackTypeVO.COLUMN_requirements); this.BuildingRequirement = ((array != null && array.Length != 0) ? array[0] : null); this.UnlockedByEvent = row.TryGetBool(SpecialAttackTypeVO.COLUMN_unlockedByEvent); this.IconCameraPosition = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconCameraPosition); this.IconLookatPosition = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconLookatPosition); this.IconCloseupCameraPosition = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconCloseupCameraPosition, this.IconCameraPosition); this.IconCloseupLookatPosition = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconCloseupLookatPosition, this.IconLookatPosition); this.Order = row.TryGetInt(SpecialAttackTypeVO.COLUMN_order); this.Lvl = row.TryGetInt(SpecialAttackTypeVO.COLUMN_lvl); this.UpgradeTime = row.TryGetInt(SpecialAttackTypeVO.COLUMN_upgradeTime); this.UpgradeCredits = row.TryGetInt(SpecialAttackTypeVO.COLUMN_upgradeCredits); this.UpgradeMaterials = row.TryGetInt(SpecialAttackTypeVO.COLUMN_upgradeMaterials); this.UpgradeContraband = row.TryGetInt(SpecialAttackTypeVO.COLUMN_upgradeContraband); this.ShotCount = row.TryGetUint(SpecialAttackTypeVO.COLUMN_shotCount); this.ShotDelay = row.TryGetUint(SpecialAttackTypeVO.COLUMN_shotDelay); this.HitDelay = row.TryGetUint(SpecialAttackTypeVO.COLUMN_impactDelay); this.AnimationDelay = row.TryGetUint(SpecialAttackTypeVO.COLUMN_animationDelay); this.DestroyDelay = row.TryGetFloat(SpecialAttackTypeVO.COLUMN_destroyDelay); this.ProjectileType = Service.StaticDataController.Get <ProjectileTypeVO>(row.TryGetString(SpecialAttackTypeVO.COLUMN_projectileType)); this.ReticleDuration = row.TryGetFloat(SpecialAttackTypeVO.COLUMN_reticleDuration, 3f); this.ReticleAsset = row.TryGetString(SpecialAttackTypeVO.COLUMN_reticleAsset); this.ReticleScale = row.TryGetFloat(SpecialAttackTypeVO.COLUMN_reticleScale, 2f); this.PlayerFacing = row.TryGetBool(SpecialAttackTypeVO.COLUMN_playerFacing); this.HologramUid = row.TryGetString(SpecialAttackTypeVO.COLUMN_hologramUid); this.NumberOfAttackers = Math.Max(row.TryGetUint(SpecialAttackTypeVO.COLUMN_numberOfAttackers), 1u); this.AttackerDelay = row.TryGetInt(SpecialAttackTypeVO.COLUMN_attackerDelay); this.AttackerOffset = row.TryGetInt(SpecialAttackTypeVO.COLUMN_attackerOffset); this.AttackerOffsetVariance = row.TryGetInt(SpecialAttackTypeVO.COLUMN_attackerOffsetVariance); this.AttackFormation = StringUtils.ParseEnum <AttackFormation>(row.TryGetString(SpecialAttackTypeVO.COLUMN_attackFormation)); this.AngleOfAttack = row.TryGetInt(SpecialAttackTypeVO.COLUMN_angleOfAttack); this.AngleOfAttackVariance = row.TryGetInt(SpecialAttackTypeVO.COLUMN_angleOfAttackVariance); this.AngleOfRoll = row.TryGetInt(SpecialAttackTypeVO.COLUMN_angleOfRoll); this.AngleOfRollVariance = row.TryGetInt(SpecialAttackTypeVO.COLUMN_angleOfRollVariance); this.LinkedUnit = row.TryGetString(SpecialAttackTypeVO.COLUMN_linkedUnit); this.UnitCount = row.TryGetUint(SpecialAttackTypeVO.COLUMN_unitCount); this.FavoriteTargetType = row.TryGetString(SpecialAttackTypeVO.COLUMN_favoriteTargetType); this.EventFeaturesString = row.TryGetString(SpecialAttackTypeVO.COLUMN_eventFeaturesString); this.EventButtonAction = row.TryGetString(SpecialAttackTypeVO.COLUMN_eventButtonAction); this.EventButtonData = row.TryGetString(SpecialAttackTypeVO.COLUMN_eventButtonData); this.EventButtonString = row.TryGetString(SpecialAttackTypeVO.COLUMN_eventButtonString); this.UpgradeShardCount = row.TryGetInt(SpecialAttackTypeVO.COLUMN_upgradeShards); this.UpgradeShardUid = row.TryGetString(SpecialAttackTypeVO.COLUMN_upgradeShardUid); this.IconUnlockScale = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconUnlockScale, Vector3.one); this.IconUnlockRotation = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconUnlockRotation, Vector3.zero); this.IconUnlockPosition = row.TryGetVector3(SpecialAttackTypeVO.COLUMN_iconUnlockPosition, Vector3.zero); }