浏览代码

- Removed useless mapname compares (since r570) and fixed the strncmp for malangdo/malaya (r15388). [thanks lighta]
- Follow up to r16322 so the comment "only modifier is halved but still benefit with the damage bonus" is actually true. Thanks lighta!

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

brianluau 12 年之前
父节点
当前提交
e55279cabe
共有 2 个文件被更改,包括 8 次插入11 次删除
  1. 4 6
      src/map/atcommand.c
  2. 4 5
      src/map/battle.c

+ 4 - 6
src/map/atcommand.c

@@ -2085,11 +2085,9 @@ ACMD_FUNC(go)
 	           strncmp(map_name, "prison", 3) == 0 ||
 	           strncmp(map_name, "prison", 3) == 0 ||
 	           strncmp(map_name, "jails", 3) == 0) {
 	           strncmp(map_name, "jails", 3) == 0) {
 		town = 16;
 		town = 16;
-	} else if (strncmp(map_name, "jawaii", 3) == 0 ||
-	           strncmp(map_name, "jawai", 3) == 0) {
+	} else if (strncmp(map_name, "jawaii", 3) == 0) {
 		town = 17;
 		town = 17;
-	} else if (strncmp(map_name, "ayothaya", 3) == 0 ||
-	           strncmp(map_name, "ayotaya", 3) == 0) {
+	} else if (strncmp(map_name, "ayothaya", 3) == 0) {
 		town = 18;
 		town = 18;
 	} else if (strncmp(map_name, "einbroch", 5) == 0 ||
 	} else if (strncmp(map_name, "einbroch", 5) == 0 ||
 	           strncmp(map_name, "ainbroch", 5) == 0) {
 	           strncmp(map_name, "ainbroch", 5) == 0) {
@@ -2120,9 +2118,9 @@ ACMD_FUNC(go)
 		town = 31;
 		town = 31;
 	} else if (strncmp(map_name, "dewata", 3) == 0) {
 	} else if (strncmp(map_name, "dewata", 3) == 0) {
 		town = 32;
 		town = 32;
-	} else if (strncmp(map_name, "malangdo", 3) == 0) {
+	} else if (strncmp(map_name, "malangdo", 5) == 0) {
 		town = 33;
 		town = 33;
-	} else if (strncmp(map_name, "malaya", 3) == 0) {
+	} else if (strncmp(map_name, "malaya", 5) == 0) {
 		town = 34;
 		town = 34;
 	} else if (strncmp(map_name, "eclage", 3) == 0) {
 	} else if (strncmp(map_name, "eclage", 3) == 0) {
 		town = 35;
 		town = 35;

+ 4 - 5
src/map/battle.c

@@ -2630,7 +2630,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 			// FIX ME: Should Rolling Cutter be affected by EDP?
 			// FIX ME: Should Rolling Cutter be affected by EDP?
 				switch(skill_num){
 				switch(skill_num){
 					case AS_SPLASHER:       case AS_VENOMKNIFE:
 					case AS_SPLASHER:       case AS_VENOMKNIFE:
-					case AS_GRIMTOOTH:	case GC_ROLLINGCUTTER:
+					case AS_GRIMTOOTH:      case GC_ROLLINGCUTTER:
 					break;
 					break;
 #ifndef RENEWAL_EDP
 #ifndef RENEWAL_EDP
 					case ASC_BREAKER:       case ASC_METEORASSAULT: break;
 					case ASC_BREAKER:       case ASC_METEORASSAULT: break;
@@ -2640,10 +2640,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
 					case GC_COUNTERSLASH:
 					case GC_COUNTERSLASH:
 					case GC_CROSSIMPACT:
 					case GC_CROSSIMPACT:
 						ATK_RATE(50); // only modifier is halved but still benefit with the damage bonus
 						ATK_RATE(50); // only modifier is halved but still benefit with the damage bonus
-						break;
 #endif
 #endif
 					default:
 					default:
-						ATK_ADDRATE(sc->data[SC_EDP]->val3); 
+						ATK_ADDRATE(sc->data[SC_EDP]->val3);
 				}
 				}
 			}
 			}
 		}
 		}
@@ -5060,7 +5059,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 						state |= BCT_ENEMY;
 						state |= BCT_ENEMY;
 						strip_enemy = 0;
 						strip_enemy = 0;
 						break;
 						break;
-					default:						
+					default:
 						if(su->group->skill_id == WM_REVERBERATION || su->group->skill_id == WM_POEMOFNETHERWORLD){
 						if(su->group->skill_id == WM_REVERBERATION || su->group->skill_id == WM_POEMOFNETHERWORLD){
 							state |= BCT_ENEMY;
 							state |= BCT_ENEMY;
 							strip_enemy = 0;
 							strip_enemy = 0;
@@ -5078,7 +5077,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
 		//Valid targets with no special checks here.
 		//Valid targets with no special checks here.
 		case BL_MER:
 		case BL_MER:
 		case BL_HOM:
 		case BL_HOM:
-		case BL_ELEM:			
+		case BL_ELEM:
 			break;
 			break;
 		//All else not specified is an invalid target.
 		//All else not specified is an invalid target.
 		default:
 		default: