This commit is contained in:
aozhiwei 2023-04-04 21:14:29 +08:00
parent 2785a947fc
commit 492862be1a

View File

@ -116,7 +116,45 @@ namespace mt
std::set<int>* Grasp::GetBuffs(int hero_id, int hero_lv, int gun_id)
{
long long key = a8::MakeInt64(hero_id, hero_lv);
int internal_lv = 1;
switch (hero_lv) {
case 1:
case 2:
case 3:
case 4:
{
internal_lv = 1;
}
break;
case 5:
case 6:
case 7:
case 8:
case 9:
{
internal_lv = 5;
}
break;
case 10:
case 11:
case 12:
case 13:
case 14:
{
internal_lv = 10;
}
break;
default:
{
if (hero_lv < 1) {
internal_lv = 1;
} else {
internal_lv = 15;
}
}
break;
}
long long key = a8::MakeInt64(hero_id, internal_lv);
auto itr = hero_id_lv_gun_hash_.find(key);
if (itr != hero_id_lv_gun_hash_.end()) {
if (std::get<0>(itr->second) == gun_id) {