mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
[Bug Fix] Fix bot guild removal. (#2194)
This commit is contained in:
parent
992e4ac59e
commit
5b90d26a33
@ -6788,7 +6788,7 @@ bool Bot::ProcessGuildRemoval(Client* guildOfficer, std::string botName) {
|
|||||||
if(guildOfficer && !botName.empty()) {
|
if(guildOfficer && !botName.empty()) {
|
||||||
Bot* botToUnGuild = entity_list.GetBotByBotName(botName);
|
Bot* botToUnGuild = entity_list.GetBotByBotName(botName);
|
||||||
if(botToUnGuild) {
|
if(botToUnGuild) {
|
||||||
if (database.botdb.SaveGuildMembership(botToUnGuild->GetBotID(), 0, 0))
|
if (database.botdb.DeleteGuildMembership(botToUnGuild->GetBotID()))
|
||||||
Result = true;
|
Result = true;
|
||||||
} else {
|
} else {
|
||||||
uint32 ownerId = 0;
|
uint32 ownerId = 0;
|
||||||
@ -6797,7 +6797,7 @@ bool Bot::ProcessGuildRemoval(Client* guildOfficer, std::string botName) {
|
|||||||
uint32 botId = 0;
|
uint32 botId = 0;
|
||||||
if (!database.botdb.LoadBotID(ownerId, botName, botId))
|
if (!database.botdb.LoadBotID(ownerId, botName, botId))
|
||||||
guildOfficer->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadBotID(), botName.c_str());
|
guildOfficer->Message(Chat::Red, "%s for '%s'", BotDatabase::fail::LoadBotID(), botName.c_str());
|
||||||
if (botId && database.botdb.SaveGuildMembership(botId, 0, 0))
|
if (botId && database.botdb.DeleteGuildMembership(botId))
|
||||||
Result = true;
|
Result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user