소스 검색

Fixed Katar critical boost on status window (would work; but not change the value in the window), bugreport:3053

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15267 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 년 전
부모
커밋
8578dd1723
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/map/clif.c
  2. 5 0
      src/map/pc.c

+ 2 - 0
src/map/clif.c

@@ -2587,6 +2587,8 @@ 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;

+ 5 - 0
src/map/pc.c

@@ -7354,6 +7354,8 @@ 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) {
@@ -7495,9 +7497,12 @@ 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;