1
This commit is contained in:
parent
5d969932e1
commit
db3818a902
@ -40,12 +40,12 @@ namespace mt
|
||||
|
||||
}
|
||||
|
||||
void Grasp::StaticPreInit()
|
||||
void Grasp::StaticPostInit()
|
||||
{
|
||||
int last_hero_id = 0;
|
||||
int last_hero_lv = 0;
|
||||
int last_weapon_id = 0;
|
||||
MutTraverse
|
||||
Grasp::MutTraverse
|
||||
(
|
||||
[&last_hero_id, &last_hero_lv, &last_weapon_id] (mt::Grasp* meta, bool& stop) mutable
|
||||
{
|
||||
@ -70,7 +70,17 @@ namespace mt
|
||||
}
|
||||
hero_id_lv_gun_hash_[key] = tuple;
|
||||
} else {
|
||||
|
||||
if (5 * (last_hero_lv / 5 + 1) != meta->hero_lv()) {
|
||||
abort();
|
||||
}
|
||||
last_hero_id = meta->hero_id();
|
||||
last_hero_lv = meta->hero_lv();
|
||||
last_weapon_id = meta->weapon_id();
|
||||
if (last_hero_lv == 15) {
|
||||
last_hero_id = 0;
|
||||
last_hero_lv = 0;
|
||||
last_weapon_id = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ namespace mt
|
||||
|
||||
void Init1();
|
||||
void Init2();
|
||||
void StaticPreInit();
|
||||
static void StaticPostInit();
|
||||
|
||||
|
||||
std::set<int>* GetBuffs(int hero_id, int hero_lv, int gun_id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user