47 lines
1.1 KiB
C#
47 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public struct PvpInvateItemStruct
|
|
{
|
|
public int _Profession;
|
|
public string _Name;
|
|
public int _Level;
|
|
public ulong _Guid;
|
|
public PvpInvateItemStruct(int profession, string name, int level, ulong guid)
|
|
{
|
|
_Profession = profession;
|
|
_Name = name;
|
|
_Level = level;
|
|
_Guid = guid;
|
|
}
|
|
}
|
|
|
|
public class PvpInvateItem : UIItemBase {
|
|
|
|
public Image _HeadIcon;
|
|
public Text _Name;
|
|
public Text _Level;
|
|
|
|
private ulong _Guid;
|
|
public override void Show(Hashtable hash)
|
|
{
|
|
base.Show(hash);
|
|
|
|
PvpInvateItemStruct info = (PvpInvateItemStruct)hash["InitObj"];
|
|
LoadAssetBundle.Instance.SetImageSprite(_HeadIcon, GCGame.Utils.GetProfessionSpriteName(info._Profession));
|
|
_Name.text = info._Name;
|
|
_Level.text = info._Level + "";
|
|
|
|
_Guid = info._Guid;
|
|
}
|
|
|
|
public void OnInvateBtnClcik()
|
|
{
|
|
ReqHonorBattlefieldMatchInvite req = new ReqHonorBattlefieldMatchInvite();
|
|
req.Guid = (long)_Guid;
|
|
req.SendMsg();
|
|
}
|
|
}
|