mirror of
https://github.com/SoDOff-Project/sodoff-mmo.git
synced 2025-10-11 08:18:49 -07:00
add EventName settings variable
This commit is contained in:
parent
dcb0644af4
commit
7288957a78
@ -29,6 +29,7 @@ internal static class Configuration {
|
||||
internal sealed class ServerConfiguration {
|
||||
public string ListenIP { get; set; } = string.Empty;
|
||||
public int Port { get; set; } = 9933;
|
||||
public string EventName { get; set; } = "ScoutAttack";
|
||||
public int EventTimer { get; set; } = 30;
|
||||
public int FirstEventTimer { get; set; } = 10;
|
||||
public int RacingMaxPlayers { get; set; } = 6;
|
||||
|
@ -161,7 +161,7 @@ class WorldEvent {
|
||||
// send reward info
|
||||
private void PostEndEvent1(Object? source, ElapsedEventArgs e) {
|
||||
NetworkPacket packet = Utils.VlNetworkPacket(
|
||||
"WE_ScoutAttack_End",
|
||||
"WE_" + Configuration.ServerConfiguration.EventName + "_End",
|
||||
lastResults,
|
||||
room.Id
|
||||
);
|
||||
@ -218,10 +218,10 @@ class WorldEvent {
|
||||
public NetworkArray EventInfoArray(bool WE = true, bool WEN = true) {
|
||||
NetworkArray vl = new();
|
||||
if (WE) {
|
||||
vl.Add(NetworkArray.VlElement("WE_ScoutAttack", EventInfo(), isPersistent:true));
|
||||
vl.Add(NetworkArray.VlElement("WE_" + Configuration.ServerConfiguration.EventName, EventInfo(), isPersistent:true));
|
||||
}
|
||||
if (WEN) {
|
||||
vl.Add(NetworkArray.VlElement("WEN_ScoutAttack", nextStartTimeString, isPersistent:true));
|
||||
vl.Add(NetworkArray.VlElement("WEN_" + Configuration.ServerConfiguration.EventName, nextStartTimeString, isPersistent:true));
|
||||
}
|
||||
return vl;
|
||||
}
|
||||
|
@ -12,6 +12,9 @@
|
||||
"// EnableChat": "When true, in-game chat will be enabled",
|
||||
"EnableChat": true,
|
||||
|
||||
"// EventName": "World event name send to client (can be used to select ship type after modding WorldEventScoutAttack in client)",
|
||||
"EventName": "ScoutAttack",
|
||||
|
||||
"// FirstEventTimer": "time to start of first world event (battle ship event) after start MMO server",
|
||||
"FirstEventTimer": 3,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user