summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-25 10:32:06 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-25 10:32:06 +0000
commitc966d1aaddd3f0fe455f6ba2bd829f26b75382eb (patch)
tree22b6f1d99f0a29d286a3097961f29a99a8df8566
parent381ebf6a8da1e8d0085b4fdb92d0dd9bf811b2aa (diff)
downloadhercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.gz
hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.bz2
hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.xz
hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.zip
Fixed losing skill list after base change. (bugreport:3106)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13812 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/pc.c19
-rw-r--r--src/map/script.c1
-rw-r--r--src/map/status.c1
4 files changed, 13 insertions, 10 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 154b279fd..72527f8ee 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+09/05/25
+ * Fixed losing skill list after base change. (bugreport:3106) [Inkfish]
09/05/24
* Taro Card can now break shoes and garment and won't affect dead target. (bugreport:2513) [Inkfish]
09/05/23
diff --git a/src/map/pc.c b/src/map/pc.c
index 890cbd0bd..ec2c4b30e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6108,16 +6108,15 @@ int pc_setoption(struct map_session_data *sd,int type)
if (type&OPTION_RIDING && !(p_type&OPTION_RIDING) && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN)
{ //We are going to mount. [Skotlex]
- new_look = -1;
clif_status_load(&sd->bl,SI_RIDING,1);
status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds.
}
else if (!(type&OPTION_RIDING) && p_type&OPTION_RIDING && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN)
{ //We are going to dismount.
- new_look = -1;
clif_status_load(&sd->bl,SI_RIDING,0);
status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds.
}
+
if(type&OPTION_CART && !(p_type&OPTION_CART))
{ //Cart On
clif_cartlist(sd);
@@ -6157,20 +6156,20 @@ int pc_setoption(struct map_session_data *sd,int type)
else if (!(type&OPTION_SUMMER) && p_type&OPTION_SUMMER)
new_look = -1;
- if (sd->disguise)
+ if (sd->disguise || !new_look)
return 0; //Disguises break sprite changes
if (new_look < 0) { //Restore normal look.
status_set_viewdata(&sd->bl, sd->status.class_);
new_look = sd->vd.class_;
}
- if (new_look) {
- //Stop attacking on new view change (to prevent wedding/santa attacks.
- pc_stop_attack(sd);
- clif_changelook(&sd->bl,LOOK_BASE,new_look);
- if (sd->vd.cloth_color)
- clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
- }
+
+ pc_stop_attack(sd); //Stop attacking on new view change (to prevent wedding/santa attacks.
+ clif_changelook(&sd->bl,LOOK_BASE,new_look);
+ if (sd->vd.cloth_color)
+ clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
+ clif_skillinfoblock(sd); // Skill list needs to be updated after base change.
+
return 0;
}
diff --git a/src/map/script.c b/src/map/script.c
index 81cb2933c..a414de4ca 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8636,6 +8636,7 @@ BUILDIN_FUNC(changebase)
clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
if (sd->vd.cloth_color)
clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
+ clif_skillinfoblock(sd);
}
return 0;
diff --git a/src/map/status.c b/src/map/status.c
index 7839330e4..a71164736 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6326,6 +6326,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
clif_changelook(bl,LOOK_CLOTHES_COLOR,vd->cloth_color);
clif_changelook(bl,LOOK_WEAPON,vd->weapon);
clif_changelook(bl,LOOK_SHIELD,vd->shield);
+ if(sd) clif_skillinfoblock(sd);
break;
case SC_RUN:
{