summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-14 23:33:19 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-25 01:43:47 +0300
commit4d11bf44c8c481045ce496669830b1990deca464 (patch)
tree3c3219a8ddfead11b739dfe0f45f8c3a97bbde70 /src/map/pc.c
parent4465180912d4757791b1365f7df0a8b889e9cafe (diff)
downloadhercules-4d11bf44c8c481045ce496669830b1990deca464.tar.gz
hercules-4d11bf44c8c481045ce496669830b1990deca464.tar.bz2
hercules-4d11bf44c8c481045ce496669830b1990deca464.tar.xz
hercules-4d11bf44c8c481045ce496669830b1990deca464.zip
Add packet 0xabd for send job and base levels to party members.
Also improve packets send on base level change. Based on commit from rathena: commit 816d8ab2d0934f823a1d26f7fcac244f8245f14b Author: Lemongrass3110 <lemongrass@kstp.at> Date: Mon Jun 5 23:07:09 2017 +0200 Fixed party window for 2017 clients Thanks to @mrdiablo for his help again!
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index c52da3c14..aedb029b6 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8793,6 +8793,7 @@ int pc_jobchange(struct map_session_data *sd, int class, int upper)
status_calc_pc(sd,SCO_FORCE);
pc->checkallowskill(sd);
pc->equiplookall(sd);
+ pc->update_job_and_level(sd);
//if you were previously famous, not anymore.
if (fame_flag != 0) {
@@ -11951,6 +11952,24 @@ void pc_check_supernovice_call(struct map_session_data *sd, const char *message)
}
}
+void pc_update_job_and_level(struct map_session_data *sd)
+{
+ nullpo_retv(sd);
+
+ if (sd->status.party_id) {
+ struct party_data *p;
+ int i;
+
+ if ((p = party->search(sd->status.party_id)) != NULL) {
+ ARR_FIND(0, MAX_PARTY, i, p->party.member[i].char_id == sd->status.char_id);
+ if (i < MAX_PARTY) {
+ p->party.member[i].lv = sd->status.base_level;
+ clif->party_job_and_level(sd);
+ }
+ }
+ }
+}
+
void do_final_pc(void) {
db_destroy(pc->itemcd_db);
pc->at_db->destroy(pc->at_db,pc->autotrade_final);
@@ -12293,6 +12312,7 @@ void pc_defaults(void) {
pc->checkcombo = pc_checkcombo;
pc->calcweapontype = pc_calcweapontype;
pc->removecombo = pc_removecombo;
+ pc->update_job_and_level = pc_update_job_and_level;
pc->bank_withdraw = pc_bank_withdraw;
pc->bank_deposit = pc_bank_deposit;