This commit is contained in:
aozhiwei 2021-07-28 09:44:54 +00:00
parent da8a0b1937
commit 2366fb6b6f
3 changed files with 18 additions and 0 deletions

View File

@ -340,6 +340,20 @@ namespace MetaData
}
}
void Equip::Init2()
{
if (i->equip_type() == EQUIP_TYPE_WEAPON) {
MetaData::Equip* bullet = MetaMgr::Instance()->GetEquip(i->use_bullet());
if (!bullet) {
#if 0
a8::XPrintf("no bullet %d\n", {i->id()});
#else
abort();
#endif
}
}
}
int Equip::GetWeaponIdx()
{
int weapon_idx = -1;

View File

@ -89,6 +89,7 @@ namespace MetaData
long long special_damage_type = 0;
void Init();
void Init2();
int GetWeaponIdx();
bool Match(CondAddBuff_e cond, int val, int val2);
};

View File

@ -454,6 +454,9 @@ private:
for (auto& buff : buff_list) {
buff.Init2();
}
for (auto& equip : equip_list) {
equip.Init2();
}
}
}