//创建角色 void create_character(rpacket_t rpk,player_t ply) { uint8_t avattype = rpk_read_uint8(rpk); const char *chaname = rpk_read_string(rpk); uint32_t agentsession = rpk_read_uint32(rpk); //合法性检测 }
static int _read_int8(lua_State *L){ lua_packet_t p = lua_getluapacket(L,1); if(p->_packet->type != RPACKET) return luaL_error(L,"invaild opration"); rpacket_t rpk = (rpacket_t)p->_packet; lua_pushinteger(L,(int8_t)rpk_read_uint8(rpk)); return 1; }