summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-09-09 21:57:14 -0300
committershennetsind <ind@henn.et>2013-09-09 21:57:14 -0300
commitc1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c (patch)
tree0376094ca0b4276df43ecba9b97e19bd779858fe /src/map/skill.c
parent2ca326b3fa3853fbc06095dbbbfee537a0387b5f (diff)
downloadhercules-c1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c.tar.gz
hercules-c1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c.tar.bz2
hercules-c1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c.tar.xz
hercules-c1c3ef1e0b356aaa89d8fba6d63b86130e8aae9c.zip
Fixed Bug #7335
Modified several gvg checks to include checking whether it is a guild castle ( map_flag_gvg2 does so and no it doesn't mean woe:se ) Special Thanks to kyeme. http://hercules.ws/board/tracker/issue-7335-woe-castle-behavior/ Also follow up 24ced6fcef1a95a2abd0c60b4fe90cbbc3aea268 changed 512 with its constant, special thanks to EPuncker. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f707395eb..d9df0b869 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -561,7 +561,7 @@ int skillnotok (uint16 skill_id, struct map_session_data *sd)
}
break;
case GC_DARKILLUSION:
- if( map_flag_gvg(m) ) {
+ if( map_flag_gvg2(m) ) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
return 1;
}
@@ -3579,7 +3579,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
uint8 dir = iMap->calc_dir(bl, src->x, src->y);
// teleport to target (if not on WoE grounds)
- if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 0, 1) )
+ if( !map_flag_gvg2(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 0, 1) )
clif->slide(src, bl->x, bl->y);
// cause damage and knockback if the path to target was a straight one
@@ -3690,7 +3690,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
if( dir > 2 && dir < 6 ) y = -i;
else if( dir == 7 || dir < 2 ) y = i;
else y = 0;
- if( (mbl == src || (!map_flag_gvg(src->m) && !map[src->m].flag.battleground) ) && // only NJ_ISSEN don't have slide effect in GVG
+ if( (mbl == src || (!map_flag_gvg2(src->m) && !map[src->m].flag.battleground) ) && // only NJ_ISSEN don't have slide effect in GVG
unit_movepos(src, mbl->x+x, mbl->y+y, 1, 1) ) {
clif->slide(src, src->x, src->y);
clif->fixpos(src);
@@ -4069,7 +4069,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
sc_start(src,SC_HIDING,100,skill_lv,skill->get_time(skill_id,skill_lv));
break;
case NJ_KIRIKAGE:
- if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground )
+ if( !map_flag_gvg2(src->m) && !map[src->m].flag.battleground )
{ //You don't move on GVG grounds.
short x, y;
iMap->search_freecell(bl, 0, &x, &y, 1, 1, 0);
@@ -4350,7 +4350,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
}
break;
case LG_PINPOINTATTACK:
- if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 1, 1) )
+ if( !map_flag_gvg2(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 1, 1) )
clif->slide(src,bl->x,bl->y);
skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
break;
@@ -4375,7 +4375,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, uint
break;
case SR_KNUCKLEARROW:
- if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 1, 1) ) {
+ if( !map_flag_gvg2(src->m) && !map[src->m].flag.battleground && unit_movepos(src, bl->x, bl->y, 1, 1) ) {
clif->slide(src,bl->x,bl->y);
clif->fixpos(src); // Aegis send this packet too.
}
@@ -5125,7 +5125,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case ALL_RESURRECTION:
- if(sd && (map_flag_gvg(bl->m) || map[bl->m].flag.battleground))
+ if(sd && (map_flag_gvg2(bl->m) || map[bl->m].flag.battleground))
{ //No reviving in WoE grounds!
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
break;
@@ -9166,7 +9166,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
case KO_KYOUGAKU:
{
int rate = max(5, (45 + 5 * skill_lv - status_get_int(bl) / 10));
- if( sd && !map_flag_gvg(src->m) ){
+ if( sd && !map_flag_gvg2(src->m) ){
clif->skill_fail(sd, skill_id, USESKILL_FAIL_SIZE, 0);
break;
}
@@ -9191,7 +9191,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
break;
case KO_GENWAKU:
- if ( !map_flag_gvg(src->m) && ( dstsd || dstmd ) && !(tstatus->mode&MD_PLANT) && battle->check_target(src,bl,BCT_ENEMY) > 0 ) {
+ if ( !map_flag_gvg2(src->m) && ( dstsd || dstmd ) && !(tstatus->mode&MD_PLANT) && battle->check_target(src,bl,BCT_ENEMY) > 0 ) {
int x = src->x, y = src->y;
if( sd && rnd()%100 > max(5, (45 + 5 * skill_lv) - status_get_int(bl) / 10) ){//[(Base chance of success) - ( target's int / 10)]%.
clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
@@ -9980,7 +9980,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
}
break;
case NJ_SHADOWJUMP:
- if( !map_flag_gvg(src->m) && !map[src->m].flag.battleground ) { //You don't move on GVG grounds.
+ if( !map_flag_gvg2(src->m) && !map[src->m].flag.battleground ) { //You don't move on GVG grounds.
unit_movepos(src, x, y, 1, 0);
clif->slide(src,x,y);
}
@@ -10622,7 +10622,7 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, uint16 skill
ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_TRAP || req.itemid[i] == ITEMID_TRAP_ALLOY));
if( req.itemid[i] )
req_item = req.itemid[i];
- if( map_flag_gvg(src->m) || map[src->m].flag.battleground )
+ if( map_flag_gvg2(src->m) || map[src->m].flag.battleground )
limit *= 4; // longer trap times in WOE [celest]
if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) )
target = BCT_ALL;
@@ -11414,7 +11414,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
const struct TimerData* td = tsc->data[type]?iTimer->get_timer(tsc->data[type]->timer):NULL;
if( td )
sec = DIFF_TICK(td->tick, tick);
- if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg(src->bl.m) ) {
+ if( sg->unit_id == UNT_MANHOLE || battle_config.skill_trap_type || !map_flag_gvg2(src->bl.m) ) {
unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif->fixpos(bl);
}
@@ -12937,7 +12937,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
}
break;
case SR_CURSEDCIRCLE:
- if (map_flag_gvg(sd->bl.m)) {
+ if (map_flag_gvg2(sd->bl.m)) {
if (iMap->foreachinrange(mob_count_sub, &sd->bl, skill->get_splash(skill_id, skill_lv), BL_MOB,
MOBID_EMPERIUM, MOBID_GUARIDAN_STONE1, MOBID_GUARIDAN_STONE2)) {
char output[128];
@@ -14035,7 +14035,7 @@ int skill_delay_fix (struct block_list *bl, uint16 skill_id, uint16 skill_lv)
time /= 2;
break;
case AS_SONICBLOW:
- if (!map_flag_gvg(bl->m) && !map[bl->m].flag.battleground && sc->data[SC_SOULLINK]->val2 == SL_ASSASIN)
+ if (!map_flag_gvg2(bl->m) && !map[bl->m].flag.battleground && sc->data[SC_SOULLINK]->val2 == SL_ASSASIN)
time /= 2;
break;
}