[Bug Fix] Fix luamod GetExperienceForKill return value

This commit is contained in:
Cole-SoD 2023-01-12 08:34:49 -05:00 committed by GitHub
parent 2f90f26351
commit 6d13f46c40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) void LuaMod::GetExperienceForKill(Client *self, Mob *against, uint64 &returnValue, bool &ignoreDefault)
{ {
int start = lua_gettop(L); int start = lua_gettop(L);
uint64 retval = 0;
try { try {
if (!m_has_get_experience_for_kill) { if (!m_has_get_experience_for_kill) {
@ -618,7 +617,7 @@ void LuaMod::GetExperienceForKill(Client *self, Mob *against, uint64 &returnValu
auto returnValueObj = ret["ReturnValue"]; auto returnValueObj = ret["ReturnValue"];
if (luabind::type(returnValueObj) == LUA_TNUMBER) { if (luabind::type(returnValueObj) == LUA_TNUMBER) {
returnValue = luabind::object_cast<uint32>(returnValueObj); returnValue = luabind::object_cast<uint64>(returnValueObj);
} }
} }
} }