diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 123eabb..9947a3f 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -2911,6 +2911,7 @@ void Room::InitAndroidAI() androids.push_back((Android*)hum); } } + std::array ai_num = {}; for (Android* hum : androids) { #ifdef DEBUG #if 0 @@ -2926,6 +2927,9 @@ void Room::InitAndroidAI() int space = std::get<1>(tuple); if (rnd <= space) { hum->SetAiLevel(ai_level); +#ifdef DEBUG + ++ai_num[ai_level - 1]; +#endif break; } } @@ -2937,9 +2941,31 @@ void Room::InitAndroidAI() int space = std::get<1>(tuple); if (rnd <= space) { hum->SetAiLevel(ai_level); +#ifdef DEBUG + ++ai_num[ai_level - 1]; +#endif break; } } } } +#ifdef DEBUG + for (auto& pair : accountid_hash_) { + pair.second->SendDebugMsg + ( + a8::Format("ai_num level1:%d level2:%d level3:%d level4:%d level5:%d level6:%d level7:%d level8:%d", + { + ai_num[0], + ai_num[1], + ai_num[2], + ai_num[3], + ai_num[4], + ai_num[5], + ai_num[6], + ai_num[7] + } + ) + ); + } +#endif }