Follow up to 5d7d994 and 6ebcb67 (code optimizations)

* Waterball now uses UNT_DUMMYSKILL
* Deluge/Volcano/Gale will no longer be blocked by UNT_DUMMYSKILL units
* Waterball will no longer cancel when damage is 0, on official servers this only happens if damage is negative but rAthena is no longer coded to handle negative damage unless you enable a custom feature, so... just don't use Waterball on water monsters, ok?
* Fixed two compiler warnings
This commit is contained in:
Playtester 2016-01-19 20:17:04 +01:00
parent 4c2d5153c3
commit 9cfca1cc08
3 changed files with 10 additions and 15 deletions

View File

@ -42,7 +42,7 @@
80,0x87,0x88, 0, 1,2000,enemy, 0x4006 //WZ_FIREPILLAR
83,0x86, , 0, 3,1000,enemy, 0x010 //WZ_METEOR
85,0x86, , 5, 1:1:1:1:1:1:1:1:1:1:3,1250,enemy,0x018 //WZ_VERMILION
86,0x8c, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
86,0x86, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
87,0x8d, , -1, 0, -1,all, 0x9010 //WZ_ICEWALL
89,0x86, , 4, 1, 450,enemy, 0x018 //WZ_STORMGUST
91,0x86, , 2, 0,1000,enemy, 0x010 //WZ_HEAVENDRIVE

View File

@ -42,7 +42,7 @@
80,0x87,0x88, 0, 1,2000,enemy, 0x4006 //WZ_FIREPILLAR
83,0x86, , 0, 3,1000,enemy, 0x010 //WZ_METEOR
85,0x86, , 5, 1:1:1:1:1:1:1:1:1:1:3,1250,enemy,0x018 //WZ_VERMILION
86,0x8c, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
86,0x86, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
87,0x8d, , -1, 0, -1,all, 0x9010 //WZ_ICEWALL
89,0x86, , 4, 1, 450,enemy, 0x018 //WZ_STORMGUST
91,0x86, , 2, 0,1000,enemy, 0x010 //WZ_HEAVENDRIVE

View File

@ -3299,10 +3299,6 @@ int64 skill_attack (int attack_type, struct block_list* src, struct block_list *
case RL_SLUGSHOT:
dmg.dmotion = clif_skill_damage(dsrc,bl,tick,status_get_amotion(src),dmg.dmotion,damage,dmg.div_,skill_id,-1,5);
break;
case WZ_WATERBALL:
if (damage > 0)
dmg.dmotion = clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skill_id, flag&SD_LEVEL ? -1 : skill_lv, type);
break;
case AB_DUPLELIGHT_MELEE:
case AB_DUPLELIGHT_MAGIC:
dmg.amotion = 300;/* makes the damage value not overlap with previous damage (when displayed by the client) */
@ -3917,10 +3913,7 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data)
if (skl->type > 0 && !status_isdead(target) && path_search_long(NULL,src->m,src->x,src->y,target->x,target->y,CELL_CHKNOREACH)) {
// Apply canact delay here to prevent hacks (unlimited casting)
ud->canact_tick = tick + skill_delayfix(src, skl->skill_id, skl->skill_lv);
if (!skill_attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag) && skl->type > 1) {
// If skill doesn't deal damage, no new timer is created
unit = NULL;
}
skill_attack(BF_MAGIC, src, src, target, skl->skill_id, skl->skill_lv, tick, skl->flag);
}
if (unit && !status_isdead(target) && !status_isdead(src)) {
if(skl->type > 0)
@ -14169,12 +14162,14 @@ int skill_check_condition_char_sub (struct block_list *bl, va_list ap)
skill_id = va_arg(ap,int);
inf2 = skill_get_inf2(skill_id);
if (skill_id == PR_BENEDICTIO)
if(*c >= 2) // Check for two companions for Benedictio. [Skotlex]
if (skill_id == PR_BENEDICTIO) {
if (*c >= 2) // Check for two companions for Benedictio. [Skotlex]
return 0;
else if ((inf2&INF2_CHORUS_SKILL || skill_id == WL_COMET))
if(*c == MAX_PARTY) // Check for partners for Chorus or Comet; Cap if the entire party is accounted for.
}
else if ((inf2&INF2_CHORUS_SKILL || skill_id == WL_COMET)) {
if (*c == MAX_PARTY) // Check for partners for Chorus or Comet; Cap if the entire party is accounted for.
return 0;
}
else if (*c >= 1) // Check for one companion for all other cases.
return 0;
@ -17001,7 +16996,7 @@ static int skill_cell_overlap(struct block_list *bl, va_list ap)
// The official implementation makes them fail to appear when casted on top of ANYTHING
// but I wonder if they didn't actually meant to fail when casted on top of each other?
// hence, I leave the alternate implementation here, commented. [Skotlex]
if (unit->range <= 0)
if (unit->range <= 0 && skill_get_unit_id(unit->group->skill_id, 0) != UNT_DUMMYSKILL)
{
(*alive) = 0;
return 1;