From e6183e5b3d7461425ef5f529c3d757952b659652 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 20 Jul 2006 18:03:18 +0000 Subject: - Added a skill_unit_db entry for NJ_HYOUSYOURAKU, thanks to Eus for the data. - Added the dummy intravision case for the changeoption packet 0x229 - Corrected Fog of Wall so that all targetted offensive skills (not only those who do damage) will fail on cast-end 75% of the time. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7773 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 13 ++++++++----- src/map/skill.c | 23 ++++++++++++----------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'src/map') diff --git a/src/map/clif.c b/src/map/clif.c index 2d925bfdc..9e29301d8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -342,17 +342,20 @@ int clif_send_sub(struct block_list *bl, va_list ap) { //option̏C switch(((unsigned short*)buf)[0]) { - case 0x119: - WFIFOW(sd->fd,10) &= ~(OPTION_HIDE|OPTION_CLOAK); - break; #if PACKETVER > 6 - case 0x22c: - case 0x22b: + case 0x229: + WFIFOL(sd->fd,10) &= ~(OPTION_HIDE|OPTION_CLOAK); + break; case 0x22a: + case 0x22b: + case 0x22c: WFIFOL(sd->fd,12) &=~(OPTION_HIDE|OPTION_CLOAK); break; #endif #if PACKETVER > 3 + case 0x119: + WFIFOW(sd->fd,10) &= ~(OPTION_HIDE|OPTION_CLOAK); + break; case 0x1d8: case 0x1d9: case 0x1da: diff --git a/src/map/skill.c b/src/map/skill.c index 9f874ed1e..e8a80fd0f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2623,15 +2623,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int if (status_isdead(bl)) return 1; - if (skillid && skill_get_type(skillid) == BF_MAGIC) - { - sc = status_get_sc(bl); - if (status_isimmune(bl) || ( - sc && sc->count && sc->data[SC_FOGWALL].timer != -1 && rand()%100 < 75) - ) { //GTB/Fogwall makes all targetted skills silently fail. - if (sd) clif_skill_fail(sd,skillid,0,0); - return 1; - } + if (skillid && skill_get_type(skillid) == BF_MAGIC && status_isimmune(bl)) + { //GTB makes all targetted magic fail silently. + if (sd) clif_skill_fail(sd,skillid,0,0); + return 1; } sc = status_get_sc(src); @@ -3202,7 +3197,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int break; case NJ_KOUENKA: case NJ_HYOUSENSOU: - case NJ_HYOUSYOURAKU: case NJ_HUUJIN: skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); break; @@ -3221,7 +3215,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int //case NJ_KIRIKAGE: //case NJ_KOUENKA: //case NJ_HYOUSENSOU: - //case NJ_HYOUSYOURAKU: //case NJ_HUUJIN: //case NJ_KAMAITACHI: case NJ_ISSEN: @@ -5826,6 +5819,14 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) if (inf && battle_check_target(src, target, inf) <= 0) break; + + if(inf&BCT_ENEMY && (sc = status_get_sc(target)) && + sc->count && sc->data[SC_FOGWALL].timer != -1 && + rand()%100 < 75) + { //Fogwall makes all offensive-type targetted skills fail at 75% + if (sd) clif_skill_fail(sd,ud->skillid,0,0); + break; + } } //Avoid doing double checks for instant-cast skills. -- cgit v1.2.3-70-g09d2