Hondacrx
2025-08-31 13:23:49 -04:00
parent 59c983d3ff
commit c5cccdec10
31 changed files with 1045 additions and 1807 deletions
+4 -1
View File
@@ -7,6 +7,7 @@ using Game.DataStorage;
using Game.Entities;
using Game.Networking;
using Game.Networking.Packets;
using System;
using System.Collections.Generic;
namespace Game.Chat
@@ -16,7 +17,7 @@ namespace Game.Chat
public virtual dynamic Invoke(Locale locale = Locale.enUS) { return default; }
}
public class ChatPacketSender : IDoWork<Player>
public class ChatPacketSender
{
ChatMsg Type;
Language Language;
@@ -72,6 +73,8 @@ namespace Game.Chat
}
}
public static implicit operator IDoWork<Player>(ChatPacketSender obj) => obj.Invoke;
public void Invoke(Player player)
{
if (!player.MeetPlayerCondition(PlayerConditionID))
+6 -4
View File
@@ -447,8 +447,12 @@ namespace Game
Max = 2,
}
public class CreatureTextLocalizer : IDoWork<Player>
public class CreatureTextLocalizer
{
Dictionary<Locale, ChatPacketSender> _packetCache = new();
MessageBuilder _builder;
ChatMsg _msgType;
public CreatureTextLocalizer(MessageBuilder builder, ChatMsg msgType)
{
_builder = builder;
@@ -484,9 +488,7 @@ namespace Game
sender.Invoke(player);
}
Dictionary<Locale, ChatPacketSender> _packetCache = new();
MessageBuilder _builder;
ChatMsg _msgType;
public static implicit operator IDoWork<Player>(CreatureTextLocalizer obj) => obj.Invoke;
}
public class CreatureTextBuilder : MessageBuilder