feat(CS): castle flag owner logo (C1 B9 02) + catapults for war atmosphere
Some checks failed
.NET Core / build (push) Has been cancelled
Some checks failed
.NET Core / build (push) Has been cancelled
#1 Castle flags now show the owner guild's logo: resolve owner name -> guild logo (cached), broadcast C1 B9 02 (32-byte mark) to players on the castle map every 15s. #3 War atmosphere: spawn catapult NPCs 221/222 at siege start (client renders them as siege weapons); the 0xB2/0x17 start flag already flips the map to warzone mode. All raw S6 packets, no client changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,4 +75,30 @@ public class CastleSiegeStatusViewPlugIn : ICastleSiegeStatusViewPlugIn
|
||||
|
||||
await connection.SendAsync(WritePacket).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async ValueTask SetCastleFlagAsync(ReadOnlyMemory<byte> guildLogo)
|
||||
{
|
||||
var connection = this._player.Connection;
|
||||
if (connection is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int WritePacket()
|
||||
{
|
||||
// C1 24 B9 02 <32-byte guild logo>
|
||||
var span = connection.Output.GetSpan(36)[..36];
|
||||
span.Clear();
|
||||
span[0] = 0xC1;
|
||||
span[1] = 0x24;
|
||||
span[2] = 0xB9;
|
||||
span[3] = 0x02;
|
||||
var logo = guildLogo.Span;
|
||||
logo[..Math.Min(32, logo.Length)].CopyTo(span.Slice(4, 32));
|
||||
return span.Length;
|
||||
}
|
||||
|
||||
await connection.SendAsync(WritePacket).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user