forked from Elfocrash/L2dotNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerConfig2.cs
More file actions
672 lines (546 loc) · 33 KB
/
ServerConfig2.cs
File metadata and controls
672 lines (546 loc) · 33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
using System.ComponentModel;
using Newtonsoft.Json;
namespace L2dotNET.Config
{
///<summary>Server Config.</summary>
public class ServerConfig2
{
///<summary>Gameserver setting.</summary>
[JsonProperty(PropertyName = "GameServer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public GameServer GameServer { get; set; }
///<summary>Database informations.</summary>
[JsonProperty(PropertyName = "GameDatabase", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public GameDatabase GameDatabase { get; set; }
///<summary>Server List.</summary>
[JsonProperty(PropertyName = "ServerList", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public ServerList ServerList { get; set; }
///<summary>Clients related options.</summary>
[JsonProperty(PropertyName = "Client", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Client Client { get; set; }
///<summary>Jail & Punishements.</summary>
[JsonProperty(PropertyName = "Punishement", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Punishement Punishement { get; set; }
///<summary>Automatic options.</summary>
[JsonProperty(PropertyName = "Automatic", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Automatic Automatic { get; set; }
///<summary>Items Management.</summary>
[JsonProperty(PropertyName = "ItemManagement", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public ItemManagement ItemManagement { get; set; }
///<summary>Rates.</summary>
[JsonProperty(PropertyName = "Rates", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Rates Rates { get; set; }
///<summary>Allowed features.</summary>
[JsonProperty(PropertyName = "AllowedFeatures", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public AllowedFeatures AllowedFeatures { get; set; }
///<summary>Debug, Dev & Test config.</summary>
[JsonProperty(PropertyName = "GameDeveloperConfig", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public GameDeveloperConfig GameDeveloperConfig { get; set; }
///<summary>Dead Lock Detector (thread detecting deadlocks).</summary>
[JsonProperty(PropertyName = "DeadLockDetector", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public DeadLockDetector DeadLockDetector { get; set; }
///<summary>Logging features.</summary>
[JsonProperty(PropertyName = "Logging", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public Logging Logging { get; set; }
///<summary>Community board configuration.</summary>
[JsonProperty(PropertyName = "CommunityBoard", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public CommunityBoard CommunityBoard { get; set; }
///<summary>Flood Protectors.</summary>
[JsonProperty(PropertyName = "FloodProtector", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public FloodProtector FloodProtector { get; set; }
///<summary>Misc.</summary>
[JsonProperty(PropertyName = "Misc", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public ServerMisc Misc { get; set; }
}
///<summary>Gameserver setting.</summary>
public class GameServer
{
///<summary>Bind ip of the gameserver, use * to bind on all available IPs.</summary>
[DefaultValue("*")]
[JsonProperty(PropertyName = "GameserverHostname", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string GameserverHostname { get; set; }
[DefaultValue(7777)]
[JsonProperty(PropertyName = "GameserverPort", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int GameserverPort { get; set; }
///<summary>This is transmitted to the clients connecting from an external network, so it has to be a public IP or resolvable hostname.</summary>
///<summary>If this ip is resolvable by Login just leave *.</summary>
[DefaultValue("*")]
[JsonProperty(PropertyName = "ExternalHostname", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string ExternalHostname { get; set; }
///<summary>This is transmitted to the client from the same network, so it has to be a local IP or resolvable hostname.</summary>
///<summary>If this ip is resolvable by Login just leave *.</summary>
[DefaultValue("*")]
[JsonProperty(PropertyName = "InternalHostname", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string InternalHostname { get; set; }
///<summary>The Loginserver port.</summary>
[DefaultValue(9014)]
[JsonProperty(PropertyName = "LoginPort", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int LoginPort { get; set; }
///<summary>The Loginserver host.</summary>
[DefaultValue("localhost")]
[JsonProperty(PropertyName = "LoginHost", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string LoginHost { get; set; }
///<summary>This is the server id that the gameserver will request.</summary>
[DefaultValue(1)]
[JsonProperty(PropertyName = "RequestServerID", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int RequestServerId { get; set; }
///<summary>If set to true, the login will give an other id to the server (if the requested id is already reserved).</summary>
[DefaultValue(true)]
[JsonProperty(PropertyName = "AcceptAlternateID", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AcceptAlternateId { get; set; }
}
///<summary>Database informations.</summary>
public class GameDatabase
{
[DefaultValue("")]
[JsonProperty(PropertyName = "URL", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string Url { get; set; }
[DefaultValue("root")]
[JsonProperty(PropertyName = "Login", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string Login { get; set; }
[DefaultValue("")]
[JsonProperty(PropertyName = "Password", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string Password { get; set; }
///<summary>Maximum database connections (minimum 2, basically 10 if number under 10, default 100).</summary>
[DefaultValue(10)]
[JsonProperty(PropertyName = "MaximumDbConnections", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MaximumDbConnections { get; set; }
///<summary>Idle connections expiration time (0 = never expire, default).</summary>
[DefaultValue(0)]
[JsonProperty(PropertyName = "MaximumDbIdleTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MaximumDbIdleTime { get; set; }
}
///<summary>Server List.</summary>
public class ServerList
{
///<summary>Displays [] in front of server name.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "ServerListBrackets", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool ServerListBrackets { get; set; }
///<summary>Displays a clock next to the server name.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "ServerListClock", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool ServerListClock { get; set; }
///<summary>If True, the server will be set as GM only.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "ServerGMOnly", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool ServerGmOnly { get; set; }
///<summary>If True, the server will be a test server (listed by testserver clients only).</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "TestServer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool TestServer { get; set; }
}
///<summary>Clients related options.</summary>
/// TODO: check protocol version
/// if (MIN_PROTOCOL_REVISION > MAX_PROTOCOL_REVISION)
/// throw new Error("MinProtocolRevision is bigger than MaxProtocolRevision in server.properties.");
public class Client
{
///<summary>Allow delete chars after D days, 0 = feature disabled.</summary>
[DefaultValue(7)]
[JsonProperty(PropertyName = "DeleteCharAfterDays", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int DeleteCharAfterDays { get; set; }
///<summary>Define how many players are allowed to play simultaneously on your server.</summary>
[DefaultValue(100)]
[JsonProperty(PropertyName = "MaximumOnlineUsers", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MaximumOnlineUsers { get; set; }
///<summary>Minimum and maximum protocol revision that server allow to connect.</summary>
///<summary>You must keep MinProtocolRevision lesser or equals than MaxProtocolRevision.</summary>
///<summary>Default: 730.</summary>
[DefaultValue(730)]
[JsonProperty(PropertyName = "MinProtocolRevision", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MinProtocolRevision { get; set; }
///<summary>Default: 746.</summary>
[DefaultValue(746)]
[JsonProperty(PropertyName = "MaxProtocolRevision", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MaxProtocolRevision { get; set; }
}
///<summary>Jail & Punishements.</summary>
public class Punishement
{
///<summary>Player punishment for illegal actions.</summary>
///<summary>1 - broadcast warning to gms only.</summary>
///<summary>2 - kick player(default).</summary>
///<summary>3 - kick & ban player.</summary>
///<summary>4 - jail player (define minutes of jail with param: 0 = infinite).</summary>
[DefaultValue(2)]
[JsonProperty(PropertyName = "DefaultPunish", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int DefaultPunish { get; set; }
[DefaultValue(0)]
[JsonProperty(PropertyName = "DefaultPunishParam", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int DefaultPunishParam { get; set; }
}
///<summary>Automatic options.</summary>
public class Automatic
{
///<summary>AutoLoot, don't lead herbs behavior. False by default.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "AutoLoot", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AutoLoot { get; set; }
///<summary>AutoLoot from raid boss. False by default.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "AutoLootRaid", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AutoLootRaid { get; set; }
///<summary>If False, herbs will drop on ground even if AutoLoot is enabled. False by default.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "AutoLootHerbs", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AutoLootHerbs { get; set; }
}
public class ItemTimer
{
[JsonProperty(PropertyName = "Id", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int ItemId { get; set; }
[JsonProperty(PropertyName = "Timer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int Timer { get; set; }
}
///<summary>Items Management.</summary>
/// TODO: Check Time * 1000
public class ItemManagement
{
///<summary>Allows players to drop items on the ground, default True.</summary>
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowDiscardItem", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowDiscardItem { get; set; }
///<summary>Allows the creation of multiple non-stackable items at one time, default True.</summary>
[DefaultValue(true)]
[JsonProperty(PropertyName = "MultipleItemDrop", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool MultipleItemDrop { get; set; }
///<summary>Destroys dropped herbs after X seconds, set 0 to disable, default 15.</summary>
[DefaultValue(15 * 1000)]
[JsonProperty(PropertyName = "AutoDestroyHerbTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int AutoDestroyHerbTime { get; set; }
///<summary>Destroys dropped items after X seconds, set 0 to disable, default 600.</summary>
[DefaultValue(600 * 1000)]
[JsonProperty(PropertyName = "AutoDestroyItemTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int AutoDestroyItemTime { get; set; }
///<summary>Destroys dropped equipable items (armor, weapon, jewelry) after X seconds, set 0 to disable, default 0.</summary>
[DefaultValue(0 * 1000)]
[JsonProperty(PropertyName = "AutoDestroyEquipableItemTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int AutoDestroyEquipableItemTime { get; set; }
///<summary>Destroys dropped items after specified time. Ignores rules above, default 57-0,5575-0,6673-0.</summary>
///<summary>57-0: Item id 57 will never be destroyed.</summary>
///<summary>57-600: Item id 57 will be destroyed after 600 seconds/10 minutes.</summary>
[JsonProperty(PropertyName = "AutoDestroySpecialItemTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public ItemTimer[] AutoDestroySpecialItemTime { get; set; } = { new ItemTimer
{
ItemId = 57,
Timer = 0
},
new ItemTimer
{
ItemId = 5575,
Timer = 0
},
new ItemTimer
{
ItemId = 6673,
Timer = 0
} };
///<summary>Items dropped by players will have destroy time multiplied by X, default 1.</summary>
///<summary>0: Items dropped by players will never be destroyed.</summary>
[DefaultValue(1)]
[JsonProperty(PropertyName = "PlayerDroppedItemMultiplier", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerDroppedItemMultiplier { get; set; }
///<summary>Save dropped items into DB, restore them after reboot/start, default True.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "SaveDroppedItem", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool SaveDroppedItem { get; set; }
}
///<summary>Rates.</summary>
public class Rates
{
///<summary>Rate control, float values.</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateXp", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateXp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateSp", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateSp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RatePartyXp", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RatePartyXp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RatePartySp", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RatePartySp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateDropAdena", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateDropAdena { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateConsumableCost", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateConsumableCost { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateDropItems", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateDropItems { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateRaidDropItems", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateRaidDropItems { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateDropSpoil", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateDropSpoil { get; set; }
[DefaultValue(1)]
[JsonProperty(PropertyName = "RateDropManor", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int RateDropManor { get; set; }
///<summary>Quest configuration settings.</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateQuestDrop", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateQuestDrop { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateQuestReward", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateQuestReward { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateQuestRewardXP", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateQuestRewardXp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateQuestRewardSP", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateQuestRewardSp { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateQuestRewardAdena", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateQuestRewardAdena { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateKarmaExpLost", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int RateKarmaExpLost { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateSiegeGuardsPrice", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int RateSiegeGuardsPrice { get; set; }
///<summary>Player Drop Rate control, percent (%) values.</summary>
[DefaultValue(3)]
[JsonProperty(PropertyName = "PlayerDropLimit", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerDropLimit { get; set; }
[DefaultValue(5)]
[JsonProperty(PropertyName = "PlayerRateDrop", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerRateDrop { get; set; }
[DefaultValue(70)]
[JsonProperty(PropertyName = "PlayerRateDropItem", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerRateDropItem { get; set; }
[DefaultValue(25)]
[JsonProperty(PropertyName = "PlayerRateDropEquip", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerRateDropEquip { get; set; }
[DefaultValue(5)]
[JsonProperty(PropertyName = "PlayerRateDropEquipWeapon", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PlayerRateDropEquipWeapon { get; set; }
///<summary>Karma Drop Rate control, percent (%) values.</summary>
[DefaultValue(10)]
[JsonProperty(PropertyName = "KarmaDropLimit", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int KarmaDropLimit { get; set; }
[DefaultValue(70)]
[JsonProperty(PropertyName = "KarmaRateDrop", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int KarmaRateDrop { get; set; }
[DefaultValue(50)]
[JsonProperty(PropertyName = "KarmaRateDropItem", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int KarmaRateDropItem { get; set; }
[DefaultValue(40)]
[JsonProperty(PropertyName = "KarmaRateDropEquip", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int KarmaRateDropEquip { get; set; }
[DefaultValue(10d)]
[JsonProperty(PropertyName = "KarmaRateDropEquipWeapon", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int KarmaRateDropEquipWeapon { get; set; }
///<summary>Pet rate control (float values except for "PetFoodRate", default 1./1/1.).</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "PetXpRate", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double PetXpRate { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "PetFoodRate", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int PetFoodRate { get; set; }
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "SinEaterXpRate", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double SinEaterXpRate { get; set; }
///<summary>Common herbs (default).</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateCommonHerbs", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateCommonHerbs { get; set; }
///<summary>Herb of Life (categorie 1).</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateHpHerbs", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateHpHerbs { get; set; }
///<summary>Herb of Mana (categorie 2).</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateMpHerbs", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateMpHerbs { get; set; }
///<summary>Special herbs (categorie 3).</summary>
[DefaultValue(1.0)]
[JsonProperty(PropertyName = "RateSpecialHerbs", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public double RateSpecialHerbs { get; set; }
}
///<summary>Allowed features.</summary>
public class AllowedFeatures
{
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowFreight", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowFreight { get; set; }
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowWarehouse", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowWarehouse { get; set; }
///<summary>If True, player can try on weapon and armor in shops.</summary>
///<summary>Each item tried cost WearPrice adena.</summary>
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowWear", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowWear { get; set; }
[DefaultValue(5)]
[JsonProperty(PropertyName = "WearDelay", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int WearDelay { get; set; }
[DefaultValue(10)]
[JsonProperty(PropertyName = "WearPrice", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int WearPrice { get; set; }
///<summary>"Allow" types - Read variable name for info about ;p.</summary>
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowLottery", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowLottery { get; set; }
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowWater", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowWater { get; set; }
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowCursedWeapons", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowCursedWeapons { get; set; }
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowManor", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowManor { get; set; }
[DefaultValue(true)]
[JsonProperty(PropertyName = "AllowBoat", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowBoat { get; set; }
///<summary>NOTE: Fishing will "bug" without geodata (if you activate w/o geodata, fishing is possible everywhere).</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "AllowFishing", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AllowFishing { get; set; }
///<summary>Allow characters to receive damage from falling. CoordSynchronize = 2 is recommended.</summary>
///<summary>True - enabled.</summary>
///<summary>False - disabled.</summary>
///<summary>Auto - True if geodata enabled and False if disabled.</summary>
///<summary>Default: Auto.</summary>
/// TODO: Check ENABLE_FALLING_DAMAGE
[DefaultValue("auto")]
[JsonProperty(PropertyName = "EnableFallingDamage", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string EnableFallingDamage { get; set; }
}
///<summary>Debug, Dev & Test config.</summary>
public class GameDeveloperConfig
{
///<summary>Don't load spawns.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "NoSpawns", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool NoSpawns { get; set; }
///<summary>Debug messages (by default False, easily "flood" your GS logs).</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "Debug", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool Debug { get; set; }
[DefaultValue(false)]
[JsonProperty(PropertyName = "Developer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool Developer { get; set; }
[DefaultValue(false)]
[JsonProperty(PropertyName = "PacketHandlerDebug", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool PacketHandlerDebug { get; set; }
}
///<summary>Dead Lock Detector (thread detecting deadlocks).</summary>
public class DeadLockDetector
{
///<summary>Activate the feature (by default: False).</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "DeadLockDetector", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool EnableDeadLockDetector { get; set; }
///<summary>Check interval in seconds (by default: 20).</summary>
[DefaultValue(20)]
[JsonProperty(PropertyName = "DeadLockCheckInterval", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int DeadLockCheckInterval { get; set; }
///<summary>Automatic restart if deadlock case is found (by default: False).</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "RestartOnDeadlock", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool RestartOnDeadlock { get; set; }
}
///<summary>Logging features.</summary>
public class Logging
{
///<summary>Logging ChatWindow.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "LogChat", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool LogChat { get; set; }
///<summary>Logging Item handling NOTE: This can be very space consuming.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "LogItems", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool LogItems { get; set; }
///<summary>Log GM actions.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "GMAudit", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool GmAudit { get; set; }
}
///<summary>Community board configuration.</summary>
public class CommunityBoard
{
///<summary>Activate or no the community board.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "EnableCommunityBoard", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool EnableCommunityBoard { get; set; }
///<summary>Show this community board section when you open it.</summary>
[DefaultValue("_bbshome")]
[JsonProperty(PropertyName = "BBSDefault", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string BBSDefault { get; set; }
}
///<summary>Flood Protectors.</summary>
public class FloodProtector
{
///<summary>The values are shown on ms. They can be setted to 0 to be disabled.</summary>
[DefaultValue(4200)]
[JsonProperty(PropertyName = "RollDiceTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int RollDiceTime { get; set; }
[DefaultValue(10000)]
[JsonProperty(PropertyName = "HeroVoiceTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int HeroVoiceTime { get; set; }
[DefaultValue(2000)]
[JsonProperty(PropertyName = "SubclassTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int SubclassTime { get; set; }
[DefaultValue(1000)]
[JsonProperty(PropertyName = "DropItemTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int DropItemTime { get; set; }
[DefaultValue(500)]
[JsonProperty(PropertyName = "ServerBypassTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int ServerBypassTime { get; set; }
[DefaultValue(100)]
[JsonProperty(PropertyName = "MultisellTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int MultisellTime { get; set; }
[DefaultValue(300)]
[JsonProperty(PropertyName = "ManufactureTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int ManufactureTime { get; set; }
[DefaultValue(3000)]
[JsonProperty(PropertyName = "ManorTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int ManorTime { get; set; }
[DefaultValue(10000)]
[JsonProperty(PropertyName = "SendMailTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int SendMailTime { get; set; }
[DefaultValue(3000)]
[JsonProperty(PropertyName = "CharacterSelectTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int CharacterSelectTime { get; set; }
[DefaultValue(0)]
[JsonProperty(PropertyName = "GlobalChatTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int GlobalChatTime { get; set; }
[DefaultValue(0)]
[JsonProperty(PropertyName = "TradeChatTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int TradeChatTime { get; set; }
[DefaultValue(2000)]
[JsonProperty(PropertyName = "SocialTime", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int SocialTime { get; set; }
}
///<summary>Misc.</summary>
public class ServerMisc
{
///<summary>Basic protection against L2Walker.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "L2WalkerProtection", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool L2WalkerProtection { get; set; }
///<summary>Delete invalid quest from player.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "AutoDeleteInvalidQuestData", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool AutoDeleteInvalidQuestData { get; set; }
///<summary>Zone setting.</summary>
///<summary>0 = Peace All the Time.</summary>
///<summary>1 = PVP During Siege for siege participants.</summary>
///<summary>2 = PVP All the Time.</summary>
[DefaultValue(0)]
[JsonProperty(PropertyName = "ZoneTown", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public int ZoneTown { get; set; }
///<summary>Show "data/html/servnews.htm" when a character logins.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "ShowServerNews", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool ShowServerNews { get; set; }
///<summary>Disable tutorial on new player game entrance. Default: False.</summary>
[DefaultValue(false)]
[JsonProperty(PropertyName = "DisableTutorial", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public bool DisableTutorial { get; set; }
}
}