summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-07 14:43:19 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-07 14:43:19 +0000
commitd2e1f056bc0f550bcb372a503a5f7489daf6ef97 (patch)
tree4b33b2b2f203ed6cc28a3aa4b6c3b53ca08d993d /src/map
parentb85ae33866e92c6e3ccef7ee32b60c521c812965 (diff)
downloadhercules-d2e1f056bc0f550bcb372a503a5f7489daf6ef97.tar.gz
hercules-d2e1f056bc0f550bcb372a503a5f7489daf6ef97.tar.bz2
hercules-d2e1f056bc0f550bcb372a503a5f7489daf6ef97.tar.xz
hercules-d2e1f056bc0f550bcb372a503a5f7489daf6ef97.zip
Fixed bugreport:6406,bugreport:5986 updated Extreme Vacuum to its official behavior.
Fixed bugreport:6404 where using KG_GENWAKU on sitting targets the client doesn't sync with the server in sitting state. Updated RK_FIGHTINGSPIRIT ASPD bonus. Thanks to michieru. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16591 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c47
-rw-r--r--src/map/status.c30
2 files changed, 60 insertions, 17 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 8246493ae..e6496a3e9 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8760,6 +8760,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
if (unit_movepos(bl,x,y,0,0))
{
clif_skill_damage(bl,bl,tick, status_get_amotion(src), 0, -30000, 1, skillid, -1, 6);
+ if( sd && pc_issit(sd))
+ clif_sitting(bl); //Avoid sitting sync problem
clif_slide(bl,x,y) ;
sc_start(bl,SC_CONFUSION,80,skilllv,skill_get_time(skillid,skilllv));
}
@@ -10567,7 +10569,9 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli
case SO_WARMER:
skill_clear_group(src, 8);
break;
-
+ case SO_VACUUM_EXTREME:
+ range++;
+ break;
case GN_WALLOFTHORN:
if( flag&1 )
limit = 3000;
@@ -11562,7 +11566,32 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
case UNT_VACUUM_EXTREME:
- sc_start(bl, SC_VACUUM_EXTREME, 100, sg->skill_lv, sg->limit);
+ {// TODO: official behavior in gvg area. [malufett]
+ int sec = sg->limit - DIFF_TICK(tick, sg->tick);
+ int range = skill_get_unit_range(sg->skill_id, sg->skill_lv);
+
+ if( tsc && !tsc->data[type] &&
+ distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) <= range)// don't consider outer bounderies
+ sc_start(bl, type, 100, sg->skill_lv, sec);
+
+ if( unit_is_walking(bl) && // wait until target stop walking
+ ( tsc && tsc->data[type] && tsc->data[type]->val4 >= tsc->data[type]->val3-range ))
+ break;
+
+ if( tsc && ( !tsc->data[type] || (tsc->data[type] && tsc->data[type]->val4 < 1 ) ) )
+ break;
+
+ if( unit_is_walking(bl) &&
+ distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) > range )// going outside of boundaries? then force it to stop
+ unit_stop_walking(bl,1);
+
+ if( !unit_is_walking(bl) &&
+ distance_xy(src->bl.x, src->bl.y, bl->x, bl->y) <= range && // only snap if the target is inside the range or
+ src->bl.x != bl->x && src->bl.y != bl->y){// diagonal position parallel to VE's center
+ unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
+ clif_fixpos(bl);
+ }
+ }
break;
case UNT_FIRE_MANTLE:
@@ -14376,13 +14405,13 @@ static int skill_trap_splash (struct block_list *bl, va_list ap)
if( ss != bl )
skill_attack(BF_MISC,ss,src,bl,sg->skill_id,sg->skill_lv,tick,sg->val1|SD_LEVEL);
break;
- case UNT_MAGENTATRAP:
- case UNT_COBALTTRAP:
- case UNT_MAIZETRAP:
- case UNT_VERDURETRAP:
- if( bl->type != BL_PC && !is_boss(bl) )
- sc_start2(bl,SC_ELEMENTALCHANGE,100,sg->skill_lv,skill_get_ele(sg->skill_id,sg->skill_lv),skill_get_time2(sg->skill_id,sg->skill_lv));
- break;
+ case UNT_MAGENTATRAP:
+ case UNT_COBALTTRAP:
+ case UNT_MAIZETRAP:
+ case UNT_VERDURETRAP:
+ if( bl->type != BL_PC && !is_boss(bl) )
+ sc_start2(bl,SC_ELEMENTALCHANGE,100,sg->skill_lv,skill_get_ele(sg->skill_id,sg->skill_lv),skill_get_time2(sg->skill_id,sg->skill_lv));
+ break;
case UNT_REVERBERATION:
skill_addtimerskill(ss,tick+50,bl->id,0,0,WM_REVERBERATION_MELEE,sg->skill_lv,BF_WEAPON,0); // for proper skill delay animation when use with Dominion Impulse
skill_addtimerskill(ss,tick+250,bl->id,0,0,WM_REVERBERATION_MAGIC,sg->skill_lv,BF_MAGIC,0);
diff --git a/src/map/status.c b/src/map/status.c
index 7af476fc0..32020004f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -995,7 +995,6 @@ void initChangeTables(void) {
StatusChangeStateTable[SC_THORNSTRAP] |= SCS_NOMOVE;
StatusChangeStateTable[SC_MAGNETICFIELD] |= SCS_NOMOVE;
StatusChangeStateTable[SC__MANHOLE] |= SCS_NOMOVE;
- StatusChangeStateTable[SC_VACUUM_EXTREME] |= SCS_NOMOVE;
StatusChangeStateTable[SC_CURSEDCIRCLE_ATKER] |= SCS_NOMOVE;
StatusChangeStateTable[SC_CURSEDCIRCLE_TARGET] |= SCS_NOMOVE;
StatusChangeStateTable[SC_CRYSTALIZE] |= SCS_NOMOVE|SCS_NOMOVECOND;
@@ -3801,6 +3800,10 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag)
if(status->aspd_rate != 1000) // absolute percentage modifier
amotion = ( 200 - (200-amotion/10) * status->aspd_rate / 1000 ) * 10;
#endif
+ //fixed value added
+ if( sc && sc->data[SC_FIGHTINGSPIRIT] && sc->data[SC_FIGHTINGSPIRIT]->val2 )
+ amotion -= (sd?pc_checkskill(sd, RK_RUNEMASTERY):10) / 10 * 40;
+
status->amotion = cap_value(amotion,((sd->class_&JOBL_THIRD) ? battle_config.max_third_aspd : battle_config.max_aspd),2000);
status->adelay = 2*status->amotion;
@@ -5183,8 +5186,6 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s
skills2 -= 30;
if( sc->data[SC_HALLUCINATIONWALK_POSTDELAY] )
skills2 -= 50;
- if( sc->data[SC_FIGHTINGSPIRIT] && sc->data[SC_FIGHTINGSPIRIT]->val2 )
- skills2 += 4;
if( sc->data[SC_PARALYSE] )
skills2 -= 10;
if( sc->data[SC__BODYPAINT] )
@@ -6115,9 +6116,6 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti
case SC_CRYSTALIZE:
tick -= (1000*(status->vit/10))+(status_get_lv(bl)/50);
break;
- case SC_VACUUM_EXTREME:
- tick -= 50*status->str;
- break;
case SC_MANDRAGORA:
sc_def = (status->vit+status->luk)/5;
break;
@@ -8015,6 +8013,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val4 = tick / 1000;
tick_time = 1000; // [GodLesZ] tick time
break;
+ case SC_VACUUM_EXTREME:
+ tick -= (status->str / 20) * 1000;
+ val4 = val3 = tick / 100;
+ tick_time = 100; // [GodLesZ] tick time
+ break;
case SC_SWINGDANCE:
val2 = 4 * val1; // Walk speed and aspd reduction.
break;
@@ -8359,7 +8362,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC__MANHOLE:
case SC_CRYSTALIZE:
case SC_WHITEIMPRISON:
- case SC_VACUUM_EXTREME:
case SC_CURSEDCIRCLE_ATKER:
case SC_CURSEDCIRCLE_TARGET:
case SC_FEAR:
@@ -9229,6 +9231,9 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
}
break;
+ case SC_VACUUM_EXTREME:
+ if(sc && sc->cant.move > 0) sc->cant.move--;
+ break;
case SC_KYOUGAKU:
clif_status_load(bl, SI_KYOUGAKU, 0); // Avoid client crash
clif_status_load(bl, SI_ACTIVE_MONSTER_TRANSFORM, 0);
@@ -10030,7 +10035,16 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
return 0;
}
break;
-
+ case SC_VACUUM_EXTREME:
+ if( --(sce->val4) >= 0 ){
+ if( !unit_is_walking(bl) && !sce->val2 ){
+ sc->cant.move++;
+ sce->val2 = 1;
+ }
+ sc_timer_next(100 + tick, status_change_timer, bl->id, data);
+ return 0;
+ }
+ break;
case SC_BLOODSUCKER:
if( --(sce->val4) >= 0 ) {
struct block_list *src = map_id2bl(sce->val2);