Skip to content

Commit

Permalink
Fix PLAYER_EVENT_ON_KILLED_BY_CREATURE never being called
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed Jan 17, 2024
1 parent c5a4f86 commit 3014f7e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,15 @@ void Unit::Kill(Unit* killer, Unit* victim, DamageEffectType damagetype, SpellEn
else // Killed creature
JustKilledCreature(killer, static_cast<Creature*>(victim), responsiblePlayer);

#ifdef BUILD_ELUNA
if (Creature* killerCre = killer->ToCreature())
{
// used by eluna
if (Player* killed = victim->ToPlayer())
sEluna->OnPlayerKilledByCreature(killerCre, killed);
}
#endif

// stop combat
DEBUG_FILTER_LOG(LOG_FILTER_DAMAGE, "DealDamageAttackStop");
victim->CombatStop();
Expand Down

0 comments on commit 3014f7e

Please sign in to comment.