/// <summary>
        /// 服务器发送角色复活消息
        /// </summary>
        /// <param name="role"></param>
        /// <param name="roleId"></param>
        private void SendRoleResurgence(Role role, int roleId)
        {
            WorldMap_OtherRoleResurgenceProto proto = new WorldMap_OtherRoleResurgenceProto();

            proto.RoleId = roleId;
            role.Client_Socket.SendMsg(proto.ToArray(role.SocketSendMS));
        }
Beispiel #2
0
    public static WorldMap_OtherRoleResurgenceProto GetProto(byte[] buffer, bool isChild = false)
    {
        WorldMap_OtherRoleResurgenceProto proto = new WorldMap_OtherRoleResurgenceProto();

        MMO_MemoryStream ms = null;

        if (!isChild)
        {
            ms = GameEntry.Socket.SocketSendMS;
        }
        else
        {
            ms = GameEntry.Pool.DequeueClassObject <MMO_MemoryStream>();
        }
        ms.SetLength(0);
        ms.Write(buffer, 0, buffer.Length);
        ms.Position = 0;

        proto.RoleId = ms.ReadInt();

        if (isChild)
        {
            GameEntry.Pool.EnqueueClassObject(ms);
        }
        return(proto);
    }
Beispiel #3
0
    public static WorldMap_OtherRoleResurgenceProto GetProto(byte[] buffer)
    {
        WorldMap_OtherRoleResurgenceProto proto = new WorldMap_OtherRoleResurgenceProto();

        using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer))
        {
            proto.RoleId = ms.ReadInt();
        }
        return(proto);
    }
Beispiel #4
0
    public static WorldMap_OtherRoleResurgenceProto GetProto(MMO_MemoryStream ms, byte[] buffer)
    {
        WorldMap_OtherRoleResurgenceProto proto = new WorldMap_OtherRoleResurgenceProto();

        ms.SetLength(0);
        ms.Write(buffer, 0, buffer.Length);
        ms.Position = 0;

        proto.RoleId = ms.ReadInt();

        return(proto);
    }