소스 검색

- Wedding Dress/Tuxedo now handle view-change using the onequip/onunequip scripts.
- Removed special state changebase and view-change check on status_calc_pc


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6292 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex 19 년 전
부모
커밋
56571363d2
6개의 변경된 파일7개의 추가작업 그리고 20개의 파일을 삭제
  1. 3 0
      Changelog-Trunk.txt
  2. 2 2
      db/item_db.txt
  3. 0 1
      src/map/map.h
  4. 0 3
      src/map/pc.c
  5. 1 3
      src/map/script.c
  6. 1 11
      src/map/status.c

+ 3 - 0
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]

+ 2 - 2
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,,,,,,,,,,,,,{},{},{}

+ 0 - 1
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]

+ 0 - 3
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.

+ 1 - 3
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;
 }

+ 1 - 11
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);	// ƒXƒLƒ‹ƒcƒŠ?‚ÌŒvŽZ
 	
@@ -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)