summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/battle.h23
-rw-r--r--src/map/skill.c1
3 files changed, 16 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 2cc4f984f..a2cc7692c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5476,7 +5476,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
int s_guild = status_get_guild_id(s_bl);
int t_guild = status_get_guild_id(t_bl);
- if( !(map[m].flag.pvp && map[m].flag.pvp_noguild) && s_guild && t_guild && (s_guild == t_guild || guild->isallied(s_guild, t_guild)) && (!map[m].flag.battleground || sbg_id == tbg_id) )
+ if( !(map[m].flag.pvp && map[m].flag.pvp_noguild) && s_guild && t_guild && (s_guild == t_guild || (!(flag&BCT_SAMEGUILD) && guild->isallied(s_guild, t_guild))) && (!map[m].flag.battleground || sbg_id == tbg_id) )
state |= BCT_GUILD;
else
state |= BCT_ENEMY;
@@ -5509,7 +5509,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
{
int s_guild = status_get_guild_id(s_bl);
int t_guild = status_get_guild_id(t_bl);
- if(s_guild && t_guild && (s_guild == t_guild || guild->isallied(s_guild, t_guild)))
+ if(s_guild && t_guild && (s_guild == t_guild || (!(flag&BCT_SAMEGUILD) && guild->isallied(s_guild, t_guild))))
state |= BCT_GUILD;
}
} //end non pvp/gvg chk rivality
diff --git a/src/map/battle.h b/src/map/battle.h
index 36796c516..707868e43 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -55,16 +55,19 @@ typedef enum damage_lv {
} damage_lv;
enum e_battle_check_target { //New definitions [Skotlex]
- BCT_ENEMY = 0x020000,
- BCT_NOENEMY = 0x1d0000, //This should be (~BCT_ENEMY&BCT_ALL)
- BCT_PARTY = 0x040000,
- BCT_NOPARTY = 0x1b0000, //This should be (~BCT_PARTY&BCT_ALL)
- BCT_GUILD = 0x080000,
- BCT_NOGUILD = 0x170000, //This should be (~BCT_GUILD&BCT_ALL)
- BCT_ALL = 0x1f0000,
- BCT_NOONE = 0x000000,
- BCT_SELF = 0x010000,
- BCT_NEUTRAL = 0x100000,
+ BCT_NOONE = 0x000000,
+ BCT_SELF = 0x010000,
+ BCT_ENEMY = 0x020000,
+ BCT_PARTY = 0x040000,
+ BCT_GUILD = 0x080000,
+ BCT_NEUTRAL = 0x100000,
+ BCT_SAMEGUILD = 0x200000, // No Guild Allies
+
+ BCT_NOGUILD = 0x170000, // This should be (~BCT_GUILD&BCT_ALL)
+ BCT_NOPARTY = 0x1b0000, // This should be (~BCT_PARTY&BCT_ALL)
+ BCT_NOENEMY = 0x1d0000, // This should be (~BCT_ENEMY&BCT_ALL)
+
+ BCT_ALL = 0x1f0000, // Sum of BCT_NOONE to BCT_GUILD
};
/**
diff --git a/src/map/skill.c b/src/map/skill.c
index 8f13591b6..4387b7de2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17591,6 +17591,7 @@ bool skill_parse_row_unitdb(char* split[], int columns, int current) {
else if( strcmpi(split[6],"all")==0 ) skill_db[idx].unit_target = BCT_ALL;
else if( strcmpi(split[6],"enemy")==0 ) skill_db[idx].unit_target = BCT_ENEMY;
else if( strcmpi(split[6],"self")==0 ) skill_db[idx].unit_target = BCT_SELF;
+ else if( strcmpi(split[6],"sameguild")==0 ) skill_db[idx].unit_target = BCT_GUILD|BCT_SAMEGUILD;
else if( strcmpi(split[6],"noone")==0 ) skill_db[idx].unit_target = BCT_NOONE;
else skill_db[idx].unit_target = strtol(split[6],NULL,16);