Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 760a97c

Browse files
committed
Zip support
1 parent 4055a0f commit 760a97c

39 files changed

+541
-683
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
##
44
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
55

6-
# Game settings files
7-
GameServerApp/Settings/
8-
96
# User-specific files
107
*.suo
118
*.user
@@ -308,7 +305,6 @@ __pycache__/
308305
OpenCover/
309306

310307
# Custom stuff
311-
GameServer/Settings/GameInfo.json
312308
GameServerConsole/Settings/GameInfo.json
313309
GameServerConsole/Settings/GameServerSettings.json
314310
MigrationBackup/

Content/GameMode/LeagueSandbox-Default/GameMode.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

Content/LeagueSandbox-Default

GameServerCore/Content/HashFunctions.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class HashFunctions
55
public static uint HashString(string path)
66
{
77
uint hash = 0;
8-
var mask = 0xF0000000;
8+
const uint mask = 0xF0000000;
99
for (var i = 0; i < path.Length; i++)
1010
{
1111
hash = char.ToLower(path[i]) + 0x10 * hash;
@@ -18,22 +18,21 @@ public static uint HashString(string path)
1818
return hash;
1919
}
2020

21-
public static uint HashStringSdbm(string section, string name)
21+
public static uint HashStringSdbm(string data)
2222
{
2323
uint hash = 0;
24-
foreach (var c in section)
25-
{
26-
hash = char.ToLower(c) + 65599 * hash;
27-
}
28-
29-
hash = char.ToLower('*') + 65599 * hash;
30-
foreach (var c in name)
24+
foreach (var c in data)
3125
{
3226
hash = char.ToLower(c) + 65599 * hash;
3327
}
3428

3529
return hash;
3630
}
31+
32+
public static uint HashStringSdbm(string section, string name)
33+
{
34+
return HashStringSdbm($"{section}*{name}");
35+
}
3736
}
3837

3938

GameServerCore/Domain/GameObjects/IChampion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ public interface IChampion : IObjAiBase
2929
ISpell GetSpell(byte slot);
3030
ISpell LevelUpSpell(byte slot);
3131

32-
32+
3333
}
3434
}

GameServerCore/Domain/IInventoryManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public interface IInventoryManager
55
IItem GetItem(byte slot);
66
void RemoveItem(byte slot);
77
byte GetItemSlot(IItem item);
8-
IItem SetExtraItem(byte slot, IItemType item);
8+
IItem SetExtraItem(byte slot, IItemData item);
99
void SwapItems(byte slot1, byte slot2);
1010
}
1111
}

GameServerCore/Domain/IItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ public interface IItem
44
{
55
byte StackSize { get; }
66
int TotalPrice { get; }
7-
IItemType ItemType { get; }
7+
IItemData ItemData { get; }
88
}
99
}

GameServerCore/Domain/IItemType.cs renamed to GameServerCore/Domain/IItemData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace GameServerCore.Domain
22
{
3-
public interface IItemType
3+
public interface IItemData
44
{
55
int ItemId { get; }
66
string Name { get; }

GameServerCore/Extensions.cs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -95,52 +95,6 @@ public static double RadianToDegree(double angle)
9595
}
9696
}
9797

98-
public class PairList<TKey, TValue> : List<Pair<TKey, TValue>>
99-
{
100-
public void Add(TKey key, TValue value)
101-
{
102-
Add(new Pair<TKey, TValue>(key, value));
103-
}
104-
public bool ContainsKey(TKey key)
105-
{
106-
foreach (var v in this)
107-
{
108-
if (v.Item1.Equals(key))
109-
{
110-
return true;
111-
}
112-
}
113-
114-
return false;
115-
}
116-
117-
public TValue this[TKey key]
118-
{
119-
get
120-
{
121-
foreach (var v in this)
122-
{
123-
if (v.Item1.Equals(key))
124-
{
125-
return v.Item2;
126-
}
127-
}
128-
129-
return default(TValue);
130-
}
131-
set
132-
{
133-
foreach (var v in this)
134-
{
135-
if (v.Item1.Equals(key))
136-
{
137-
v.Item2 = value;
138-
}
139-
}
140-
}
141-
}
142-
}
143-
14498
public static class CustomConvert
14599
{
146100
public static TeamId ToTeamId(this int i)

GameServerCore/GameServerCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<Compile Include="Domain\IBuff.cs" />
7575
<Compile Include="Domain\IInventoryManager.cs" />
7676
<Compile Include="Domain\IItem.cs" />
77-
<Compile Include="Domain\IItemType.cs" />
77+
<Compile Include="Domain\IItemData.cs" />
7878
<Compile Include="Domain\IReplicate.cs" />
7979
<Compile Include="Domain\IReplication.cs" />
8080
<Compile Include="Domain\IRuneCollection.cs" />

0 commit comments

Comments
 (0)