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 19, 2024
1 parent 07fb9f6 commit df2f9bd
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 @@ -1240,6 +1240,15 @@ void Unit::Kill(Unit* killer, Unit* victim, DamageEffectType damagetype, SpellEn
if (responsiblePlayer)
responsiblePlayer->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, 1, 0, victim);

#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 df2f9bd

Please sign in to comment.