Commit 35f6f670 authored by nanahira's avatar nanahira

return flag in locationcount at the 2nd ret

parent 41a08a03
......@@ -1840,8 +1840,10 @@ int32 scriptlib::duel_get_location_count(lua_State *L) {
uint32 zone = 0xff;
if(lua_gettop(L) >= 5)
zone = lua_tointeger(L, 5);
lua_pushinteger(L, pduel->game_field->get_useable_count(NULL, playerid, location, uplayer, reason, zone));
return 1;
uint32 list = 0;
lua_pushinteger(L, pduel->game_field->get_useable_count(NULL, playerid, location, uplayer, reason, zone, &list));
lua_pushinteger(L, list);
return 2;
}
int32 scriptlib::duel_get_mzone_count(lua_State *L) {
check_param_count(L, 1);
......@@ -1887,14 +1889,16 @@ int32 scriptlib::duel_get_mzone_count(lua_State *L) {
reason = lua_tointeger(L, 4);
if(lua_gettop(L) >= 5)
zone = lua_tointeger(L, 5);
lua_pushinteger(L, pduel->game_field->get_useable_count(NULL, playerid, LOCATION_MZONE, uplayer, reason, zone));
uint32 list = 0;
lua_pushinteger(L, pduel->game_field->get_useable_count(NULL, playerid, LOCATION_MZONE, uplayer, reason, zone, &list));
lua_pushinteger(L, list);
if(swapped) {
pduel->game_field->player[0].used_location = used_location[0];
pduel->game_field->player[1].used_location = used_location[1];
pduel->game_field->player[0].list_mzone.swap(list_mzone[0]);
pduel->game_field->player[1].list_mzone.swap(list_mzone[1]);
}
return 1;
return 2;
}
int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
check_param_count(L, 1);
......@@ -1947,7 +1951,9 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
uint32 zone = 0xff;
if(lua_gettop(L) >= 5)
zone = lua_tointeger(L, 5);
lua_pushinteger(L, pduel->game_field->get_useable_count_fromex(scard, playerid, uplayer, zone));
uint32 list = 0;
lua_pushinteger(L, pduel->game_field->get_useable_count_fromex(scard, playerid, uplayer, zone, &list));
lua_pushinteger(L, list);
if(mcard)
mcard->set_status(STATUS_TO_LEAVE_FROMEX, FALSE);
if(mgroup){
......@@ -1962,7 +1968,7 @@ int32 scriptlib::duel_get_location_count_fromex(lua_State *L) {
pduel->game_field->player[0].list_mzone.swap(list_mzone[0]);
pduel->game_field->player[1].list_mzone.swap(list_mzone[1]);
}
return 1;
return 2;
}
int32 scriptlib::duel_get_usable_mzone_count(lua_State *L) {
check_param_count(L, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment