Rename the message so it doesn't collide with the description class

The message and the class which describes a chat command in the game
logic were both named ChatCommandInfo. A view plugin needs both, so the
name was ambiguous there and its method didn't match the interface any
more.

Name the message AvailableChatCommand: it carries one command which is
available to the player, which also reads well next to the request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MSpK6jkyF8ZS5nYXyGwYxA
(cherry picked from commit a945634ba683a465b68f5ee8aed06293c1bb1187)
This commit is contained in:
Claude
2026-07-26 06:47:36 +00:00
committed by Acentech Dev
parent 7a7e63b40e
commit 0aedeb9ce8
4 changed files with 12 additions and 12 deletions

View File

@@ -55,9 +55,9 @@ public class ChatCommandListViewPlugIn : IChatCommandListViewPlugIn
int Write()
{
var size = ChatCommandInfoRef.GetRequiredSize(parameters.Count);
var size = AvailableChatCommandRef.GetRequiredSize(parameters.Count);
var span = connection.Output.GetSpan(size)[..size];
var packet = new ChatCommandInfoRef(span)
var packet = new AvailableChatCommandRef(span)
{
Index = index,
Count = count,

View File

@@ -4277,7 +4277,7 @@
<Length>4</Length>
<Direction>ClientToServer</Direction>
<SentWhen>A client which supports a user interface for chat commands requests the list of commands which are available to the player. It's usually sent after the character entered the game world.</SentWhen>
<CausedReaction>The server sends a ChatCommandInfo for each available chat command.</CausedReaction>
<CausedReaction>The server sends an AvailableChatCommand message for each available chat command.</CausedReaction>
<Fields />
</Packet>
</Packets>

View File

@@ -11244,7 +11244,7 @@
<HeaderType>C2HeaderWithSubCode</HeaderType>
<Code>F5</Code>
<SubCode>01</SubCode>
<Name>ChatCommandInfo</Name>
<Name>AvailableChatCommand</Name>
<Direction>ServerToClient</Direction>
<SentWhen>After the client requested the list of available chat commands. One message is sent for each command which is available to the player.</SentWhen>
<CausedReaction>The client adds the command to its list of known commands, so that it can offer them to the player without requiring him to know or type them.</CausedReaction>