summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 02:30:41 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-26 02:30:41 +0000
commit6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9 (patch)
tree18aba15be1744d9c7dc52305cf70ccb1b936bc5e /src/map
parent8d573da5d4db846bb53ed8b3e8e628e6fa997510 (diff)
downloadhercules-6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9.tar.gz
hercules-6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9.tar.bz2
hercules-6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9.tar.xz
hercules-6ebedc8ce5d97d55cf4fe395471c8fee7bd309a9.zip
Fixed bugreport:6115 players without guild may now attack guardians during woe, mercenaries no longer can attack emperium.
Special Thanks/Credits To Daegaladh git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16502 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index aff678365..11efc70e0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -915,7 +915,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
}
}
if(src->type != BL_MOB) {
- struct guild *g=guild_search(status_get_guild_id(src));
+ struct guild *g = guild_search(status_get_guild_id(src));
if (!g) return 0;
if (class_ == MOBID_EMPERIUM && guild_checkskill(g,GD_APPROVAL) <= 0)
return 0;
@@ -4871,7 +4871,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
switch( target->type ) { // Checks on actual target
- case BL_PC: {
+ case BL_PC: {
struct status_change* sc = status_get_sc(src);
if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target))
return -1; //Cannot be targeted yet.
@@ -5009,6 +5009,10 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
}
break;
+ case BL_MER:
+ if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM && flag&BCT_ENEMY)
+ return 0; //mercenary may not attack Emperium
+ break;
}
switch( s_bl->type )
@@ -5031,8 +5035,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0; // You can't target anything out of your duel
}
}
- if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->guardian_data )
- return 0; //If you don't belong to a guild, can't target guardians/emperium.
+ if( map_flag_gvg(m) && !sd->status.guild_id && t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM )
+ return 0; //If you don't belong to a guild, can't target emperium.
if( t_bl->type != BL_PC )
state |= BCT_ENEMY; //Natural enemy.
break;