summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcsnv <ctt@csnv.es>2014-09-10 00:12:17 +0200
committercsnv <ctt@csnv.es>2014-09-10 00:12:17 +0200
commitd19310af9540db177bb35116d19dd1c3a2afff14 (patch)
treee733376112c60f53286eeb4464eb24e7b69d6c4c /src/map/skill.c
parente785879df0519ee69afcac34a1b49db1462d67fc (diff)
downloadhercules-d19310af9540db177bb35116d19dd1c3a2afff14.tar.gz
hercules-d19310af9540db177bb35116d19dd1c3a2afff14.tar.bz2
hercules-d19310af9540db177bb35116d19dd1c3a2afff14.tar.xz
hercules-d19310af9540db177bb35116d19dd1c3a2afff14.zip
Fixes songs refresh bug, updates BA_ASSASSINCROSS
- Fixes bug 7125: http://hercules.ws/board/tracker/issue-7125-song-refresh/ (Rathena fix) - Updated BA_ASSASSINCROSS ASPD Renewal Formula according to latest tests - Added 'Skill failed' message to Devotion
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b6a7e91f0..3e3a6507a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11018,13 +11018,15 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
}
break;
case BA_ASSASSINCROSS:
- val1 = 10 + skill_lv + (st->agi/10); // ASPD increase
if(sd)
+ val1 = (pc->checkskill(sd,BA_MUSICALLESSON) + 1) / 2;
#ifdef RENEWAL
- val1 += 4 * pc->checkskill(sd,BA_MUSICALLESSON);
+ // This formula was taken from a RE calculator
+ // and the changes published on irowiki
+ // Luckily, official tests show it's the right one
+ val1 += skill_lv + (st->agi/20);
#else
- val1 += (pc->checkskill(sd,BA_MUSICALLESSON) + 1) / 2;
-
+ val1 += 10 + skill_lv + (st->agi/10); // ASPD increase
val1 *= 10; // ASPD works with 1000 as 100%
#endif
break;
@@ -12273,6 +12275,16 @@ int skill_unit_onout(struct skill_unit *src, struct block_list *bl, int64 tick)
}
}
break;
+ case UNT_WHISTLE:
+ case UNT_ASSASSINCROSS:
+ case UNT_POEMBRAGI:
+ case UNT_APPLEIDUN:
+ case UNT_HUMMING:
+ case UNT_DONTFORGETME:
+ case UNT_FORTUNEKISS:
+ case UNT_SERVICEFORYOU:
+ if (sg->src_id==bl->id && !(sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_BARDDANCER))
+ return -1;
}
return sg->skill_id;
}
@@ -12413,8 +12425,8 @@ int skill_unit_effect(struct block_list* bl, va_list ap) {
} else {
if( flag&1 )
skill->unit_onplace(su,bl,tick);
- else
- skill->unit_onout(su,bl,tick);
+ else if (skill->unit_onout(su,bl,tick) == -1)
+ return 0; // Don't let a Bard/Dancer update their own song timer
if( flag&4 )
skill->unit_onleft(skill_id, bl, tick);