This commit is contained in:
aozhiwei 2022-09-28 15:22:43 +08:00
parent 411b586506
commit 63d92ce2d7

View File

@ -5,6 +5,7 @@
#include "human.h"
#include "metamgr.h"
#include "hero.h"
#include "player.h"
void Incubator::Init()
{
@ -328,7 +329,12 @@ void Incubator::SpawnWaveMon(int wave)
[] (const a8::XParams& param)
{
Hero* hero = (Hero*)param.sender.GetUserData();
hero->BeKill(VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas);
Human* hum = hero->room->GetOneAlivePlayer();
if (hum) {
hero->BeKill(hum->GetUniId(), hum->name, hum->GetCurrWeapon()->weapon_id);
} else {
hero->BeKill(VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas);
}
},
&hero->xtimer_attacher.timer_list_);
}