Core/Guilds: guild code was completely refactored and rewritten.
* OOP desing and implementation; * all the queries are moved to prepared statements; * guild loading is optimized; * all the possible interaction with guild's data is done inside the guild class; * added more hooks to GuildScript class; WARNING: Make sure you backup your characters database before applying this change (just in case). Known problems with guilds: * when new member is added to the guild, MOTD is not displayed for him in guild tab of social window; * if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number); * packets order differs from official: currently guild bank packet traffic is twice as more than on offy. --HG-- branch : trunk
This commit is contained in:
@@ -3996,10 +3996,7 @@ bool ChatHandler::HandleGuildInviteCommand(const char *args)
|
||||
return false;
|
||||
|
||||
// player's guild membership checked in AddMember before add
|
||||
if (!targetGuild->AddMember (target_guid,targetGuild->GetLowestRank ()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return targetGuild->AddMember(target_guid);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGuildUninviteCommand(const char *args)
|
||||
@@ -4018,7 +4015,7 @@ bool ChatHandler::HandleGuildUninviteCommand(const char *args)
|
||||
if (!targetGuild)
|
||||
return false;
|
||||
|
||||
targetGuild->DelMember (target_guid, false, true);
|
||||
targetGuild->DeleteMember(target_guid, false, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4045,11 +4042,7 @@ bool ChatHandler::HandleGuildRankCommand(const char *args)
|
||||
return false;
|
||||
|
||||
uint32 newrank = uint32 (atoi (rankStr));
|
||||
if (newrank > targetGuild->GetLowestRank ())
|
||||
return false;
|
||||
|
||||
targetGuild->ChangeRank (target_guid,newrank);
|
||||
return true;
|
||||
return targetGuild->ChangeMemberRank(target_guid, newrank);
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleGuildDeleteCommand(const char *args)
|
||||
|
||||
Reference in New Issue
Block a user