public static StoreUI LaunchStoreFront(NPC storeOwner) { { StoreUI su = Resources.Load<StoreUI>("StoreUI"); staticStoreUI = Instantiate(su); } if (!isStoreOpen) { //staticStoreUI.GenerateStoreItems(storeOwner.inventory); } return staticStoreUI; }
// private void OnClickbagaBtn(ButtonScript obj, object args, int param1, int param2) // { // BagUI.SwithShowMe (); // } private void OnClickshopBtn(ButtonScript obj, object args, int param1, int param2) { StoreUI.SwithShowMe(); }
void OnClicLottery(ButtonScript obj, object args, int param1, int param2) { if (GamePlayer.Instance.EmployeeList.Count + 1 > 100) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_EmployeeIsFull")); showBuyBtn(true); return; } string numStr = ""; if (btpye == BoxType.BX_Glod) { if (BagSystem.instance.GetItemMaxNum((uint)drawNeedItem_) >= drawNeedGoldNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaojizhnag").Replace("{n1}", drawNeedGoldNum_.ToString()).Replace("{n}", ItemData.GetData(drawNeedItem_).name_), () => { NetConnection.Instance.drawLotteryBox(btpye, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Diamond) >= drawNeedGoldZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chouxiaohanzs").Replace("{n}", drawNeedGoldZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(btpye, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency) >= drawNeedGoldZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaotimoli").Replace("{n}", drawNeedGoldZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(btpye, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("daojubuzu"), () => { StoreUI.SwithShowMe(2); }); } showBuyBtn(true); return; } else if (btpye == BoxType.BX_Blue) { if (BagSystem.instance.GetItemMaxNum((uint)drawNeedItem_) >= drawNeedBlueNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaojizhnag").Replace("{n1}", drawNeedBlueNum_.ToString()).Replace("{n}", ItemData.GetData(drawNeedItem_).name_), () => { NetConnection.Instance.drawLotteryBox(btpye, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Diamond) >= drawNeedBlueZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chouxiaohanzs").Replace("{n}", drawNeedBlueZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(BoxType.BX_Blue, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency) >= drawNeedBlueZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaotimoli").Replace("{n}", drawNeedBlueZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(BoxType.BX_Blue, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); } else { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("daojubuzu"), () => { StoreUI.SwithShowMe(2); }); } showBuyBtn(true); } else if (btpye == BoxType.BX_Normal) { if (GamePlayer.Instance.GetIprop(PropertyType.PT_Money) < _BoxGreenSpend) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("nomoney"), () => {}); showBuyBtn(true); return; } MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chouxiaohanjq").Replace("{n}", _BoxGreenSpend.ToString()), () => { NetConnection.Instance.drawLotteryBox(btpye, false); LotteryBtn.isEnabled = false; SetPrizeWinDisplay(false); }); showBuyBtn(true); } }
void OnClicPerfectBtn(ButtonScript obj, object args, int param1, int param2) { if (GamePlayer.Instance.EmployeeList.Count + 10 > 100) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_EmployeeIsFull")); return; } showBuyBtn(false); if (BagSystem.instance.GetItemMaxNum((uint)drawNeedItem_) >= drawNeedGoldNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaojizhnag").Replace("{n1}", drawNeedGoldNum_.ToString()).Replace("{n}", ItemData.GetData(drawNeedItem_).name_), () => { NetConnection.Instance.drawLotteryBox(BoxType.BX_Glod, false); btpye = BoxType.BX_Glod; }, false, () => { showBuyBtn(true); }); EmployessSystem.instance._BuyEmployeeTable_ = BoxType.BX_Glod; } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_Diamond) >= drawNeedGoldZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("chouxiaohanzs").Replace("{n}", drawNeedGoldZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(BoxType.BX_Glod, false); btpye = BoxType.BX_Glod; }, false, () => { showBuyBtn(true); }); EmployessSystem.instance._BuyEmployeeTable_ = BoxType.BX_Glod; } else if (GamePlayer.Instance.GetIprop(PropertyType.PT_MagicCurrency) >= drawNeedGoldZhuanNum_) { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("xiaohaotimoli").Replace("{n}", drawNeedGoldZhuanNum_.ToString()), () => { NetConnection.Instance.drawLotteryBox(BoxType.BX_Glod, false); btpye = BoxType.BX_Glod; }, false, () => { showBuyBtn(true); }); EmployessSystem.instance._BuyEmployeeTable_ = BoxType.BX_Glod; } else { MessageBoxUI.ShowMe(LanguageManager.instance.GetValue("daojubuzu"), () => { StoreUI.SwithShowMe(2); }); } showBuyBtn(true); }
// GET: Store/Edit/5 public ActionResult Edit(int StoreId) { StoreUI store = Mapper.Map(Repo.LoadLocationByID(StoreId)); return(View(store)); }
void Awake() { StoreIns = this; }
public void NpcOpenUI(UIASSETS_ID id) { switch (id) { case UIASSETS_ID.UIASSETS__BabySkillLearning: BabySkillLearning.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_ProfessionPanel: ProfessionPanel.SwithShowMe(); //UIBase.AsyncLoad(UIASSETS_ID.UIASSETS_ProfessionPanel); break; case UIASSETS_ID.UIASSETS_ExchangePanel: Exchange.SwithShowMe(); break; case UIASSETS_ID.UIASSETS__LearningUI: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Bar)) { LearningUI.SwithShowMe(); } break; case UIASSETS_ID.UIASSETS_FamilyPanel: FamilyPanelUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_FamilinfoPanel: MyFamilyInfo.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_FamilShopPanel: FamilyShopUI.SwithShowMe(true); break; case UIASSETS_ID.UIASSETS__StoreUI: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Shop)) { StoreUI.SwithShowMe(2); } break; case UIASSETS_ID.UIASSETS__Arena: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_JJC)) { ArenaUI.SwithShowMe(); } else { int level = 0; GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level); if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < level) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_OpenBaoXiangLevel")); return; } } break; case UIASSETS_ID.UIASSETS_ArenaPvpPanel: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_PVPJJC)) { bool isOpen = ActivitySystem.Instance.GetInfoState(7) == ActivitySystem.ActivityInfo.ActivityState.AS_Open; if (!isOpen) { PopText.Instance.Show(LanguageManager.instance.GetValue("jjcmeikai")); return; } if (TeamSystem.IsInTeam()) { if (!TeamSystem.IsTeamLeader()) { PopText.Instance.Show(LanguageManager.instance.GetValue("teamopen")); return; } COM_SimplePlayerInst[] team = TeamSystem.GetTeamMembers(); if (team == null || team.Length < 3) { PopText.Instance.Show(LanguageManager.instance.GetValue("arenapvpnum")); return; } if (team != null && team.Length > 0) { for (int i = 0; i < team.Length; i++) { if (team[i].isLeavingTeam_) { PopText.Instance.Show(LanguageManager.instance.GetValue("teamMemberLeavingNoopen")); return; } } int level = 0; GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level); for (int i = 0; i < team.Length; i++) { if (team[i].properties_[(int)PropertyType.PT_Level] < level) { PopText.Instance.Show(LanguageManager.instance.GetValue("duiyuandengji")); return; } } } } else { PopText.Instance.Show(LanguageManager.instance.GetValue("pvpzudui")); return; } NetConnection.Instance.joinWarriorchoose(); //NetConnection.Instance.requestpvprank(); //NetConnection.Instance.requestMyJJCTeamMsg(); //ArenaPvpPanelUI.SwithShowMe(); } else { int level = 0; GlobalValue.Get(Constant.C_PVPJJCOpenlevel, out level); if (GamePlayer.Instance.GetIprop(PropertyType.PT_Level) < level) { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_OpenBaoXiangLevel")); return; } } break; case UIASSETS_ID.UIASSETS__WordMapUI: WorldMap.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_GatherPanel: SkillViewUI.SwithShowMe(1); break; case UIASSETS_ID.UIASSETS_AuctionHousePanel: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_AuctionHouse)) { if (AuctionHouseSystem.Open_ == false) { PopText.Instance.Show(LanguageManager.instance.GetValue("AuctionHouseClosed"), PopText.WarningType.WT_Warning); return; } AuctionHousePanel.SwithShowMe(); } break; case UIASSETS_ID.UIASSETS_HundredUI: if (GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Hundred)) { HundredUI.SwithShowMe(); } break; case UIASSETS_ID.UIASSETS_EmailPanel: EmailUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_LookchiPanel: LookTreeUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_PetTemple: PetTemple.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_FanilyBank: FanilyBankUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_FamilyCollection: FamilyCollectionUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_GuildBattlePanel: GuildBattleEnterScene.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_FamilyMonster: { if (FamilySystem.instance.GuildMember != null && (int)GuildSystem.GetGuildMemberSelf((int)GamePlayer.Instance.InstId).job_ >= (int)GuildJob.GJ_VicePremier) { FamilyMonsterUI.SwithShowMe(); } else { PopText.Instance.Show(LanguageManager.instance.GetValue("EN_CommandPositionLess")); } } break; case UIASSETS_ID.UIASSETS_CopyOpenPanel: CopyOpenUI.SwithShowMe(); break; case UIASSETS_ID.UIASSETS_EmployeeTask: NetConnection.Instance.requestEmployeeQuest(); break; case UIASSETS_ID.UIASSETS_EquipUIPanel: EquipUIPanel.SwithShowMe(); break; } }