Kaite should not work against high-level mobs - bug introduced in r11230 (bugreport:1623).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12767 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
9568930e99
commit
d5f1f0a910
@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
|||||||
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.
|
||||||
|
|
||||||
2008/06/07
|
2008/06/07
|
||||||
|
* Kaite should not work against high-level mobs (bugreport:1623)
|
||||||
* Fixed 'soundeffectall' not reading its params correctly [ultramage]
|
* Fixed 'soundeffectall' not reading its params correctly [ultramage]
|
||||||
* Fixed PF_DOUBLECASTING casting % bugreport:140
|
* Fixed PF_DOUBLECASTING casting % bugreport:140
|
||||||
* Fixed a few properties of NPC_CHANGEUNDEAD bugreport:79 [Brainstorm]
|
* Fixed a few properties of NPC_CHANGEUNDEAD bugreport:79 [Brainstorm]
|
||||||
|
@ -1300,29 +1300,30 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Checks if bl should reflect back a spell.
|
//Checks if 'bl' should reflect back a spell cast by 'src'.
|
||||||
//type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted)
|
//type is the type of magic attack: 0: indirect (aoe), 1: direct (targetted)
|
||||||
static int skill_magic_reflect(struct block_list *bl, int type)
|
static int skill_magic_reflect(struct block_list* src, struct block_list* bl, int type)
|
||||||
{
|
{
|
||||||
struct status_change *sc = status_get_sc(bl);
|
struct status_change *sc = status_get_sc(bl);
|
||||||
struct map_session_data *sd;
|
struct map_session_data* sd = BL_CAST(BL_PC, bl);
|
||||||
sd = BL_CAST(BL_PC, bl);
|
|
||||||
|
|
||||||
if(sd && sd->magic_damage_return && type && rand()%100 < sd->magic_damage_return)
|
// item-based reflection
|
||||||
|
if( sd && sd->magic_damage_return && type && rand()%100 < sd->magic_damage_return )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if(sc && sc->count)
|
// status-based reflection
|
||||||
{
|
if( !sc || sc->count == 0 )
|
||||||
if(sc->data[SC_MAGICMIRROR] && rand()%100 < sc->data[SC_MAGICMIRROR]->val2)
|
return 0;
|
||||||
return 1;
|
|
||||||
|
|
||||||
if(sc->data[SC_KAITE] && (sd || status_get_lv(bl) <= 80))
|
if( sc->data[SC_MAGICMIRROR] && rand()%100 < sc->data[SC_MAGICMIRROR]->val2 )
|
||||||
{ //Works on players or mobs with level under 80.
|
return 1;
|
||||||
clif_specialeffect(bl, 438, AREA);
|
|
||||||
if (--sc->data[SC_KAITE]->val2 <= 0)
|
if( sc->data[SC_KAITE] && (src->type == BL_PC || status_get_lv(src) <= 80) )
|
||||||
status_change_end(bl, SC_KAITE, -1);
|
{// Kaite only works against non-players if they are low-level.
|
||||||
return 1;
|
clif_specialeffect(bl, 438, AREA);
|
||||||
}
|
if( --sc->data[SC_KAITE]->val2 <= 0 )
|
||||||
|
status_change_end(bl, SC_KAITE, -1);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1403,8 +1404,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (attack_type&BF_MAGIC) {
|
if (attack_type&BF_MAGIC) {
|
||||||
if (!(sstatus->mode&MD_BOSS) && (dmg.damage || dmg.damage2) &&
|
if( !(sstatus->mode&MD_BOSS) && (dmg.damage || dmg.damage2) && skill_magic_reflect(src, bl, src==dsrc) )
|
||||||
skill_magic_reflect(bl, src==dsrc))
|
|
||||||
{ //Magic reflection, switch caster/target
|
{ //Magic reflection, switch caster/target
|
||||||
struct block_list *tbl = bl;
|
struct block_list *tbl = bl;
|
||||||
bl = src;
|
bl = src;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user