Commit acbb56b3 authored by Chen Bill's avatar Chen Bill

use default initialize

parent 06b41f47
......@@ -27,43 +27,8 @@ bool is_continuous_event(uint32 code) {
}
effect::effect(duel* pd) {
ref_handle = 0;
pduel = pd;
owner = 0;
handler = 0;
description = 0;
effect_owner = PLAYER_NONE;
card_type = 0;
active_type = 0;
active_location = 0;
active_sequence = 0;
active_handler = 0;
id = 0;
code = 0;
type = 0;
flag[0] = 0;
flag[1] = 0;
copy_id = 0;
range = 0;
s_range = 0;
o_range = 0;
count_limit = 0;
count_limit_max = 0;
reset_count = 0;
reset_flag = 0;
count_code = 0;
category = 0;
label.reserve(4);
label_object = 0;
hint_timing[0] = 0;
hint_timing[1] = 0;
status = 0;
condition = 0;
cost = 0;
target = 0;
value = 0;
operation = 0;
cost_checked = FALSE;
}
int32 effect::is_disable_related() {
if (code == EFFECT_IMMUNE_EFFECT || code == EFFECT_DISABLE || code == EFFECT_CANNOT_DISABLE || code == EFFECT_FORBIDDEN)
......
......@@ -27,41 +27,41 @@ enum effect_flag2 : uint32;
class effect {
public:
int32 ref_handle;
duel* pduel;
card* owner;
card* handler;
uint8 effect_owner;
uint32 description;
uint32 code;
uint32 flag[2];
uint32 id;
uint16 type;
uint16 copy_id;
uint16 range;
uint16 s_range;
uint16 o_range;
uint8 count_limit;
uint8 count_limit_max;
uint16 reset_count;
uint32 reset_flag;
uint32 count_code;
uint32 category;
uint32 hint_timing[2];
uint32 card_type;
uint32 active_type;
uint16 active_location;
uint16 active_sequence;
card* active_handler;
uint16 status;
int32 ref_handle{ 0 };
duel* pduel{ nullptr };
card* owner{ nullptr };
card* handler{ nullptr };
uint8 effect_owner{ PLAYER_NONE };
uint32 description{ 0 };
uint32 code{ 0 };
uint32 flag[2]{ 0 };
uint32 id{ 0 };
uint16 type{ 0 };
uint16 copy_id{ 0 };
uint16 range{ 0 };
uint16 s_range{ 0 };
uint16 o_range{ 0 };
uint8 count_limit{ 0 };
uint8 count_limit_max{ 0 };
uint16 reset_count{ 0 };
uint32 reset_flag{ 0 };
uint32 count_code{ 0 };
uint32 category{ 0 };
uint32 hint_timing[2]{ 0 };
uint32 card_type{ 0 };
uint32 active_type{ 0 };
uint16 active_location{ 0 };
uint16 active_sequence{ 0 };
card* active_handler{ nullptr };
uint16 status{ 0 };
std::vector<uint32> label;
int32 label_object;
int32 condition;
int32 cost;
int32 target;
int32 value;
int32 operation;
uint8 cost_checked;
int32 label_object{ 0 };
int32 condition{ 0 };
int32 cost{ 0 };
int32 target{ 0 };
int32 value{ 0 };
int32 operation{ 0 };
uint8 cost_checked{ FALSE };
explicit effect(duel* pd);
~effect() = default;
......
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