-
-
Notifications
You must be signed in to change notification settings - Fork 27
mod: add Dtv viscount attacked message #1218
mod: add Dtv viscount attacked message #1218
Conversation
[DefineGameNetworkMessageTypeForMod(GameNetworkMessageSendType.FromServer)] | ||
internal sealed class CrpgDtvViscountUnderAttackMessage : GameNetworkMessage | ||
{ | ||
public Agent Attacker { get; set; } = default!; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to keep the property nullable because
I think ReadAgentReferenceFromPacket could return null if the agent doesn't exist. It's very unlikely that this will ever happen but we never know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've changed the property to nullable, let me know if you are happy with it and I will request some translations for the message to send in the event that the agent doesn't exist.
src/Module.Server/ModuleData/Languages/CNs/std_module_strings_xml-zho-CN.xml
Outdated
Show resolved
Hide resolved
else | ||
{ | ||
textObject = new("{=}The Viscount is under attack!"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to just ignore that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet, removed it
Notifies players when viscount is under attack