clean up 6x75 structure
This commit is contained in:
+2
-2
@@ -309,10 +309,10 @@ static void server_command_qset_qclear(shared_ptr<Client> c, const std::string&
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_v1_or_v2(c->version())) {
|
if (is_v1_or_v2(c->version())) {
|
||||||
G_SetQuestFlag_DC_PC_6x75 cmd = {{0x75, 0x02, 0x0000}, flag_num, should_set ? 0 : 1};
|
G_UpdateQuestFlag_DC_PC_6x75 cmd = {{0x75, 0x02, 0x0000}, flag_num, should_set ? 0 : 1};
|
||||||
send_command_t(l, 0x60, 0x00, cmd);
|
send_command_t(l, 0x60, 0x00, cmd);
|
||||||
} else {
|
} else {
|
||||||
G_SetQuestFlag_V3_BB_6x75 cmd = {{{0x75, 0x03, 0x0000}, flag_num, should_set ? 0 : 1}, l->difficulty, 0x0000};
|
G_UpdateQuestFlag_V3_BB_6x75 cmd = {{{0x75, 0x03, 0x0000}, flag_num, should_set ? 0 : 1}, l->difficulty, 0x0000};
|
||||||
send_command_t(l, 0x60, 0x00, cmd);
|
send_command_t(l, 0x60, 0x00, cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4781,16 +4781,15 @@ struct G_WordSelect_6x74 {
|
|||||||
WordSelectMessage message;
|
WordSelectMessage message;
|
||||||
} __packed__;
|
} __packed__;
|
||||||
|
|
||||||
// 6x75: Set quest flag
|
// 6x75: Update quest flag
|
||||||
|
|
||||||
struct G_SetQuestFlag_DC_PC_6x75 {
|
struct G_UpdateQuestFlag_DC_PC_6x75 {
|
||||||
G_UnusedHeader header;
|
G_UnusedHeader header;
|
||||||
le_uint16_t flag = 0; // Must be < 0x400
|
le_uint16_t flag = 0; // Must be < 0x400
|
||||||
le_uint16_t action = 0; // 0 = set flag, 1 = clear flag
|
le_uint16_t action = 0; // 0 = set flag, 1 = clear flag
|
||||||
} __packed__;
|
} __packed__;
|
||||||
|
|
||||||
struct G_SetQuestFlag_V3_BB_6x75 {
|
struct G_UpdateQuestFlag_V3_BB_6x75 : G_UpdateQuestFlag_DC_PC_6x75 {
|
||||||
G_SetQuestFlag_DC_PC_6x75 basic_cmd;
|
|
||||||
le_uint16_t difficulty = 0;
|
le_uint16_t difficulty = 0;
|
||||||
le_uint16_t unused = 0;
|
le_uint16_t unused = 0;
|
||||||
} __packed__;
|
} __packed__;
|
||||||
|
|||||||
@@ -1689,14 +1689,14 @@ static void on_set_quest_flag(shared_ptr<Client> c, uint8_t command, uint8_t fla
|
|||||||
|
|
||||||
uint16_t flag_index, difficulty, action;
|
uint16_t flag_index, difficulty, action;
|
||||||
if (is_v1_or_v2(c->version()) && (c->version() != Version::GC_NTE)) {
|
if (is_v1_or_v2(c->version()) && (c->version() != Version::GC_NTE)) {
|
||||||
const auto& cmd = check_size_t<G_SetQuestFlag_DC_PC_6x75>(data, size);
|
const auto& cmd = check_size_t<G_UpdateQuestFlag_DC_PC_6x75>(data, size);
|
||||||
flag_index = cmd.flag;
|
flag_index = cmd.flag;
|
||||||
action = cmd.action;
|
action = cmd.action;
|
||||||
difficulty = l->difficulty;
|
difficulty = l->difficulty;
|
||||||
} else {
|
} else {
|
||||||
const auto& cmd = check_size_t<G_SetQuestFlag_V3_BB_6x75>(data, size);
|
const auto& cmd = check_size_t<G_UpdateQuestFlag_V3_BB_6x75>(data, size);
|
||||||
flag_index = cmd.basic_cmd.flag;
|
flag_index = cmd.flag;
|
||||||
action = cmd.basic_cmd.action;
|
action = cmd.action;
|
||||||
difficulty = cmd.difficulty;
|
difficulty = cmd.difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user