diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 24e77c6c..fabc70ff 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -68,6 +68,7 @@ #include "mt/Drop.h" #include "mt/MergeItem.h" #include "mt/BattleBasicAttribute.h" +#include "mt/BattleHeroGrow.h" #include "pbutils.h" @@ -1580,7 +1581,9 @@ void Human::OnDie() SyncAroundPlayers(__FILE__, __LINE__, __func__); { Creature* killer = room->GetCreatureByUniId(stats->killer_id); - if (killer && killer->IsHuman()) { + if (killer && killer->GetHeroGrowMeta() && killer->IsHuman() && + killer->GetHeroGrowMeta()->lootExp() > 0) { + killer->WinExp(killer->GetHeroGrowMeta()->lootExp() * mt::Param::s().battle_gain_exp_rate_killer); } } if (GetTeam()) {