private void OnClickAddFriendButton(GameObject obj) { UIButton AddBtn = obj.transform.GetComponent <UIButton>(); sg.GS2C_Task_Invite_List_Res.canInviteFriend Friend = (sg.GS2C_Task_Invite_List_Res.canInviteFriend)AddBtn.data; string FriendName = Friend.friendName; long RoleId = Friend.friendId; }
private void OnClickNextButton(GameObject obj) { UIButton btn = obj.transform.GetComponent <UIButton>(); sg.GS2C_Task_Invite_List_Res.canInviteFriend friend = (sg.GS2C_Task_Invite_List_Res.canInviteFriend)btn.Data; StorageFriendInfo friendInfo = new StorageFriendInfo(); friendInfo.friendId = friend.friendId; friendInfo.friendType = friend.friendType; friendInfo.friendGender = friend.friendGender; friendInfo.friednAppearance = friend.friednAppearance; if (friend.friendType == (int)JobManager.InviteType.Pet) { friendInfo.friendCloth = Globals.Instance.MGameDataManager.MActorData.PetInfo.itemId.ToString(); } else { friendInfo.friendCloth = friend.friendCloth; } friendInfo.friendActing = friend.actSkill; Globals.Instance.MTaskManager.mTaskDailyData.FriendInfo = friendInfo; NPCConfig Config = Globals.Instance.MDataTableManager.GetConfig <NPCConfig>(); NPCConfig.NPCObject NpcObj = null; bool isHas = Config.GetNPCObject((int)friend.friendId, out NpcObj); if (!isHas) { NetSender.Instance.RequestTaskInviteReq(taskID, (int)friend.friendId, friend.friendType); return; } if (friend.friendType != (int)JobManager.InviteType.FRIEND && friend.friendType != (int)JobManager.InviteType.NEARBY) { if (NpcObj.Cost_Money != -1) { Globals.Instance.MGUIManager.CreateGUIDialog(delegate(GUIDialog gui){ gui.SetTextAnchor(ETextAnchor.MiddleLeft, false); gui.SetDialogType(EDialogType.CommonType, null); string flag = string.Format(Globals.Instance.MDataTableManager.GetWordText(4014), NpcObj.Cost_Money, Globals.Instance.MDataTableManager.GetWordText(4015)); gui.SetText(flag); }, EDialogStyle.DialogOkCancel, delegate() { NetSender.Instance.RequestTaskInviteReq(taskID, (int)friend.friendId, friend.friendType); }); } else if (NpcObj.Cost_Ingot != -1) { Globals.Instance.MGUIManager.CreateGUIDialog(delegate(GUIDialog gui){ gui.SetTextAnchor(ETextAnchor.MiddleLeft, false); gui.SetDialogType(EDialogType.CommonType, null); string flag = string.Format(Globals.Instance.MDataTableManager.GetWordText(4014), NpcObj.Cost_Ingot, Globals.Instance.MDataTableManager.GetWordText(4016)); gui.SetText(flag); }, EDialogStyle.DialogOkCancel, delegate() { NetSender.Instance.RequestTaskInviteReq(taskID, (int)friend.friendId, friend.friendType); }); } else { NetSender.Instance.RequestTaskInviteReq(taskID, (int)friend.friendId, friend.friendType); } } }