/// <summary> /// /// </summary> /// <param name="capacity">总数</param> /// <param name="bufferSize">缓存大小</param> /// <param name="expand">是否自动扩展缓存</param> public AMFEncodePool(int capacity, int bufferSize, bool expand) { m_capacity = capacity; m_pools = new Amf3Writer[m_capacity]; for (int i = 0; i < m_capacity; i++) { m_pools[i] = new Amf3Writer(bufferSize, expand); } }
public AMFEncodePool(int capacity, int bufferSize = 1024 * 64) { m_capacity = capacity; m_pools = new Amf3Writer[m_capacity]; for (int i = 0; i < m_capacity; i++) { m_pools[i] = new Amf3Writer(bufferSize); } }
/// <summary> /// 查看玩家信息 /// </summary> /// <param name="note"></param> /// <param name="comm"></param> internal static object ViewPlayer(Notification note) { string[] strs = GetCommand(note); if (strs.Length != 1) return null; PlayerBusiness player = PlayersProxy.FindPlayerByName(strs[0].Trim()); if (player == null) { return string.Format(TipManager.GetMessage(GMReturn.NoName), strs[0]); } var v = new PlayerDetail(player, 2); Amf3Writer writer = new Amf3Writer(65535, false); writer.WriteObject(v); Amf3Reader<Variant> reader = new Amf3Reader<Variant>(writer.Array, 0, writer.Count); object b = reader.ReadObject(); return new object[] { player.Online, b }; }