void BuyItem(GameObject obj) { if (guildShopIteminfo == null) { return; } //if (guildShopIteminfo.Amount - guildShopIteminfo.BuyedNum<=0) //{ // GameCenter.messageMng.AddClientMsg(167); //} if (guildShopIteminfo != null) { GameCenter.buyMng.CurPrice = guildShopIteminfo.Price; GameCenter.buyMng.id = guildShopIteminfo.ID; GameCenter.buyMng.priceType = 16; GameCenter.buyMng.restrictionNum = guildShopIteminfo.Amount - guildShopIteminfo.BuyedNum; if (guildShopIteminfo.Item != null) { ToolTipMng.ShowEquipmentTooltip(guildShopIteminfo.Item, ItemActionType.StoreBuy, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } //GameCenter.buyMng.id = guildShopIteminfo.ID; //GameCenter.buyMng.CurPrice = guildShopIteminfo.Price; //GameCenter.buyMng.priceType = 16; //GameCenter.buyMng.OpenBuyWnd(guildShopIteminfo.Item, BuyType.GUILDSHOP, (guildShopIteminfo.Amount - guildShopIteminfo.BuyedNum)); // GameCenter.titleMng.ChooseTitle = titleinfo; // GameCenter.titleMng.UpdateTitle (); }
/// <summary> /// 展示物品信息 by吴江 /// </summary> /// <param name="_info">装备信息</param> /// <param name="_left">左边功能按钮的行为类型</param> /// <param name="_middle">中间功能按钮的行为类型</param> /// <param name="_right">右边功能按钮的行为类型</param> /// <param name="_itemUI">展示界面的碰撞依据。为空的话则是物品控件本身</param> public static void ShowEquipmentTooltip(EquipmentInfo _info, ItemActionType _left, ItemActionType _middle, ItemActionType _right, ItemActionType _other, GameObject _tiggerUI = null) { CloseAllTooltip(); if (_info == null) { return; } GUIBase panel = GetPanelByType(TooltipType.Equipment); if (panel == null) { return; } EquipmentTooltip equipmentTooltip = panel.GetComponent <EquipmentTooltip>(); if (equipmentTooltip == null) { GameSys.LogError("在预制上找不到组件 : <EquipmentTooltip>!"); return; } equipmentTooltip.EquipmentInfo = _info; equipmentTooltip.SetActionBtn(_left, _middle, _right, _other); panel.OpenUI(); //SetEquipTooltipPostion(panel.gameObject, _tiggerUI); if (_info.IsEquip && _info.BelongTo != EquipmentBelongTo.EQUIP) { EquipmentInfo compareEquip = GameCenter.inventoryMng.GetEquipFromEquipDicBySlot(_info.Slot); if (compareEquip != null && _info.InstanceID != compareEquip.InstanceID) { ToolTipMng.ShowCompareEquipmentTooltip(compareEquip); } } }
/// <summary> /// 点击抽到道具后 /// </summary> void OnClickGoods(GameObject obj) { Debug.Log("点击抽取道具"); int id = (int)UIEventListener.Get(obj).parameter; ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(id, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); }
void ClickLabelBack(GameObject go) { if (GameCenter.mainPlayerMng.MainPlayerInfo.CurSceneType != SceneType.SCUFFLEFIELD) { GameCenter.messageMng.AddClientMsg(405); return; } string url = labText.GetUrlAtPosition(UICamera.lastWorldPosition); if (!string.IsNullOrEmpty(url)) { string[] urlStr = url.Split('|'); if (urlStr.Length == 3) { switch (urlStr[0]) { case "0": break; case "1": //跳到一级界面 GUIType uiType = (GUIType)Enum.Parse(Type.GetType("GUIType"), urlStr[2]); if (uiType == GUIType.NEWMALL && curEquipmentInfo != null) { GameCenter.buyMng.OpenBuyWnd(curEquipmentInfo); } else { GameCenter.uIMng.SwitchToUI(uiType); } ToolTipMng.CloseAllTooltip(); break; case "2": //跳到二级界面 SubGUIType subUiType = (SubGUIType)Enum.Parse(Type.GetType("SubGUIType"), urlStr[2]); GameCenter.uIMng.SwitchToSubUI(subUiType); ToolTipMng.CloseAllTooltip(); break; case "3": int npcID = 0; if (int.TryParse(urlStr[2], out npcID)) { ToolTipMng.CloseAllTooltip(); GameCenter.uIMng.SwitchToUI(GUIType.NONE); GameCenter.taskMng.PublicTraceToNpc(npcID); } break; } } else { Debug.Log("数据错误!"); } } Debug.Log("url:" + url); }
void OnDisable() { if (mSyncTriggerChk != null) { mSyncTriggerChk.value = false; mSyncTriggerChk = null; } GameCenter.inventoryMng.OnUpdateDetailItem -= GetItemDetail; ToolTipMng.CloseAllTooltip(); //同时关闭比较界面 }
/// <summary> /// 点击材料,热显 /// </summary> void OnClickConsum() { if (toggleTemper.value) { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(data.ConsumeItemId, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } else { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(data.AddSoulConsumeItemId, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } }
void OnClick() { if (labEquip == null) { return; } string typeStr = labEquip.GetUrlAtPosition(UICamera.lastWorldPosition); int type = 0; if (int.TryParse(typeStr, out type)) { ToolTipMng.ShowEquipmentTooltip(type); } }
/// <summary> /// 根据界面id设置一个UILabel链接至UI界面 /// </summary> void OnClickLabelBack(GameObject go) { if (GameCenter.mainPlayerMng.MainPlayerInfo.CurSceneType != SceneType.SCUFFLEFIELD) { GameCenter.messageMng.AddClientMsg(405); return; } string url = labText.GetUrlAtPosition(UICamera.lastWorldPosition); if (!string.IsNullOrEmpty(url)) { string[] urlStr = url.Split('|'); switch (urlStr[0]) { case "0": case "1": case "2": { if (urlStr.Length == 3) { int uiType = int.Parse(urlStr[2]); if (GameCenter.inventoryMng != null) { GameCenter.inventoryMng.SkipWndById(uiType); } else { Debug.Log(" inventoryMng 为null, 不能使用跳转界面功能"); } ToolTipMng.CloseAllTooltip(); } } break; case "3": int npcID = 0; if (int.TryParse(urlStr[2], out npcID)) { ToolTipMng.CloseAllTooltip(); GameCenter.uIMng.SwitchToUI(GUIType.NONE); GameCenter.taskMng.PublicTraceToNpc(npcID); } break; } } }
void BuyItem(GameObject obj) { if (shopIteminfo == null && cityShopRef == null) { return; } if (shopIteminfo != null) { if (shopIteminfo.soleID == 0) { GameCenter.buyMng.CurPrice = shopIteminfo.Price; GameCenter.buyMng.id = shopIteminfo.ID; GameCenter.buyMng.priceType = shopIteminfo.BuyWay.EID; if (shopIteminfo.Item != null) { ToolTipMng.ShowEquipmentTooltip(shopIteminfo.Item, ItemActionType.StoreBuy, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } else { GameCenter.buyMng.id = shopIteminfo.soleID; if (shopIteminfo.Item != null) { ToolTipMng.ShowEquipmentTooltip(shopIteminfo.Item, ItemActionType.Redeem, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } } if (cityShopRef != null) { GameCenter.buyMng.CurPrice = cityShopRef.price; GameCenter.buyMng.id = cityShopRef.id; GameCenter.buyMng.priceType = cityShopRef.priceType; GameCenter.buyMng.restrictionNum = curLimitCount; EquipmentInfo equip = new EquipmentInfo(cityShopRef.itemID, EquipmentBelongTo.SHOPWND); if (equip != null) { ToolTipMng.ShowEquipmentTooltip(equip, ItemActionType.CityShopBuy, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } }
public UIFxAutoActive addLevEffect; //升级特效 #endregion void OnEnable() { if (promoteBtn != null) { EventDelegate.Add(promoteBtn.onClick, OnClickPromoteBtn); } if (equBtn != null) { EventDelegate.Add(equBtn.onClick, OnClickEquBtn); } if (unlodBtn != null) { EventDelegate.Add(unlodBtn.onClick, OnClickUnlodBtn); } //点击消耗材料,弹出信息框 if (consumBtn != null) { UIEventListener.Get(consumBtn.gameObject).onClick = delegate { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(data.WingPromoteList[0].eid, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } } ; GameCenter.wingMng.OnGetWingChange -= showEffect; GameCenter.wingMng.OnGetWingChange += showEffect; GameCenter.wingMng.OnAddLev -= ShowAddLevEffect; GameCenter.wingMng.OnAddLev += ShowAddLevEffect; } void OnDisable() { if (promoteBtn != null) { EventDelegate.Remove(promoteBtn.onClick, OnClickPromoteBtn); } if (equBtn != null) { EventDelegate.Remove(equBtn.onClick, OnClickEquBtn); } if (unlodBtn != null) { EventDelegate.Remove(unlodBtn.onClick, OnClickUnlodBtn); } GameCenter.wingMng.OnGetWingChange -= showEffect; GameCenter.wingMng.OnAddLev -= ShowAddLevEffect; } /// <summary> /// 淬炼 /// </summary> void OnClickPromoteBtn() { num = GameCenter.inventoryMng.GetNumberByType(data.WingPromoteList[0].eid); goldNum = GameCenter.mainPlayerMng.MainPlayerInfo.TotalCoinCount; // 淬炼提升判断条件 if (data.WingLev == maxWingLev) { //("提示翅膀已到达满级!!!"); GameCenter.messageMng.AddClientMsg(280); } else if (isQuickBuy.value == false && data.WingPromoteNum[0] > num)//没有勾选上直接用元宝购买的按钮,且材料不足 { MessageST mst = new MessageST(); mst.messID = 217; string str2 = string.Empty; if (num == 0) { str2 = data.WingPromoteNum[0].ToString(); } else { str2 = (data.WingPromoteNum[0] - num).ToString(); } mst.words = new string[3] { data.ConsumeYb.ToString(), str2, ConfigMng.Instance.GetEquipmentRef(data.WingPromoteList[0].eid).name }; mst.delYes = UseYB; GameCenter.messageMng.AddClientMsg(mst); } else if (isQuickBuy.value == true && data.WingPromoteNum[0] > num)//勾选上直接用元宝购买的按钮,且材料不足 { UseYB(null); } //铜钱不足提示 else if (goldNum < (ulong)data.WingPromoteNum[1]) { GoldNotEnough(); } else { GameCenter.wingMng.C2S_RequestUpLev(WingState.UPWINGLEV, data.WingId, false); } } void UseYB(object[] pars) { if ((ulong)data.ConsumeYb > GameCenter.mainPlayerMng.MainPlayerInfo.TotalDiamondCount)// (元宝) { MessageST mst = new MessageST(); mst.messID = 137; mst.delYes = delegate { //充值界面 GameCenter.uIMng.SwitchToUI(GUIType.RECHARGE); }; GameCenter.messageMng.AddClientMsg(mst); } //铜钱不足提示 else if (goldNum < (ulong)data.WingPromoteNum[1]) { GoldNotEnough(); } else { GameCenter.wingMng.C2S_RequestUpLev(WingState.UPWINGLEV, data.WingId, true); } } /// <summary> /// 铜钱不足提示 /// </summary> void GoldNotEnough() { MessageST mst = new MessageST(); mst.messID = 12; EquipmentRef equipRef = ConfigMng.Instance.GetEquipmentRef(data.WingPromoteList[1].eid); mst.words = new string[1] { equipRef == null ? string.Empty : equipRef.name }; GameCenter.messageMng.AddClientMsg(mst); } /// <summary> /// 穿戴 /// </summary> void OnClickEquBtn() { GameCenter.wingMng.C2S_RequestChangeWing(data.WingId, true); } /// <summary> /// 卸下 /// </summary> void OnClickUnlodBtn() { GameCenter.wingMng.C2S_RequestChangeWing(data.WingId, false); } #region 刷新翅膀激活窗口 void ShowAddLevEffect() { if (addLevEffect != null) { addLevEffect.ShowFx(); } } void showEffect() { if (effect != null) { effect.ReShowFx(); } }
public void Close(GameObject _go) { ToolTipMng.CloseAllTooltip(); }
/// <summary> /// 展示详细信息 /// </summary> /// <param name="obj"></param> protected void OnShowTooltip(GameObject obj) { if (showUIType == ItemShowUIType.MARKETBAG || showUIType == ItemShowUIType.TRADEBAG) { if (equipmentInfo.IsBind) { GameCenter.messageMng.AddClientMsg(326); return; } } if (showRedMask) //by 邓成 { return; } if (equipmentInfo != null && equipmentInfo.CDInfo != null) { if (equipmentInfo.BelongTo == EquipmentBelongTo.BACKPACK) { if (GameCenter.inventoryMng.UseCD.ContainsKey(equipmentInfo.CDInfo.id)) { if (GameCenter.inventoryMng.UseCD[equipmentInfo.CDInfo.id] != 0) { GameCenter.messageMng.AddClientMsg(259); return; } } } } if (equipmentInfo != null && showTooltip) { StorageWnd storageWnd = GameCenter.uIMng.GetGui <StorageWnd>(); GuildStorageWnd guildStorageWnd = GameCenter.uIMng.GetGui <GuildStorageWnd>(); if (storageWnd != null || guildStorageWnd != null) //当前打开的是仓库,屏蔽所有按钮.只有取出or放入 { if (equipmentInfo.BelongTo == EquipmentBelongTo.BACKPACK) { ToolTipMng.ShowEquipmentTooltip(equipmentInfo, ItemActionType.PutInStorage, ItemActionType.None, ItemActionType.None, ItemActionType.None, tooltipTrigger == null ? this.gameObject : tooltipTrigger); } else if (equipmentInfo.BelongTo == EquipmentBelongTo.STORAGE) { ToolTipMng.ShowEquipmentTooltip(equipmentInfo, ItemActionType.TakeOutStorage, ItemActionType.None, ItemActionType.None, ItemActionType.None, tooltipTrigger == null ? this.gameObject : tooltipTrigger); } } else { ToolTipMng.ShowEquipmentTooltip(equipmentInfo, leftAction, middleAction, rightAction, otherAction, tooltipTrigger == null ? this.gameObject : tooltipTrigger); } } if (equipmentInfo != null && equipmentInfo.BelongTo == EquipmentBelongTo.EQUIP) { GameCenter.inventoryMng.CurSelectEquip = equipmentInfo; } ///能使用的物品(非装备)用于使用预览 by 唐源 if (equipmentInfo != null && equipmentInfo.CanUse) { GameCenter.inventoryMng.CurSelectInventory = equipmentInfo;//如果当前选中的物品是可以使用的 } if (OnSelectEvent != null) { OnSelectEvent(this); } }
protected override void HandEvent(bool _bind) { base.HandEvent(_bind); if (_bind) { if (toggleEquip != null) { UIEventListener.Get(toggleEquip.gameObject).onClick = OnChangeEquipList; } if (toggleBag != null) { UIEventListener.Get(toggleBag.gameObject).onClick = OnChangeEquipList; } if (quickTog != null) { EventDelegate.Add(quickTog.onChange, OnChangeQuickTog); } GameCenter.inventoryMng.OnGetSealEquResult += RefreshLeft; if (shenGo != null) { UIEventListener.Get(shenGo).onClick = delegate { ToolTipMng.ShowEquipmentTooltip(consumeInfo, ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } } ; } else { if (toggleEquip != null) { UIEventListener.Get(toggleEquip.gameObject).onClick = null; } if (toggleBag != null) { UIEventListener.Get(toggleBag.gameObject).onClick = null; } if (quickTog != null) { EventDelegate.Remove(quickTog.onChange, OnChangeQuickTog); } GameCenter.inventoryMng.OnGetSealEquResult -= RefreshLeft; if (shenGo != null) { UIEventListener.Get(shenGo).onClick = null; } } } /// <summary> /// 是否快捷购买 /// </summary> void OnChangeQuickTog() { goldGo.SetActive(quickTog.value); } /// <summary> /// 切换身上和背包按钮 /// </summary> void OnChangeEquipList(GameObject go) { itemsPanel.GetComponent <UIScrollView>().ResetPosition(); if (toggleEquip.value) { GetEquipFromEqu(); } else if (toggleBag.value) { GetEquipFromBag(); } ShowItems(); } /// <summary> /// 获得身上的所有装备 /// </summary> void GetEquipFromEqu() { tempItems.Clear(); Dictionary <int, EquipmentInfo> backDic = GameCenter.inventoryMng.GetPlayerEquipList(); using (var e = backDic.GetEnumerator()) { while (e.MoveNext()) { EquipmentInfo info = e.Current.Value; if (info.Slot != EquipSlot.None && info.StackCurCount != 0) { tempItems[info.InstanceID] = info; } } } } /// <summary> /// 获得背包中的所有装备 /// </summary> void GetEquipFromBag() { tempItems.Clear(); Dictionary <int, EquipmentInfo> backDic = GameCenter.inventoryMng.GetBackpackEquipDic(); using (var e = backDic.GetEnumerator()) { while (e.MoveNext()) { EquipmentInfo info = e.Current.Value; if (info.Slot != EquipSlot.None && info.StackCurCount != 0) { tempItems[info.InstanceID] = info; } } } } #region 右侧逻辑 /// <summary> /// 显示右边的装备信息 /// </summary> void ShowItems() { HideAllGoItems(); int index = 0; using (var e = tempItems.GetEnumerator()) { while (e.MoveNext()) { EquipmentInfo info = e.Current.Value; if (info == null) { continue; } GameObject go = null; if (!allGoItems.ContainsKey(info.InstanceID)) { go = Instantiate(exResources.GetResource(ResourceType.GUI, "Backpack/DecomposeItem")) as GameObject; allGoItems[info.InstanceID] = go; } go = allGoItems[info.InstanceID]; go.SetActive(true); go.transform.parent = itemsPanel.transform; go.transform.localPosition = new Vector3(positionInfo.x, positionInfo.y - positionInfo.w * index, -1); go.transform.localScale = Vector3.one; DecomposeItemUI bagItemUI = go.GetComponent <DecomposeItemUI>(); go = null; bagItemUI.SetData(info, ChooseBagItem); index++; } } } void HideAllGoItems() { using (var e = allGoItems.GetEnumerator()) { while (e.MoveNext()) { GameObject go = e.Current.Value; if (go != null) { go.SetActive(false); } } } } void ChooseBagItem(GameObject go) { curEquInfo = (EquipmentInfo)UIEventListener.Get(go).parameter; RefreshLeft(curEquInfo); } #endregion #region 左侧逻辑 /// <summary> /// 刷新左边的信息 /// </summary> void RefreshLeft(EquipmentInfo _info) { if (_info != null) { curEquInfo = _info; } if (curEquInfo != null) { curChooseItem.FillInfo(new EquipmentInfo(curEquInfo, EquipmentBelongTo.PREVIEW)); } else { curChooseItem.FillInfo(null); } if (curEquInfo != null) { if (bindLabel[0] != null) { bindLabel[0].gameObject.SetActive(curEquInfo.IsBind); } if (bindLabel[1] != null) { bindLabel[1].gameObject.SetActive(!curEquInfo.IsBind); } if (bindBtn != null) { bindBtn.gameObject.SetActive(!curEquInfo.IsBind); } if (cancelBindBtn != null) { cancelBindBtn.gameObject.SetActive(curEquInfo.IsBind); } } else { if (bindLabel[0] != null) { bindLabel[0].gameObject.SetActive(false); } if (bindLabel[1] != null) { bindLabel[1].gameObject.SetActive(false); } } int num = GameCenter.inventoryMng.GetNumberByType(4000013); if (consumeLabel != null) { consumeLabel.text = "1/" + (num >= 1 ? num.ToString() :"[ff0000]" + num); } if (goldLabel != null) { goldLabel.text = consumeInfo.DiamondPrice + "/" + GameCenter.mainPlayerMng.MainPlayerInfo.TotalDiamondCount; } } #endregion }
/// <summary> /// 激活材料获取途径 /// </summary> void OnClickMaterialBtn() { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(info.MagicId, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); }
public static void TryToAccess(this EquipmentInfo _eq) { Debug.Log("TryToAccess:" + _eq); ToolTipMng.ShowEquipmentAccessTooltip(_eq); }
void ClickLabelBack(GameObject go) { if (chatinfo == null) { return; } if (labText == null) { return; } string url = labText.GetUrlAtPosition(UICamera.lastWorldPosition); if (!string.IsNullOrEmpty(url)) { string[] urlStr = url.Split('|'); if (urlStr.Length == 2) { if (urlStr[0].Equals("1")) { if (urlStr[1].Equals("0")) { if (chatinfo.playerID.Count > 0) { GameCenter.previewManager.C2S_AskOPCPreview(chatinfo.playerID[0]); } } if (urlStr[1].Equals("1")) { if (chatinfo.playerID.Count > 1) { GameCenter.previewManager.C2S_AskOPCPreview(chatinfo.playerID[1]); } } } if (urlStr[0].Equals("2")) { if (urlStr[1].Equals("0")) { if (chatinfo.equipmentRefList.Count > 0) { if (chatinfo.equipmentRefList[0] != null) { ToolTipMng.ShowEquipmentTooltip(chatinfo.equipmentRefList[0], ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } } if (urlStr[1].Equals("1")) { if (chatinfo.equipmentRefList.Count > 1) { if (chatinfo.equipmentRefList[1] != null) { ToolTipMng.ShowEquipmentTooltip(chatinfo.equipmentRefList[1], ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } } } if (urlStr[0].Equals("3")) { if (urlStr[1].Equals("0")) { if (chatinfo.equipmentList.Count > 0) { if (chatinfo.equipmentList[0] != null) { ToolTipMng.ShowEquipmentTooltip(chatinfo.equipmentList[0], ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } } if (urlStr[1].Equals("1")) { if (chatinfo.equipmentList.Count > 1) { if (chatinfo.equipmentList[1] != null) { ToolTipMng.ShowEquipmentTooltip(chatinfo.equipmentList[1], ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } } } } if (urlStr[0].Equals("4")) { if (chatinfo.sceneID != 0 && chatinfo.point != Vector3.zero) { GameCenter.curMainPlayer.GoTraceTarget(chatinfo.sceneID, (int)chatinfo.point.x, (int)chatinfo.point.z); willCloseChatWnd = true; } } if (urlStr[0].Equals("5")) { if (chatinfo.EquipInfo != null) { ToolTipMng.ShowEquipmentTooltip(chatinfo.EquipInfo, ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None, this.gameObject); } else { Debug.LogError("查看的物品数据为空 by黄洪兴"); } } if (urlStr[0].Equals("6")) { if (chatinfo != null) { Vector3 point = GameCenter.cameraMng.uiCamera.ScreenToWorldPoint(Input.mousePosition); if (GameCenter.chatMng.OnShowInformation != null) { GameCenter.chatMng.OnShowInformation(chatinfo, point); } } } if (urlStr[0].Equals("7")) { if (chatinfo != null) { int oth_id = GameCenter.mainPlayerMng.MainPlayerInfo.ServerInstanceID; if (!GameCenter.teamMng.isInTeam) { if (!GameCenter.duplicateMng.CopyTeams.ContainsKey(oth_id) && GameCenter.duplicateMng.CopyTeams.Count < 3) { if (chatinfo.playerID.Count > 0) { GameCenter.duplicateMng.C2S_CopyInFriendReturn(chatinfo.playerID[0], 2); GameCenter.duplicateMng.isMagicTowrAddFri = true; } } else { GameCenter.messageMng.AddClientMsg(84); } } else { GameCenter.messageMng.AddClientMsg(423); } } } } else { Debug.Log("数据错误!" + "url:" + url); } } }
void Start() { //激活宝箱 if (openBtn != null) { UIEventListener.Get(openBtn.gameObject).onClick = delegate { if (data != null) { GameCenter.royalTreasureMng.C2S_ReqActiveRoyalBox(data.ID); } } } ; //加速开启 领取奖励 if (rightAwayBtn != null) { UIEventListener.Get(rightAwayBtn.gameObject).onClick = delegate { if (data != null) { PopTip(true); } } } ; //立即开启 领取奖励 if (quickenBtn != null) { UIEventListener.Get(quickenBtn.gameObject).onClick = delegate { if (data != null) { PopTip(false); } } } ; //普通开启 领取奖励 if (getRewardBtn != null) { UIEventListener.Get(getRewardBtn.gameObject).onClick = delegate { if (data != null) { GameCenter.royalTreasureMng.curGetRewardBoxData = data; GameCenter.royalTreasureMng.C2S_ReqGetRoyalReward(data.ID, 1); } } } ; //点击成为Vip if (goRecharge != null) { UIEventListener.Get(goRecharge.gameObject).onClick = delegate { GameCenter.uIMng.SwitchToUI(GUIType.RECHARGE); } } ; //展示物品信息 if (haveItemGo != null) { UIEventListener.Get(haveItemGo).onClick = delegate { if (data != null) { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(data.ItemID, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } } } ; //展示物品信息 if (vipGo != null) { UIEventListener.Get(vipGo).onClick = delegate { ToolTipMng.ShowEquipmentTooltip(new EquipmentInfo(7000004, EquipmentBelongTo.PREVIEW), ItemActionType.None, ItemActionType.None, ItemActionType.None, ItemActionType.None); } } ; }