fix dressing room overwriting level/exp
This commit is contained in:
@@ -240,6 +240,28 @@ void PlayerDispDataBB::apply_preview(const PlayerDispDataBBPreview& pre) {
|
|||||||
this->name = pre.name;
|
this->name = pre.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerDispDataBB::apply_dressing_room(const PlayerDispDataBBPreview& pre) {
|
||||||
|
this->name_color = pre.name_color;
|
||||||
|
this->extra_model = pre.extra_model;
|
||||||
|
this->name_color_checksum = pre.name_color_checksum;
|
||||||
|
this->section_id = pre.section_id;
|
||||||
|
this->char_class = pre.char_class;
|
||||||
|
this->v2_flags = pre.v2_flags;
|
||||||
|
this->version = pre.version;
|
||||||
|
this->v1_flags = pre.v1_flags;
|
||||||
|
this->costume = pre.costume;
|
||||||
|
this->skin = pre.skin;
|
||||||
|
this->face = pre.face;
|
||||||
|
this->head = pre.head;
|
||||||
|
this->hair = pre.hair;
|
||||||
|
this->hair_r = pre.hair_r;
|
||||||
|
this->hair_g = pre.hair_g;
|
||||||
|
this->hair_b = pre.hair_b;
|
||||||
|
this->proportion_x = pre.proportion_x;
|
||||||
|
this->proportion_y = pre.proportion_y;
|
||||||
|
this->name = pre.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PlayerDispDataBBPreview::PlayerDispDataBBPreview() noexcept
|
PlayerDispDataBBPreview::PlayerDispDataBBPreview() noexcept
|
||||||
|
|||||||
@@ -206,6 +206,7 @@ struct PlayerDispDataBB {
|
|||||||
PlayerDispDataDCPCV3 to_dcpcv3() const;
|
PlayerDispDataDCPCV3 to_dcpcv3() const;
|
||||||
PlayerDispDataBBPreview to_preview() const;
|
PlayerDispDataBBPreview to_preview() const;
|
||||||
void apply_preview(const PlayerDispDataBBPreview&);
|
void apply_preview(const PlayerDispDataBBPreview&);
|
||||||
|
void apply_dressing_room(const PlayerDispDataBBPreview&);
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1941,7 +1941,7 @@ static void on_create_character_bb(shared_ptr<ServerState> s, shared_ptr<Client>
|
|||||||
|
|
||||||
if (c->game_data.account()->newserv_flags & AccountFlag::IN_DRESSING_ROOM) {
|
if (c->game_data.account()->newserv_flags & AccountFlag::IN_DRESSING_ROOM) {
|
||||||
try {
|
try {
|
||||||
c->game_data.player()->disp.apply_preview(cmd.preview);
|
c->game_data.player()->disp.apply_dressing_room(cmd.preview);
|
||||||
} catch (const exception& e) {
|
} catch (const exception& e) {
|
||||||
string message = string_printf("$C6Character could not be modified:\n%s", e.what());
|
string message = string_printf("$C6Character could not be modified:\n%s", e.what());
|
||||||
send_message_box(c, decode_sjis(message));
|
send_message_box(c, decode_sjis(message));
|
||||||
|
|||||||
Reference in New Issue
Block a user