public void Handle(BaseInfoRequest message) { // FLPACKET_CLIENT_REQUESTBASEINFO int pos = 2; uint baseid = FLMsgType.GetUInt32(message.Message, ref pos); uint type = FLMsgType.GetUInt8(message.Message, ref pos); Logger.Debug("tx FLPACKET_CLIENT_REQUESTBASEINFO id {0} type {1}", baseid, type); if (baseid != _baseID) { //TODO: kick and log, docked base != requested base } // TODO: Eventually ignore the client message and send the base info // that the server believes the player to be at. if (type != 1) { return; } _base = BaseDB.GetBase(baseid); if (_base == null) { //TODO: kick and log } SendSetStartRoom(baseid, _base.StartRoomID); // fixme? SendGFCompleteMissionComputerList(baseid); SendGFCompleteNewsBroadcastList(_base); }
/// <summary> /// FLPACKET_SERVER_GFCOMPLETENEWSBROADCASTLIST /// </summary> void SendGFCompleteNewsBroadcastList(GameDB.Base.Base ubase) { Logger.Debug("tx FLPACKET_BASE_NEWS char {2} {0} count {1}", ubase.Nickname, ubase.News.Count, _charAccount.CharName); //BaseData bd = UniverseDB.FindBase(baseid); uint newsid = 0; foreach (var ni in ubase.News) { byte[] omsg = { 0x1E, 0x02 }; FLMsgType.AddUInt32(ref omsg, 40 + (uint)ni.Logo.Length); // size goes here FLMsgType.AddUInt32(ref omsg, newsid++); FLMsgType.AddUInt32(ref omsg, ubase.BaseID); FLMsgType.AddUInt16(ref omsg, 0); FLMsgType.AddUInt32(ref omsg, ni.Icon); FLMsgType.AddUInt32(ref omsg, ni.Category); FLMsgType.AddUInt16(ref omsg, 0); FLMsgType.AddUInt32(ref omsg, ni.Headline); FLMsgType.AddUInt16(ref omsg, 0); FLMsgType.AddUInt32(ref omsg, ni.Text); FLMsgType.AddUInt16(ref omsg, 0); FLMsgType.AddAsciiStringLen32(ref omsg, ni.Logo); FLMsgType.AddUInt32(ref omsg, 0); // unknown hash, 0 seems to work Context.Sender.Tell(omsg); } // Send "news list complete" message { byte[] omsg = { 0x0e, 0x02 }; FLMsgType.AddUInt32(ref omsg, ubase.BaseID); Context.Sender.Tell(omsg); } }