summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-12 02:55:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-12 02:55:39 +0000
commit1181f3ea7d249ef2e1d6571e803940a95d03ffa0 (patch)
tree497f175d88f4e28bbfdab33704240863cbb84fd2
parent0fff381fcb3cf402f579b4dd62d15f3e6323f014 (diff)
downloadhercules-1181f3ea7d249ef2e1d6571e803940a95d03ffa0.tar.gz
hercules-1181f3ea7d249ef2e1d6571e803940a95d03ffa0.tar.bz2
hercules-1181f3ea7d249ef2e1d6571e803940a95d03ffa0.tar.xz
hercules-1181f3ea7d249ef2e1d6571e803940a95d03ffa0.zip
- Added special_state changebase to identify when a character has a special-view associated with some equipment to correctly revert the look when you take off said equipment (fixes tuxedo/wedding dress when you use modify_wedding_display: yes)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6002 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/script.c5
-rw-r--r--src/map/status.c6
4 files changed, 12 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1e1138de7..2d34210be 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/04/11
+ * Added special_state changebase to identify when a character has a
+ special-view associated with some equipment to correctly revert the look
+ when you take off said equipment (fixes tuxedo/wedding dress when you use
+ modify_wedding_display: yes) [Skotlex]
* Removed the piece of code that "guesses" that job classes between 24 and
68 are advanced classes from mob_avail reading since they conflict with
NJ/GS. Use the correct class numbers from now on! [Skotlex]
diff --git a/src/map/map.h b/src/map/map.h
index 603d21701..0fa350f8b 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -507,6 +507,7 @@ struct map_session_data {
unsigned no_gemstone : 1;
unsigned infinite_endure : 1;
unsigned intravision : 1; // Maya Purple Card effect allowing to see Hiding/Cloaking people [DracoRPG]
+ unsigned changebase : 1; //Specifies when you are wearing a change-base piece of equipment.
} special_state;
int char_id, login_id1, login_id2, sex;
unsigned short class_; //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
diff --git a/src/map/script.c b/src/map/script.c
index 706408af4..66e77d9c8 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6335,9 +6335,10 @@ int buildin_changebase(struct script_state *st)
return 0;
}
- //If you are already using a special view (disguises?) prevent overriding it. [Skotlex]
- if (sd->vd.class_ == sd->status.class_)
+ if(!sd->disguise && !sd->special_state.changebase) {
status_set_viewdata(&sd->bl, vclass);
+ sd->special_state.changebase =1; //Character on suit.
+ }
return 0;
}
diff --git a/src/map/status.c b/src/map/status.c
index 7555a25aa..9b7ed47f0 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -627,9 +627,11 @@ int status_calc_pc(struct map_session_data* sd,int first)
b_matk2 = sd->matk2;
b_mdef = sd->mdef;
b_mdef2 = sd->mdef2;
- b_class = sd->vd.class_;
b_base_atk = sd->base_atk;
-
+ b_class = sd->vd.class_;
+ if (sd->special_state.changebase) //Clear suit. (if equipment is still on, vd.class_ will revert back to b_class's value)
+ sd->vd.class_ = sd->status.class_;
+
pc_calc_skilltree(sd); // スキルツリ?の計算
sd->max_weight = max_weight_base[sd->status.class_]+sd->status.str*300;