From 0c9f93d706355c83acd3f8eae1fa2c7d04ca4e24 Mon Sep 17 00:00:00 2001 From: Niam5 Date: Fri, 13 Oct 2023 01:56:12 -0500 Subject: [PATCH] Add new environmental death hook -Update Eluna Submodule --- src/game/Entities/Player.cpp | 5 +++++ src/game/LuaEngine | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/Entities/Player.cpp b/src/game/Entities/Player.cpp index f44506881..70d769ca4 100644 --- a/src/game/Entities/Player.cpp +++ b/src/game/Entities/Player.cpp @@ -1004,6 +1004,11 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage) uint32 final_damage = DealDamage(this, damage, nullptr, damageType, SPELL_SCHOOL_MASK_NORMAL, nullptr, false); +#ifdef BUILD_ELUNA + if (!IsAlive()) + sEluna->OnPlayerKilledByEnvironment(this, type); +#endif + if (!IsAlive()) { if (type == DAMAGE_FALL) // DealDamage not apply item durability loss at self damage diff --git a/src/game/LuaEngine b/src/game/LuaEngine index e54901281..dc040cc1f 160000 --- a/src/game/LuaEngine +++ b/src/game/LuaEngine @@ -1 +1 @@ -Subproject commit e54901281d7e63463031315046e9e21e5922e2d3 +Subproject commit dc040cc1fa76b76b3f45eddec4e929db5b0df9c6