summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 03:08:07 +0200
committerKenpachi Developer <Kenpachi.Developer@gmx.de>2020-06-22 03:08:07 +0200
commit36d001b4a491e6d1bd22c4398891de068066cbb2 (patch)
tree871d0feb0b2095d8164743facd2e317d53699048
parent7a2565af344a26275c0800f91d6c4aa3142827a8 (diff)
downloadhercules-36d001b4a491e6d1bd22c4398891de068066cbb2.tar.gz
hercules-36d001b4a491e6d1bd22c4398891de068066cbb2.tar.bz2
hercules-36d001b4a491e6d1bd22c4398891de068066cbb2.tar.xz
hercules-36d001b4a491e6d1bd22c4398891de068066cbb2.zip
Show party options when member was added
-rw-r--r--src/map/clif.c1
-rw-r--r--src/map/party.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c1e3750d4..e350948b2 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7304,6 +7304,7 @@ static void clif_party_inviteack(struct map_session_data *sd, const char *nick,
/// 0x01 = Cannot change EXP sharing. (Only set when tried to change options manually.)
/// 0x02 = Options changed manually.
/// 0x04 = Options changed automatically.
+/// 0x08 = Member added.
/// 0x20 = Character logged in.
static void clif_party_option(struct party_data *p, struct map_session_data *sd, int flag)
{
diff --git a/src/map/party.c b/src/map/party.c
index 14e3df42f..597325e7d 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -330,6 +330,8 @@ static int party_recv_info(const struct party *sp, int char_id)
party->member_withdraw(sp->party_id, sd->status.account_id, sd->status.char_id);
}
+ int option_auto_changed = p->state.option_auto_changed; // Preserve state.
+
memcpy(&p->party, sp, sizeof(struct party));
memset(&p->state, 0, sizeof(p->state));
memset(&p->data, 0, sizeof(p->data));
@@ -342,6 +344,7 @@ static int party_recv_info(const struct party *sp, int char_id)
p->party.member[member_id].leader = 1;
}
party->check_state(p);
+ p->state.option_auto_changed = option_auto_changed;
while( added_count > 0 ) { // new in party
member_id = added[--added_count];
sd = p->data[member_id].sd;
@@ -537,6 +540,11 @@ static int party_member_added(int party_id, int account_id, int char_id, int fla
clif->party_member_info(p,sd);
clif->party_info(p,sd);
+ if (p->state.option_auto_changed != 0)
+ clif->party_option(p, sd, 0x04);
+ else
+ clif->party_option(p, sd, 0x08);
+
if( sd2 != NULL )
clif->party_inviteack(sd2,sd->status.name,2);