Converted ZC_DELETE_RELATED_GUILD to struct (#8638)
Co-authored-by: Daegaladh <Daegaladh@users.noreply.github.com> Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
parent
1425705a2a
commit
9761fdf4da
@ -9192,25 +9192,21 @@ void clif_guild_allianceack(map_session_data& sd,uint8 flag){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Notifies the client that a alliance or opposition has been removed (ZC_DELETE_RELATED_GUILD).
|
/// Notifies the client that a alliance or opposition has been removed.
|
||||||
/// 0184 <other guild id>.L <relation>.L
|
/// 0184 <other guild id>.L <relation>.L (ZC_DELETE_RELATED_GUILD)
|
||||||
/// relation:
|
/// relation:
|
||||||
/// 0 = Ally
|
/// 0 = Ally
|
||||||
/// 1 = Enemy
|
/// 1 = Enemy
|
||||||
void clif_guild_delalliance(map_session_data *sd,int guild_id,int flag)
|
void clif_guild_delalliance(map_session_data& sd,uint32 guild_id,uint32 flag)
|
||||||
{
|
{
|
||||||
nullpo_retv(sd);
|
|
||||||
|
|
||||||
int fd = sd->fd;
|
PACKET_ZC_DELETE_RELATED_GUILD p{};
|
||||||
|
|
||||||
if ( !session_isActive(fd) )
|
p.packetType = HEADER_ZC_DELETE_RELATED_GUILD;
|
||||||
return;
|
p.allyID = guild_id;
|
||||||
|
p.flag = flag;
|
||||||
|
|
||||||
WFIFOHEAD(fd,packet_len(0x184));
|
clif_send(&p,sizeof(p),&sd.bl,SELF);
|
||||||
WFIFOW(fd,0)=0x184;
|
|
||||||
WFIFOL(fd,2)=guild_id;
|
|
||||||
WFIFOL(fd,6)=flag;
|
|
||||||
WFIFOSET(fd,packet_len(0x184));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1060,7 +1060,7 @@ void clif_guild_notice( map_session_data& sd );
|
|||||||
void clif_guild_message( const struct mmo_guild& g, uint32 account_id, const char* mes, size_t len );
|
void clif_guild_message( const struct mmo_guild& g, uint32 account_id, const char* mes, size_t len );
|
||||||
void clif_guild_reqalliance(map_session_data& sd,uint32 account_id,const char *name);
|
void clif_guild_reqalliance(map_session_data& sd,uint32 account_id,const char *name);
|
||||||
void clif_guild_allianceack(map_session_data& sd, uint8 flag);
|
void clif_guild_allianceack(map_session_data& sd, uint8 flag);
|
||||||
void clif_guild_delalliance(map_session_data *sd,int guild_id,int flag);
|
void clif_guild_delalliance(map_session_data& sd,uint32 guild_id,uint32 flag);
|
||||||
void clif_guild_oppositionack(map_session_data& sd,uint8 flag);
|
void clif_guild_oppositionack(map_session_data& sd,uint8 flag);
|
||||||
void clif_guild_broken( map_session_data& sd, int flag );
|
void clif_guild_broken( map_session_data& sd, int flag );
|
||||||
void clif_guild_xy( map_session_data& sd );
|
void clif_guild_xy( map_session_data& sd );
|
||||||
|
|||||||
@ -205,7 +205,6 @@
|
|||||||
parseable_packet(0x0180,6,clif_parse_GuildOpposition,2);
|
parseable_packet(0x0180,6,clif_parse_GuildOpposition,2);
|
||||||
packet(0x0182,106);
|
packet(0x0182,106);
|
||||||
parseable_packet(0x0183,10,clif_parse_GuildDelAlliance,2,6);
|
parseable_packet(0x0183,10,clif_parse_GuildDelAlliance,2,6);
|
||||||
packet(0x0184,10);
|
|
||||||
packet(0x0185,34);
|
packet(0x0185,34);
|
||||||
packet(0x0187,6);
|
packet(0x0187,6);
|
||||||
parseable_packet(0x018a,4,clif_parse_QuitGame,2);
|
parseable_packet(0x018a,4,clif_parse_QuitGame,2);
|
||||||
|
|||||||
@ -2073,7 +2073,7 @@ int guild_allianceack(int guild_id1,int guild_id2,uint32 account_id1,uint32 acco
|
|||||||
g[i]->alliance[j].guild_id = 0;
|
g[i]->alliance[j].guild_id = 0;
|
||||||
}
|
}
|
||||||
if (sd[i] != nullptr) // notify players
|
if (sd[i] != nullptr) // notify players
|
||||||
clif_guild_delalliance(sd[i],guild_id[1-i],(flag&1));
|
clif_guild_delalliance(*sd[i],guild_id[1-i],(flag&1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2112,7 +2112,7 @@ int guild_broken_sub(struct mmo_guild &g, int guild_id) {
|
|||||||
if (g.alliance[i].guild_id == guild_id) {
|
if (g.alliance[i].guild_id == guild_id) {
|
||||||
for (int j = 0; j < g.max_member; j++) {
|
for (int j = 0; j < g.max_member; j++) {
|
||||||
if (g.member[j].sd)
|
if (g.member[j].sd)
|
||||||
clif_guild_delalliance(g.member[j].sd, guild_id, g.alliance[i].opposition);
|
clif_guild_delalliance(*g.member[j].sd, guild_id, g.alliance[i].opposition);
|
||||||
}
|
}
|
||||||
intif_guild_alliance(g.guild_id, guild_id, 0, 0, g.alliance[i].opposition | 8);
|
intif_guild_alliance(g.guild_id, guild_id, 0, 0, g.alliance[i].opposition | 8);
|
||||||
g.alliance[i].guild_id = 0;
|
g.alliance[i].guild_id = 0;
|
||||||
|
|||||||
@ -766,6 +766,13 @@ struct PACKET_ZC_ACK_REQ_ALLY_GUILD {
|
|||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
DEFINE_PACKET_HEADER(ZC_ACK_REQ_ALLY_GUILD, 0x173)
|
DEFINE_PACKET_HEADER(ZC_ACK_REQ_ALLY_GUILD, 0x173)
|
||||||
|
|
||||||
|
struct PACKET_ZC_DELETE_RELATED_GUILD {
|
||||||
|
int16 packetType;
|
||||||
|
uint32 allyID;
|
||||||
|
uint32 flag;
|
||||||
|
} __attribute__((packed));
|
||||||
|
DEFINE_PACKET_HEADER(ZC_DELETE_RELATED_GUILD, 0x184)
|
||||||
|
|
||||||
struct PACKET_ZC_REQ_ALLY_GUILD {
|
struct PACKET_ZC_REQ_ALLY_GUILD {
|
||||||
int16 packetType;
|
int16 packetType;
|
||||||
uint32 inviterId;
|
uint32 inviterId;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user