//public void AccountmgrBtnPos() //{ //} void SetBindBtn() { if (PlayerRole.Instance.EntityManager.GetRoleEntityInfo() == null) { return; } tagRoleAddressInfo pInfo = PlayerRole.Instance.EntityManager.GetRoleEntityInfo(); bool bBind = FishDataInfo.IsCanUsePhone(pInfo.Phone); m_AccountMgrTrans[1].gameObject.SetActive(!bBind); m_AccountMgrTrans[2].gameObject.SetActive(bBind); }
bool HandleLoadRoleEntityInfo(NetCmdBase obj) { LC_Cmd_LoadUserEntity ncb = (LC_Cmd_LoadUserEntity)obj; RoleEntityInfo = ncb.UserEntityInfo; m_IsLoadInfo = true; tagEntityChangeEvent pEvent = new tagEntityChangeEvent(); MsgEventHandle.HandleMsg(pEvent); return(true); }
public void UpdateReceiverAddressDate() { if (PlayerRole.Instance.EntityManager.GetRoleEntityInfo() == null) { return; } tagRoleAddressInfo pInfo = PlayerRole.Instance.EntityManager.GetRoleEntityInfo(); if (pInfo.EntityItemUseName != null && pInfo.EntityItemUseName.Length > 0 && pInfo.EntityItemUseName != "" && pInfo.EntityItemUseAddres != null && pInfo.EntityItemUseAddres.Length > 0 && pInfo.EntityItemUseAddres != "") { m_UIInput[0].value = pInfo.EntityItemUseName; m_UIInput[1].value = pInfo.EntityItemUseAddres; } }
public void UpdateCertificationDate() { if (PlayerRole.Instance.EntityManager.GetRoleEntityInfo() == null) { return; } tagRoleAddressInfo pInfo = PlayerRole.Instance.EntityManager.GetRoleEntityInfo(); if (pInfo.Name != null && pInfo.Name.Length > 0 && pInfo.Name != "" && pInfo.IdentityID != null && pInfo.IdentityID.Length > 0 && pInfo.IdentityID != "") { m_CertificationOK.SetActive(true); m_NoCertification.SetActive(false); } }
public void UpateMaterailDate() { ClearGird(); m_ShopID = (byte)(Shop_Type.Shop_Material + 1); if (FishConfig.Instance.m_ShopInfo.ShopMap.ContainsKey(m_ShopID) == false) { return; } tagShopConfig shopItemMap = FishConfig.Instance.m_ShopInfo.ShopMap[m_ShopID]; if (shopItemMap == null) { return; } byte Idx = 0; foreach (KeyValuePair <byte, tagShopItemConfig> map in shopItemMap.ShopItemMap) { //对聚宝盆特殊处理 //IsOfficialVersion true 官网 if (JBPSetting.ShowJBP(map.Value.ItemInfo.ItemID) == false) { continue; } //if (SDKMgr.Instance.IsOfficialVersion == false && map.Value.ItemInfo.ItemID == 1700) //为渠道版 //{ // continue; //} //else if (SDKMgr.Instance.IsOfficialVersion && PlayerRole.Instance.RoleInfo.RoleMe.GetVipLevel() < 3) //VIP等级小于3不显示 // continue; ShopItemInfoUI item = new ShopItemInfoUI(); item.Init(m_ScrollView.m_BaseChild); item.InitItemSum(); item.SetShopItemInfo(m_ShopID, map.Value, shopItemMap.ShopItemStrMap[map.Key]); m_ScrollView.m_Grid[Idx % 3].AddChild(item.m_BaseTrans); item.ResetLocalScale(); Idx++; } tagRoleAddressInfo pEntity = PlayerRole.Instance.EntityManager.GetRoleEntityInfo();//获取一次实体数据 UpdateNoticeDate(); }
private bool SendShopItem(Byte ShopID, Byte ItemIndex, UInt32 ItemSum) { //玩家购买物品 //1.判断商店是否存在 if (!FishConfig.Instance.m_ShopInfo.ShopMap.ContainsKey(ShopID)) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_1); MsgEventHandle.HandleMsg(pUOM); return(false); } //2.判断物品是否存在 if (!FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap.ContainsKey(ItemIndex)) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_2); MsgEventHandle.HandleMsg(pUOM); return(false); } if (ItemSum > 1 && !FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].IsCanPile) { //不可以堆叠的物品购买多个 tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_8); MsgEventHandle.HandleMsg(pUOM); return(false); } //3.判断物品是否已经激活 if (!FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].IsInTime()) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_3); MsgEventHandle.HandleMsg(pUOM); return(false); } if (FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].ShopType == ShopItemType.SIT_Entity)//实体物品购买 { tagRoleAddressInfo pEntity = PlayerRole.Instance.EntityManager.GetRoleEntityInfo(); if (pEntity == null || !PlayerRole.Instance.EntityManager.CheckEntityInfoIsCanUser()) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_4); MsgEventHandle.HandleMsg(pUOM); return(false); } } if (FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].ShopType == ShopItemType.SIT_PhonePay) { tagRoleAddressInfo pEntity = PlayerRole.Instance.EntityManager.GetRoleEntityInfo(); if (pEntity == null || !PlayerRole.Instance.EntityManager.CheckIsCanPhonePay()) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_7); MsgEventHandle.HandleMsg(pUOM); return(false); } } //4.判断物品的价格 玩家是否可以购买 if ( PlayerRole.Instance.RoleInfo.RoleMe.GetGlobel() < FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].PriceGlobel * ItemSum || PlayerRole.Instance.RoleInfo.RoleMe.GetMedal() < FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].PriceMabel * ItemSum || PlayerRole.Instance.RoleInfo.RoleMe.GetCurrency() < FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].PriceCurrey * ItemSum ) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_5); MsgEventHandle.HandleMsg(pUOM); return(false); } //判断玩家兑换次数是否符合要求 ShopItemType ItemType = FishConfig.Instance.m_ShopInfo.ShopMap[ShopID].ShopItemMap[ItemIndex].ShopType; if (ItemType == ShopItemType.SIT_PhonePay || ItemType == ShopItemType.SIT_Entity) { if (PlayerRole.Instance.RoleInfo.RoleMe.GetCashSum() >= PlayerRole.Instance.RoleVip.GetUseMedalSum()) { tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_9); MsgEventHandle.HandleMsg(pUOM); return(false); } //兑换次数符合要求 我们可以继续判断 部分平台上玩家 必须先点击分享才可以使用 //1.配置文件判断 当前平台是否需要分享 (写入配置文件 360 官网包等 ) if (IsNeedShare(ItemType)) { //必须先分享才可以兑换物品 tagUserOperationEvent pUOM = new tagUserOperationEvent(UserOperateMessage.UOM_Shop_BuyItem_Failed_10); MsgEventHandle.HandleMsg(pUOM); return(false); } } //5.发送命令 CL_Cmd_ShopItem ncb = new CL_Cmd_ShopItem(); ncb.SetCmdType(NetCmdType.CMD_CL_ShopItem); ncb.ShopItemIndex = ItemIndex; ncb.ItemSum = ItemSum; ncb.ShopID = ShopID; NetServices.Instance.Send <CL_Cmd_ShopItem>(ncb); return(true); }