-
Notifications
You must be signed in to change notification settings - Fork 16
/
misc.cs
73 lines (57 loc) · 2.36 KB
/
misc.cs
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
using System;
namespace EOLib
{
public static class ArrayExtension
{
public static T[] SubArray<T>(this T[] arr, int offset, int count)
{
T[] ret = new T[count];
if (count == 1)
ret[0] = arr[offset];
for (int i = offset; i < offset + count; ++i)
ret[i - offset] = arr[i];
return ret;
}
}
public static class DateTimeExtension
{
public static int ToEOTimeStamp(this DateTime dt)
{
return dt.Hour * 360000 + dt.Minute * 6000 + dt.Second * 100 + dt.Millisecond / 10;
}
}
public static class Constants
{
public const int ChatBubbleTimeout = 4000;
public const int ResponseTimeout = 5000;
public const int ResponseFileTimeout = 10000;
public const byte ViewLength = 16;
public const int LockerMaxSingleItemAmount = 200;
public const int PartyRequestTimeoutSeconds = 15;
public const int TradeRequestTimeoutSeconds = 15;
public const int MuteDefaultTimeMinutes = 5;
public const string LogFilePath = "log/debug.log";
public const string LogFileFmt = "log/{0}-debug.log";
public const string FriendListFile = "config/friends.ini";
public const string IgnoreListFile = "config/ignore.ini";
public const string InventoryFile = "config/inventory.ini";
//Should be easily customizable between different clients (based on graphics)
//not a config option because this shouldn't be exposed at the user level
public static readonly int[] TrapSpikeGFXObjectIDs = {449, 450, 451, 452};
public const string FontSize07 = @"Fonts/InGame_Main_07";
public const string FontSize08 = @"Fonts/InGame_Main_08";
public const string FontSize08pt5 = @"Fonts/InGame_Main_08pt5";
public const string FontSize09 = @"Fonts/InGame_Main_09";
public const string FontSize10 = @"Fonts/InGame_Main_10";
public const int OutOfBand_Packets_Handled_Per_Update = 10;
public const string CreditsText = @"Endless Online - C# Client
Developed by Ethan Moffat
Based on Endless Online --
Copyright Vult-R
Thanks to :
--Sausage for eoserv + C# EO libs
--eoserv.net community
--Hotdog for Eodev client";
public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}";
}
}