Bläddra i källkod

- Fixed status_damage not setting your HP to 0 when you died T.T
- Fixed the pcbonus2 warnings using the wrong value before printing the invalid Element error.


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

skotlex 19 år sedan
förälder
incheckning
d90347c73e
3 ändrade filer med 12 tillägg och 8 borttagningar
  1. 3 0
      Changelog-Trunk.txt
  2. 8 8
      src/map/pc.c
  3. 1 0
      src/map/status.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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/05/30
+	* Fixed status_damage not setting your HP to 0 when you died [Skotlex]
+	* Fixed the pcbonus2 warnings using the wrong value before printing the
+	  invalid Element error. [Skotlex]
 	* Fixed underflow issues when calculating dmotion. [Skotlex]
 	* Fixed Absorb Spirit Spheres [Skotlex]
 	* Added battle_config min_chat_delay (default 0, battle/client.conf)

+ 8 - 8
src/map/pc.c

@@ -1660,9 +1660,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
 
 	switch(type){
 	case SP_ADDELE:
-		if(val >= ELE_MAX) {
+		if(type2 >= ELE_MAX) {
 			if(battle_config.error_log)
-				ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", val);
+				ShowError("pc_bonus2: SP_ADDELE: Invalid element %d\n", type2);
 			break;
 		}
 		if(!sd->state.lr_flag)
@@ -1689,9 +1689,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
 			sd->arrow_addsize[type2]+=val;
 		break;
 	case SP_SUBELE:
-		if(val >= ELE_MAX) {
+		if(type2 >= ELE_MAX) {
 			if(battle_config.error_log)
-				ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", val);
+				ShowError("pc_bonus2: SP_SUBELE: Invalid element %d\n", type2);
 			break;
 		}
 		if(sd->state.lr_flag != 2)
@@ -1730,9 +1730,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
 			sd->reseff[type2-SC_COMMON_MIN]+=val;
 		break;
 	case SP_MAGIC_ADDELE:
-		if(val >= ELE_MAX) {
+		if(type2 >= ELE_MAX) {
 			if(battle_config.error_log)
-				ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", val);
+				ShowError("pc_bonus2: SP_MAGIC_ADDELE: Invalid element %d\n", type2);
 			break;
 		}
 		if(sd->state.lr_flag != 2)
@@ -1896,9 +1896,9 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
 		}
 		break;
 	case SP_WEAPON_COMA_ELE:
-		if(val >= ELE_MAX) {
+		if(type2 >= ELE_MAX) {
 			if(battle_config.error_log)
-				ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", val);
+				ShowError("pc_bonus2: SP_WEAPON_COMA_ELE: Invalid element %d\n", type2);
 			break;
 		}
 		if(sd->state.lr_flag != 2)

+ 1 - 0
src/map/status.c

@@ -625,6 +625,7 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
 		return hp+sp;
   
 	//Normal death
+	status->hp = 0;
 	if (battle_config.clear_unit_ondeath &&
 		battle_config.clear_unit_ondeath&target->type)
 		skill_clear_unitgroup(target);