public string GetFactionAssetName() { if (this.isPveBuffBase) { return(UXUtils.GetIconNameFromFactionType(this.battleData.Defender.PlayerFaction)); } return(this.battle.DefenderId); }
public string GetIcon(FactionType factionType, int rating) { string result; if (this.UseUpgradeImage(rating)) { string iconPostfixFromRating = this.GetIconPostfixFromRating(rating); if (factionType == FactionType.Rebel) { result = "FactionUpReb" + iconPostfixFromRating; } else { result = "FactionUpEmp" + iconPostfixFromRating; } } else { result = UXUtils.GetIconNameFromFactionType(factionType); } return(result); }
private void Refresh() { WarBuffVO warBuffVO = Service.Get <IDataController>().Get <WarBuffVO>(this.buffBaseData.BuffBaseId); SquadWarManager warManager = Service.Get <SquadController>().WarManager; SquadWarSquadData squadData = warManager.GetSquadData(this.buffBaseData.OwnerId); FactionType factionType = FactionType.Neutral; string text = this.buffBaseData.GetDisplayBaseLevel().ToString(); if (squadData != null) { factionType = squadData.Faction; } string uid; string text2; if (factionType == FactionType.Empire) { uid = warBuffVO.MasterEmpireBuildingUid; text2 = LangUtils.GetFactionName(factionType); } else if (factionType == FactionType.Rebel) { uid = warBuffVO.MasterRebelBuildingUid; text2 = LangUtils.GetFactionName(factionType); } else { uid = warBuffVO.MasterNeutralBuildingUid; text2 = this.lang.Get("BUFF_BASE_UNOWNED_FACTION_NAME", new object[0]); } this.spriteFactionIcon.SpriteName = UXUtils.GetIconNameFromFactionType(factionType); this.labelBuffBaseName.Text = this.lang.Get("WAR_BOARD_BUFF_BASE_TITLE", new object[] { this.lang.Get(warBuffVO.BuffBaseName, new object[0]), LangUtils.GetPlanetDisplayName(warBuffVO.PlanetId) }); this.labelBuffBaseLevel.Text = this.lang.Get("WAR_BOARD_BUFF_BASE_LEVEL", new object[] { text, text2 }); this.labelCaptureRequirement.Text = this.lang.Get("WAR_BOARD_BUFF_BASE_CAPTURE_REQUIREMENT", new object[0]); this.labelProduces.Text = this.lang.Get("BUFF_BASE_PRODUCES", new object[0]); this.labelBuffDescription.Text = this.lang.Get(warBuffVO.BuffStringDesc, new object[0]); this.labelLocked.Text = this.lang.Get("PLANET_LOCKED_REQUIREMENT", new object[0]); this.labelLocked.Visible = !Service.Get <CurrentPlayer>().IsPlanetUnlocked(warBuffVO.PlanetId); TextureVO textureVO = null; IDataController dataController = Service.Get <IDataController>(); if (warBuffVO.PlanetId == GameConstants.TATOOINE_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_tatooine"); } else if (warBuffVO.PlanetId == GameConstants.YAVIN_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_yavin"); } else if (warBuffVO.PlanetId == GameConstants.DANDORAN_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_dandoran"); } else if (warBuffVO.PlanetId == GameConstants.ERKIT_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_erkit"); } else if (warBuffVO.PlanetId == GameConstants.TFA_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_tfa"); } else if (warBuffVO.PlanetId == GameConstants.HOTH_PLANET_UID) { textureVO = dataController.GetOptional <TextureVO>("squadwars_basedetails_hoth"); } if (textureVO != null) { this.textureBaseDetail.LoadTexture(textureVO.AssetName); } BuildingTypeVO data = Service.Get <IDataController>().Get <BuildingTypeVO>(uid); UXUtils.SetupGeometryForIcon(this.spriteBuffBaseIcon, data); this.spriteBuffIcon.SpriteName = warBuffVO.BuffIcon; string empty = string.Empty; if (warManager.CanScoutBuffBase(this.buffBaseData, ref empty)) { this.btnScout.VisuallyEnableButton(); this.labelScout.TextColor = this.labelScout.OriginalTextColor; return; } this.btnScout.VisuallyDisableButton(); this.labelScout.TextColor = UXUtils.COLOR_LABEL_DISABLED; }
public string GetFactionAssetName() { FactionType faction = this.response.Faction; return(UXUtils.GetIconNameFromFactionType(faction)); }
public string GetFactionAssetName() { return(UXUtils.GetIconNameFromFactionType(this.faction)); }
public string GetFactionAssetName() { return(UXUtils.GetIconNameFromFactionType(this.pvpTarget.PlayerFaction)); }
public string GetFactionAssetName() { FactionType faction = Service.CurrentPlayer.Faction; return(UXUtils.GetIconNameFromFactionType(faction)); }
public string GetFactionAssetName() { return(UXUtils.GetIconNameFromFactionType(this.defender.PlayerFaction)); }