This commit is contained in:
aozhiwei 2023-07-21 18:45:37 +08:00
parent fe45d21f94
commit 30dbd7f3b2
4 changed files with 12 additions and 10 deletions

View File

@ -118,13 +118,6 @@ namespace mt
if (swim_speed() < 0.0001f) {
swim_speed_ = 1.0f;
}
if (default_weapon()) {
for (int i = 1; i <= 15; ++i) {
if (!mt::NpcStandard::GetByHeroAndLv(id(), i)) {
abort();
}
}
}
}
}
@ -170,6 +163,15 @@ namespace mt
abort();
}
}
#if 0
if (hero->default_weapon()) {
for (int i = 1; i <= 15; ++i) {
if (!mt::NpcStandard::GetByHeroAndLv(hero->id(), i)) {
abort();
}
}
}
#endif
});
}

View File

@ -9,7 +9,7 @@ std::map<long long, const mt::NpcStandard*> mt::NpcStandard::hero_lv_hash_;
namespace mt
{
void NpcStandard::Init()
void NpcStandard::Init1()
{
if (GetByHeroAndLv(hero_id(), level())) {
abort();

View File

@ -10,7 +10,7 @@ namespace mt
"npcStandard@npcStandard.json",
"id")
public:
void Init();
void Init1();
static void StaticPostInit();
static const mt::NpcStandard* GetByHeroAndLv(int hero_id, int lv);

View File

@ -441,7 +441,7 @@ namespace mtb
{
a8::reflect::Class* meta_class = nullptr;
if (!meta_class) {
meta_class = new a8::reflect::Class("NpcStandard", 5, 0);
meta_class = new a8::reflect::Class("NpcStandard", 7, 0);
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(NpcStandard, id_));
meta_class->SetSimpleField(1, "quality", a8::reflect::ET_INT32, my_offsetof2(NpcStandard, quality_));
meta_class->SetSimpleField(2, "hp", a8::reflect::ET_INT32, my_offsetof2(NpcStandard, hp_));