Bug Fixes

* Fixed Guild Auras applying to other guilds. (bugreport:7073) (Hercules 81caf70, 7fc0697, eb53067)
* Fixed wrong packet being used for storages on 20071002 and older clients.
This commit is contained in:
aleos89 2014-03-07 11:53:14 -05:00
parent df1b99212b
commit 5aa2f17fc1
6 changed files with 19 additions and 16 deletions

View File

@ -5,7 +5,7 @@
// //
// layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11 // layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11
// target = friend (party +guildmates +neutral players) / party / guild // target = friend (party +guildmates +neutral players) / party / guild
// ally (party +guildmates) / all / enemy // ally (party +guildmates) / all / sameguild (guild but no allies) / enemy
// flag 0x0001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend' // flag 0x0001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend'
// 0x0002(UF_NOREITERRATION) Spell cannot be stacked // 0x0002(UF_NOREITERRATION) Spell cannot be stacked
// 0x0004(UF_NOFOOTSET) Spell cannot be cast near/on targets // 0x0004(UF_NOFOOTSET) Spell cannot be cast near/on targets

View File

@ -5,7 +5,7 @@
// //
// layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11 // layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11
// target = friend (party +guildmates +neutral players) / party / guild // target = friend (party +guildmates +neutral players) / party / guild
// ally (party +guildmates) / all / enemy // ally (party +guildmates) / all / sameguild (guild but no allies) / enemy
// flag 0x0001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend' // flag 0x0001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend'
// 0x0002(UF_NOREITERRATION) Spell cannot be stacked // 0x0002(UF_NOREITERRATION) Spell cannot be stacked
// 0x0004(UF_NOFOOTSET) Spell cannot be cast near/on targets // 0x0004(UF_NOFOOTSET) Spell cannot be cast near/on targets

View File

@ -6879,7 +6879,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 s_guild = status_get_guild_id(s_bl);
int t_guild = status_get_guild_id(t_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; state |= BCT_GUILD;
else else
state |= BCT_ENEMY; state |= BCT_ENEMY;
@ -6912,7 +6912,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 s_guild = status_get_guild_id(s_bl);
int t_guild = status_get_guild_id(t_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; state |= BCT_GUILD;
} }
} //end non pvp/gvg chk rivality } //end non pvp/gvg chk rivality

View File

@ -33,16 +33,18 @@ enum { // Flag of the final calculation
enum e_battle_check_target enum e_battle_check_target
{//New definitions [Skotlex] {//New definitions [Skotlex]
BCT_ENEMY = 0x020000, BCT_NOONE = 0x000000,
BCT_NOENEMY = 0x1d0000, //This should be (~BCT_ENEMY&BCT_ALL) BCT_SELF = 0x010000,
BCT_PARTY = 0x040000, BCT_ENEMY = 0x020000,
BCT_NOPARTY = 0x1b0000, //This should be (~BCT_PARTY&BCT_ALL) BCT_PARTY = 0x040000,
BCT_GUILD = 0x080000, BCT_GUILDALLY = 0x080000, // Only allies, NOT guildmates
BCT_NOGUILD = 0x170000, //This should be (~BCT_GUILD&BCT_ALL) BCT_NEUTRAL = 0x100000,
BCT_ALL = 0x1f0000, BCT_SAMEGUILD = 0x200000, // No Guild Allies
BCT_NOONE = 0x000000, BCT_GUILD = 0x280000, // Guild AND Allies (BCT_SAMEGUILD|BCT_GUILDALLY)
BCT_SELF = 0x010000, BCT_NOGUILD = 0x170000, // This should be (~BCT_GUILD&BCT_ALL)
BCT_NEUTRAL = 0x100000, BCT_NOPARTY = 0x3b0000, // This should be (~BCT_PARTY&BCT_ALL)
BCT_NOENEMY = 0x3d0000, // This should be (~BCT_ENEMY&BCT_ALL)
BCT_ALL = 0x3f0000,
}; };
// dammage structure // dammage structure

View File

@ -2554,7 +2554,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items
#if PACKETVER < 20071002 #if PACKETVER < 20071002
const int se = 20; //entry size equip const int se = 20; //entry size equip
const int sidxe = 4; //start itemlist idx const int sidxe = 4; //start itemlist idx
const int cmde = 0x2d1; const int cmde = 0xa6;
#elif PACKETVER < 20100629 #elif PACKETVER < 20100629
const int se = 26; const int se = 26;
const int sidxe = 4; const int sidxe = 4;

View File

@ -12211,7 +12211,7 @@ static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, un
case UNT_GD_GLORYWOUNDS: case UNT_GD_GLORYWOUNDS:
case UNT_GD_SOULCOLD: case UNT_GD_SOULCOLD:
case UNT_GD_HAWKEYES: case UNT_GD_HAWKEYES:
if ( !sce ) if ( !sce && battle_check_target(&sg->unit->bl, bl, sg->target_flag) > 0 )
sc_start4(ss, bl,type,100,sg->skill_lv,0,0,0,1000); sc_start4(ss, bl,type,100,sg->skill_lv,0,0,0,1000);
break; break;
} }
@ -18990,6 +18990,7 @@ static 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],"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],"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],"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 if( strcmpi(split[6],"noone")==0 ) skill_db[idx].unit_target = BCT_NOONE;
else skill_db[idx].unit_target = strtol(split[6],NULL,16); else skill_db[idx].unit_target = strtol(split[6],NULL,16);