Core/Commands: rename guilds (.guild rename "old guildname" "new guildname")
This commit is contained in:
1 parent
bf10860a1c
commit
678cade116
7 files changed
+81
-1
No files matched your search
@@ -1285,6 +1285,19 @@ void Guild::OnPlayerStatusChange(Player* player, uint32 flag, bool state)
|
||||
}
|
||||
}
|
||||
|
||||
bool Guild::SetName(std::string const& name)
|
||||
{
|
||||
if (m_name == name || name.empty() || name.length() > 24 || sObjectMgr->IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
return false;
|
||||
|
||||
m_name = name;
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_GUILD_NAME);
|
||||
stmt->setString(0, m_name);
|
||||
stmt->setUInt32(1, GetId());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Guild::HandleRoster(WorldSession* session /*= NULL*/)
|
||||
{
|
||||
// Guess size
|
||||
|
||||
Reference in new issue
Block a user