282 查看他人-客户端 同步A523 A212封包,公会成员列表,公会聊天支持支持跨服
| | |
| | | |
| | | public class CA212_tagCMViewPlayerInfo : GameNetPackBasic { |
| | | public uint PlayerID; |
| | | public byte EquipClassLV; //大于0为查看指定境界阶装备信息, 0为查看默认信息 |
| | | public uint ServerID; //玩家服务器ID,发0默认本服玩家 |
| | | |
| | | public CA212_tagCMViewPlayerInfo () { |
| | | combineCmd = (ushort)0x03FE; |
| | |
| | | |
| | | public override void WriteToBytes () { |
| | | WriteBytes (PlayerID, NetDataType.DWORD); |
| | | WriteBytes (EquipClassLV, NetDataType.BYTE); |
| | | WriteBytes (ServerID, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 23 搜索家族返回列表 #tagMCFamilyViewList
|
| | |
|
| | | public class HA523_tagMCFamilyViewList : GameNetPackBasic {
|
| | |
| | | TransBytes (out FamilyList[i].LeaderID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out FamilyList[i].LeaderNameLen, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out FamilyList[i].LeaderName, vBytes, NetDataType.Chars, FamilyList[i].LeaderNameLen);
|
| | | TransBytes (out FamilyList[i].LeaderServerID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out FamilyList[i].FamilyLV, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out FamilyList[i].JoinReview, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out FamilyList[i].JoinLVMin, vBytes, NetDataType.WORD);
|
| | |
| | | public uint LeaderID; //族长ID
|
| | | public byte LeaderNameLen;
|
| | | public string LeaderName; //size = LeaderNameLen
|
| | | public uint LeaderServerID; //族长服务器ID
|
| | | public byte FamilyLV; //家族等级
|
| | | public byte JoinReview; //成员加入是否需要审核,默认0自动加入
|
| | | public ushort JoinLVMin; //限制最低可加入的玩家等级
|
| | |
| | | TalkData data = hasNewPlayerInfo ? newPlayerInfo : nowData; |
| | | |
| | | avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)data.PlayerID, (int)data.Face, (int)data.FacePic, data.Job)); |
| | | |
| | | |
| | | title.InitUI(data.RealmLV, (int)data.TitleID); |
| | | int bubbleID = ChatBubbleHelper.GetOtherChatBubbleID(data.Job, (int)data.BubbleBox); |
| | | m_ChatBubble.DisplayBubble(bubbleID, (int)data.PlayerID); |
| | |
| | | } |
| | | m_PlayerName.text = Language.Get("Chat08", RichTextMsgReplaceConfig.GetRichReplace("FAMILY", fmlv), data.Name); |
| | | } |
| | | |
| | | avatarCell.SetListener(() => |
| | | { |
| | | AvatarHelper.TryViewOtherPlayerInfo((int)data.PlayerID, serverID: (int)data.ServerID, viewPlayerLineupType: (int)BattlePreSetType.Arena); |
| | | }); |
| | | } |
| | | |
| | | public float GetHeight(string content, ArrayList list) |
| | |
| | | data.FamilyID = (int)view.FamilyID;
|
| | | data.FamilyName = view.FamilyName;
|
| | | data.LeaderID = (int)view.LeaderID;
|
| | | data.LeaderServerID = (int)view.LeaderServerID;
|
| | | data.LeaderName = view.LeaderName;
|
| | | data.FamilyLV = view.FamilyLV;
|
| | | data.JoinReview = view.JoinReview;
|
| | |
| | | /// </summary> |
| | | public class GuildMemberCell : CellView |
| | | { |
| | | |
| | | |
| | | [SerializeField] AvatarCell avatarCell; |
| | | [SerializeField] OfficialTitleCell titleCell; |
| | | [SerializeField] Text lvText; |
| | |
| | | |
| | | avatarCell.AddListener(() => |
| | | { |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(playerID); |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(playerID, playerInfo.ServerID); |
| | | }); |
| | | |
| | | contribText.text = playerInfo.ContribDay + "/" + playerInfo.ContribTotal; |
| | |
| | | showArrowImg.transform.localScale = new Vector3(1, -1, 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | //例子 取整处理, 1.5天 显示1天; 最大7天特殊处理 |
| | | //x天 |
| | | //x时 |
| | |
| | | |
| | | int guildID; |
| | | int leaderID; |
| | | int leaderServerID; |
| | | protected override void InitComponent() |
| | | { |
| | | opearteBtn.AddListener(() => |
| | |
| | | |
| | | leaderAvatar.AddListener(() => |
| | | { |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(leaderID); |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(leaderID, leaderServerID); |
| | | }); |
| | | } |
| | | |
| | |
| | | var guildInfo = GuildManager.Instance.guildsDict[guildID]; |
| | | if (guildInfo == null) return; |
| | | leaderID = guildInfo.LeaderID; |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(leaderID, (int)ViewPlayerType.viewGuildLeader); |
| | | leaderServerID = guildInfo.ServerID; |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(leaderID, leaderServerID, (int)ViewPlayerType.viewGuildLeader); |
| | | |
| | | var config = FamilyConfig.Get(guildInfo.FamilyLV); |
| | | guildEmblem.Display(guildInfo.EmblemID, guildInfo.EmblemWord, 0.7f); |
| | |
| | | fairy.totalFightPower = vNetData.FightPowerEx * Constants.ExpPointValue + vNetData.FightPower;
|
| | | fairy.Broadcast = vNetData.Broadcast;
|
| | | fairy.LeaderID = (int)vNetData.LeaderID;
|
| | | |
| | |
|
| | | fairy.lastChangeNameTick = (int)vNetData.Extra1;
|
| | |
|
| | |
|
| | |
| | |
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | if (mine.FmLV == 3 && mine.PlayerID != leaderID)
|
| | | {
|
| | | mine.FmLV = 0;
|
| | |
| | | public long totalFightPower;
|
| | | public string Broadcast;
|
| | | public int LeaderID; //族长玩家ID
|
| | | public int LeaderServerID; //族长服务器ID
|
| | | public int MemberCount;
|
| | | public int lastChangeNameTick;
|
| | |
|
| | |
| | | public class FairyApply
|
| | | {
|
| | | public int PlayerID;
|
| | | public string Name; |
| | | public string Name;
|
| | | public int ReqTime; //申请时间戳
|
| | | public int LV; //等级
|
| | | public int Job; //职业
|
| | |
| | | public int Face; //基本脸型
|
| | | public int FacePic; //头像框
|
| | | public int TitleID; //称号
|
| | | public long FightPower; |
| | | public long FightPower;
|
| | | public int ServerID; //所属区服ID
|
| | | public int IsOnLine; //是否在线
|
| | | }
|
| | |
| | | return viewPlayerData; |
| | | } |
| | | |
| | | // 向服务端请求其他玩家数据 |
| | | public void ViewPlayerDetail(int playerId, int viewType = (int)ViewPlayerType.viewPlayerData, int viewBattlePreSetType = (int)BattlePreSetType.Story) |
| | | // 向服务端请求其他玩家数据 serverID发0默认本服玩家 |
| | | public void ViewPlayerDetail(int playerId, int serverID, int viewType = (int)ViewPlayerType.viewPlayerData, int viewBattlePreSetType = (int)BattlePreSetType.Story) |
| | | { |
| | | // 自己不能查看自己的信息 |
| | | if (playerId == PlayerDatas.Instance.baseData.PlayerID) |
| | |
| | | |
| | | viewPlayerType = viewType; |
| | | viewPreSetType = viewBattlePreSetType; |
| | | ViewRoleParticulars(playerId); |
| | | ViewRoleParticulars(playerId, serverID); |
| | | } |
| | | |
| | | // 向服务端请求玩家数据 |
| | | void ViewRoleParticulars(int playerID) |
| | | void ViewRoleParticulars(int playerID, int serverID) |
| | | { |
| | | if (playerID <= 0) |
| | | return; |
| | |
| | | |
| | | CA212_tagCMViewPlayerInfo pak = new CA212_tagCMViewPlayerInfo(); |
| | | pak.PlayerID = (uint)playerID; |
| | | pak.ServerID = (uint)serverID; |
| | | GameNetSystem.Instance.SendInfo(pak); |
| | | } |
| | | public void OnRevRoleEquip(HA705_tagSCQueryPlayerCacheResult package) |
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | AvatarHelper.TryViewOtherPlayerInfo(avatarModel.playerID, (int)ViewPlayerType.viewPlayerData);
|
| | | AvatarHelper.TryViewOtherPlayerInfo(avatarModel.playerID);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public static class AvatarHelper
|
| | | {
|
| | | public static void TryViewOtherPlayerInfo(int _playerId, int viewType = (int)ViewPlayerType.viewPlayerData, int viewPlayerLineupType = (int)BattlePreSetType.Story)
|
| | | //serverID发0默认本服玩家
|
| | | public static void TryViewOtherPlayerInfo(int playerId, int serverID = 0, int viewType = (int)ViewPlayerType.viewPlayerData, int viewPlayerLineupType = (int)BattlePreSetType.Story)
|
| | | {
|
| | | if (_playerId == PlayerDatas.Instance.PlayerId || UIManager.Instance.IsOpened<OtherPlayerDetailWin>())
|
| | | if (playerId == PlayerDatas.Instance.PlayerId || UIManager.Instance.IsOpened<OtherPlayerDetailWin>())
|
| | | return;
|
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(_playerId, viewType, viewPlayerLineupType);
|
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(playerId, serverID, viewType, viewPlayerLineupType);
|
| | | }
|
| | |
|
| | | public static AvatarModel GetAvatarModel(int playerId, int face, int facePic, int job = 0)
|
| | | {
|
| | | bool isMyself = playerId == PlayerDatas.Instance.PlayerId;
|
| | |
| | | { |
| | | case BattleConst.ArenaBattleField: |
| | | int playerId = (int)ArenaManager.Instance.atkPlayerId; |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(playerId, (int)ViewPlayerType.viewArenaBattleEnemyHero, (int)BattlePreSetType.Arena); |
| | | OtherPlayerDetailManager.Instance.ViewPlayerDetail(playerId, 0, (int)ViewPlayerType.viewArenaBattleEnemyHero, (int)BattlePreSetType.Arena); |
| | | break; |
| | | } |
| | | return; |