Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

mod: add Dtv viscount attacked message #1218

Merged
merged 5 commits into from
Aug 2, 2023
Merged

mod: add Dtv viscount attacked message #1218

merged 5 commits into from
Aug 2, 2023

Conversation

Muparadzi
Copy link
Contributor

Notifies players when viscount is under attack

src/Module.Server/Modes/Dtv/CrpgDtvServer.cs Outdated Show resolved Hide resolved
src/Module.Server/Modes/Dtv/CrpgDtvServer.cs Outdated Show resolved Hide resolved
[DefineGameNetworkMessageTypeForMod(GameNetworkMessageSendType.FromServer)]
internal sealed class CrpgDtvViscountUnderAttackMessage : GameNetworkMessage
{
public Agent Attacker { get; set; } = default!;
Copy link
Owner

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.

Copy link
Contributor Author

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.

@Muparadzi Muparadzi requested a review from verdie-g August 1, 2023 21:19
Comment on lines 90 to 93
else
{
textObject = new("{=}The Viscount is under attack!");
}
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet, removed it

@verdie-g verdie-g merged commit 4add2ee into verdie-g:master Aug 2, 2023
2 checks passed
@Muparadzi Muparadzi deleted the dtv-viscount-attack-notifier branch August 2, 2023 07:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants