1
This commit is contained in:
parent
fe45d21f94
commit
30dbd7f3b2
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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_));
|
||||
|
Loading…
x
Reference in New Issue
Block a user