Sfoglia il codice sorgente

Follow up r15267, changed to standard

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15268 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 anni fa
parent
commit
a4ce4c598d
4 ha cambiato i file con 2 aggiunte e 10 eliminazioni
  1. 0 2
      src/map/battle.c
  2. 0 2
      src/map/clif.c
  3. 0 5
      src/map/pc.c
  4. 2 1
      src/map/status.c

+ 0 - 2
src/map/battle.c

@@ -1240,8 +1240,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 			cri+= sd->critaddrace[tstatus->race];
 			if(flag.arrow)
 				cri += sd->arrow_cri;
-			if(sd->status.weapon == W_KATAR)
-				cri <<=1;
 		}
 		//The official equation is *2, but that only applies when sd's do critical.
 		//Therefore, we use the old value 3 on cases when an sd gets attacked by a mob

+ 0 - 2
src/map/clif.c

@@ -2587,8 +2587,6 @@ int clif_updatestatus(struct map_session_data *sd,int type)
 		break;
 	case SP_CRITICAL:
 		WFIFOL(fd,4)=sd->battle_status.cri/10;
-		if(sd->status.weapon == W_KATAR)
-			WFIFOL(fd,4) <<=1;
 		break;
 	case SP_MATK1:
 		WFIFOL(fd,4)=sd->battle_status.matk_max;

+ 0 - 5
src/map/pc.c

@@ -7354,8 +7354,6 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
 			sd->weapontype1 = 0;
 		pc_calcweapontype(sd);
 		clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
-		if( sd->status.weapon == W_KATAR )
-			clif_updatestatus(sd,SP_CRITICAL);
 	}
 	if(pos & EQP_HAND_L) {
 		if(id) {
@@ -7497,12 +7495,9 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
 		clif_changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
 	}
 	if(sd->status.inventory[n].equip & EQP_HAND_L) {
-		bool kt_flag = ( sd->status.weapon == W_KATAR );
 		sd->status.shield = sd->weapontype2 = 0;
 		pc_calcweapontype(sd);
 		clif_changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
-		if( kt_flag )
-			clif_updatestatus(sd,SP_CRITICAL);
 	}
 	if(sd->status.inventory[n].equip & EQP_HEAD_LOW && pc_checkequip(sd,EQP_COSTUME_HEAD_LOW) == -1 ) {
 		sd->status.head_bottom = 0;

+ 2 - 1
src/map/status.c

@@ -3926,7 +3926,8 @@ static signed short status_calc_critical(struct block_list *bl, struct status_ch
 		critical += critical;
 	if(sc->data[SC_CAMOUFLAGE])
 		critical += 100;
-
+	if( bl->type == BL_PC && ((TBL_PC*)bl)->status.weapon == W_KATAR )
+		critical <<= 1;
 	return (short)cap_value(critical,10,SHRT_MAX);
 }