Sfoglia il codice sorgente

- Re-committed r16979/trunk/src/ (pid:161281).
- Re-committed r16980/trunk/src/ (pid:161281).
- Malufett's enhancement applied (r16981)

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

markzd 12 anni fa
parent
commit
ed8f0515ef
4 ha cambiato i file con 36 aggiunte e 18 eliminazioni
  1. 1 3
      src/char/char.c
  2. 2 2
      src/map/skill.c
  3. 32 12
      src/map/status.c
  4. 1 1
      src/map/unit.c

+ 1 - 3
src/char/char.c

@@ -1486,9 +1486,7 @@ int make_new_char_sql(struct char_session_data* sd, char* name_, int str, int ag
 	|| (str + int_ != 10 || agi + luk != 10 || vit + dex != 10) ) // pairs
 #endif
 		return -2; // invalid input
-		
-	if (hair_style > 17 || hair_color > 8)
-		return -2;
+
 
 	// check the number of already existing chars in this account
 	if( char_per_account != 0 ) {

+ 2 - 2
src/map/skill.c

@@ -7433,7 +7433,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 			clif_skill_nodamage(src,bl,skillid,skilllv,
 				sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 			status_heal(bl,heal,0,1);
-			status_change_clear_buffs(bl,2);
+			status_change_clear_buffs(bl,4);
 		}
 		break;
 
@@ -11480,7 +11480,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
 						status_heal(bl,heal,0,0);
 						break;
 					case 1: // End all negative status
-						status_change_clear_buffs(bl,2);
+						status_change_clear_buffs(bl,6);
 						if (tsd) clif_gospel_info(tsd, 0x15);
 						break;
 					case 2: // Immunity to all status

+ 32 - 12
src/map/status.c

@@ -6346,8 +6346,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 		case SC_DEATHHURT:
 		case SC_PYREXIA:
 		case SC_OBLIVIONCURSE:
-		//case SC_LEECHESEND://Need confirm. If it protects against nearly every Guillotine poison, it should work on this too right? [Rytech]
-		case SC_CRYSTALIZE:
+		case SC_LEECHESEND:
+		case SC_CRYSTALIZE: ////08/31/2011 - Class Balance Changes
 		case SC_DEEPSLEEP:
 		case SC_MANDRAGORA:
 			return 0;
@@ -8551,8 +8551,8 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
 		case SC_STONE:  sc->opt1 = OPT1_STONEWAIT; break;
 		case SC_FREEZE: sc->opt1 = OPT1_FREEZE;    break;
 		case SC_STUN:   sc->opt1 = OPT1_STUN;      break;
-		case SC_SLEEP:
-		case SC_DEEPSLEEP:    opt_flag = 0;   sc->opt1 = OPT1_SLEEP;		break;
+		case SC_DEEPSLEEP:    opt_flag = 0;
+		case SC_SLEEP:   sc->opt1 = OPT1_SLEEP;		break;
 		case SC_BURNING:		sc->opt1 = OPT1_BURNING;	break; // Burning need this to be showed correctly. [pakpil]
 		case SC_WHITEIMPRISON:  sc->opt1 = OPT1_IMPRISON;	break;
 		case SC_CRYSTALIZE:		sc->opt1 = OPT1_CRYSTALIZE;	break;
@@ -10553,6 +10553,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
 /*==========================================
  * Clears buffs/debuffs of a character.
  * type&1 -> buffs, type&2 -> debuffs
+ * type&4 -> especific debuffs(implemented with refresh) 
  *------------------------------------------*/
 int status_change_clear_buffs (struct block_list* bl, int type)
 {
@@ -10562,11 +10563,14 @@ int status_change_clear_buffs (struct block_list* bl, int type)
 	if (!sc || !sc->count)
 		return 0;
 
-	if (type&2) //Debuffs
-	for( i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++ )
-	{
-		status_change_end(bl, (sc_type)i, INVALID_TIMER);
-	}
+
+    if (type&6) //Debuffs
+        for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
+            status_change_end(bl, (sc_type)i, INVALID_TIMER);
+
+    for (i = SC_COMMON_MAX+1; i < SC_MAX; i++) {
+        if (!sc->data[i])
+            continue;
 
 	for( i = SC_COMMON_MAX+1; i < SC_MAX; i++ )
 	{
@@ -10628,7 +10632,24 @@ int status_change_clear_buffs (struct block_list* bl, int type)
 			case SC_CURSEDCIRCLE_TARGET:
 				continue;
 
-			//Debuffs that can be removed.
+		 //Debuffs that can be removed.
+			case SC_DEEPSLEEP:
+			case SC_BURNING:
+			case SC_FREEZING:
+			case SC_CRYSTALIZE:
+			case SC_TOXIN:
+			case SC_PARALYSE:
+			case SC_VENOMBLEED:
+			case SC_MAGICMUSHROOM:
+			case SC_DEATHHURT:
+			case SC_PYREXIA:
+			case SC_OBLIVIONCURSE:
+			case SC_LEECHESEND:
+			case SC_MARSHOFABYSS:
+			case SC_MANDRAGORA:
+				if(!(type&4))
+					continue;
+				break;
 			case SC_HALLUCINATION:
 			case SC_QUAGMIRE:
 			case SC_SIGNUMCRUCIS:
@@ -10645,14 +10666,13 @@ int status_change_clear_buffs (struct block_list* bl, int type)
 			case SC_BITE:
 			case SC_ADORAMUS:
 			case SC_VACUUM_EXTREME:
-			case SC_BURNING:
 			case SC_FEAR:
 			case SC_MAGNETICFIELD:
 			case SC_NETHERWORLD:
 				if (!(type&2))
 					continue;
 				break;
-			//The rest are buffs that can be removed.
+				//The rest are buffs that can be removed.
 			case SC__BLOODYLUST:
 			case SC_BERSERK:
 			case SC_SATURDAYNIGHTFEVER:

+ 1 - 1
src/map/unit.c

@@ -766,7 +766,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,clr_type type)
 		case BL_MOB:
 			if (map[bl->m].flag.monster_noteleport && ((TBL_MOB*)bl)->master_id == 0)
 				return 1;
-			if (m != bl->m && map[m].flag.nobranch && battle_config.mob_warp&4)
+			if (m != bl->m && map[m].flag.nobranch && battle_config.mob_warp&4 && !(((TBL_MOB *)bl)->master_id))
 				return 1;
 			break;
 		case BL_PC: