mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
Scripts/Commands: add some missing checks for .guild create command (#23201)
* Core/Conditions: implement CONDITION_GAMEMASTER
* Scripts/Commands: add some missing checks for .guild create command
(cherry picked from commit ae8750716f)
This commit is contained in:
@@ -90,7 +90,22 @@ public:
|
||||
if (target->GetGuildId())
|
||||
{
|
||||
handler->SendSysMessage(LANG_PLAYER_IN_GUILD);
|
||||
return true;
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sGuildMgr->GetGuildByName(guildName))
|
||||
{
|
||||
handler->SendSysMessage(LANG_GUILD_RENAME_ALREADY_EXISTS);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(guildName) || !sObjectMgr->IsValidCharterName(guildName))
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
Guild* guild = new Guild;
|
||||
|
||||
Reference in New Issue
Block a user