summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-13 09:30:31 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-13 09:30:31 +0000
commit7e930917355db2790835bcda2f6ae37e3ae3c05c (patch)
treedcc77a96804505bb9da837b44dd6edb22f4213d2 /src
parent0d4639eea94cd4ef972bdfa592366447dd4bdba7 (diff)
downloadhercules-7e930917355db2790835bcda2f6ae37e3ae3c05c.tar.gz
hercules-7e930917355db2790835bcda2f6ae37e3ae3c05c.tar.bz2
hercules-7e930917355db2790835bcda2f6ae37e3ae3c05c.tar.xz
hercules-7e930917355db2790835bcda2f6ae37e3ae3c05c.zip
Fixed bugreport:4951 Bard/Dancer songs duration exploit fixed
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16109 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index ed5d4c8dc..7e1031e1a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -10555,8 +10555,11 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un
case UNT_DONTFORGETME:
case UNT_FORTUNEKISS:
case UNT_SERVICEFORYOU:
- if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER))
+ if (sg->src_id==bl->id && !(sc && sc->data[SC_SPIRIT] && sc->data[SC_SPIRIT]->val2 == SL_BARDDANCER)) {
+ if( sce )/* We have the status but we're not elegible for it, so we take it away. (bugreport:4591) */
+ sce->val4 = 2;
return 0;
+ }
if (!sc) return 0;
if (!sce)
sc_start4(bl,type,100,sg->skill_lv,sg->val1,sg->val2,0,sg->limit);
@@ -11347,13 +11350,17 @@ static int skill_unit_onleft (int skill_id, struct block_list *bl, unsigned int
case DC_DONTFORGETME:
case DC_FORTUNEKISS:
case DC_SERVICEFORYOU:
- if (sce)
- {
- delete_timer(sce->timer, status_change_timer);
- //NOTE: It'd be nice if we could get the skill_lv for a more accurate extra time, but alas...
- //not possible on our current implementation.
- sce->val4 = 1; //Store the fact that this is a "reduced" duration effect.
- sce->timer = add_timer(tick+skill_get_time2(skill_id,1), status_change_timer, bl->id, type);
+ if (sce) {
+ if( sce->val4 == 2 ) {/* We have the status but we're not elegible for it, so we take it away. (bugreport:4591) */
+ if( !( sc && sc->data[SC_DANCING] && sc->data[SC_DANCING]->val2 ) )/* check if we're still in the skill */
+ status_change_end(bl,type,INVALID_TIMER);
+ } else {
+ delete_timer(sce->timer, status_change_timer);
+ //NOTE: It'd be nice if we could get the skill_lv for a more accurate extra time, but alas...
+ //not possible on our current implementation.
+ sce->val4 = 1; //Store the fact that this is a "reduced" duration effect.
+ sce->timer = add_timer(tick+skill_get_time2(skill_id,1), status_change_timer, bl->id, type);
+ }
}
break;
case PF_FOGWALL: