Changeset 230 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Apr 18, 2015, 4:27:57 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 2 added
- 6 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r224 r230 15 15 <DebugType>none</DebugType> 16 16 <Optimize>true</Optimize> 17 <OutputPath>..\bin\ 7DaysToDie_Data\Managed</OutputPath>17 <OutputPath>..\bin\Mods\Allocs_CommonFunc</OutputPath> 18 18 <ErrorReport>prompt</ErrorReport> 19 19 <WarningLevel>4</WarningLevel> … … 23 23 <DebugType>none</DebugType> 24 24 <Optimize>true</Optimize> 25 <OutputPath>..\bin\ 7DaysToDie_Data\Managed</OutputPath>25 <OutputPath>..\bin\Mods\Allocs_CommonFunc</OutputPath> 26 26 <ErrorReport>prompt</ErrorReport> 27 27 <WarningLevel>4</WarningLevel> … … 34 34 </PropertyGroup> 35 35 <ItemGroup> 36 <Reference Include="System" /> 36 <Reference Include="Assembly-CSharp"> 37 <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath> 38 <Private>False</Private> 39 </Reference> 40 <Reference Include="mscorlib"> 41 <HintPath>..\7dtd-binaries\mscorlib.dll</HintPath> 42 <Private>False</Private> 43 </Reference> 44 <Reference Include="System"> 45 <HintPath>..\7dtd-binaries\System.dll</HintPath> 46 <Private>False</Private> 47 </Reference> 37 48 <Reference Include="UnityEngine"> 38 49 <HintPath>..\7dtd-binaries\UnityEngine.dll</HintPath> 39 </Reference> 40 <Reference Include="EasyAntiCheat.Client"> 41 <HintPath>..\7dtd-binaries\EasyAntiCheat.Client.dll</HintPath> 42 </Reference> 43 <Reference Include="EasyAntiCheat.Server"> 44 <HintPath>..\7dtd-binaries\EasyAntiCheat.Server.dll</HintPath> 45 </Reference> 46 <Reference Include="Assembly-CSharp-firstpass"> 47 <HintPath>..\7dtd-binaries\Assembly-CSharp-firstpass.dll</HintPath> 50 <Private>False</Private> 48 51 </Reference> 49 52 <Reference Include="LogLibrary"> 50 53 <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath> 51 </Reference> 52 <Reference Include="mscorlib"> 53 <HintPath>..\7dtd-binaries\mscorlib.dll</HintPath> 54 </Reference> 55 <Reference Include="Assembly-CSharp"> 56 <HintPath>..\7dtd-binaries\Assembly-CSharp.dll</HintPath> 54 <Private>False</Private> 57 55 </Reference> 58 56 </ItemGroup> … … 61 59 <Compile Include="src\AllocsLogFunctions.cs" /> 62 60 <Compile Include="src\PlayerDataStuff.cs" /> 63 <Compile Include="src\CommandExtensions.cs" />64 <Compile Include="src\CommonMappingFunctions.cs" />65 <Compile Include="src\NetConnections\ConsoleOutputSeparator.cs" />66 <Compile Include="src\NetConnections\NetTelnetServer.cs" />67 <Compile Include="src\NetConnections\IServer.cs" />68 <Compile Include="src\NetConnections\IConnection.cs" />69 <Compile Include="src\NetConnections\Servers\Telnet\Telnet.cs" />70 <Compile Include="src\NetConnections\Servers\Telnet\TelnetConnection.cs" />71 61 <Compile Include="src\PersistentData\PersistentContainer.cs" /> 72 62 <Compile Include="src\StateManager.cs" /> … … 90 80 <Compile Include="src\FileCache\SimpleCache.cs" /> 91 81 <Compile Include="src\FileCache\MapTileCache.cs" /> 92 <Compile Include="src\Mods.cs" /> 93 <Compile Include="src\ModAPI.cs" /> 94 <Compile Include="src\Version.cs" /> 82 <Compile Include="src\API.cs" /> 95 83 </ItemGroup> 96 84 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 97 85 <ItemGroup> 98 86 <Folder Include="src\" /> 99 <Folder Include="src\CustomCommands\" />100 <Folder Include="src\NetConnections\" />101 <Folder Include="src\NetConnections\Servers\" />102 <Folder Include="src\NetConnections\Servers\Telnet\" />103 87 <Folder Include="src\PersistentData\" /> 104 88 <Folder Include="src\JSON\Parser\" /> 105 89 <Folder Include="src\FileCache\" /> 106 90 </ItemGroup> 91 <ItemGroup> 92 <None Include="ModInfo.xml"> 93 <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> 94 </None> 95 </ItemGroup> 107 96 </Project> -
binary-improvements/7dtd-server-fixes/src/AllocsLogFunctions.cs
r228 r230 8 8 public class AllocsLogFunctions 9 9 { 10 public static void RequestToSpawnPlayer ( GameManager manager,int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile)10 public static void RequestToSpawnPlayer (int _clientId, string _name, int _chunkViewDim, PlayerProfile _playerProfile) 11 11 { 12 12 try { 13 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID (_clientId); 14 int entityId = CommonMappingFunctions.GetEntityID (ci); 15 EntityPlayer ep = CommonMappingFunctions.GetEntityPlayer (ci); 16 string steamId = CommonMappingFunctions.GetSteamID (ci); 17 18 string ip = ci.ip; 19 string name = string.Empty; 20 21 if (ep != null) 22 name = ep.EntityName; 13 ClientInfo ci = ConnectionManager.Instance.GetClient (_clientId); 23 14 24 15 Log.Out ("Player connected, clientid=" + _clientId + 25 ", entityid=" + entityId +26 ", name=" + name +27 ", steamid=" + steamId +28 ", ip=" + ip16 ", entityid=" + ci.entityId + 17 ", name=" + ci.playerName + 18 ", steamid=" + ci.playerId + 19 ", ip=" + ci.ip 29 20 ); 30 21 31 PersistentContainer.Instance.Players [ steamId].SetOnline (ci);22 PersistentContainer.Instance.Players [ci.playerId].SetOnline (ci); 32 23 PersistentData.PersistentContainer.Instance.Save (); 33 34 Mods.CallRequestToSpawnPlayer (_clientId, _name, _chunkViewDim, _playerProfile);35 24 } catch (Exception e) { 36 25 Log.Out ("Error in AllocsLogFunctions.RequestToSpawnPlayer: " + e); … … 38 27 } 39 28 40 public static void PlayerDisconnected (C onnectionManager manager, ClientInfo _cInfo, bool _bShutdown)29 public static void PlayerDisconnected (ClientInfo _cInfo, bool _bShutdown) 41 30 { 42 31 try { … … 48 37 } 49 38 PersistentData.PersistentContainer.Instance.Save (); 50 51 Mods.CallPlayerDisconnected (_cInfo, _bShutdown);52 39 } catch (Exception e) { 53 40 Log.Out ("Error in AllocsLogFunctions.PlayerDisconnected: " + e); -
binary-improvements/7dtd-server-fixes/src/AssemblyInfo.cs
r228 r230 18 18 // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 19 20 [assembly: AssemblyVersion("0.11 2.*")]20 [assembly: AssemblyVersion("0.113.*")] 21 21 22 22 // The following attributes are used to specify the signing key for the assembly, -
binary-improvements/7dtd-server-fixes/src/PersistentData/PersistentContainer.cs
r146 r230 54 54 return true; 55 55 } catch (Exception e) { 56 Log.Out ("Exception in PersistentContainer.Load: " + e.Message); 56 Log.Error ("Exception in PersistentContainer.Load"); 57 Log.Exception (e); 57 58 } 58 59 } -
binary-improvements/7dtd-server-fixes/src/PersistentData/Player.cs
r228 r230 59 59 get { 60 60 if (IsOnline) { 61 return CommonMappingFunctions.GetEntityPlayer (clientInfo);61 return GameManager.Instance.World.Players.dict [clientInfo.entityId]; 62 62 } else { 63 63 return null; … … 116 116 Log.Out ("Player set to online: " + steamId); 117 117 clientInfo = ci; 118 entityId = CommonMappingFunctions.GetEntityID (ci);119 name = CommonMappingFunctions.GetPlayerName (ci);118 entityId = ci.entityId; 119 name = ci.playerName; 120 120 ip = ci.ip; 121 121 } -
binary-improvements/7dtd-server-fixes/src/PlayerDataStuff.cs
r224 r230 11 11 { 12 12 try { 13 ClientInfo ci = CommonMappingFunctions.GetClientInfoFromClientID(_clientId); 14 string steamId = CommonMappingFunctions.GetSteamID(ci); 15 PersistentContainer.Instance.Players[steamId].Inventory.Update(_playerDataFile); 16 Mods.CallSavePlayerData (_clientId, _playerDataFile); 13 ClientInfo ci = ConnectionManager.Instance.GetClient (_clientId); 14 PersistentContainer.Instance.Players[ci.playerId].Inventory.Update(_playerDataFile); 17 15 } catch (Exception e) { 18 16 Log.Out ("Error in GM_SavePlayerData: " + e); -
binary-improvements/7dtd-server-fixes/src/StateManager.cs
r224 r230 1 using AllocsFixes.NetConnections.Servers.Telnet;2 1 using System; 3 2 using System.Reflection; … … 7 6 public class StateManager 8 7 { 9 public static void Awake ( GameManager manager)8 public static void Awake () 10 9 { 11 10 try { 12 11 Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version); 13 14 Mods.LoadMods ();15 Mods.CallGameAwake ();16 CommandExtensions.InitCommandExtensions (manager);17 18 new Telnet ();19 12 20 13 ItemList.Instance.Init (); … … 26 19 } 27 20 28 public static void Shutdown ( GameManager manager)21 public static void Shutdown () 29 22 { 30 23 try { 31 24 Log.Out ("Server shutting down!"); 32 Mods.CallGameShutdown ();33 25 PersistentData.PersistentContainer.Instance.Save (); 34 26 } catch (Exception e) {
Note:
See TracChangeset
for help on using the changeset viewer.