52 lines
1.7 KiB
C#
52 lines
1.7 KiB
C#
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using Games.Item;
|
|||
|
using GCGame;
|
|||
|
using GCGame.Table;
|
|||
|
using Games.ChatHistory;
|
|||
|
using Games.GlobeDefine;
|
|||
|
using Games.LogicObj;
|
|||
|
|
|||
|
public class ChatLinkConscribeGuild : ChatLinkName
|
|||
|
{
|
|||
|
ulong m_GuildGUID = GlobeVar.INVALID_GUID;
|
|||
|
public override void SetLinkBySendStr(Text text, ChatHistoryItem chatHistory, string linkStr, string[] linkParams)
|
|||
|
{
|
|||
|
StrSend = linkStr;
|
|||
|
StrInput = linkStr;
|
|||
|
|
|||
|
if (linkParams.Length != 3)
|
|||
|
return;
|
|||
|
StrShow = linkParams[1];
|
|||
|
ulong.TryParse(linkParams[2], out m_GuildGUID);
|
|||
|
}
|
|||
|
|
|||
|
protected override void LinkClick(int linkindex)
|
|||
|
{
|
|||
|
if (GameManager.gameManager.PlayerDataPool.IsHaveGuild() && GameManager.gameManager.PlayerDataPool.GuildInfo.GuildGuid == m_GuildGUID)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{25155}",GameManager.gameManager.PlayerDataPool.GuildInfo.GuildName));
|
|||
|
return;
|
|||
|
}
|
|||
|
|
|||
|
if (GameManager.gameManager.PlayerDataPool.IsHaveGuild())
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{25154}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
Tab_GuildOther guildOther = TableManager.GetGuildOtherByID(0, 0);
|
|||
|
if(GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < guildOther.JoinNeedLevel)
|
|||
|
{
|
|||
|
GUIData.AddNotifyData(StrDictionary.GetClientDictionaryString("#{25153}"));
|
|||
|
return;
|
|||
|
}
|
|||
|
Obj_MainPlayer mainPlayer = Singleton<ObjManager>.GetInstance().MainPlayer;
|
|||
|
if (mainPlayer == null)
|
|||
|
return;
|
|||
|
mainPlayer.ReqJoinGuild(m_GuildGUID);
|
|||
|
}
|
|||
|
|
|||
|
}
|