Commit 79a5fbc1 authored by Chen Bill's avatar Chen Bill

card: reorder static function

parent 7e1801e0
......@@ -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;
......
......@@ -219,6 +219,7 @@ public:
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 @@ public:
std::tuple<uint32, uint32> 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);
......
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