diff --git a/data/sql/updates/pending_db_world/rev_1751142733581192500.sql b/data/sql/updates/pending_db_world/rev_1751142733581192500.sql new file mode 100644 index 000000000..c4ef57308 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1751142733581192500.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `acore_string` WHERE `entry` IN (1184,1185); +INSERT INTO `acore_string` (`entry`, `content_default`) VALUES +(1184, '| Guild Ranks:'), +(1185, '| {} - {}'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index b99ed999b..801ad3a48 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -972,7 +972,9 @@ enum AcoreStrings LANG_GUILD_INFO_BANK_GOLD = 1181, LANG_GUILD_INFO_MOTD = 1182, LANG_GUILD_INFO_EXTRA_INFO = 1183, - // Room for more level 3 1184-1198 not used + LANG_GUILD_INFO_RANKS = 1184, + LANG_GUILD_INFO_RANKS_LIST = 1185, + // Room for more level 3 1186-1198 not used // Debug commands LANG_DO_NOT_USE_6X_DEBUG_AREATRIGGER_LEFT = 1999, diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp index b3ea9e0f6..9075f2db1 100644 --- a/src/server/scripts/Commands/cs_guild.cpp +++ b/src/server/scripts/Commands/cs_guild.cpp @@ -74,7 +74,7 @@ public: if (sGuildMgr->GetGuildByName(guildName)) { - handler->SendErrorMessage(LANG_GUILD_RENAME_ALREADY_EXISTS); + handler->SendErrorMessage(LANG_GUILD_RENAME_ALREADY_EXISTS, guildName); return false; } @@ -249,6 +249,20 @@ public: handler->PSendSysMessage(LANG_GUILD_INFO_BANK_GOLD, guild->GetTotalBankMoney() / 100 / 100); // Bank Gold (in gold coins) handler->PSendSysMessage(LANG_GUILD_INFO_MOTD, guild->GetMOTD()); // Message of the Day handler->PSendSysMessage(LANG_GUILD_INFO_EXTRA_INFO, guild->GetInfo()); // Extra Information + + QueryResult result = CharacterDatabase.Query("SELECT rid, rname FROM guild_rank WHERE guildid = {}", guild->GetId()); + if (result) + { + handler->PSendSysMessage(LANG_GUILD_INFO_RANKS); + do + { + Field* fields = result->Fetch(); + uint32 rid = fields[0].Get(); + std::string rname = fields[1].Get(); + + handler->PSendSysMessage(LANG_GUILD_INFO_RANKS_LIST, rid, rname); + } while (result->NextRow()); + } return true; } };