Commit ffd1733e authored by nanahira's avatar nanahira

Merge branch 'develop' of github.com:purerosefallen/ygopro-core into develop

parents 19d2f157 9a2d6fd0
...@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8 ...@@ -201,7 +201,7 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
} }
/** /**
* @brief Get card information. * @brief Get card information.
* @param buf uint32_t array * @param buf int32_t array
* @return buffer length in bytes * @return buffer length in bytes
*/ */
extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, uint8_t location, uint8_t sequence, int32_t query_flag, byte* buf, int32_t use_cache) { extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, uint8_t location, uint8_t sequence, int32_t query_flag, byte* buf, int32_t use_cache) {
...@@ -210,7 +210,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u ...@@ -210,7 +210,7 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
duel* ptduel = (duel*)pduel; duel* ptduel = (duel*)pduel;
card* pcard = nullptr; card* pcard = nullptr;
location &= 0x7f; location &= 0x7f;
if(location & LOCATION_ONFIELD) if (location == LOCATION_MZONE || location == LOCATION_SZONE)
pcard = ptduel->game_field->get_field_card(playerid, location, sequence); pcard = ptduel->game_field->get_field_card(playerid, location, sequence);
else { else {
card_vector* lst = nullptr; card_vector* lst = nullptr;
...@@ -226,10 +226,9 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u ...@@ -226,10 +226,9 @@ extern "C" DECL_DLLEXPORT int32_t query_card(intptr_t pduel, uint8_t playerid, u
lst = &ptduel->game_field->player[playerid].list_main; lst = &ptduel->game_field->player[playerid].list_main;
else else
return LEN_FAIL; return LEN_FAIL;
if(sequence >= (int32_t)lst->size()) if (sequence >= (int32_t)lst->size())
pcard = nullptr; return LEN_FAIL;
else pcard = (*lst)[sequence];
pcard = (*lst)[sequence];
} }
if (pcard) { if (pcard) {
return pcard->get_infos(buf, query_flag, use_cache); return pcard->get_infos(buf, query_flag, use_cache);
......
...@@ -4327,10 +4327,8 @@ int32_t field::send_to(uint16_t step, group * targets, effect * reason_effect, u ...@@ -4327,10 +4327,8 @@ int32_t field::send_to(uint16_t step, group * targets, effect * reason_effect, u
if(nloc == LOCATION_GRAVE) if(nloc == LOCATION_GRAVE)
pcard->reset(RESET_TOGRAVE, RESET_EVENT); pcard->reset(RESET_TOGRAVE, RESET_EVENT);
if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) { if(nloc == LOCATION_REMOVED || ((pcard->data.type & TYPE_TOKEN) && pcard->sendto_param.location == LOCATION_REMOVED)) {
if(pcard->current.reason & REASON_TEMPORARY) { if(pcard->current.reason & REASON_TEMPORARY)
pcard->reset(RESET_TEMP_REMOVE, RESET_EVENT); pcard->reset(RESET_TEMP_REMOVE, RESET_EVENT);
pcard->set_status(STATUS_CANNOT_CHANGE_FORM, FALSE);
}
else else
pcard->reset(RESET_REMOVE, RESET_EVENT); pcard->reset(RESET_REMOVE, RESET_EVENT);
} }
......
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