From 79a5fbc1d7c0ebf77a4d6094e7d2371ede15f29f Mon Sep 17 00:00:00 2001 From: salix5 Date: Sun, 17 Nov 2024 23:00:25 +0800 Subject: [PATCH] card: reorder static function --- card.cpp | 10 +++++----- card.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/card.cpp b/card.cpp index 6c6cf41ad..b980f773a 100644 --- a/card.cpp +++ b/card.cpp @@ -133,6 +133,11 @@ bool card::card_operation_sort(card* c1, card* c2) { return c1->current.sequence < c2->current.sequence; } } +bool card::check_card_setcode(uint32 code, uint32 value) { + card_data dat; + ::read_card(code, &dat); + return dat.is_setcode(value); +} void card::attacker_map::addcard(card* pcard) { auto fid = pcard ? pcard->fieldid_r : 0; auto pr = emplace(fid, std::make_pair(pcard, 0)); @@ -488,11 +493,6 @@ inline bool check_setcode(uint16_t setcode, uint32 value) { uint32 setsubtype = value & 0xf000U; return (setcode & 0x0fffU) == settype && (setcode & 0xf000U & setsubtype) == setsubtype; } -bool card::check_card_setcode(uint32 code, uint32 value) { - card_data dat; - ::read_card(code, &dat); - return dat.is_setcode(value); -} int32 card::is_set_card(uint32 set_code) { uint32 code1 = get_code(); card_data dat1; diff --git a/card.h b/card.h index 0f65a9237..100b39f2c 100644 --- a/card.h +++ b/card.h @@ -219,6 +219,7 @@ class card { explicit card(duel* pd); ~card() = default; static bool card_operation_sort(card* c1, card* c2); + static bool check_card_setcode(uint32 code, uint32 value); bool is_extra_deck_monster() const { return !!(data.type & TYPES_EXTRA_DECK); } int32 get_infos(byte* buf, uint32 query_flag, int32 use_cache = TRUE); @@ -227,7 +228,6 @@ class card { std::tuple get_original_code_rule() const; uint32 get_code(); uint32 get_another_code(); - static bool check_card_setcode(uint32 code, uint32 value); int32 is_set_card(uint32 set_code); int32 is_origin_set_card(uint32 set_code); int32 is_pre_set_card(uint32 set_code);