Commit 51762e8c authored by salix5's avatar salix5

update Duel.IsPlayerCanRelease

add 3rd param (optional): reason
parent 8f5aacef
...@@ -4324,7 +4324,10 @@ int32 scriptlib::duel_is_player_can_release(lua_State * L) { ...@@ -4324,7 +4324,10 @@ int32 scriptlib::duel_is_player_can_release(lua_State * L) {
check_param_count(L, 2); check_param_count(L, 2);
check_param(L, PARAM_TYPE_CARD, 2); check_param(L, PARAM_TYPE_CARD, 2);
card* pcard = *(card**) lua_touserdata(L, 2); card* pcard = *(card**) lua_touserdata(L, 2);
lua_pushboolean(L, pduel->game_field->is_player_can_release(playerid, pcard)); uint32 reason = 0;
if (!lua_isnil(L, 3))
reason = (uint32)lua_tointeger(L, 3);
lua_pushboolean(L, pduel->game_field->is_player_can_release(playerid, pcard, reason));
} }
return 1; return 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