From 14f6654943b7e060ee5acf2fd24a8b04a68e9e9f Mon Sep 17 00:00:00 2001 From: icxbb-xx Date: Fri, 5 Dec 2014 03:22:39 +0700 Subject: [PATCH] Fixed bugs. - problem fast movement animation when disguised. - devotion behaviour Can't cast on other characters when limit is reached. --- src/map/clif.c | 11 +++++++++-- src/map/unit.c | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 3e0b813ac3..e13d39707f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5075,7 +5075,8 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int type = clif_calc_delay(type,div,damage,ddelay); #if PACKETVER >= 20131223 - if( type == 6 ) type = 8; + if ( type == DMG_SKILL ) + type = DMG_MULTI_HIT; /* Temporary Fix */ #endif if( ( sc = status_get_sc(dst) ) && sc->count ) { @@ -17022,7 +17023,13 @@ void clif_snap( struct block_list *bl, short x, short y ) { WBUFW(buf,6) = x; WBUFW(buf,8) = y; - clif_send(buf,packet_len(0x8d2),bl,AREA); + if( disguised(bl) ) + { + clif_send(buf, packet_len(0x8d2), bl, AREA_WOS); + WBUFL(buf,2) = -bl->id; + clif_send(buf, packet_len(0x8d2), bl, SELF); + } else + clif_send(buf,packet_len(0x8d2),bl, AREA); } void clif_monster_hp_bar( struct mob_data* md, int fd ) { diff --git a/src/map/unit.c b/src/map/unit.c index 28b5f701ce..df7f75cfce 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1748,6 +1748,19 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui casttime = -1; combo = 1; break; + case CR_DEVOTION: + if (sd) { + int i = 0, count = min(skill_lv, MAX_DEVOTION); + ARR_FIND(0, count, i, sd->devotion[i] == target_id); + if (i == count) { + ARR_FIND(0, count, i, sd->devotion[i] == 0); + if(i == count) { + clif_skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0); + return 0; // Can't cast on other characters when limit is reached + } + } + } + break; case SR_GATEOFHELL: case SR_TIGERCANNON: if (sc && sc->data[SC_COMBO] &&