Explorar o código

Corrected change r10051 which prevented Ice Pick from working

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10063 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage %!s(int64=18) %!d(string=hai) anos
pai
achega
fdcca7192a
Modificáronse 3 ficheiros con 12 adicións e 9 borrados
  1. 4 0
      Changelog-Trunk.txt
  2. 6 6
      src/map/map.h
  3. 2 3
      src/map/status.c

+ 4 - 0
Changelog-Trunk.txt

@@ -3,6 +3,10 @@ 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.
 
+2007/03/24
+	* Corrected change r10051 which prevented Ice Pick from working [ultramage]
+	- the 'ignore_' variables are bitflags and therefore need enough bits
+	  to store all info; 8 bits wasn't enough in this case
 2007/03/23
 	* Major reconfiguration of the vs7 project files (+vs8 while I was at it)
 	- added definitions _DEBUG and NDEBUG to tune system-specific stuff

+ 6 - 6
src/map/map.h

@@ -441,15 +441,15 @@ struct weapon_data {
 	//  in status_calc_pc as well! All the following are automatically zero'ed. [Skotlex]
 	int overrefine;
 	int star;
+	int ignore_def_ele;
+	int ignore_def_race;
+	int def_ratio_atk_ele;
+	int def_ratio_atk_race;
 	int addele[ELE_MAX];
 	int addrace[RC_MAX];
 	int addrace2[RC_MAX];
 	int addsize[3];
 
-	unsigned char ignore_def_ele;
-	unsigned char ignore_def_race;
-	unsigned char def_ratio_atk_ele;
-	unsigned char def_ratio_atk_race;
 	struct drain_data {
 		short rate;
 		short per;
@@ -723,6 +723,8 @@ struct map_session_data {
 	int critical_def,double_rate;
 	int long_attack_atk_rate; //Long range atk rate, not weapon based. [Skotlex]
 	int near_attack_def_rate,long_attack_def_rate,magic_def_rate,misc_def_rate;
+	int ignore_mdef_ele;
+	int ignore_mdef_race;
 	int perfect_hit;
 	int perfect_hit_add;
 	int get_zeny_rate;
@@ -754,8 +756,6 @@ struct map_session_data {
 	short add_def_count,add_mdef_count;
 	short add_dmg_count,add_mdmg_count;
 
-	unsigned char ignore_mdef_ele;
-	unsigned char ignore_mdef_race;
 	// zeroed vars end here.
 
 	int castrate,delayrate,hprate,sprate,dsprate;

+ 2 - 3
src/map/status.c

@@ -1673,6 +1673,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
 		+ sizeof(sd->long_attack_def_rate)
 		+ sizeof(sd->magic_def_rate)
 		+ sizeof(sd->misc_def_rate)
+		+ sizeof(sd->ignore_mdef_ele)
+		+ sizeof(sd->ignore_mdef_race)
 		+ sizeof(sd->perfect_hit)
 		+ sizeof(sd->perfect_hit_add)
 		+ sizeof(sd->get_zeny_rate)
@@ -1712,9 +1714,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
 		+ sizeof(sd->add_mdef_count)
 		+ sizeof(sd->add_dmg_count)
 		+ sizeof(sd->add_mdmg_count)
-		// chars
-		+ sizeof(sd->ignore_mdef_ele)
-		+ sizeof(sd->ignore_mdef_race)
 		);
 
 	// Parse equipment.