mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 21:44:35 +02:00
Addressed issues where users on Windows 10 and Windows 11 were having issues running running the project.
1) Updated all projects to .NET Framework 4.7.2. This was a necessary prerequisite for the core fix. 2) The core fix is to upgrade the version of MySql.Data to address an error when opening connections. There is some kind of nuget issue with updating to the latest version (8.0.32) so fell back to updating to version 8.0.31. This also causes the addition of several all dependant libraries. Opted to just keep those at whatever version was specified by MySql.Data for now. 3) With the upgrade to MySql.Data, there is a behavioral change with the way the .Prepare statemenet works, and now it's required that parameters be added BEFORE calling .Prepare. So I've maded adjustments to the calls to .Prepare.
This commit is contained in:
parent
8ceee35492
commit
1e311904cc
16 changed files with 251 additions and 80 deletions
|
@ -1,20 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<remove invariant="MySql.Data.MySqlClient" />
|
||||
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
|
||||
</DbProviderFactories>
|
||||
</system.data>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
|
|
|
@ -2596,10 +2596,10 @@ namespace Meteor.Map
|
|||
characterId = @characterId", CharacterUtils.GetClassNameForId(classId));
|
||||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||
|
||||
cmd.Prepare();
|
||||
cmd = new MySqlCommand(query, conn);
|
||||
cmd.Parameters.AddWithValue("@characterId", player.actorId);
|
||||
cmd.Parameters.AddWithValue("@exp", exp);
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (MySqlException e)
|
||||
|
@ -2629,10 +2629,10 @@ namespace Meteor.Map
|
|||
characterId = @characterId", CharacterUtils.GetClassNameForId(classId));
|
||||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||
|
||||
cmd.Prepare();
|
||||
cmd = new MySqlCommand(query, conn);
|
||||
cmd.Parameters.AddWithValue("@characterId", player.actorId);
|
||||
cmd.Parameters.AddWithValue("@lvl", level);
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (MySqlException e)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Meteor.Map</RootNamespace>
|
||||
<AssemblyName>Map Server</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>1d22ec4a</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
|
@ -63,16 +63,30 @@
|
|||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Cyotek.Collections.Generic.CircularBuffer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=58daa28b0b2de221, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Cyotek.CircularBuffer.1.0.0.0\lib\net20\Cyotek.Collections.Generic.CircularBuffer.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Google.Protobuf, Version=3.19.4.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Google.Protobuf.3.19.4\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.2.6\lib\net46\K4os.Compression.LZ4.Streams.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Hash.xxHash, Version=1.0.6.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\K4os.Hash.xxHash.1.0.6\lib\net46\K4os.Hash.xxHash.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MoonSharp.Interpreter">
|
||||
<HintPath>..\packages\MoonSharp.1.2.1.0\lib\net40-client\MoonSharp.Interpreter.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.6.9.8\lib\net45\MySql.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="MySql.Data, Version=8.0.31.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.8.0.31\lib\net452\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
|
@ -86,10 +100,24 @@
|
|||
<HintPath>navmesh\SharpNav.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.IO.Compression" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
|
@ -98,6 +126,9 @@
|
|||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="ZstdNet, Version=1.4.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MySql.Data.8.0.31\lib\net452\ZstdNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Actors\Area\PrivateArea.cs" />
|
||||
|
|
2
Map Server/Properties/Resources.Designer.cs
generated
2
Map Server/Properties/Resources.Designer.cs
generated
|
@ -19,7 +19,7 @@ namespace Meteor.Map.Properties {
|
|||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
|
|
@ -51,8 +51,6 @@ namespace Meteor.Map.utils
|
|||
cmd.Parameters.AddWithValue("@id", 100);
|
||||
cmd.Parameters.AddWithValue("@placename", "");
|
||||
|
||||
cmd.Prepare();
|
||||
|
||||
Dictionary<uint, string> placenames = new Dictionary<uint, string>();
|
||||
|
||||
string line2;
|
||||
|
@ -101,6 +99,7 @@ namespace Meteor.Map.utils
|
|||
cmd.Parameters["@placename"].Value = placenames[pId];
|
||||
|
||||
Program.Log.Debug("Wrote: {0}", id);
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
}
|
||||
|
@ -133,9 +132,7 @@ namespace Meteor.Map.utils
|
|||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||
cmd.Parameters.AddWithValue("@id", 100);
|
||||
cmd.Parameters.AddWithValue("@displayNameId", 100);
|
||||
|
||||
cmd.Prepare();
|
||||
|
||||
|
||||
string line, line2;
|
||||
Regex csvSplit = new Regex("(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)", RegexOptions.Compiled);
|
||||
System.IO.StreamReader file = new System.IO.StreamReader("D:\\Coding\\FFXIV Related\\FFXIV Tool\\2012.09.19.0001.decode.csv\\actorclass.csv");
|
||||
|
@ -159,6 +156,7 @@ namespace Meteor.Map.utils
|
|||
cmd.Parameters["@displayNameId"].Value = nameId;
|
||||
|
||||
Program.Log.Debug("Wrote: {0} : {1}", id, nameId);
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
}
|
||||
|
@ -198,8 +196,6 @@ namespace Meteor.Map.utils
|
|||
for (int i = 0; i < NUMFIELDS; i++)
|
||||
cmd.Parameters.AddWithValue("@v" + i, 100);
|
||||
|
||||
cmd.Prepare();
|
||||
|
||||
string line;
|
||||
Regex csvSplit = new Regex("(?:^|,)(\"(?:[^\"]+|\"\")*\"|[^,]*)", RegexOptions.Compiled);
|
||||
//System.IO.StreamReader file = new System.IO.StreamReader("D:\\Coding\\FFXIV Related\\FFXIV Tool\\2012.09.19.0001.decode.csv\\actorclass.csv");
|
||||
|
@ -224,7 +220,8 @@ namespace Meteor.Map.utils
|
|||
|
||||
cmd.Parameters["@id"].Value = id;
|
||||
|
||||
Program.Log.Debug("Wrote: {0}", id);
|
||||
Program.Log.Debug("Wrote: {0}", id);
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
}
|
||||
|
@ -260,7 +257,6 @@ namespace Meteor.Map.utils
|
|||
cmd.Parameters.AddWithValue("@name", "Battle");
|
||||
cmd.Parameters.AddWithValue("@otherId", 0);
|
||||
cmd.Parameters.AddWithValue("@rewardPoints", 0);
|
||||
cmd.Prepare();
|
||||
|
||||
int otherId = 1;
|
||||
string line, line2;
|
||||
|
@ -314,6 +310,7 @@ namespace Meteor.Map.utils
|
|||
cmd.Parameters["@name"].Value = name;
|
||||
cmd.Parameters["@otherId"].Value = otherId;
|
||||
cmd.Parameters["@rewardPoints"].Value = points;
|
||||
cmd.Prepare();
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
otherId++;
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cyotek.CircularBuffer" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Google.Protobuf" version="3.19.4" targetFramework="net472" />
|
||||
<package id="K4os.Compression.LZ4" version="1.2.6" targetFramework="net472" />
|
||||
<package id="K4os.Compression.LZ4.Streams" version="1.2.6" targetFramework="net472" />
|
||||
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
|
||||
<package id="Microsoft.Net.Compilers" version="2.0.0-beta3" targetFramework="net45" developmentDependency="true" />
|
||||
<package id="MoonSharp" version="1.2.1.0" targetFramework="net45" />
|
||||
<package id="MySql.Data" version="6.9.8" targetFramework="net45" />
|
||||
<package id="MySql.Data" version="8.0.31" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net451" />
|
||||
<package id="NLog" version="4.5.0" targetFramework="net451" />
|
||||
<package id="Portable.BouncyCastle" version="1.9.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.4" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="5.0.0" targetFramework="net472" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue