diff options
-rw-r--r-- | src/char/char.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 4 | ||||
-rw-r--r-- | src/map/status.c | 44 | ||||
-rw-r--r-- | src/map/unit.c | 2 |
4 files changed, 36 insertions, 18 deletions
diff --git a/src/char/char.c b/src/char/char.c index 234a91b79..0003e590f 100644 --- a/src/char/char.c +++ b/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 ) { diff --git a/src/map/skill.c b/src/map/skill.c index 82b502420..e19326bad 100644 --- a/src/map/skill.c +++ b/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 diff --git a/src/map/status.c b/src/map/status.c index a9c3790d5..4a3a6b0d8 100644 --- a/src/map/status.c +++ b/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: diff --git a/src/map/unit.c b/src/map/unit.c index 4827c0c68..51da8ef24 100644 --- a/src/map/unit.c +++ b/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: |