mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Allow name billboards to be toggled (#1026)
* Allow name billboards to be toggled * Allow name billboards to be toggled * Add comments * Move logic to Character * Use Entity in Character instead
This commit is contained in:
@@ -171,6 +171,19 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
}
|
||||
#endif
|
||||
|
||||
if (chatCommand == "togglenameplate" && (Game::config->GetValue("allownameplateoff") == "1" || entity->GetGMLevel() > GAME_MASTER_LEVEL_DEVELOPER)) {
|
||||
auto* character = entity->GetCharacter();
|
||||
|
||||
if (character && character->GetBillboardVisible()) {
|
||||
character->SetBillboardVisible(false);
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Your nameplate has been turned off and is not visible to players currently in this zone.");
|
||||
} else {
|
||||
character->SetBillboardVisible(true);
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Your nameplate is now on and visible to all players.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
//HANDLE ALL NON GM SLASH COMMANDS RIGHT HERE!
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
Reference in New Issue
Block a user