This commit is contained in:
aozhiwei 2021-06-10 10:50:33 +08:00
parent 08ce7453fe
commit c1f8caea38
3 changed files with 39 additions and 1 deletions

View File

@ -126,6 +126,28 @@ namespace MetaData
airdrop_mon_list.push_back(a8::XValue(tmp_str));
}
}
{
std::vector<std::string> strings;
a8::Split(i->special_damage_type(), strings, '|');
for (auto& str : strings) {
int n = a8::XValue(str);
if (n <= 0 || n > 63) {
abort();
}
a8::SetBitFlag(special_damage_type, n);
}
}
{
std::vector<std::string> strings;
a8::Split(i->receive_special_damage_type(), strings, '|');
for (auto& str : strings) {
int n = a8::XValue(str);
if (n <= 0 || n > 63) {
abort();
}
a8::SetBitFlag(receive_special_damage_type, n);
}
}
}
void Equip::Init()
@ -261,6 +283,17 @@ namespace MetaData
++j;
}
}
{
std::vector<std::string> strings;
a8::Split(i->special_damage_type(), strings, '|');
for (auto& str : strings) {
int n = a8::XValue(str);
if (n <= 0 || n > 63) {
abort();
}
a8::SetBitFlag(special_damage_type, n);
}
}
}
int Equip::GetWeaponIdx()
@ -796,7 +829,6 @@ namespace MetaData
std::get<0>(p) = rand_space;
}
}
int i = 0;
}
}
}

View File

@ -44,6 +44,8 @@ namespace MetaData
const metatable::MapThing* i = nullptr;
std::vector<int> buff_list;
std::vector<int> airdrop_mon_list;
long long special_damage_type = 0;
long long receive_special_damage_type = 0;
void Init();
};
@ -75,6 +77,7 @@ namespace MetaData
std::vector<std::tuple<float, int>> car_buff_list;
int car_active_buff_id = 0;
int car_deactive_buff_id = 0;
long long special_damage_type = 0;
void Init();
int GetWeaponIdx();

View File

@ -61,6 +61,8 @@ message MapThing
optional int32 explosion_times = 19;
optional int32 explosion_float = 20;
optional string monster_list = 21;
optional string special_damage_type = 22;
optional string receive_special_damage_type = 23;
}
message SafeArea
@ -122,6 +124,7 @@ message Equip
optional string power_buff = 53;
optional int32 through_teammate = 54;
optional int32 text_icon = 55;
optional string special_damage_type = 56;
optional string inventory_slot = 31; //
optional int32 _inventory_slot = 32; //