Exemple #1
0
 private static void QueryFriendInfo(Player player, ref MsgAction packet)
 {
     if (GameWorld.Find(packet.Param, out Player target))
     {
         player.Send(MsgFriendInfo.Create(target));
     }
 }
Exemple #2
0
        public static byte[] Create(Player target)
        {
            var packet = new MsgFriendInfo
            {
                Size       = (ushort)sizeof(MsgFriendInfo),
                Id         = 2033,
                UniqId     = target.UniqueId,
                Look       = target.Look,
                Level      = target.Level,
                Profession = target.Class,
                PkPoints   = target.PkPoints,
                GuildUID   = 0,
                Unknow     = 0,
                Position   = (byte)target.GuildRank,
            };

            for (byte i = 0; i < target.Partner.Length; i++)
            {
                packet.Spouse[i] = (byte)target.Partner[i];
            }
            return(packet);
        }