From f192457a77956754ce666b1ee363e267528ae7e3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 May 2023 17:55:19 +0800 Subject: [PATCH] 1 --- server/gameserver/mt/AirRaid.cc | 12 ++++++++++++ server/gameserver/mt/AirRaid.h | 1 + server/tools/protobuild/cs_proto.proto | 1 + 3 files changed, 14 insertions(+) diff --git a/server/gameserver/mt/AirRaid.cc b/server/gameserver/mt/AirRaid.cc index 9c382b94..77428678 100644 --- a/server/gameserver/mt/AirRaid.cc +++ b/server/gameserver/mt/AirRaid.cc @@ -28,6 +28,18 @@ namespace mt ); } } + { + std::vector strings; + a8::Split(bombling_time(), strings, ':'); + if (strings.size() == 0) { + _bombling_time = std::make_tuple(0, 0); + } else if (strings.size() == 2) { + _bombling_time = std::make_tuple(a8::XValue(strings[0]).GetInt(), + a8::XValue(strings[1]).GetInt()); + } else { + abort(); + } + } } } diff --git a/server/gameserver/mt/AirRaid.h b/server/gameserver/mt/AirRaid.h index 5242ab4b..08d76e13 100644 --- a/server/gameserver/mt/AirRaid.h +++ b/server/gameserver/mt/AirRaid.h @@ -15,6 +15,7 @@ namespace mt std::vector> _raid_waves; std::vector _bomb_ids; + std::tuple _bombling_time; }; diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index 80afdb78..835515d9 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -834,6 +834,7 @@ message MFAirRaid optional int32 appear_time = 1; //空袭出现时间(毫秒) optional MFVec3 pos = 3; //空袭位置 optional float rad = 4; //空袭半径 + optional int32 continue_time = 5; //轰炸持续时间,(在空袭出现后!!!) } //buff