mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
feat(Guild/Commands): guild rename (#10323)
* feat(Guild/Commands): guild rename
* cherry-pick commit (678cade116#)
* Update cs_guild.cpp
This commit is contained in:
@@ -1182,6 +1182,21 @@ void Guild::OnPlayerStatusChange(Player* player, uint32 flag, bool state)
|
||||
}
|
||||
}
|
||||
|
||||
bool Guild::SetName(std::string_view const& name)
|
||||
{
|
||||
if (m_name == name || name.empty() || name.length() > 24 || sObjectMgr->IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_name = name;
|
||||
CharacterDatabasePreparedStatement* 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)
|
||||
{
|
||||
WorldPackets::Guild::GuildRoster roster;
|
||||
|
||||
Reference in New Issue
Block a user