This commit is contained in:
aozhiwei 2023-02-21 10:51:34 +08:00
parent a5d631b3d1
commit d6aafe8202

View File

@ -5,6 +5,8 @@
IMPL_TABLE(mt::Grasp)
std::map<long long, std::map<int, mt::GraspBuffs>> mt::Grasp::hero_weapon_hash_;
static std::set<int> hero_lv_sets({1, 5, 10, 15});
namespace mt
{
@ -22,6 +24,9 @@ namespace mt
if (graspbuff_id2() && !buff2_meta) {
abort();
}
if (hero_lv_sets.find(hero_lv()) != hero_lv_sets.end()) {
abort();
}
}
void Grasp::Init2()
@ -57,6 +62,25 @@ namespace mt
}
}
});
for (auto& pair : hero_weapon_hash_) {
if (!pair.second.empty()) {
std::vector<std::tuple<int, mt::GraspBuffs*>> buffs;
{
for (auto& pair2 : pair.second) {
buffs.push_back(std::make_tuple(pair2.first, &pair2.second));
}
}
#if 0
auto& parent_buffs = pair.second[i];
for (size_t ii = 0; ii < i; ++ii) {
auto& child_buffs = pair.second[ii];
for (size_t iii = 0; iii < parent_buffs.size(); ++iii) {
}
}
#endif
}
}
}
GraspBuffs* Grasp::GetGrasp(int hero_id, int hero_lv, int weapon_id)