private void OpenStoreDialog(OpenStoreDialogMsg msg) { SoundManager.Instance.PlaySound((int)SoundType.EFFCT_MENU_Open, optionModel.MobileOption.effectVolume); if (msg.storeMenu == StoreMenu.IdolShop) { UI.IDialog.RequestDialogEnter <UI.StoreIdolDialog>(); List <Character_Table.Param> ListCharacter = new List <Character_Table.Param>(); List <bool> ListIsHave = new List <bool>(); for (int i = 0; i < character_Table.sheets[0].list.Count; i++) { ListCharacter.Add(character_Table.sheets[0].list[i]); ListIsHave.Add(playerInventoryModel.IsHaveCharacter(i)); } Message.Send <SetCharacterStoreMsg>(new SetCharacterStoreMsg(playerInventoryModel.NowCharacter, ListCharacter, ListIsHave)); } else if (msg.storeMenu == StoreMenu.CashShop) { UI.IDialog.RequestDialogEnter <UI.StoreCashDialog>(); Message.Send <SetCashStoreMsg>(new SetCashStoreMsg(cash_Table)); } else if (msg.storeMenu == StoreMenu.SkinShop) { SoundManager.Instance.PlaySound((int)SoundType.EFFCT_MENU_Open, optionModel.MobileOption.effectVolume); UI.IDialog.RequestDialogEnter <UI.StoreSkinDialog>(); List <Skin_Table.Param> ListSkin = new List <Skin_Table.Param>(); List <bool> ListIsHave = new List <bool>(); for (int i = 0; i < skin_Table.sheets[0].list.Count; i++) { if (skin_Table.sheets[0].list[i].Character == (int)playerInventoryModel.NowCharacter) { ListSkin.Add(skin_Table.sheets[0].list[i]); ListIsHave.Add(playerInventoryModel.IsHaveSkin(i)); } } Message.Send <SetSkinStoreMsg>(new SetSkinStoreMsg(playerInventoryModel.NowCharacter, playerInventoryModel.NowSkin, ListSkin, ListIsHave, playerStatusModel.Coin)); List <Character_Table.Param> ListCharacter = new List <Character_Table.Param>(); List <bool> ListIsCharacterHave = new List <bool>(); for (int i = 0; i < character_Table.sheets[0].list.Count; i++) { ListCharacter.Add(character_Table.sheets[0].list[i]); ListIsCharacterHave.Add(playerInventoryModel.IsHaveCharacter(i)); } Message.Send <SetSkinStoreCharacterMsg>(new SetSkinStoreCharacterMsg(playerInventoryModel.NowCharacter, ListCharacter, ListIsCharacterHave)); } }
private void OpenStoreDialog(OpenStoreDialogMsg msg) { if (msg.storeMenu == StoreMenu.IdolShop) { UI.IDialog.RequestDialogEnter <UI.StoreIdolDialog>(); //Message.Send<SetCharacterStoreMsg>(new SetCharacterStoreMsg(character_Table)); } else if (msg.storeMenu == StoreMenu.CashShop) { UI.IDialog.RequestDialogEnter <UI.StoreCashDialog>(); Message.Send <SetCashStoreMsg>(new SetCashStoreMsg(cash_Table)); } else if (msg.storeMenu == StoreMenu.SkinShop) { UI.IDialog.RequestDialogEnter <UI.StoreSkinDialog>(); //Message.Send<SetSkinStoreMsg>(new SetSkinStoreMsg(skin_Table)); } }