mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/GuildFinder: Remove all requests from a player when he enters a guild.
This commit is contained in:
@@ -2650,7 +2650,7 @@ bool Guild::AddMember(uint64 guid, uint8 rankId)
|
||||
_UpdateAccountsNumber();
|
||||
_LogEvent(GUILD_EVENT_LOG_JOIN_GUILD, lowguid);
|
||||
_BroadcastEvent(GE_JOINED, guid, name.c_str());
|
||||
sGuildFinderMgr->RemoveMembershipRequest(lowguid, GUID_LOPART(GetGUID()));
|
||||
sGuildFinderMgr->RemoveAllMembershipRequestsFromPlayer(lowguid);
|
||||
|
||||
// Call scripts if member was succesfully added (and stored to database)
|
||||
sScriptMgr->OnGuildAddMember(this, player, rankId);
|
||||
|
||||
@@ -37,7 +37,7 @@ enum GuildFinderOptionsAvailability
|
||||
{
|
||||
AVAILABILITY_WEEKDAYS = 0x1,
|
||||
AVAILABILITY_WEEKENDS = 0x2,
|
||||
ALL_WEEK = AVAILABILITY_WEEKDAYS | AVAILABILITY_WEEKENDS
|
||||
AVAILABILITY_ALWAYS = AVAILABILITY_WEEKDAYS | AVAILABILITY_WEEKENDS
|
||||
};
|
||||
|
||||
enum GuildFinderOptionsRoles
|
||||
@@ -50,8 +50,8 @@ enum GuildFinderOptionsRoles
|
||||
|
||||
enum GuildFinderOptionsLevel
|
||||
{
|
||||
ANY_FINDER_LEVEL = 0x1,
|
||||
MAX_FINDER_LEVEL = 0x2,
|
||||
ANY_FINDER_LEVEL = 0x1,
|
||||
MAX_FINDER_LEVEL = 0x2,
|
||||
ALL_GUILDFINDER_LEVELS = ANY_FINDER_LEVEL | MAX_FINDER_LEVEL
|
||||
};
|
||||
|
||||
@@ -237,7 +237,7 @@ class GuildFinderMgr
|
||||
*/
|
||||
void RemoveMembershipRequest(uint32 playerId, uint32 guildId);
|
||||
|
||||
/// wipes everything related to a guild. Used when that guild is disbanded
|
||||
/// Wipes everything related to a guild. Used when that guild is disbanded
|
||||
void DeleteGuild(uint32 guildId);
|
||||
|
||||
/**
|
||||
|
||||
@@ -64,7 +64,7 @@ void WorldSession::HandleGuildFinderAddRecruit(WorldPacket& recvPacket)
|
||||
return;
|
||||
if (!(classRoles & GUILDFINDER_ALL_ROLES) || classRoles > GUILDFINDER_ALL_ROLES)
|
||||
return;
|
||||
if (!(availability & ALL_WEEK) || availability > ALL_WEEK)
|
||||
if (!(availability & AVAILABILITY_ALWAYS) || availability > AVAILABILITY_ALWAYS)
|
||||
return;
|
||||
if (!(guildInterests & ALL_INTERESTS) || guildInterests > ALL_INTERESTS)
|
||||
return;
|
||||
@@ -85,7 +85,7 @@ void WorldSession::HandleGuildFinderBrowse(WorldPacket& recvPacket)
|
||||
|
||||
if (!(classRoles & GUILDFINDER_ALL_ROLES) || classRoles > GUILDFINDER_ALL_ROLES)
|
||||
return;
|
||||
if (!(availability & ALL_WEEK) || availability > ALL_WEEK)
|
||||
if (!(availability & AVAILABILITY_ALWAYS) || availability > AVAILABILITY_ALWAYS)
|
||||
return;
|
||||
if (!(guildInterests & ALL_INTERESTS) || guildInterests > ALL_INTERESTS)
|
||||
return;
|
||||
@@ -421,7 +421,7 @@ void WorldSession::HandleGuildFinderSetGuildPost(WorldPacket& recvPacket)
|
||||
|
||||
if (!(classRoles & GUILDFINDER_ALL_ROLES) || classRoles > GUILDFINDER_ALL_ROLES)
|
||||
return;
|
||||
if (!(availability & ALL_WEEK) || availability > ALL_WEEK)
|
||||
if (!(availability & AVAILABILITY_ALWAYS) || availability > AVAILABILITY_ALWAYS)
|
||||
return;
|
||||
if (!(guildInterests & ALL_INTERESTS) || guildInterests > ALL_INTERESTS)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user