Skip to content

Commit

Permalink
update card::get_infos
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 committed Dec 15, 2024
1 parent 4ff9722 commit cef862b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ int32_t card::get_infos(byte* buf, uint32_t query_flag, int32_t use_cache) {
base_atk_def = get_base_atk_def();
}
//first 8 bytes: data length, query flag
p += 8;
p += 2 * sizeof(uint32_t);
if (query_flag & QUERY_CODE) {
buffer_write<uint32_t>(p, data.code);
}
Expand Down
5 changes: 5 additions & 0 deletions ocgapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ extern "C" DECL_DLLEXPORT void new_tag_card(intptr_t pduel, uint32_t code, uint8
break;
}
}
/**
* @brief Get card information.
* @param buf uint32_t array
* @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) {
if (!check_playerid(playerid))
return LEN_FAIL;
Expand Down

0 comments on commit cef862b

Please sign in to comment.