Files
JJBB/Assets/Project/Script/GUI/Chat/ChatLinkRespondGuild.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2024-08-23 15:49:34 +08:00
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;
public class ChatLinkRespondGuild : 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 != 2)
return;
StrShow = StrDictionary.GetClientDictionaryString("#{25003}");
ulong.TryParse(linkParams[1], out m_GuildGUID);
}
protected override void LinkClick(int linkindex)
{
UIManager.ShowUI(UIInfo.GuildMainWnd,delegate(bool bSuccess, object param)
{
if(bSuccess)
{
GameObject GuildMainWnd = UIManager.GetUIGameObject(UIInfo.GuildMainWnd);
if(GuildMainWnd!=null)
{
NoHasGuildMainWnd guild = GuildMainWnd.GetComponent<NoHasGuildMainWnd>();
if(guild!=null)
{
guild.OpenIndex(2, m_GuildGUID);
}
}
}
},null);
}
}