diff --git a/server/gameserver/GGListener.h b/server/gameserver/GGListener.h index 5a29f50..c26b5ed 100644 --- a/server/gameserver/GGListener.h +++ b/server/gameserver/GGListener.h @@ -20,6 +20,7 @@ public: void UnInit(); int max_packet_size = 0; + int his_max_packet_size = 0; template void SendProxyMsg(int sockhandle, T& msg) diff --git a/server/gameserver/app.cc b/server/gameserver/app.cc index d5e1854..0bb4e9e 100644 --- a/server/gameserver/app.cc +++ b/server/gameserver/app.cc @@ -65,8 +65,9 @@ static void SavePerfLog() a8::UdpLog::Instance()->Info ("max_rundelay:%d room_num:%d player_num:%d online_num:%d alive_count:%d " "sys_request_delay:%d user_request_delay:%d http_pending_num:%d real_alive_count:%d " - "account_num:%d level0_num:%d level1_num:%d max_full_obj:%d max_part_obj:%d max_bullet:%d " - "max_packet:%d", + "account_num:%d level0_num:%d level1_num:%d " + "max_full_obj:%d max_part_obj:%d max_bullet:%d max_packet:%d " + "his_max_full_obj:%d his_max_part_obj:%d his_max_bullet:%d his_max_packet:%d", { PerfMonitor::Instance()->max_run_delay_time, RoomMgr::Instance()->RoomNum(), @@ -83,8 +84,22 @@ static void SavePerfLog() PerfMonitor::Instance()->max_full_objects_num, PerfMonitor::Instance()->max_part_objects_num, PerfMonitor::Instance()->max_bullet_num, - GGListener::Instance()->max_packet_size + GGListener::Instance()->max_packet_size, + PerfMonitor::Instance()->his_max_full_objects_num, + PerfMonitor::Instance()->his_max_part_objects_num, + PerfMonitor::Instance()->his_max_bullet_num, + GGListener::Instance()->his_max_packet_size }); + { + PerfMonitor::Instance()->his_max_full_objects_num = std::max + (PerfMonitor::Instance()->his_max_full_objects_num, PerfMonitor::Instance()->max_full_objects_num); + PerfMonitor::Instance()->his_max_part_objects_num = std::max + (PerfMonitor::Instance()->his_max_part_objects_num, PerfMonitor::Instance()->max_part_objects_num); + PerfMonitor::Instance()->his_max_bullet_num = std::max + (PerfMonitor::Instance()->his_max_bullet_num, PerfMonitor::Instance()->max_bullet_num); + GGListener::Instance()->his_max_packet_size = std::max + (GGListener::Instance()->his_max_packet_size, GGListener::Instance()->max_packet_size); + } PerfMonitor::Instance()->max_run_delay_time = 0; PerfMonitor::Instance()->max_dispatchmsg_time = 0; PerfMonitor::Instance()->max_timer_idle = 0; diff --git a/server/gameserver/framedata.h b/server/gameserver/framedata.h index 54c2047..67897d0 100644 --- a/server/gameserver/framedata.h +++ b/server/gameserver/framedata.h @@ -19,6 +19,8 @@ class FrameData private: std::map new_objects; + std::map block_objects; + std::map loot_objects; std::map part_objects; std::set del_objects; std::set out_objects; diff --git a/server/gameserver/framemaker.cc b/server/gameserver/framemaker.cc index 8fc4ea4..31437ee 100644 --- a/server/gameserver/framemaker.cc +++ b/server/gameserver/framemaker.cc @@ -94,6 +94,8 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(Human* hum) Room* room = hum->room; PreProcess(msg, room, hum, framedata); + SerializeLootObjects(msg, room, hum, framedata); + SerializeMapBlockObjects(msg, room, hum, framedata); SerializeNewObjects(msg, room, hum, framedata); SerializePartObjects(msg, room, hum, framedata); SerializeDelObjects(msg, room, hum, framedata); @@ -164,6 +166,16 @@ void FrameMaker::PostProcess(cs::SMUpdate* msg, Room* room, Human* hum, FrameDat } } +void FrameMaker::SerializeLootObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata) +{ + +} + +void FrameMaker::SerializeMapBlockObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata) +{ + +} + void FrameMaker::SerializeNewObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata) { if (!framedata->new_objects.empty()) { diff --git a/server/gameserver/framemaker.h b/server/gameserver/framemaker.h index dc07d21..5ad0e68 100644 --- a/server/gameserver/framemaker.h +++ b/server/gameserver/framemaker.h @@ -17,6 +17,8 @@ private: void PreProcess(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); void PostProcess(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); + void SerializeLootObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); + void SerializeMapBlockObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); void SerializeNewObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); void SerializePartObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); void SerializeDelObjects(cs::SMUpdate* msg, Room* room, Human* hum, FrameData* framedata); diff --git a/server/gameserver/perfmonitor.h b/server/gameserver/perfmonitor.h index 1068faf..b3f7287 100644 --- a/server/gameserver/perfmonitor.h +++ b/server/gameserver/perfmonitor.h @@ -24,6 +24,10 @@ class PerfMonitor : public a8::Singleton int max_part_objects_num = 0; int max_bullet_num = 0; + int his_max_full_objects_num = 0; + int his_max_part_objects_num = 0; + int his_max_bullet_num = 0; + void Init(); void UnInit(); };