Core/GuildFinder: Remove all requests from a player when he enters a guild.

This commit is contained in:
Warpten
2013-01-02 05:19:18 +01:00
parent 2fa3972707
commit 91f8ca3244
3 changed files with 8 additions and 8 deletions

View File

@@ -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);

View File

@@ -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);
/**

View File

@@ -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;