浏览代码

Follow-up to r14456. Default initialize atk_rate to 0 instead of 100 to match new effect of bonus bAtkRate.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14464 54d463be-8e91-2dee-dedb-b68131a5f0ec
Paradox924X 14 年之前
父节点
当前提交
906945e1da
共有 3 个文件被更改,包括 8 次插入5 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 1 1
      src/map/pc.h
  3. 5 4
      src/map/status.c

+ 2 - 0
Changelog-Trunk.txt

@@ -1,5 +1,7 @@
 Date	Added
 
+2010/11/15
+	* Follow-up to r14456. Default initialize atk_rate to 0 instead of 100 to match new effect of bonus bAtkRate. [Paradox924X]
 2010/11/14
 	* Rev. 14463 Updated quest_read_db. [L0ne_W0lf]
 	- Reports entries when read by server at start up like other DBs.

+ 1 - 1
src/map/pc.h

@@ -270,6 +270,7 @@ struct map_session_data {
 	struct s_autobonus autobonus[MAX_PC_BONUS], autobonus2[MAX_PC_BONUS], autobonus3[MAX_PC_BONUS]; //Auto script on attack, when attacked, on skill usage
 	// manually zeroed structures end here.
 	// zeroed vars start here.
+	int atk_rate;
 	int arrow_atk,arrow_ele,arrow_cri,arrow_hit;
 	int nsshealhp,nsshealsp;
 	int critical_def,double_rate;
@@ -304,7 +305,6 @@ struct map_session_data {
 	// zeroed vars end here.
 
 	int castrate,delayrate,hprate,sprate,dsprate;
-	int atk_rate;
 	int hprecov_rate,sprecov_rate;
 	int matk_rate;
 	int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;

+ 5 - 4
src/map/status.c

@@ -1721,13 +1721,13 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
 	sd->dsprate=100;
 	sd->hprecov_rate = 100;
 	sd->sprecov_rate = 100;
-	sd->atk_rate = sd->matk_rate = 100;
+	sd->matk_rate = 100;
 	sd->critical_rate = sd->hit_rate = sd->flee_rate = sd->flee2_rate = 100;
 	sd->def_rate = sd->def2_rate = sd->mdef_rate = sd->mdef2_rate = 100;
 	sd->regen.state.block = 0;
 
-	// zeroed arrays, order follows the order in map.h.
-	// add new arrays to the end of zeroed area in map.h (see comments) and size here. [zzo]
+	// zeroed arrays, order follows the order in pc.h.
+	// add new arrays to the end of zeroed area in pc.h (see comments) and size here. [zzo]
 	memset (sd->param_bonus, 0, sizeof(sd->param_bonus)
 		+ sizeof(sd->param_equip)
 		+ sizeof(sd->subele)
@@ -1805,7 +1805,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
 	);
 	
 	// vars zeroing. ints, shorts, chars. in that order.
-	memset (&sd->arrow_atk, 0,sizeof(sd->arrow_atk)
+	memset (&sd->atk_rate, 0,sizeof(sd->atk_rate)
+		+ sizeof(sd->arrow_atk)
 		+ sizeof(sd->arrow_ele)
 		+ sizeof(sd->arrow_cri)
 		+ sizeof(sd->arrow_hit)