From 6b8be35686281efa427e112b657ab7fa7e34dab5 Mon Sep 17 00:00:00 2001 From: "alexey.min" Date: Sat, 19 May 2012 16:25:59 +0000 Subject: [PATCH] fix l2c_getObjectInfoByObjectId(): return isAlikeDead for pc/npc/mob as boolean value, not integer --- l2detect/se_funcs/sef_world.cpp | 4 ++-- l2ooghelper/scripts/archer_assist_pvp.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/l2detect/se_funcs/sef_world.cpp b/l2detect/se_funcs/sef_world.cpp index 2b9bbac..c7ac52f 100644 --- a/l2detect/se_funcs/sef_world.cpp +++ b/l2detect/se_funcs/sef_world.cpp @@ -234,7 +234,7 @@ int l2c_getObjectInfoByObjectId( lua_State *L ) lua_pushnumber( L, chars_array[idx]->maxHp ); lua_settable( L, -3 ); lua_pushstring( L, "isAlikeDead" ); - lua_pushnumber( L, chars_array[idx]->isAlikeDead ); + lua_pushboolean( L, chars_array[idx]->isAlikeDead ); lua_settable( L, -3 ); // player specific lua_pushstring( L, "classID" ); @@ -296,7 +296,7 @@ int l2c_getObjectInfoByObjectId( lua_State *L ) lua_pushnumber( L, npc_array[idx]->maxHp ); lua_settable( L, -3 ); lua_pushstring( L, "isAlikeDead" ); - lua_pushnumber( L, npc_array[idx]->isAlikeDead ); + lua_pushboolean( L, npc_array[idx]->isAlikeDead ); lua_settable( L, -3 ); // npc specific lua_pushstring( L, "templateID" ); diff --git a/l2ooghelper/scripts/archer_assist_pvp.lua b/l2ooghelper/scripts/archer_assist_pvp.lua index 2690fb8..5884cea 100644 --- a/l2ooghelper/scripts/archer_assist_pvp.lua +++ b/l2ooghelper/scripts/archer_assist_pvp.lua @@ -150,17 +150,17 @@ function isDead( objectId ) local objectInfo = l2c_getObjectInfoByObjectId( objectId ); if objectInfo == nil then return true end if( objectInfo.type == "pc" ) then - if( objectInfo.isAlikeDead == 1 ) then + if( objectInfo.isAlikeDead ) then return true end end if( objectInfo.type == "npc" ) then - if( objectInfo.isAlikeDead == 1 ) then + if( objectInfo.isAlikeDead ) then return true end end if( objectInfo.type == "mob" ) then - if( objectInfo.isAlikeDead == 1 ) then + if( objectInfo.isAlikeDead ) then return true end end