- Modified clif_skill_nodamage to allow for a NULL source. This is to simplify code related to AL_HEAL/MG_RECOVERY effects where someone shows a healing value, but there's no "caster" in sight (Pitcher skills, Blood Drain, Kaahi)
- Updated Kaahi to use clif_skill_nodamage to display amount healed. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6335 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
ebf3c20d6b
commit
e967ccf396
@ -3,6 +3,12 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
2006/04/27
|
2006/04/27
|
||||||
|
* Modified clif_skill_nodamage to allow for a NULL source. This is to
|
||||||
|
simplify code related to AL_HEAL/MG_RECOVERY effects where someone shows a
|
||||||
|
healing value, but there's no "caster" in sight (Pitcher skills, Blood
|
||||||
|
Drain, Kaahi) [Skotlex]
|
||||||
|
* Updated Kaahi to use clif_skill_nodamage to display amount healed.
|
||||||
|
[Skotlex]
|
||||||
* Added unlocking ud.target on mob_unlocktarget, fixes mobs chasing you
|
* Added unlocking ud.target on mob_unlocktarget, fixes mobs chasing you
|
||||||
around while cloaked. [Skotlex]
|
around while cloaked. [Skotlex]
|
||||||
* Changed the default rate of clone mob skills to 5% modified by
|
* Changed the default rate of clone mob skills to 5% modified by
|
||||||
|
@ -4440,28 +4440,28 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,
|
|||||||
{
|
{
|
||||||
unsigned char buf[32];
|
unsigned char buf[32];
|
||||||
|
|
||||||
nullpo_retr(0, src);
|
|
||||||
nullpo_retr(0, dst);
|
nullpo_retr(0, dst);
|
||||||
|
|
||||||
WBUFW(buf,0)=0x11a;
|
WBUFW(buf,0)=0x11a;
|
||||||
WBUFW(buf,2)=skill_id;
|
WBUFW(buf,2)=skill_id;
|
||||||
WBUFW(buf,4)=(heal > SHRT_MAX)? SHRT_MAX:heal;
|
WBUFW(buf,4)=(heal > SHRT_MAX)? SHRT_MAX:heal;
|
||||||
WBUFL(buf,6)=dst->id;
|
WBUFL(buf,6)=dst->id;
|
||||||
WBUFL(buf,10)=src->id;
|
WBUFL(buf,10)=src?src->id:0;
|
||||||
WBUFB(buf,14)=fail;
|
WBUFB(buf,14)=fail;
|
||||||
clif_send(buf,packet_len_table[0x11a],src,AREA);
|
clif_send(buf,packet_len_table[0x11a],dst,AREA);
|
||||||
|
|
||||||
if(disguised(src)) {
|
|
||||||
WBUFL(buf,10)=-src->id;
|
|
||||||
clif_send(buf,packet_len_table[0x115],src,SELF);
|
|
||||||
}
|
|
||||||
if (disguised(dst)) {
|
if (disguised(dst)) {
|
||||||
WBUFL(buf,6)=-dst->id;
|
WBUFL(buf,6)=-dst->id;
|
||||||
if (disguised(src))
|
|
||||||
WBUFL(buf,10)=src->id;
|
|
||||||
clif_send(buf,packet_len_table[0x115],dst,SELF);
|
clif_send(buf,packet_len_table[0x115],dst,SELF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(src && disguised(src)) {
|
||||||
|
WBUFL(buf,10)=-src->id;
|
||||||
|
if (disguised(dst))
|
||||||
|
WBUFL(buf,6)=dst->id;
|
||||||
|
clif_send(buf,packet_len_table[0x115],src,SELF);
|
||||||
|
}
|
||||||
|
|
||||||
return fail;
|
return fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1021,8 +1021,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
|
|||||||
; //Not enough SP to cast
|
; //Not enough SP to cast
|
||||||
else {
|
else {
|
||||||
battle_heal(bl, bl, 200*tsc->data[SC_KAAHI].val1, -5*tsc->data[SC_KAAHI].val1, 1);
|
battle_heal(bl, bl, 200*tsc->data[SC_KAAHI].val1, -5*tsc->data[SC_KAAHI].val1, 1);
|
||||||
if(dstsd && dstsd->fd)
|
clif_skill_nodamage(NULL,bl,AL_HEAL,200*tsc->data[SC_KAAHI].val1,1);
|
||||||
clif_heal(dstsd->fd,SP_HP,200*tsc->data[SC_KAAHI].val1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2296,17 +2295,12 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
|
|||||||
if(src->prev == NULL)
|
if(src->prev == NULL)
|
||||||
break;
|
break;
|
||||||
if(skl->target_id) {
|
if(skl->target_id) {
|
||||||
struct block_list tbl;
|
|
||||||
target = map_id2bl(skl->target_id);
|
target = map_id2bl(skl->target_id);
|
||||||
if(!target && skl->skill_id == RG_INTIMIDATE) {
|
if(!target && skl->skill_id == RG_INTIMIDATE)
|
||||||
target = &tbl; //Required since it has to warp.
|
target = src; //Required since it has to warp.
|
||||||
target->type = BL_NUL;
|
|
||||||
target->m = src->m;
|
|
||||||
target->prev = target->next = NULL;
|
|
||||||
}
|
|
||||||
if(target == NULL)
|
if(target == NULL)
|
||||||
break;
|
break;
|
||||||
if(target->prev == NULL && skl->skill_id != RG_INTIMIDATE)
|
if(target->prev == NULL)
|
||||||
break;
|
break;
|
||||||
if(src->m != target->m)
|
if(src->m != target->m)
|
||||||
break;
|
break;
|
||||||
@ -2320,7 +2314,7 @@ static int skill_timerskill(int tid, unsigned int tick, int id,int data )
|
|||||||
if (unit_warp(src,-1,-1,-1,3) == 0) {
|
if (unit_warp(src,-1,-1,-1,3) == 0) {
|
||||||
short x,y;
|
short x,y;
|
||||||
map_search_freecell(src, 0, &x, &y, 1, 1, 0);
|
map_search_freecell(src, 0, &x, &y, 1, 1, 0);
|
||||||
if (!status_isdead(target))
|
if (target != src && !status_isdead(target))
|
||||||
unit_warp(target, -1, x, y, 3);
|
unit_warp(target, -1, x, y, 3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2995,13 +2989,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
|
|||||||
int heal = skill_attack( (skillid == NPC_BLOODDRAIN) ? BF_WEAPON : BF_MAGIC,
|
int heal = skill_attack( (skillid == NPC_BLOODDRAIN) ? BF_WEAPON : BF_MAGIC,
|
||||||
src, src, bl, skillid, skilllv, tick, flag);
|
src, src, bl, skillid, skilllv, tick, flag);
|
||||||
if (heal > 0){
|
if (heal > 0){
|
||||||
struct block_list tbl;
|
clif_skill_nodamage(NULL, src, AL_HEAL, heal, 1);
|
||||||
tbl.id = 0;
|
|
||||||
tbl.type = BL_NUL;
|
|
||||||
tbl.m = src->m;
|
|
||||||
tbl.x = src->x;
|
|
||||||
tbl.y = src->y;
|
|
||||||
clif_skill_nodamage(&tbl, src, AL_HEAL, heal, 1);
|
|
||||||
battle_heal(NULL, src, heal, 0, 0);
|
battle_heal(NULL, src, heal, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4502,7 +4490,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
case AM_BERSERKPITCHER:
|
case AM_BERSERKPITCHER:
|
||||||
case AM_POTIONPITCHER: /* ƒ|?ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ? */
|
case AM_POTIONPITCHER: /* ƒ|?ƒVƒ‡ƒ“ƒsƒbƒ`ƒƒ? */
|
||||||
{
|
{
|
||||||
struct block_list tbl;
|
|
||||||
int i,x,hp = 0,sp = 0,bonus=100;
|
int i,x,hp = 0,sp = 0,bonus=100;
|
||||||
if(sd) {
|
if(sd) {
|
||||||
x = skilllv%11 - 1;
|
x = skilllv%11 - 1;
|
||||||
@ -4561,16 +4548,11 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
if(dstsd)
|
if(dstsd)
|
||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
||||||
}
|
}
|
||||||
tbl.id = 0;
|
|
||||||
tbl.type = BL_NUL;
|
|
||||||
tbl.m = src->m;
|
|
||||||
tbl.x = src->x;
|
|
||||||
tbl.y = src->y;
|
|
||||||
clif_skill_nodamage(src,bl,skillid,skilllv,1);
|
clif_skill_nodamage(src,bl,skillid,skilllv,1);
|
||||||
if(hp > 0 || (skillid == AM_POTIONPITCHER && hp <= 0 && sp <= 0))
|
if(hp > 0 || (skillid == AM_POTIONPITCHER && hp <= 0 && sp <= 0))
|
||||||
clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
|
clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
|
||||||
if(sp > 0)
|
if(sp > 0)
|
||||||
clif_skill_nodamage(&tbl,bl,MG_SRECOVERY,sp,1);
|
clif_skill_nodamage(NULL,bl,MG_SRECOVERY,sp,1);
|
||||||
battle_heal(src,bl,hp,sp,0);
|
battle_heal(src,bl,hp,sp,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5200,18 +5182,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
// Slim Pitcher
|
// Slim Pitcher
|
||||||
case CR_SLIMPITCHER:
|
case CR_SLIMPITCHER:
|
||||||
if (potion_hp) {
|
if (potion_hp) {
|
||||||
struct block_list tbl;
|
|
||||||
int hp = potion_hp;
|
int hp = potion_hp;
|
||||||
hp = hp * (100 + (status_get_vit(bl)<<1))/100;
|
hp = hp * (100 + (status_get_vit(bl)<<1))/100;
|
||||||
if (dstsd) {
|
if (dstsd) {
|
||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
|
||||||
}
|
}
|
||||||
tbl.id = 0;
|
clif_skill_nodamage(NULL,bl,AL_HEAL,hp,1);
|
||||||
tbl.type = BL_NUL;
|
|
||||||
tbl.m = src->m;
|
|
||||||
tbl.x = src->x;
|
|
||||||
tbl.y = src->y;
|
|
||||||
clif_skill_nodamage(&tbl,bl,AL_HEAL,hp,1);
|
|
||||||
battle_heal(NULL,bl,hp,0,0);
|
battle_heal(NULL,bl,hp,0,0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user