fix l2c_getObjectInfoByObjectId(): return isAlikeDead for pc/npc/mob as boolean value, not integer
This commit is contained in:
parent
f2c52cbb3c
commit
6b8be35686
@ -234,7 +234,7 @@ int l2c_getObjectInfoByObjectId( lua_State *L )
|
|||||||
lua_pushnumber( L, chars_array[idx]->maxHp );
|
lua_pushnumber( L, chars_array[idx]->maxHp );
|
||||||
lua_settable( L, -3 );
|
lua_settable( L, -3 );
|
||||||
lua_pushstring( L, "isAlikeDead" );
|
lua_pushstring( L, "isAlikeDead" );
|
||||||
lua_pushnumber( L, chars_array[idx]->isAlikeDead );
|
lua_pushboolean( L, chars_array[idx]->isAlikeDead );
|
||||||
lua_settable( L, -3 );
|
lua_settable( L, -3 );
|
||||||
// player specific
|
// player specific
|
||||||
lua_pushstring( L, "classID" );
|
lua_pushstring( L, "classID" );
|
||||||
@ -296,7 +296,7 @@ int l2c_getObjectInfoByObjectId( lua_State *L )
|
|||||||
lua_pushnumber( L, npc_array[idx]->maxHp );
|
lua_pushnumber( L, npc_array[idx]->maxHp );
|
||||||
lua_settable( L, -3 );
|
lua_settable( L, -3 );
|
||||||
lua_pushstring( L, "isAlikeDead" );
|
lua_pushstring( L, "isAlikeDead" );
|
||||||
lua_pushnumber( L, npc_array[idx]->isAlikeDead );
|
lua_pushboolean( L, npc_array[idx]->isAlikeDead );
|
||||||
lua_settable( L, -3 );
|
lua_settable( L, -3 );
|
||||||
// npc specific
|
// npc specific
|
||||||
lua_pushstring( L, "templateID" );
|
lua_pushstring( L, "templateID" );
|
||||||
|
@ -150,17 +150,17 @@ function isDead( objectId )
|
|||||||
local objectInfo = l2c_getObjectInfoByObjectId( objectId );
|
local objectInfo = l2c_getObjectInfoByObjectId( objectId );
|
||||||
if objectInfo == nil then return true end
|
if objectInfo == nil then return true end
|
||||||
if( objectInfo.type == "pc" ) then
|
if( objectInfo.type == "pc" ) then
|
||||||
if( objectInfo.isAlikeDead == 1 ) then
|
if( objectInfo.isAlikeDead ) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if( objectInfo.type == "npc" ) then
|
if( objectInfo.type == "npc" ) then
|
||||||
if( objectInfo.isAlikeDead == 1 ) then
|
if( objectInfo.isAlikeDead ) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if( objectInfo.type == "mob" ) then
|
if( objectInfo.type == "mob" ) then
|
||||||
if( objectInfo.isAlikeDead == 1 ) then
|
if( objectInfo.isAlikeDead ) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user