From 6d13f46c409de75221b2bdadeb82cb5ddbaed110 Mon Sep 17 00:00:00 2001 From: Cole-SoD <90719745+Cole-SoD@users.noreply.github.com> Date: Thu, 12 Jan 2023 08:34:49 -0500 Subject: [PATCH] [Bug Fix] Fix luamod GetExperienceForKill return value --- zone/lua_mod.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zone/lua_mod.cpp b/zone/lua_mod.cpp index 9558563a3..147a3a046 100644 --- a/zone/lua_mod.cpp +++ b/zone/lua_mod.cpp @@ -585,7 +585,6 @@ void LuaMod::GetEXPForLevel(Client *self, uint16 level, uint32 &returnValue, boo void LuaMod::GetExperienceForKill(Client *self, Mob *against, uint64 &returnValue, bool &ignoreDefault) { int start = lua_gettop(L); - uint64 retval = 0; try { if (!m_has_get_experience_for_kill) { @@ -618,7 +617,7 @@ void LuaMod::GetExperienceForKill(Client *self, Mob *against, uint64 &returnValu auto returnValueObj = ret["ReturnValue"]; if (luabind::type(returnValueObj) == LUA_TNUMBER) { - returnValue = luabind::object_cast(returnValueObj); + returnValue = luabind::object_cast(returnValueObj); } } }