Bläddra i källkod

- Changed some numbers for their respective constants in battle.c

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8901 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 år sedan
förälder
incheckning
db1a23187d
1 ändrade filer med 6 tillägg och 6 borttagningar
  1. 6 6
      src/map/battle.c

+ 6 - 6
src/map/battle.c

@@ -1168,11 +1168,11 @@ static struct Damage battle_calc_weapon_attack(
 				break;
 			case LK_SPIRALPIERCE:
 				if (sd) {
-					short index = sd->equip_index[9];
+					short index = sd->equip_index[EQI_HAND_R];
 
 					if (index >= 0 &&
 						sd->inventory_data[index] &&
-						sd->inventory_data[index]->type == 4)
+						sd->inventory_data[index]->type == IT_WEAPON)
 						wd.damage = sd->inventory_data[index]->weight*8/100; //80% of weight
 					
 					ATK_ADDRATE(50*skill_lv); //Skill modifier applies to weight only.
@@ -1194,13 +1194,13 @@ static struct Damage battle_calc_weapon_attack(
 			case CR_SHIELDBOOMERANG:
 			case PA_SHIELDCHAIN:
 				if (sd) {
-					short index = sd->equip_index[8];
+					short index = sd->equip_index[EQI_HAND_L];
 					
 					wd.damage = sstatus->batk;
 
 					if (index >= 0 &&
 						sd->inventory_data[index] &&
-						sd->inventory_data[index]->type == 5)
+						sd->inventory_data[index]->type == IT_ARMOR)
 						ATK_ADD(sd->inventory_data[index]->weight/10);
 					break;
 				}
@@ -1896,10 +1896,10 @@ static struct Damage battle_calc_weapon_attack(
 		}
 		
 		if (skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN) { //Refine bonus applies after cards and elements.
-			short index= sd->equip_index[8];
+			short index= sd->equip_index[EQI_HAND_L];
 			if (index >= 0 &&
 				sd->inventory_data[index] &&
-				sd->inventory_data[index]->type == 5)
+				sd->inventory_data[index]->type == IT_ARMOR)
 				ATK_ADD(10*sd->status.inventory[index].refine);
 		}
 	} //if (sd)