- status_check_skilluse cleanup. Some status will only block skills when they are first used, not on cast-end (which includes auto-spells and ground-skill checks). Added flag 2 to signal splash/aoe effects (skill already casted, but target just affected)
- Gravitation now only affects the caster, should have also fixed the skill not doing damage when skill_caster_check is set. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5437 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
c64fbb45b5
commit
28e4d9d3ae
@ -5,6 +5,12 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
|
|||||||
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
|
||||||
|
|
||||||
2006/03/02
|
2006/03/02
|
||||||
|
* status_check_skilluse cleanup. Some status will only block skills when
|
||||||
|
they are first used, not on cast-end (which includes auto-spells and
|
||||||
|
ground-skill checks). Now when status_castcancel is 'no', skills WILL
|
||||||
|
come off after the cast bar is done. [Skotlex]
|
||||||
|
* Gravitation now only affects the caster, should have also fixed the skill
|
||||||
|
not doing damage when skill_caster_check is set. [Skotlex]
|
||||||
* Max fame list size is now defined by MAX_FAME_LIST constant (mmo.h)
|
* Max fame list size is now defined by MAX_FAME_LIST constant (mmo.h)
|
||||||
[Skotlex]
|
[Skotlex]
|
||||||
* Individual fame lists sizes can now be specified through the char-server
|
* Individual fame lists sizes can now be specified through the char-server
|
||||||
|
@ -1580,17 +1580,16 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
|
|
||||||
if(src->prev == NULL || dsrc->prev == NULL || bl->prev == NULL)
|
if(src->prev == NULL || dsrc->prev == NULL || bl->prev == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
|
if (src != dsrc) {
|
||||||
if (
|
//When caster is not the src of attack, this is a ground skill, and as such, do the relevant target checking. [Skotlex]
|
||||||
(src != dsrc || battle_config.skill_caster_check) &&
|
if (!status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skillid, 2))
|
||||||
!status_check_skilluse(battle_config.skill_caster_check?src:NULL, bl, skillid, 1)
|
return 0;
|
||||||
)
|
} else if (flag && skill_get_nk(skillid)&NK_SPLASH) {
|
||||||
return 0;
|
//Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
|
||||||
|
if (!status_check_skilluse(dsrc, bl, skillid, 2))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//Note that splash attacks often only check versus the targetted mob, those around the splash area normally don't get checked for being hidden/cloaked/etc. [Skotlex]
|
|
||||||
if (flag && skill_get_nk(skillid)&NK_SPLASH
|
|
||||||
&& !status_check_skilluse(dsrc, bl, skillid, 1))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
//uncomment the following to do a check between caster and target. [Skotlex]
|
//uncomment the following to do a check between caster and target. [Skotlex]
|
||||||
//eg: if you want storm gust to do no damage if the caster runs to another map after invoking the skill.
|
//eg: if you want storm gust to do no damage if the caster runs to another map after invoking the skill.
|
||||||
|
@ -329,7 +329,10 @@ int status_getrefinebonus(int lv,int type)
|
|||||||
/*==========================================
|
/*==========================================
|
||||||
* Checks whether the src can use the skill on the target,
|
* Checks whether the src can use the skill on the target,
|
||||||
* taking into account status/option of both source/target. [Skotlex]
|
* taking into account status/option of both source/target. [Skotlex]
|
||||||
* flag: 1 to indicate this call is done after the casting (target already selected)
|
* flag:
|
||||||
|
* 0 - Trying to use skill on target.
|
||||||
|
* 1 - Cast bar is done.
|
||||||
|
* 2- Skill already pulled off, check is due to ground-based skills or splash-damage ones.
|
||||||
* src MAY be null to indicate we shouldn't check it, this is a ground-based skill attack.
|
* src MAY be null to indicate we shouldn't check it, this is a ground-based skill attack.
|
||||||
* target MAY Be null, in which case the checks are only to see
|
* target MAY Be null, in which case the checks are only to see
|
||||||
* whether the source can cast or not the skill on the ground.
|
* whether the source can cast or not the skill on the ground.
|
||||||
@ -376,7 +379,8 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
|
|||||||
|
|
||||||
if (src) sc = status_get_sc(src);
|
if (src) sc = status_get_sc(src);
|
||||||
|
|
||||||
if(sc && sc->opt1 >0 && (!flag || battle_config.sc_castcancel))
|
if(sc && sc->opt1 >0 && (battle_config.sc_castcancel || flag != 1))
|
||||||
|
//When sc do not cancel casting, the spell should come out.
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if(sc && sc->count)
|
if(sc && sc->count)
|
||||||
@ -385,7 +389,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
|
|||||||
(sc->data[SC_TRICKDEAD].timer != -1 && skill_num != NV_TRICKDEAD)
|
(sc->data[SC_TRICKDEAD].timer != -1 && skill_num != NV_TRICKDEAD)
|
||||||
|| (sc->data[SC_AUTOCOUNTER].timer != -1 && skill_num != KN_AUTOCOUNTER)
|
|| (sc->data[SC_AUTOCOUNTER].timer != -1 && skill_num != KN_AUTOCOUNTER)
|
||||||
|| (sc->data[SC_GOSPEL].timer != -1 && sc->data[SC_GOSPEL].val4 == BCT_SELF && skill_num != PA_GOSPEL)
|
|| (sc->data[SC_GOSPEL].timer != -1 && sc->data[SC_GOSPEL].val4 == BCT_SELF && skill_num != PA_GOSPEL)
|
||||||
|| sc->data[SC_GRAVITATION].timer != -1
|
|| (sc->data[SC_GRAVITATION].timer != -1 && sc->data[SC_GRAVITATION].val3 == BCT_SELF)
|
||||||
)
|
)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -402,14 +406,20 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, int
|
|||||||
}
|
}
|
||||||
if (skill_num)
|
if (skill_num)
|
||||||
{ //Skills blocked through status changes...
|
{ //Skills blocked through status changes...
|
||||||
if ((sc->data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
|
if (!flag && ( //Blocked only from using the skill (stuff like autospell may still go through
|
||||||
(sc->data[SC_ROKISWEIL].timer != -1 && skill_num != BD_ADAPTATION && !(mode&MD_BOSS)) ||
|
|
||||||
(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
|
(sc->data[SC_MARIONETTE].timer != -1 && skill_num != CG_MARIONETTE) ||
|
||||||
(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
|
(sc->data[SC_MARIONETTE2].timer != -1 && skill_num == CG_MARIONETTE) ||
|
||||||
(sc->data[SC_HERMODE].timer != -1 && skill_get_inf(skill_num) & INF_SUPPORT_SKILL) ||
|
sc->data[SC_SILENCE].timer != -1 ||
|
||||||
(sc->data[SC_SILENCE].timer != -1 && !flag) || //Silence only blocks initial casting of skills.
|
|
||||||
sc->data[SC_STEELBODY].timer != -1 ||
|
sc->data[SC_STEELBODY].timer != -1 ||
|
||||||
sc->data[SC_BERSERK].timer != -1 || sc->data[SC_SKA].timer != -1 ||
|
sc->data[SC_BERSERK].timer != -1 ||
|
||||||
|
sc->data[SC_SKA].timer != -1
|
||||||
|
))
|
||||||
|
return 0;
|
||||||
|
//Skill blocking.
|
||||||
|
if (
|
||||||
|
(sc->data[SC_VOLCANO].timer != -1 && skill_num == WZ_ICEWALL) ||
|
||||||
|
(sc->data[SC_ROKISWEIL].timer != -1 && skill_num != BD_ADAPTATION && !(mode&MD_BOSS)) ||
|
||||||
|
(sc->data[SC_HERMODE].timer != -1 && skill_get_inf(skill_num) & INF_SUPPORT_SKILL) ||
|
||||||
sc->data[SC_NOCHAT].timer != -1
|
sc->data[SC_NOCHAT].timer != -1
|
||||||
)
|
)
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user