소스 검색

Added Wildcard's fix for @hide gms on @pvp'd pvp maps

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

+ 11 - 15
src/map/atcommand.c

@@ -896,14 +896,12 @@ ACMD_FUNC(hide)
 			status_set_viewdata(&sd->bl, sd->status.class_);
 		clif_displaymessage(fd, msg_txt(10)); // Invisible: Off
 
-		if( map[sd->bl.m].flag.pvp )
-		{// increment the number of pvp players on the map
-			map[sd->bl.m].users_pvp++;
+		// increment the number of pvp players on the map
+		map[sd->bl.m].users_pvp++;
 
-			if( !map[sd->bl.m].flag.pvp_nocalcrank )
-			{// register the player for ranking calculations
-				sd->pvp_timer = add_timer( gettick() + 200, pc_calc_pvprank_timer, sd->bl.id, 0 );
-			}
+		if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank )
+		{// register the player for ranking calculations
+			sd->pvp_timer = add_timer( gettick() + 200, pc_calc_pvprank_timer, sd->bl.id, 0 );
 		}
 		//bugreport:2266
 		map_foreachinmovearea(clif_insight, &sd->bl, AREA_SIZE, sd->bl.x, sd->bl.y, BL_ALL, &sd->bl);
@@ -912,15 +910,13 @@ ACMD_FUNC(hide)
 		sd->vd.class_ = INVISIBLE_CLASS;
 		clif_displaymessage(fd, msg_txt(11)); // Invisible: On
 
-		if( map[sd->bl.m].flag.pvp )
-		{// decrement the number of pvp players on the map
-			map[sd->bl.m].users_pvp--;
+		// decrement the number of pvp players on the map
+		map[sd->bl.m].users_pvp--;
 
-			if( !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER )
-			{// unregister the player for ranking
-				delete_timer( sd->pvp_timer, pc_calc_pvprank_timer );
-				sd->pvp_timer = INVALID_TIMER;
-			}
+		if( map[sd->bl.m].flag.pvp && !map[sd->bl.m].flag.pvp_nocalcrank && sd->pvp_timer != INVALID_TIMER )
+		{// unregister the player for ranking
+			delete_timer( sd->pvp_timer, pc_calc_pvprank_timer );
+			sd->pvp_timer = INVALID_TIMER;
 		}
 	}
 	clif_changeoption(&sd->bl);