protected void ReportInfoBtns() { var isNpc = (string.Equals(TargetUserName, Npc.SkagyName, StringComparison.CurrentCultureIgnoreCase)); var fromReport = IsReport; var btnPref = (fromReport) ? "report_" + Id + "_" : "spy_" + Id + "_"; if (!isNpc) { var mes = ButtonsView.ConstructorSizeBtn(2, true, "tr_send message"); mes.ButtonId = btnPref + "mes"; Buttons.Add(mes); var smSpay = ButtonsView.Spy(2, TargetPlanetId, TargetPlanetName, true); smSpay.ButtonId = btnPref + "spy"; Buttons.Add(smSpay); } else { if (IsLose || !fromReport) { var spyBtn = ButtonsView.Spy(1, TargetPlanetId, TargetPlanetName, true); spyBtn.ButtonId = btnPref + "spy"; Buttons.Add(spyBtn); } } }
public void PlanetInfoButtons() { if (HasButtons) { return; } HasButtons = true; if (PlanetReferToCurrentUser) { if (IsBookmark) { Buttons = new List <IButtonsView> { ButtonsView.DeleteBookmark(1, BookmarkId, TypeNativeName, Id, 0) }; } else { Buttons = new List <IButtonsView> { ButtonsView.ConstructorSizeBtn(1, true, "Go To Planet", "GameServices.mapControlHelper.jumpToUserPlanet", new { OwnId = Id, UpdateSelect = true }) }; } } else if (IsBookmark) { Buttons = new List <IButtonsView> { ButtonsView.Spy(3, Id, NativeName, false), ButtonsView.Attack(false, 3, NativeName, Id), ButtonsView.DeleteBookmark(3, BookmarkId, TypeNativeName, Id, 0) }; } else { Buttons = new List <IButtonsView> { ButtonsView.Spy(2, Id, NativeName, false), ButtonsView.Attack(false, 2, NativeName, Id) }; } }