LUA HasFreeSlots
Posted: Fri Nov 13, 2009 2:29 pm
Another one if possible (i'm using summonitem till the looting with KOS is all working)
int EQ2Emu_lua_HasFreeSlot(lua_State* state) {
if(!lua_interface)
return 0;
Spawn* player = lua_interface->GetSpawn(state);
if(player && player->IsPlayer())
{
lua_interface->SetBooleanValue(state, ((Player*)player)->item_list.HasFreeSlot());
return 1;
}
return 0;
}
int EQ2Emu_lua_HasFreeSlot(lua_State* state) {
if(!lua_interface)
return 0;
Spawn* player = lua_interface->GetSpawn(state);
if(player && player->IsPlayer())
{
lua_interface->SetBooleanValue(state, ((Player*)player)->item_list.HasFreeSlot());
return 1;
}
return 0;
}