diff --git a/server/gameserver/mt/Grasp.cc b/server/gameserver/mt/Grasp.cc index fbc49750..ad75ee06 100644 --- a/server/gameserver/mt/Grasp.cc +++ b/server/gameserver/mt/Grasp.cc @@ -3,7 +3,9 @@ #include "mt/Grasp.h" IMPL_TABLE(mt::Grasp) -std::map> mt::Grasp:: hero_weapon_hash_; +std::map> mt::Grasp::hero_weapon_hash_; + +static std::set 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> 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)