From 3d260cdc41a5b7a46a06c9ae8fa3326862cfb629 Mon Sep 17 00:00:00 2001 From: "alexey.min" Date: Sat, 12 May 2012 19:57:40 +0000 Subject: [PATCH] l2c_getObjectInfoByObjectId(): return also char/npc/mob title --- l2detect/se_funcs/sef_world.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/l2detect/se_funcs/sef_world.cpp b/l2detect/se_funcs/sef_world.cpp index 006c79b..2b9bbac 100644 --- a/l2detect/se_funcs/sef_world.cpp +++ b/l2detect/se_funcs/sef_world.cpp @@ -222,6 +222,10 @@ int l2c_getObjectInfoByObjectId( lua_State *L ) sprintf( ansi, "%S", chars_array[idx]->charName ); lua_pushstring( L, ansi ); lua_settable( L, -3 ); + lua_pushstring( L, "title" ); + sprintf( ansi, "%S", chars_array[idx]->charTitle ); + lua_pushstring( L, ansi ); + lua_settable( L, -3 ); // lua_pushstring( L, "curHp" ); lua_pushnumber( L, chars_array[idx]->curHp ); @@ -280,6 +284,10 @@ int l2c_getObjectInfoByObjectId( lua_State *L ) sprintf( ansi, "%S", npc_array[idx]->charName ); lua_pushstring( L, ansi ); lua_settable( L, -3 ); + lua_pushstring( L, "title" ); + sprintf( ansi, "%S", npc_array[idx]->charTitle ); + lua_pushstring( L, ansi ); + lua_settable( L, -3 ); // lua_pushstring( L, "curHp" ); lua_pushnumber( L, npc_array[idx]->curHp ); @@ -322,7 +330,7 @@ int l2c_getObjectInfoByObjectId( lua_State *L ) lua_settable( L, -3 ); // lua_pushstring( L, "name" ); - char itemName[256] = {0}; + char itemName[512] = {0}; L2Data_DB_GetItemNamePicByID( a->gi_array[idx]->itemID, itemName, NULL ); lua_pushstring( L, itemName ); // at last lua_settable( L, -3 );