1
This commit is contained in:
parent
e6f1defa54
commit
e06af25b29
@ -99,6 +99,15 @@ namespace MetaData
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapThing::Init()
|
||||||
|
{
|
||||||
|
std::vector<std::string> strings;
|
||||||
|
a8::Split(i->buff_list(), strings, '|');
|
||||||
|
for (const std::string& tmp_str : strings) {
|
||||||
|
buff_list.push_back(a8::XValue(tmp_str));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Equip::Init()
|
void Equip::Init()
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,9 @@ namespace MetaData
|
|||||||
struct MapThing
|
struct MapThing
|
||||||
{
|
{
|
||||||
const metatable::MapThing* i = nullptr;
|
const metatable::MapThing* i = nullptr;
|
||||||
|
std::vector<int> buff_list;
|
||||||
|
|
||||||
|
void Init();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SafeArea
|
struct SafeArea
|
||||||
|
@ -508,6 +508,7 @@ private:
|
|||||||
for (auto& meta : mapthing_meta_list) {
|
for (auto& meta : mapthing_meta_list) {
|
||||||
MetaData::MapThing& item = a8::FastAppend(mapthing_list);
|
MetaData::MapThing& item = a8::FastAppend(mapthing_list);
|
||||||
item.i = &meta;
|
item.i = &meta;
|
||||||
|
item.Init();
|
||||||
mapthing_hash[item.i->thing_id()] = &item;
|
mapthing_hash[item.i->thing_id()] = &item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ void RoomObstacle::ActiveTimerFunc()
|
|||||||
|
|
||||||
void RoomObstacle::UpdateTimerFunc()
|
void RoomObstacle::UpdateTimerFunc()
|
||||||
{
|
{
|
||||||
if (grid_list_ && master) {
|
if (grid_list_ && master && !IsDead(room)) {
|
||||||
std::set<Human*> human_list;
|
std::set<Human*> human_list;
|
||||||
room->grid_service->TouchAllLayerHumanList
|
room->grid_service->TouchAllLayerHumanList
|
||||||
(room->GetRoomIdx(),
|
(room->GetRoomIdx(),
|
||||||
@ -143,11 +143,13 @@ void RoomObstacle::UpdateTimerFunc()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
for (Human* hum : human_list) {
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!human_list.empty()) {
|
if (!human_list.empty()) {
|
||||||
|
for (Human* hum : human_list) {
|
||||||
|
|
||||||
|
}
|
||||||
Explosion();
|
Explosion();
|
||||||
|
Die(room);
|
||||||
|
BroadcastFullState(room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ message MapThing
|
|||||||
optional int32 is_house = 11; //是否房间
|
optional int32 is_house = 11; //是否房间
|
||||||
optional int32 is_tree = 12; //是否树
|
optional int32 is_tree = 12; //是否树
|
||||||
optional int32 house_id = 13; //房间id
|
optional int32 house_id = 13; //房间id
|
||||||
repeated int32 buff_list = 14;
|
optional string buff_list = 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SafeArea
|
message SafeArea
|
||||||
|
Loading…
x
Reference in New Issue
Block a user