summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--db/item_db.txt4
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/script.c4
-rw-r--r--src/map/status.c12
6 files changed, 7 insertions, 20 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9e1957bc8..d4031f351 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ 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.
2006/04/26
+ * Modified how changebase script command works, the change caused by it is
+ permanent (at least until logout). Updated the Tuxedo and Wedding dress to
+ use onequip/onunequip scripts to change the look. [Skotlex]
* Changed the skill_wall_check to use shoot-path seeking. May fix
skill_wall_check setting. [Skotlex]
* Fixed typo in skill.c: skill_clear_group [Lance]
diff --git a/db/item_db.txt b/db/item_db.txt
index bfbacb66b..85e0f2d12 100644
--- a/db/item_db.txt
+++ b/db/item_db.txt
@@ -996,7 +996,7 @@
2335,Thief_Clothes,Thief Clothes,5,74000,,100,,6,,0,0x02021040,7,2,16,,0,1,0,{ bonus bAgi,1; },{},{}
2336,Thief_Clothes_,Thief Clothes,5,74000,,100,,6,,1,0x00021040,7,2,16,,0,1,0,{ bonus bAgi,1; },{},{}
2337,Ninja_Suit,Ninja Suit,5,,10,1500,,7,,0,0x00021040,7,2,16,,50,1,0,{ bonus bAgi,1; bonus bMdef,3; },{},{}
-2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{ bonus bMdef,15; changebase 22; },{},{}
+2338,Wedding_Dress,Wedding Dress,5,43000,,500,,0,,0,0xFFFFFFFE,7,0,16,,0,1,0,{ bonus bMdef,15; },{ changebase Job_Wedding; },{ changebase bClass; }
2339,Pantie,Pantie,5,1000,,100,,4,,0,0xFFFFFFFF,7,2,16,,0,1,0,{},{},{}
2340,Novice_Breastplate,Novice Breastplate,5,89000,,500,,4,,1,0x00000001,7,2,16,,10,1,0,{},{},{}
2341,Legion_Plate_Armor,Legion Plate Armor,5,94000,,5500,,11,,0,0x00004000,7,2,16,,70,1,0,{},{},{}
@@ -1785,7 +1785,7 @@
7167,Strange_Steel_Piece,Strange Steel Piece,3,,215,10,,,,,,,,,,,,,{},{},{}
7168,Giant_Butterfly_Wing,Giant Butterfly Wing,3,,307,10,,,,,,,,,,,,,{},{},{}
7169,Ba_Gua,Ba_Gua,3,,1400,10,,,,,,,,,,,,,{},{},{}
-7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{ changebase 22; },{},{}
+7170,Tuxedo,Tuxedo,5,43000,,10,,0,,0,0xFFFFFFFE,7,1,16,,0,1,0,{},{ changebase Job_Wedding; },{ changebase bClass; }
7171,Leopard_Skin,Leopard Skin,3,,141,10,,,,,,,,,,,,,{},{},{}
7172,Leopard_Claw,Leopard Claw,3,,145,10,,,,,,,,,,,,,{},{},{}
7173,Bun_Buster_Bag,Bun Buster Bag,3,,10,10,,,,,,,,,,,,,{},{},{}
diff --git a/src/map/map.h b/src/map/map.h
index ff1fe27c2..3f0871c8e 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -531,7 +531,6 @@ 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/pc.c b/src/map/pc.c
index 9ba9f9bf0..ae878cd3d 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4874,9 +4874,6 @@ int pc_readparam(struct map_session_data *sd,int type)
val= sd->status.job_level;
break;
case SP_CLASS:
- if(val>=27 && val < 45)
- val+=3978;
- else
val= sd->status.class_;
break;
case SP_BASEJOB: //Base job, extracting upper type.
diff --git a/src/map/script.c b/src/map/script.c
index e708ef2ca..20b761b2d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6348,10 +6348,8 @@ int buildin_changebase(struct script_state *st)
return 0;
}
- if(!sd->disguise && !sd->special_state.changebase) {
+ if(!sd->disguise && vclass != sd->vd.class_)
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 677918669..ba6031c7c 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -593,7 +593,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
{
static int calculating = 0; //Check for recursive call preemption. [Skotlex]
int b_speed,b_max_hp,b_max_sp,b_hp,b_sp,b_weight,b_max_weight,b_paramb[6],b_parame[6],b_hit,b_flee;
- int b_aspd,b_watk,b_def,b_watk2,b_def2,b_flee2,b_critical,b_attackrange,b_matk1,b_matk2,b_mdef,b_mdef2,b_class;
+ int b_aspd,b_watk,b_def,b_watk2,b_def2,b_flee2,b_critical,b_attackrange,b_matk1,b_matk2,b_mdef,b_mdef2;
int b_base_atk;
struct skill b_skill[MAX_SKILL];
int i,bl,index;
@@ -629,9 +629,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
b_mdef = sd->mdef;
b_mdef2 = sd->mdef2;
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); // スキルツリ?の計算
@@ -1600,13 +1597,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
return 0;
}
- if(b_class != sd->vd.class_) {
- clif_changelook(&sd->bl,LOOK_BASE,sd->vd.class_);
- clif_changelook(&sd->bl,LOOK_WEAPON,sd->vd.weapon);
- clif_changelook(&sd->bl,LOOK_SHIELD,sd->vd.shield);
- clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color);
- }
-
if(memcmp(b_skill,sd->status.skill,sizeof(sd->status.skill)))
clif_skillinfoblock(sd);
if(b_speed != sd->speed)