mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-08 05:43:43 +00:00
feat(world): guilds in the world: create box, character component, guild commands
The world side of guilds (docs/Guilds.md): - TMP_GUILD_CREATE, which the client's guild create box sends to its world, goes to the chat server as GUILD_CREATE. - The character component reads the character's guild from the database when it loads (instead of the old unused "gn" and "gid" charxml attributes) and takes GUILD_GET_STATUS from the chat server; a change is serialized once (the client redraws the name billboard every time it reads a guild name). A name waiting for moderation isn't shown. - Slash commands (the client has none for guilds): /g and /guild (guild chat; the client's guild tab sends /g, which goes through the chat filter and mute like zone chat, then to the chat server as channel 10), /guildcreate (opens the create box with DisplayGuildCreateBox), /gkick, /grank <name> <officer|veteran|recruit>, /gleader and /gdisband confirm. - The Guild Master script (LOT 3001, L_GUILD_CREATE.lua: using it opens the create box). Live never placed it; GMs can spawn it. Check in game (two accounts, a client with a FeatureGating row "guilds", 1, 0, 0 in its cdclient.fdb): /guildcreate, make a guild (the name shows under yours, the guild button appears on the status bar); invite the second character from the guild window, accept, both lists show both; guild chat tab; /grank, /gkick, /gleader; leave from the window; log the second character out and in (guildmate logged off/in lines). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "DEVGMCommands.h"
|
||||
#include "GMGreaterThanZeroCommands.h"
|
||||
#include "GMZeroCommands.h"
|
||||
#include "GuildCommands.h"
|
||||
#include "LiveEvents.h"
|
||||
|
||||
#include "Amf3.h"
|
||||
@@ -1328,6 +1329,61 @@ void SlashCommandHandler::Startup() {
|
||||
};
|
||||
RegisterCommand(ServerUptimeCommand);
|
||||
|
||||
// Guilds (docs/Guilds.md): the client has no guild commands; its guild chat tab sends /g
|
||||
Command guildChatCommand{
|
||||
.help = "Send a message to your guild.",
|
||||
.info = "Send a message to your guild. The guild chat tab sends this.",
|
||||
.aliases = { "g", "guild" },
|
||||
.handle = GuildCommands::Chat,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildChatCommand);
|
||||
|
||||
Command guildCreateCommand{
|
||||
.help = "Open the window to create a guild.",
|
||||
.info = "Open the window to create a guild (live opened it from the Guild Master NPC).",
|
||||
.aliases = { "guildcreate", "createguild" },
|
||||
.handle = GuildCommands::OpenCreateBox,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildCreateCommand);
|
||||
|
||||
Command guildKickCommand{
|
||||
.help = "Remove a player from your guild.",
|
||||
.info = "Remove a player from your guild: the leader can remove anyone, officers veterans and recruits.",
|
||||
.aliases = { "gkick", "guildkick" },
|
||||
.handle = GuildCommands::Kick,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildKickCommand);
|
||||
|
||||
Command guildRankCommand{
|
||||
.help = "Set a guild member's rank: /grank <name> <officer|veteran|recruit>",
|
||||
.info = "Set a guild member's rank. The leader sets any rank; officers move members between veteran and recruit.",
|
||||
.aliases = { "grank", "guildrank" },
|
||||
.handle = GuildCommands::Rank,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildRankCommand);
|
||||
|
||||
Command guildLeaderCommand{
|
||||
.help = "Hand your guild over to another member: /gleader <name>",
|
||||
.info = "Make another member the guild's leader; you become an officer.",
|
||||
.aliases = { "gleader", "guildleader" },
|
||||
.handle = GuildCommands::Leader,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildLeaderCommand);
|
||||
|
||||
Command guildDisbandCommand{
|
||||
.help = "Disband your guild: /gdisband confirm",
|
||||
.info = "The leader removes every member and the guild itself.",
|
||||
.aliases = { "gdisband", "guilddisband" },
|
||||
.handle = GuildCommands::Disband,
|
||||
.requiredLevel = eGameMasterLevel::CIVILIAN
|
||||
};
|
||||
RegisterCommand(guildDisbandCommand);
|
||||
|
||||
//Commands that are handled by the client
|
||||
|
||||
Command faqCommand{
|
||||
|
||||
Reference in New Issue
Block a user