637 lines
22 KiB
C#
637 lines
22 KiB
C#
|
//拥有帮会时打开的界面中的成员分页窗口
|
|||
|
|
|||
|
using Games.LogicObj;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using GCGame;
|
|||
|
using Module.Log;
|
|||
|
using Games.GlobeDefine;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System;
|
|||
|
using GCGame.Table;
|
|||
|
|
|||
|
public class GuildMemberInfoWnd : MonoBehaviour
|
|||
|
{
|
|||
|
private GuildMember m_CurrSelectMemberInfo;
|
|||
|
|
|||
|
public UIContainerSelect m_MemberContainer;
|
|||
|
public UIContainerSelect m_ApplyContainer;
|
|||
|
public GameObject m_memlistInfoWnd;
|
|||
|
public GameObject m_ApplyWnd;
|
|||
|
public Text MemberText;
|
|||
|
|
|||
|
public GameObject AutoUnPowerfull;
|
|||
|
public Toggle AutoAgreeApply;
|
|||
|
public InputField AutoAgreeLevel;
|
|||
|
|
|||
|
public GameObject ChangeOther;//变更职位按钮
|
|||
|
public GameObject PutOtherOutGuild;//逐出帮会按钮
|
|||
|
|
|||
|
public ToggleGroup m_ToggleGroup;
|
|||
|
|
|||
|
public GameObject m_LeaveGuildBtn;
|
|||
|
public GameObject m_ReSignBtn;
|
|||
|
|
|||
|
public GameObject m_AskFriendWnd;
|
|||
|
public GameObject HasApply;
|
|||
|
public GameObject m_JobChangeWnd;
|
|||
|
public GameObject m_SendMsgToAll;
|
|||
|
public InputField m_MsgInputField;
|
|||
|
private int selectJobindex = -1;
|
|||
|
private int index_ShowWnd = 1;
|
|||
|
|
|||
|
private bool canShowRedPoint = false;
|
|||
|
|
|||
|
public void UnPowerClick()
|
|||
|
{
|
|||
|
GCGame.Utils.IsGuildPowerFull(11);
|
|||
|
}
|
|||
|
|
|||
|
public void AutoAgreeToggleChange(bool isOn)
|
|||
|
{
|
|||
|
if (isOn == (GameManager.gameManager.PlayerDataPool.GuildInfo.AutoApproveState == 1))
|
|||
|
return;
|
|||
|
SendAutoSet();
|
|||
|
}
|
|||
|
|
|||
|
public void AutoAgreeLevelEndEdit()
|
|||
|
{
|
|||
|
if (AutoAgreeApply.isOn == false)
|
|||
|
return;
|
|||
|
SendAutoSet();
|
|||
|
}
|
|||
|
|
|||
|
public void SendAutoSet()
|
|||
|
{
|
|||
|
bool auto = AutoAgreeApply.isOn;
|
|||
|
int level = 0;
|
|||
|
if (int.TryParse(AutoAgreeLevel.text, out level) == false || level <= 0)
|
|||
|
{
|
|||
|
level = 0;
|
|||
|
}
|
|||
|
//发送消息给服务器
|
|||
|
CG_REQ_SET_AUTO_APPROVE send = (CG_REQ_SET_AUTO_APPROVE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_REQ_SET_AUTO_APPROVE);
|
|||
|
send.Level = level;
|
|||
|
send.SetState(auto ? 1 : 0);
|
|||
|
send.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
void Awake()
|
|||
|
{
|
|||
|
Hashtable add = new Hashtable();
|
|||
|
add["name"] = "UpdateGuildMemInfo";
|
|||
|
Games.Events.MessageEventCallBack call = UpdateGuildInfo;
|
|||
|
add["callFun"] = call;
|
|||
|
Games.Events.EventDispatcher.Instance.AddMessageEvent(Games.Events.EventId.UpdateGuildInfo, add);
|
|||
|
|
|||
|
Games.Events.EventDispatcher.Instance.Add(Games.Events.EventId.OpenSetNewJob, ChangePlace);
|
|||
|
|
|||
|
Hashtable add1 = new Hashtable();
|
|||
|
add1["name"] = "MemberJobChange";
|
|||
|
Games.Events.MessageEventCallBack call1 = MemberJobChange;
|
|||
|
add1["callFun"] = call1;
|
|||
|
Games.Events.EventDispatcher.Instance.AddMessageEvent(Games.Events.EventId.OperatorResult, add1);
|
|||
|
|
|||
|
// 职位是否可以接收红点
|
|||
|
GameDefine_Globe.GUILD_JOB myJob = (GameDefine_Globe.GUILD_JOB)GameManager.gameManager.PlayerDataPool.GuildInfo.GuildJob;
|
|||
|
if (myJob == GameDefine_Globe.GUILD_JOB.CHIEF
|
|||
|
|| myJob == GameDefine_Globe.GUILD_JOB.VICE_CHIEF
|
|||
|
|| myJob == GameDefine_Globe.GUILD_JOB.TANGZHU
|
|||
|
|| myJob == GameDefine_Globe.GUILD_JOB.XIANGZHU)
|
|||
|
{
|
|||
|
canShowRedPoint = true;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void OnDestroy()
|
|||
|
{
|
|||
|
Games.Events.EventDispatcher.Instance.RemoveMessage(Games.Events.EventId.UpdateGuildInfo, "UpdateGuildMemInfo");
|
|||
|
Games.Events.EventDispatcher.Instance.RemoveMessage(Games.Events.EventId.OperatorResult, "MemberJobChange");
|
|||
|
Games.Events.EventDispatcher.Instance.Remove(Games.Events.EventId.OpenSetNewJob, ChangePlace);
|
|||
|
}
|
|||
|
|
|||
|
public void MemberJobChange(Hashtable addParam, Hashtable sendParam)
|
|||
|
{
|
|||
|
InitInfos();
|
|||
|
}
|
|||
|
|
|||
|
public void UpdateGuildInfo(Hashtable addParam, Hashtable sendParam)
|
|||
|
{
|
|||
|
InitInfos();
|
|||
|
|
|||
|
// 申请列表是否有人
|
|||
|
bool hasApply = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildApplyList.Count > 0 ? true : false;
|
|||
|
|
|||
|
HasApply.SetActive(hasApply && canShowRedPoint);
|
|||
|
}
|
|||
|
|
|||
|
public void InitInfos()
|
|||
|
{
|
|||
|
if (index_ShowWnd == 3)
|
|||
|
{
|
|||
|
InitApplyListContent();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
if (index_ShowWnd == 2)
|
|||
|
{
|
|||
|
InitMemberListContent((int)GameDefine_Globe.GUILD_JOB.ELITE);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
InitMemberListContent((int)GameDefine_Globe.GUILD_JOB.PRERESERVE);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
if (MemberText != null && GameManager.gameManager.PlayerDataPool.IsHaveGuild())
|
|||
|
{
|
|||
|
MemberText.text = string.Format("{0}/{1}", GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem, GameManager.gameManager.PlayerDataPool.GuildInfo.GuildMaxMem);
|
|||
|
}
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Guid);
|
|||
|
bool hasJob = (job < (int)GameDefine_Globe.GUILD_JOB.MEMBER);
|
|||
|
m_LeaveGuildBtn.SetActive(!hasJob);
|
|||
|
m_ReSignBtn.SetActive(hasJob);
|
|||
|
|
|||
|
// 申请列表是否有人
|
|||
|
bool hasApply = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildApplyList.Count > 0 ? true : false;
|
|||
|
|
|||
|
HasApply.SetActive(hasApply && canShowRedPoint);
|
|||
|
|
|||
|
AutoAgreeLevel.text = GameManager.gameManager.PlayerDataPool.GuildInfo.AutoApproveLevel.ToString();
|
|||
|
AutoAgreeApply.isOn = (GameManager.gameManager.PlayerDataPool.GuildInfo.AutoApproveState == 1);
|
|||
|
AutoUnPowerfull.SetActive(!GCGame.Utils.IsGuildPowerFull(11, false));
|
|||
|
}
|
|||
|
public void InitApplyListContent()
|
|||
|
{
|
|||
|
List<GuildMember> showList = new List<GuildMember>();
|
|||
|
List<GuildMember> selects = new List<GuildMember>();
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo != null)
|
|||
|
{
|
|||
|
foreach (KeyValuePair<UInt64, GuildMember> memberPair in GameManager.gameManager.PlayerDataPool.GuildInfo.GuildApplyList)
|
|||
|
{
|
|||
|
showList.Add(memberPair.Value);
|
|||
|
}
|
|||
|
}
|
|||
|
if (showList.Count > 0)
|
|||
|
selects.Add(showList[0]);
|
|||
|
applyCurMember = null;
|
|||
|
m_ApplyContainer.InitSelectContent(showList, selects, ApplyListClick);
|
|||
|
}
|
|||
|
|
|||
|
GuildMember applyCurMember = null;
|
|||
|
private void ApplyListClick(object item)
|
|||
|
{
|
|||
|
GuildMember member = item as GuildMember;
|
|||
|
if (applyCurMember == null)
|
|||
|
{
|
|||
|
applyCurMember = member;
|
|||
|
return;
|
|||
|
}
|
|||
|
if (applyCurMember == member)
|
|||
|
return;
|
|||
|
if(member.LastLogout<=0)
|
|||
|
{
|
|||
|
PopMenuLogic.ShowMenu("GuildApplyPopMenu", null, member.Guid);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
PopMenuLogic.ShowMenu("GuildApplyPopMenu", null, member.Guid,"line");
|
|||
|
}
|
|||
|
applyCurMember = member;
|
|||
|
}
|
|||
|
|
|||
|
public void InitMemberListContent(int job)
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo != null)
|
|||
|
{
|
|||
|
List<GuildMember> self = new List<GuildMember>();
|
|||
|
List<GuildMember> showList = new List<GuildMember>();
|
|||
|
GuildMember OldSelect = null;
|
|||
|
foreach (KeyValuePair<UInt64, GuildMember> memberPair in GameManager.gameManager.PlayerDataPool.GuildInfo.GuildMemberList)
|
|||
|
{
|
|||
|
GuildMember member = memberPair.Value;
|
|||
|
if (member.Guid != GlobeVar.INVALID_GUID && member.Job <= job)
|
|||
|
{
|
|||
|
if (m_CurrSelectMemberInfo != null && m_CurrSelectMemberInfo.Guid == member.Guid)
|
|||
|
OldSelect = member;
|
|||
|
if (member.Guid == Singleton<ObjManager>.Instance.MainPlayer.GUID)
|
|||
|
{
|
|||
|
self.Add(member);
|
|||
|
member.ShowIndex = 0;
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
showList.Add(member);
|
|||
|
member.ShowIndex = showList.Count;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
if (self.Count > 0)
|
|||
|
showList.Insert(0, self[0]);
|
|||
|
if (OldSelect != null)
|
|||
|
{
|
|||
|
self.Clear();
|
|||
|
self.Add(OldSelect);
|
|||
|
}else if(m_CurrSelectMemberInfo!=null)
|
|||
|
{
|
|||
|
if(m_CurrSelectMemberInfo.ShowIndex < showList.Count)
|
|||
|
{
|
|||
|
self.Clear();
|
|||
|
self.Add(showList[m_CurrSelectMemberInfo.ShowIndex]);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
self.Clear();
|
|||
|
self.Add(showList[showList.Count - 1]);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
m_MemberContainer.InitSelectContent(showList, self, ItemClick);
|
|||
|
}
|
|||
|
}
|
|||
|
public void ItemClick(object initInfo)
|
|||
|
{
|
|||
|
GuildMember info = initInfo as GuildMember;
|
|||
|
if (info == null)
|
|||
|
{
|
|||
|
LogModule.DebugLog("GuildPreviewInfo is null");
|
|||
|
return;
|
|||
|
}
|
|||
|
if (m_CurrSelectMemberInfo == null)
|
|||
|
{
|
|||
|
m_CurrSelectMemberInfo = info;
|
|||
|
return;
|
|||
|
}
|
|||
|
UpdateBtnsState(info);
|
|||
|
m_CurrSelectMemberInfo = info;
|
|||
|
}
|
|||
|
|
|||
|
void UpdateBtnsState(GuildMember selectInfo)
|
|||
|
{
|
|||
|
if (selectInfo == null)
|
|||
|
return;
|
|||
|
GuildMember info = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMainPlayerGuildInfo();
|
|||
|
if (info == null)
|
|||
|
return;
|
|||
|
if (PutOtherOutGuild != null)
|
|||
|
{
|
|||
|
PutOtherOutGuild.SetActive((info.Job < (int)GameDefine_Globe.GUILD_JOB.TANGZHU) && (selectInfo.Guid != info.Guid) && (info.Job != -1));
|
|||
|
}
|
|||
|
if (ChangeOther != null)
|
|||
|
{
|
|||
|
ChangeOther.SetActive((info.Job < (int)GameDefine_Globe.GUILD_JOB.ELITE) && (selectInfo.Guid != info.Guid) && (info.Job != -1));
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//辞职
|
|||
|
public void Click_Resign()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (Singleton<ObjManager>.Instance.MainPlayer == null)
|
|||
|
return;
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Guid);
|
|||
|
if (job > (int)GameDefine_Globe.GUILD_JOB.ELITE && GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem > 1)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25020}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem <= 1)
|
|||
|
{
|
|||
|
MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{25052}"), "", ResignOK, null);
|
|||
|
return;
|
|||
|
}
|
|||
|
if (job == (int)GameDefine_Globe.GUILD_JOB.CHIEF)
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberCountJob((int)GameDefine_Globe.GUILD_JOB.VICE_CHIEF) <= 0)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25021}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
if (Guild.GuildJobName.ContainsKey(job))
|
|||
|
{
|
|||
|
string jobStr = StrDictionary.GetClientDictionaryString(Guild.GuildJobName[job]);
|
|||
|
MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{25024}", jobStr), "", ResignOK, null);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void ResignOK()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem <= 1)
|
|||
|
{
|
|||
|
CG_GUILD_LEAVE msg = (CG_GUILD_LEAVE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_LEAVE);
|
|||
|
msg.Requester = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid;
|
|||
|
msg.SendPacket();
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Guid);
|
|||
|
if (job == (int)GameDefine_Globe.GUILD_JOB.CHIEF)
|
|||
|
{
|
|||
|
GuildMember Vice_Chief = GameManager.gameManager.PlayerDataPool.GuildInfo.GetVICE_CHIEF();
|
|||
|
if (Vice_Chief != null)
|
|||
|
{
|
|||
|
CG_GUILD_JOB_CHANGE msg = (CG_GUILD_JOB_CHANGE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_JOB_CHANGE);
|
|||
|
msg.Approver = Vice_Chief.Guid;
|
|||
|
msg.JobID = (int)GameDefine_Globe.GUILD_JOB.CHIEF;
|
|||
|
msg.SendPacket();
|
|||
|
}
|
|||
|
}
|
|||
|
//职位判断
|
|||
|
if (job < 0 || job >= (int)GameDefine_Globe.GUILD_JOB.MEMBER)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
CG_GUILD_JOB_CHANGE send = (CG_GUILD_JOB_CHANGE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_JOB_CHANGE);
|
|||
|
send.SetApprover(Singleton<ObjManager>.Instance.MainPlayer.GUID);
|
|||
|
send.SetJobID((int)GameDefine_Globe.GUILD_JOB.MEMBER);
|
|||
|
send.SendPacket();
|
|||
|
}
|
|||
|
|
|||
|
//脱离帮会
|
|||
|
public void LeaveGuild()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (null != Singleton<ObjManager>.GetInstance().MainPlayer)
|
|||
|
{
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Guid);
|
|||
|
if (job == (int)GameDefine_Globe.GUILD_JOB.CHIEF && GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem <= 1)
|
|||
|
{
|
|||
|
MessageBoxLogic.OpenOKCancelBox(StrDictionary.GetClientDictionaryString("#{25052}"), "", LeaveOK, null);
|
|||
|
return;
|
|||
|
}
|
|||
|
if (job <= (int)GameDefine_Globe.GUILD_JOB.ELITE)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25020}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqLeavGuild();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void LeaveOK()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.GuildInfo.GuildCurMem <= 1)
|
|||
|
{
|
|||
|
CG_GUILD_LEAVE msg = (CG_GUILD_LEAVE)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_LEAVE);
|
|||
|
msg.Requester = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid;
|
|||
|
msg.SendPacket();
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//我要换帮
|
|||
|
public void ChangeGuild()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
UIManager.ShowUI(UIInfo.GuildMainWnd);
|
|||
|
}
|
|||
|
|
|||
|
public void ChangePlace(object args)
|
|||
|
{
|
|||
|
ChangePlace1();
|
|||
|
}
|
|||
|
|
|||
|
//变更职位
|
|||
|
public void ChangePlace1()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (m_CurrSelectMemberInfo == null)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25015}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
if (Singleton<ObjManager>.Instance.MainPlayer != null)
|
|||
|
{
|
|||
|
if (GCGame.Utils.IsGuildPowerFull(4) == false)
|
|||
|
return;
|
|||
|
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(Singleton<ObjManager>.Instance.MainPlayer.GUID);
|
|||
|
if (job >= m_CurrSelectMemberInfo.Job)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25030}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
}
|
|||
|
else
|
|||
|
return;
|
|||
|
if (m_JobChangeWnd != null)
|
|||
|
{
|
|||
|
m_JobChangeWnd.SetActive(true);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public void ClosePlace()
|
|||
|
{
|
|||
|
if (m_JobChangeWnd != null)
|
|||
|
m_JobChangeWnd.SetActive(false);
|
|||
|
Toggle[] togs = m_ToggleGroup.GetComponentsInChildren<Toggle>();
|
|||
|
for (int i = 0; i < togs.Length; i++)
|
|||
|
{
|
|||
|
togs[i].isOn = false;
|
|||
|
}
|
|||
|
selectJobindex = -1;
|
|||
|
}
|
|||
|
|
|||
|
//同意入帮
|
|||
|
public void AgreeAddGuild()
|
|||
|
{
|
|||
|
//Singleton<ObjManager>.GetInstance().MainPlayer.ReqApproveGuildMember(m_PopMenuSelectGuid, 1);
|
|||
|
}
|
|||
|
|
|||
|
//撤职
|
|||
|
public void MissJob()
|
|||
|
{
|
|||
|
if (m_CurrSelectMemberInfo == null)
|
|||
|
return;
|
|||
|
|
|||
|
//职位判断
|
|||
|
if (m_CurrSelectMemberInfo.Job < 0 || m_CurrSelectMemberInfo.Job >= (int)GameDefine_Globe.GUILD_JOB.MEMBER)
|
|||
|
{
|
|||
|
if(m_CurrSelectMemberInfo.Job == (int)GameDefine_Globe.GUILD_JOB.MEMBER)
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{25234}"));
|
|||
|
if (m_CurrSelectMemberInfo.Job == (int)GameDefine_Globe.GUILD_JOB.RESERVE)
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{25230}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqChangeGuildMemberJob(m_CurrSelectMemberInfo.Guid, (int)GameDefine_Globe.GUILD_JOB.MEMBER);
|
|||
|
ClosePlace();
|
|||
|
}
|
|||
|
|
|||
|
//设置职位
|
|||
|
public void SetJob()
|
|||
|
{
|
|||
|
if (m_CurrSelectMemberInfo == null)
|
|||
|
return;
|
|||
|
// if (selectJobindex < 1)
|
|||
|
// return;
|
|||
|
if (m_CurrSelectMemberInfo.Job == selectJobindex)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{25046}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqChangeGuildMemberJob(m_CurrSelectMemberInfo.Guid, selectJobindex);
|
|||
|
ClosePlace();
|
|||
|
}
|
|||
|
|
|||
|
public void Click_SelectJob(int selectIndex)
|
|||
|
{
|
|||
|
selectJobindex = selectIndex;
|
|||
|
}
|
|||
|
|
|||
|
public void AskFriend()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
m_AskFriendWnd.SetActive(true);
|
|||
|
}
|
|||
|
|
|||
|
//逐出帮会
|
|||
|
public void DeleteGuild()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (m_CurrSelectMemberInfo == null)
|
|||
|
return;
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqKickGuildMember(m_CurrSelectMemberInfo.Guid);
|
|||
|
}
|
|||
|
|
|||
|
//群发消息
|
|||
|
public void SendMsgAll(string text)
|
|||
|
{
|
|||
|
if (m_MsgInputField == null)
|
|||
|
return;
|
|||
|
int job = GameManager.gameManager.PlayerDataPool.GuildInfo.GetMemberJob(Singleton<ObjManager>.Instance.MainPlayer.GUID);
|
|||
|
text = string.Format("<color=#ff1100ff>{0}-{1}:</color>\n\n{2}", StrDictionary.GetClientDictionaryString(Guild.GuildJobName[job]), GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.RoleName,text);
|
|||
|
bool result = Singleton<ObjManager>.GetInstance().MainPlayer.ReqSendMsgToAll(text, (int)CG_GUILD_REQ_CHANGE_NOTICE.CHANGE_TYPE.CHANGE_TYPE_MASSTEXTING);
|
|||
|
if (result)
|
|||
|
m_SendMsgToAll.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void CloseSendMsg()
|
|||
|
{
|
|||
|
if (m_SendMsgToAll != null)
|
|||
|
m_SendMsgToAll.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
public void OPenSendMsgWnd()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (Singleton<ObjManager>.GetInstance().MainPlayer.IsPowerfull(5) == false)
|
|||
|
return;
|
|||
|
|
|||
|
if (m_SendMsgToAll != null)
|
|||
|
m_SendMsgToAll.SetActive(true);
|
|||
|
}
|
|||
|
|
|||
|
//显示成员列表
|
|||
|
public void AllMemList()
|
|||
|
{
|
|||
|
if (m_memlistInfoWnd != null)
|
|||
|
m_memlistInfoWnd.SetActive(true);
|
|||
|
if (m_ApplyWnd != null)
|
|||
|
m_ApplyWnd.SetActive(false);
|
|||
|
//InitMemberListContent((int)GameDefine_Globe.GUILD_JOB.PRERESERVE);
|
|||
|
//请求帮会成员信息
|
|||
|
CG_GUILD_REQ_INFO send1 = (CG_GUILD_REQ_INFO)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_REQ_INFO);
|
|||
|
send1.SetReqType((int)CG_GUILD_REQ_INFO.REQ_TYPE.REQ_TYPE_MEMBET_LIST);
|
|||
|
send1.SendPacket();
|
|||
|
index_ShowWnd = 1;
|
|||
|
m_CurrSelectMemberInfo = null;
|
|||
|
|
|||
|
// 申请列表是否有人
|
|||
|
bool hasApply = GameManager.gameManager.PlayerDataPool.GuildInfo.GuildApplyList.Count > 0 ? true : false;
|
|||
|
HasApply.SetActive(hasApply && canShowRedPoint);
|
|||
|
}
|
|||
|
|
|||
|
//显示核心成员
|
|||
|
public void HeartmemList()
|
|||
|
{
|
|||
|
if (m_memlistInfoWnd != null)
|
|||
|
m_memlistInfoWnd.SetActive(true);
|
|||
|
if (m_ApplyWnd != null)
|
|||
|
m_ApplyWnd.SetActive(false);
|
|||
|
//InitMemberListContent((int)GameDefine_Globe.GUILD_JOB.ELITE);
|
|||
|
//请求帮会成员信息
|
|||
|
m_CurrSelectMemberInfo = null;
|
|||
|
CG_GUILD_REQ_INFO send1 = (CG_GUILD_REQ_INFO)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_REQ_INFO);
|
|||
|
send1.SetReqType((int)CG_GUILD_REQ_INFO.REQ_TYPE.REQ_TYPE_MEMBET_LIST);
|
|||
|
send1.SendPacket();
|
|||
|
index_ShowWnd = 2;
|
|||
|
}
|
|||
|
|
|||
|
//显示申请列表
|
|||
|
public void ApplyList()
|
|||
|
{
|
|||
|
if (m_memlistInfoWnd != null)
|
|||
|
m_memlistInfoWnd.SetActive(false);
|
|||
|
if (m_ApplyWnd != null)
|
|||
|
m_ApplyWnd.SetActive(true);
|
|||
|
//InitApplyListContent();
|
|||
|
m_CurrSelectMemberInfo = null;
|
|||
|
CG_GUILD_REQ_INFO send1 = (CG_GUILD_REQ_INFO)PacketDistributed.CreatePacket(MessageID.PACKET_CG_GUILD_REQ_INFO);
|
|||
|
send1.SetReqType((int)CG_GUILD_REQ_INFO.REQ_TYPE.REQ_TYPE_APPLY_LIST);
|
|||
|
send1.SendPacket();
|
|||
|
index_ShowWnd = 3;
|
|||
|
}
|
|||
|
|
|||
|
public void Click_AgreeApply()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (applyCurMember==null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqApproveGuildMember(applyCurMember.Guid, 1);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void Click_ReFuseApply()
|
|||
|
{
|
|||
|
if (GameManager.gameManager.m_RunningScene == 658)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(GCGame.Table.StrDictionary.GetClientDictionaryString("#{79512}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
if (applyCurMember == null)
|
|||
|
{
|
|||
|
return;
|
|||
|
}
|
|||
|
Singleton<ObjManager>.GetInstance().MainPlayer.ReqApproveGuildMember(applyCurMember.Guid, 0);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|