Przeglądaj źródła

* Removed DEF reduction display when casting GrandCross.
- This might not be official and led to repeated calculation.

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

Inkfish 16 lat temu
rodzic
commit
acdd90f4aa
3 zmienionych plików z 9 dodań i 29 usunięć
  1. 0 3
      src/map/skill.c
  2. 0 7
      src/map/status.c
  3. 9 19
      src/map/unit.c

+ 0 - 3
src/map/skill.c

@@ -5576,9 +5576,6 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
 		}
 
 		ud->skilltimer = INVALID_TIMER;
-
-		if( sd && (ud->skillid == CR_GRANDCROSS || ud->skillid == NPC_GRANDDARKNESS) )
-			status_calc_bl(&sd->bl, SCB_DEF); // restore original DEF
 	}
 
 	if (ud->skilltarget == id)

+ 0 - 7
src/map/status.c

@@ -3685,13 +3685,6 @@ static signed short status_calc_flee2(struct block_list *bl, struct status_chang
 
 static signed char status_calc_def(struct block_list *bl, struct status_change *sc, int def)
 {
-	if( bl->type == BL_PC )
-	{
-		struct unit_data *ud = unit_bl2ud( bl);
-		if( ud && ud->skilltimer != INVALID_TIMER && (ud->skillid == CR_GRANDCROSS || ud->skillid == NPC_GRANDDARKNESS) )
-			def = def*2/3;
-	}
-
 	if(!sc || !sc->count)
 		return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
 

+ 9 - 19
src/map/unit.c

@@ -1072,7 +1072,15 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
 	ud->canact_tick  = tick + casttime + 100;
 	if ( battle_config.display_status_timers && sd )
 		clif_status_change(src, SI_ACTIONDELAY, 1, casttime);
-
+	if( sd )
+	{
+		switch( skill_num )
+		{
+		case CG_ARROWVULCAN:
+			sd->canequip_tick = tick + casttime;
+			break;
+		}
+	}
 	ud->skilltarget  = target_id;
 	ud->skillx       = 0;
 	ud->skilly       = 0;
@@ -1092,20 +1100,6 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
 			status_calc_bl(&sd->bl, SCB_SPEED);
 		else
 			unit_stop_walking(src,1);
-
-		if( sd )
-		{
-			switch( skill_num )
-			{
-			case CG_ARROWVULCAN:
-				sd->canequip_tick = tick + casttime;
-				break;
-			case CR_GRANDCROSS:
-			case NPC_GRANDDARKNESS:
-				status_calc_bl(src, SCB_DEF);
-				break;
-			}
-		}
 	}
 	else
 		skill_castend_id(ud->skilltimer,tick,src->id,0);
@@ -1646,10 +1640,6 @@ int unit_skillcastcancel(struct block_list *bl,int type)
 		case CG_ARROWVULCAN:
 			sd->canequip_tick = tick;
 			break;
-		case CR_GRANDCROSS:
-		case NPC_GRANDDARKNESS:
-			status_calc_bl(bl, SCB_DEF);
-			break;
 		}
 	}