Commit bab7d057 authored by Chen Bill's avatar Chen Bill

update effect::get_code_type()

parent 68bcbce0
...@@ -849,7 +849,7 @@ uint32 effect::get_active_type() { ...@@ -849,7 +849,7 @@ uint32 effect::get_active_type() {
} }
int32 effect::get_code_type() { int32 effect::get_code_type() {
// start from the highest bit // start from the highest bit
if (code & EVENT_CUSTOM) if (code & 0xf0000000)
return CODE_CUSTOM; return CODE_CUSTOM;
else if (code & 0xf0000) else if (code & 0xf0000)
return CODE_COUNTER; return CODE_COUNTER;
......
...@@ -553,7 +553,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2) ...@@ -553,7 +553,7 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define HEADER_FLAG_EFFECT 0x20000000 #define HEADER_FLAG_EFFECT 0x20000000
#define MAX_CARD_ID 0xfffffff #define MAX_CARD_ID 0xfffffff
// The type of event in code // The type of effect code
#define CODE_CUSTOM 1 // header + id (28 bits) #define CODE_CUSTOM 1 // header + id (28 bits)
#define CODE_COUNTER 2 // header + counter_id (16 bits) #define CODE_COUNTER 2 // header + counter_id (16 bits)
#define CODE_PHASE 3 // header + phase_id (12 bits) #define CODE_PHASE 3 // header + phase_id (12 bits)
......
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