summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 05:49:10 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 05:49:10 +0000
commit6d970f21c13006074dea1bd173d9ff7f7af7c338 (patch)
tree0fba9f33681ca5549027fbb8aabeb02a44edd1f6 /src/map/pc.c
parente180648e8d399a7d367e557f3857753d54987b9b (diff)
downloadhercules-6d970f21c13006074dea1bd173d9ff7f7af7c338.tar.gz
hercules-6d970f21c13006074dea1bd173d9ff7f7af7c338.tar.bz2
hercules-6d970f21c13006074dea1bd173d9ff7f7af7c338.tar.xz
hercules-6d970f21c13006074dea1bd173d9ff7f7af7c338.zip
- Re-committed r16974/trunk/src/ (pid:161281).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16996 54d463be-8e91-2dee-dedb-b68131a5f0ec
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 25ef846ae..e1ef92d00 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -7119,6 +7119,19 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
return 0;
}
+static int jobchange_killclone(struct block_list *bl, va_list ap)
+{
+ struct mob_data *md;
+ int flag;
+ md = (struct mob_data *)bl;
+ nullpo_ret(md);
+ flag = va_arg(ap, int);
+
+ if (md->master_id && md->special_state.clone && md->master_id == flag)
+ status_kill(&md->bl);
+ return 1;
+}
+
/*==========================================
* Called when player changes job
* Rewrote to make it tidider [Celest]
@@ -7228,6 +7241,13 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
//Update skill tree.
pc_calc_skilltree(sd);
clif_skillinfoblock(sd);
+
+ if (sd->ed)
+ elemental_delete(sd->ed, 0);
+ if (sd->state.vending)
+ vending_closevending(sd);
+
+ map_foreachinmap(jobchange_killclone, sd->bl.m, BL_MOB, sd->bl.id);
//Remove peco/cart/falcon
i = sd->sc.option;