mirror of
https://github.com/MilkBarModding/MilkBarLauncher.git
synced 2025-06-16 12:11:01 +00:00
Initial commit
This commit is contained in:
parent
a3bd6bd261
commit
189b86e4a8
350
.gitignore
vendored
Normal file
350
.gitignore
vendored
Normal file
@ -0,0 +1,350 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.rsuser
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Mono auto generated files
|
||||
mono_crash.*
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUnit
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
nunit-*.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_h.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*_wpftmp.csproj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# NuGet Symbol Packages
|
||||
*.snupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
*.appxbundle
|
||||
*.appxupload
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!?*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
*- [Bb]ackup.rdl
|
||||
*- [Bb]ackup ([0-9]).rdl
|
||||
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush personal settings
|
||||
.cr/personal
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
|
||||
# Local History for Visual Studio
|
||||
.localhistory/
|
||||
|
||||
# BeatPulse healthcheck temp database
|
||||
healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
# Ionide (cross platform F# VS Code tools) working folder
|
||||
.ionide/
|
BIN
BNP Files/BOTWMultiplayer-Classic.bnp
Normal file
BIN
BNP Files/BOTWMultiplayer-Classic.bnp
Normal file
Binary file not shown.
BIN
BNP Files/BreathoftheWildMultiplayer.bnp
Normal file
BIN
BNP Files/BreathoftheWildMultiplayer.bnp
Normal file
Binary file not shown.
1
C#/BOTW.DedicatedServer/AppdataFiles/ArmorMapping.txt
Normal file
1
C#/BOTW.DedicatedServer/AppdataFiles/ArmorMapping.txt
Normal file
@ -0,0 +1 @@
|
||||
{"001": "001", "002": "001", "003": "001", "004": "001", "015": "001", "005": "005", "035": "005", "039": "005", "060": "005", "061": "005", "006": "006", "007": "006", "062": "006", "063": "006", "064": "006", "008": "008", "040": "008", "065": "008", "066": "008", "067": "008", "009": "009", "036": "009", "071": "009", "072": "009", "073": "009", "012": "012", "042": "012", "077": "012", "078": "012", "079": "012", "014": "014", "083": "014", "084": "014", "085": "014", "086": "014", "017": "017", "087": "017", "088": "017", "089": "017", "090": "017", "020": "020", "095": "020", "096": "020", "097": "020", "098": "020", "021": "021", "099": "021", "100": "021", "101": "021", "102": "021", "022": "022", "024": "024", "117": "024", "118": "024", "119": "024", "120": "024", "025": "025", "121": "025", "122": "025", "123": "025", "124": "025", "026": "026", "125": "026", "126": "026", "127": "026", "128": "026", "027": "027", "129": "027", "130": "027", "131": "027", "132": "027", "028": "028", "133": "028", "134": "028", "135": "028", "136": "028", "029": "029", "137": "029", "138": "029", "139": "029", "140": "029", "030": "030", "011": "030", "037": "030", "074": "030", "075": "030", "076": "030", "043": "043", "044": "044", "045": "045", "046": "046", "103": "046", "104": "046", "105": "046", "106": "046", "048": "048", "111": "048", "112": "048", "113": "048", "114": "048", "049": "049", "152": "049", "153": "049", "154": "049", "155": "049", "053": "053", "055": "055", "056": "056", "115": "115", "116": "116", "148": "116", "149": "116", "150": "116", "151": "116", "141": "141", "156": "141", "157": "141", "158": "141", "159": "141", "160": "160", "170": "170", "171": "171", "172": "172", "173": "173", "174": "174", "175": "175", "176": "176", "177": "177", "178": "178", "179": "179", "180": "180", "181": "181", "186": "181", "187": "181", "188": "181", "189": "181", "182": "182", "190": "182", "191": "182", "192": "182", "193": "182", "183": "183", "194": "183", "195": "183", "196": "183", "197": "183", "184": "184", "168": "184", "169": "184", "198": "184", "199": "184", "185": "185", "200": "200", "201": "200", "202": "200", "203": "200", "204": "200", "205": "205", "206": "205", "207": "205", "208": "205", "209": "205", "210": "210", "211": "210", "212": "210", "213": "210", "214": "210", "215": "215", "216": "215", "217": "215", "218": "215", "219": "215", "220": "220", "221": "220", "222": "220", "223": "220", "224": "220", "225": "225", "226": "225", "227": "225", "228": "225", "229": "225", "230": "230", "231": "230", "232": "230", "233": "230", "234": "230"}
|
1
C#/BOTW.DedicatedServer/AppdataFiles/QuestFlagsNames.txt
Normal file
1
C#/BOTW.DedicatedServer/AppdataFiles/QuestFlagsNames.txt
Normal file
File diff suppressed because one or more lines are too long
66
C#/BOTW.DedicatedServer/BOTWM.DedicatedServer.csproj
Normal file
66
C#/BOTW.DedicatedServer/BOTWM.DedicatedServer.csproj
Normal file
@ -0,0 +1,66 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<BaseOutputPath></BaseOutputPath>
|
||||
<AssemblyName>MBL.DedicatedServer</AssemblyName>
|
||||
<OutputPath>..\..\Build\DedicatedServer</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="AppdataFiles\ArmorMapping.txt" />
|
||||
<None Remove="AppdataFiles\QuestFlagsNames.txt" />
|
||||
<None Remove="ServerConfig.ini" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="Multiplayer_App_Icon_Server.ico" />
|
||||
<Content Include="ServerConfig.ini">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="AppdataFiles\ArmorMapping.txt" />
|
||||
<EmbeddedResource Include="AppdataFiles\QuestFlagsNames.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BOTW.Logging\BOTWM.Logging.csproj" />
|
||||
<ProjectReference Include="..\BOTWM.Server\BOTWM.Server.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Gamemodes.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Landmarks.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="PropHuntLocations.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
||||
<ApplicationIcon>Multiplayer_App_Icon_Server.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
1276
C#/BOTW.DedicatedServer/DedicatedServer.cs
Normal file
1276
C#/BOTW.DedicatedServer/DedicatedServer.cs
Normal file
File diff suppressed because it is too large
Load Diff
80
C#/BOTW.DedicatedServer/Gamemodes.json
Normal file
80
C#/BOTW.DedicatedServer/Gamemodes.json
Normal file
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"SettingsName": "Game Completion",
|
||||
"EnemySync": true,
|
||||
"GameMode": "NoGamemode",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": true,
|
||||
"Towers": true,
|
||||
"Shrines": true,
|
||||
"Locations": true,
|
||||
"DivineBeast": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"SettingsName": "Hunter Vs Speedrunner",
|
||||
"EnemySync": true,
|
||||
"GameMode": "HunterVsSpeedrunner",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": false,
|
||||
"Towers": true,
|
||||
"Shrines": true,
|
||||
"Locations": true,
|
||||
"DivineBeast": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"SettingsName": "Any% Speedrun",
|
||||
"EnemySync": true,
|
||||
"GameMode": "NoGamemode",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": false,
|
||||
"Towers": true,
|
||||
"Shrines": true,
|
||||
"Locations": true,
|
||||
"DivineBeast": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"SettingsName": "Hide n' seek",
|
||||
"EnemySync": true,
|
||||
"GameMode": "NoGamemode",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": false,
|
||||
"Towers": false,
|
||||
"Shrines": false,
|
||||
"Locations": false,
|
||||
"DivineBeast": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"SettingsName": "Death Swap",
|
||||
"EnemySync": false,
|
||||
"GameMode": "DeathSwap",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": false,
|
||||
"Towers": false,
|
||||
"Shrines": false,
|
||||
"Locations": false,
|
||||
"DivineBeast": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"SettingsName": "Prop hunt",
|
||||
"EnemySync": false,
|
||||
"GameMode": "PropHunt",
|
||||
"QuestSyncSettings": {
|
||||
"Vanilla": false,
|
||||
"Koroks": false,
|
||||
"Towers": false,
|
||||
"Shrines": false,
|
||||
"Locations": false,
|
||||
"DivineBeast": false
|
||||
}
|
||||
}
|
||||
]
|
727
C#/BOTW.DedicatedServer/Landmarks.json
Normal file
727
C#/BOTW.DedicatedServer/Landmarks.json
Normal file
@ -0,0 +1,727 @@
|
||||
{
|
||||
"Battle Royale Great Plateau": {
|
||||
"x": -885.6469,
|
||||
"y": 589.4873,
|
||||
"z": 1765.535
|
||||
},
|
||||
"To Quomo Shrine": {
|
||||
"x": -4013.94556,
|
||||
"y": 288.104248,
|
||||
"z": -3712.16968
|
||||
},
|
||||
"Hia Miu Shrine": {
|
||||
"x": -4439.59082,
|
||||
"y": 329.866577,
|
||||
"z": -3797.33472
|
||||
},
|
||||
"Maka Rah Shrine": {
|
||||
"x": -4066.98218,
|
||||
"y": 94.903717,
|
||||
"z": -2507.36523
|
||||
},
|
||||
"Voo Lota Shrine": {
|
||||
"x": -4008.64917,
|
||||
"y": 275.215393,
|
||||
"z": -1727.18665
|
||||
},
|
||||
"Kah Okeo Shrine": {
|
||||
"x": -4129.4751,
|
||||
"y": 184.301117,
|
||||
"z": -412.806915
|
||||
},
|
||||
"Kema Kosassa Shrine": {
|
||||
"x": -4649.36768,
|
||||
"y": 619.505554,
|
||||
"z": 906.038574
|
||||
},
|
||||
"Kema Zoos Shrine": {
|
||||
"x": -4673.52979,
|
||||
"y": 132.132996,
|
||||
"z": 1976.98535
|
||||
},
|
||||
"Tho Kayu Shrine": {
|
||||
"x": -4790.04785,
|
||||
"y": 135.140259,
|
||||
"z": 2798.78687
|
||||
},
|
||||
"Hawa Koth Shrine": {
|
||||
"x": -4850.69434,
|
||||
"y": 123.756027,
|
||||
"z": 3781.06616
|
||||
},
|
||||
"Mozo Shenno Shrine": {
|
||||
"x": -3618.51929,
|
||||
"y": 420.836121,
|
||||
"z": -3038.53833
|
||||
},
|
||||
"Sha Warvo Shrine": {
|
||||
"x": -3815.32642,
|
||||
"y": 265.133392,
|
||||
"z": -2211.30029
|
||||
},
|
||||
"Akh Va'quot Shrine": {
|
||||
"x": -3655.24609,
|
||||
"y": 321.757812,
|
||||
"z": -1765.85779
|
||||
},
|
||||
"Bareeda Naag Shrine": {
|
||||
"x": -3607.28467,
|
||||
"y": 246.750397,
|
||||
"z": -1524.3938
|
||||
},
|
||||
"Divine Beast Vah Medoh": {
|
||||
"x": -3622.0376,
|
||||
"y": 515.639893,
|
||||
"z": -1797.22644
|
||||
},
|
||||
"Tena Ko'sah Shrine": {
|
||||
"x": -3473.58447,
|
||||
"y": 384.505432,
|
||||
"z": -443.636627
|
||||
},
|
||||
"Tabantha Tower": {
|
||||
"x": -3613.74829,
|
||||
"y": 445.057465,
|
||||
"z": -981.164734
|
||||
},
|
||||
"Keeha Yoog Shrine": {
|
||||
"x": -3844.75952,
|
||||
"y": 640.312988,
|
||||
"z": 713.555115
|
||||
},
|
||||
"Gerudo Tower": {
|
||||
"x": -3674.45728,
|
||||
"y": 471.002197,
|
||||
"z": 1831.67822
|
||||
},
|
||||
"Kuh Takkar Shrine": {
|
||||
"x": -3088.6377,
|
||||
"y": 571.564148,
|
||||
"z": 1228.26428
|
||||
},
|
||||
"Sho Dantu Shrine": {
|
||||
"x": -3905.34351,
|
||||
"y": 396.014008,
|
||||
"z": 1646.75476
|
||||
},
|
||||
"Sasa Kai Shrine": {
|
||||
"x": -3564.28076,
|
||||
"y": 352.789764,
|
||||
"z": 1961.02942
|
||||
},
|
||||
"Gerudo Town": {
|
||||
"x": -3784.68994,
|
||||
"y": 149.098404,
|
||||
"z": 2864.45459
|
||||
},
|
||||
"Kara Kara Bazaar": {
|
||||
"x": -3195.9812,
|
||||
"y": 129.420532,
|
||||
"z": 2549.31421
|
||||
},
|
||||
"Dako Tah Shrine": {
|
||||
"x": -3308.77026,
|
||||
"y": 146.126785,
|
||||
"z": 2164.30713
|
||||
},
|
||||
"Daqo Chisay Shrine": {
|
||||
"x": -3810.43481,
|
||||
"y": 150.459839,
|
||||
"z": 2813.44751
|
||||
},
|
||||
"Raqa Zunzo Shrine": {
|
||||
"x": -3801.85962,
|
||||
"y": 159.313004,
|
||||
"z": 3124.05518
|
||||
},
|
||||
"Shada Naw Shrine": {
|
||||
"x": -2995.72827,
|
||||
"y": 667.766357,
|
||||
"z": -3212.85547
|
||||
},
|
||||
"Rok Uwog Shrine": {
|
||||
"x": -2368.89307,
|
||||
"y": 485.927063,
|
||||
"z": -3223.52832
|
||||
},
|
||||
"Lanno Kooh Shrine": {
|
||||
"x": -2639.85376,
|
||||
"y": 446.045166,
|
||||
"z": -2068.87109
|
||||
},
|
||||
"Hebra Tower": {
|
||||
"x": -2165.20581,
|
||||
"y": 529.202209,
|
||||
"z": -2029.5
|
||||
},
|
||||
"Gee Ha'rah Shrine": {
|
||||
"x": -2385.19067,
|
||||
"y": 278.122894,
|
||||
"z": -2262.06689
|
||||
},
|
||||
"Goma Asaagh Shrine": {
|
||||
"x": -2801.21143,
|
||||
"y": 671.031921,
|
||||
"z": -2880.021
|
||||
},
|
||||
"Dunba Taag Shrine": {
|
||||
"x": -2828.72168,
|
||||
"y": 79.8880005,
|
||||
"z": -1569.64795
|
||||
},
|
||||
"Shae Loya Shrine": {
|
||||
"x": -2929.48291,
|
||||
"y": 306.458954,
|
||||
"z": -441.133606
|
||||
},
|
||||
"Toh Yahsa Shrine": {
|
||||
"x": -2269.1001,
|
||||
"y": 216.592468,
|
||||
"z": -909.295044
|
||||
},
|
||||
"Mogg Latan Shrine": {
|
||||
"x": -2300.67114,
|
||||
"y": 439.58136,
|
||||
"z": 469.334045
|
||||
},
|
||||
"Mijah Rokee Shrine": {
|
||||
"x": -2749.91113,
|
||||
"y": 309.406494,
|
||||
"z": 220.079224
|
||||
},
|
||||
"Joloo Nah Shrine": {
|
||||
"x": -2004.0083,
|
||||
"y": 231.660202,
|
||||
"z": 1683.45776
|
||||
},
|
||||
"Wasteland Tower": {
|
||||
"x": -2314.63013,
|
||||
"y": 530.202209,
|
||||
"z": 2441.82031
|
||||
},
|
||||
"Kay Noh Shrine": {
|
||||
"x": -2801.80762,
|
||||
"y": 172.021225,
|
||||
"z": 2300.93286
|
||||
},
|
||||
"Divine Beast Vah Naboris": {
|
||||
"x": -2138.95361,
|
||||
"y": 470.653625,
|
||||
"z": 2553.20093
|
||||
},
|
||||
"Korsh O'hu Shrine": {
|
||||
"x": -2695.10181,
|
||||
"y": 105.018402,
|
||||
"z": 2817.7019
|
||||
},
|
||||
"Misae Suma Shrine": {
|
||||
"x": -2965.70239,
|
||||
"y": 137.686447,
|
||||
"z": 3773.53662
|
||||
},
|
||||
"Sha Gehma Shrine": {
|
||||
"x": -1665.69397,
|
||||
"y": 346.579926,
|
||||
"z": -3763.80054
|
||||
},
|
||||
"Rin Oyaa Shrine": {
|
||||
"x": -1712.31287,
|
||||
"y": 335.75415,
|
||||
"z": -2556.0188
|
||||
},
|
||||
"Rona Kachta Shrine": {
|
||||
"x": -1094.06738,
|
||||
"y": 22.0610676,
|
||||
"z": -2654.46631
|
||||
},
|
||||
"Maag No'rah Shrine": {
|
||||
"x": -1945.17419,
|
||||
"y": 249.894257,
|
||||
"z": -1465.7323
|
||||
},
|
||||
"Monya Toma Shrine": {
|
||||
"x": -1494.45081,
|
||||
"y": 275.235229,
|
||||
"z": -1480.12878
|
||||
},
|
||||
"Zalta Wa Shrine": {
|
||||
"x": -1435.21814,
|
||||
"y": 138.33197,
|
||||
"z": -585.474915
|
||||
},
|
||||
"Ridgeland Tower": {
|
||||
"x": -1758.37817,
|
||||
"y": 328.602234,
|
||||
"z": -782.757263
|
||||
},
|
||||
"Sheem Dagoze Shrine": {
|
||||
"x": -1885.18127,
|
||||
"y": 212.41301,
|
||||
"z": 87.183197
|
||||
},
|
||||
"Shrine of Resurrection": {
|
||||
"x": -1102.17139,
|
||||
"y": 235.490173,
|
||||
"z": 1880.03613
|
||||
},
|
||||
"Rota Ooh Shrine": {
|
||||
"x": -1554.44458,
|
||||
"y": 186.741318,
|
||||
"z": 1307.42358
|
||||
},
|
||||
"Dah Kaso Shrine": {
|
||||
"x": -1699.17712,
|
||||
"y": 68.8502426,
|
||||
"z": 1708.45374
|
||||
},
|
||||
"Keh Namut Shrine": {
|
||||
"x": -1427.53174,
|
||||
"y": 337.589966,
|
||||
"z": 1988.36963
|
||||
},
|
||||
"Jee Noh Shrine": {
|
||||
"x": -1796.75732,
|
||||
"y": 112.866081,
|
||||
"z": 2415.07715
|
||||
},
|
||||
"Suma Sahma Shrine": {
|
||||
"x": -1414.31396,
|
||||
"y": 545.413025,
|
||||
"z": 3456.63354
|
||||
},
|
||||
"Dila Maag Shrine": {
|
||||
"x": -1795.00012,
|
||||
"y": 164.197449,
|
||||
"z": 3456.19531
|
||||
},
|
||||
"Qaza Tokki Shrine": {
|
||||
"x": -829.695312,
|
||||
"y": 341.313019,
|
||||
"z": -3535.0
|
||||
},
|
||||
"Daag Chokah Shrine": {
|
||||
"x": -23.217804,
|
||||
"y": 280.354645,
|
||||
"z": -2450.00879
|
||||
},
|
||||
"Saas Ko'sah Shrine": {
|
||||
"x": -156.59024,
|
||||
"y": 144.234741,
|
||||
"z": -1159.34644
|
||||
},
|
||||
"Noya Neha Shrine": {
|
||||
"x": -960.300293,
|
||||
"y": 134.37558,
|
||||
"z": -624.940491
|
||||
},
|
||||
"Katah Chuki Shrine": {
|
||||
"x": -633.422119,
|
||||
"y": 128.879913,
|
||||
"z": -336.41394
|
||||
},
|
||||
"Kaam Ya'tak Shrine": {
|
||||
"x": -966.33374,
|
||||
"y": 127.678223,
|
||||
"z": 724.969849
|
||||
},
|
||||
"Central Tower": {
|
||||
"x": -797.596558,
|
||||
"y": 197.663208,
|
||||
"z": 442.963104
|
||||
},
|
||||
"Ja Baij Shrine": {
|
||||
"x": -455.890411,
|
||||
"y": 180.031815,
|
||||
"z": 1990.18237
|
||||
},
|
||||
"Oman Au Shrine": {
|
||||
"x": -666.042725,
|
||||
"y": 173.103912,
|
||||
"z": 1518.72461
|
||||
},
|
||||
"Great Plateau Tower": {
|
||||
"x": -568.657288,
|
||||
"y": 246.442215,
|
||||
"z": 1697.44373
|
||||
},
|
||||
"Lake Tower": {
|
||||
"x": -31.8155518,
|
||||
"y": 280.500854,
|
||||
"z": 2970.60083
|
||||
},
|
||||
"Owa Daim Shrine": {
|
||||
"x": -925.030273,
|
||||
"y": 274.181519,
|
||||
"z": 2312.03394
|
||||
},
|
||||
"Ya Naga Shrine": {
|
||||
"x": -337.242615,
|
||||
"y": 68.0352631,
|
||||
"z": 2598.72656
|
||||
},
|
||||
"Ishto Soh Shrine": {
|
||||
"x": -993.983521,
|
||||
"y": 321.228394,
|
||||
"z": 3564.86328
|
||||
},
|
||||
"Ketoh Wawai Shrine": {
|
||||
"x": 292.595001,
|
||||
"y": 285.313019,
|
||||
"z": -3119.6001
|
||||
},
|
||||
"Keo Ruug Shrine": {
|
||||
"x": 473.018433,
|
||||
"y": 250.161438,
|
||||
"z": -2159.88623
|
||||
},
|
||||
"Maag Halan Shrine": {
|
||||
"x": 833.170288,
|
||||
"y": 282.208313,
|
||||
"z": -2411.38379
|
||||
},
|
||||
"Woodland Tower": {
|
||||
"x": 883.884277,
|
||||
"y": 350.23645,
|
||||
"z": -1596.71021
|
||||
},
|
||||
"Kuhn Sidajj Shrine": {
|
||||
"x": 24.3395081,
|
||||
"y": 281.412994,
|
||||
"z": -1938.01135
|
||||
},
|
||||
"Namika Ozz Shrine": {
|
||||
"x": 752.126465,
|
||||
"y": 188.737473,
|
||||
"z": -822.10199
|
||||
},
|
||||
"Kaya Wan Shrine": {
|
||||
"x": 833.035767,
|
||||
"y": 132.890442,
|
||||
"z": 185.224274
|
||||
},
|
||||
"Hila Rao Shrine": {
|
||||
"x": 848.011047,
|
||||
"y": 116.944794,
|
||||
"z": 844.329224
|
||||
},
|
||||
"Wahgo Katta Shrine": {
|
||||
"x": 351.108521,
|
||||
"y": 123.092743,
|
||||
"z": 1013.82556
|
||||
},
|
||||
"Bosh Kala Shrine": {
|
||||
"x": 87.01651,
|
||||
"y": 122.527931,
|
||||
"z": 1649.51038
|
||||
},
|
||||
"Pumaag Nitae Shrine": {
|
||||
"x": 558.039001,
|
||||
"y": 118.050713,
|
||||
"z": 2999.26562
|
||||
},
|
||||
"Shae Katha Shrine": {
|
||||
"x": 871.776733,
|
||||
"y": 123.003876,
|
||||
"z": 2337.6228
|
||||
},
|
||||
"Ka'o Makagh Shrine": {
|
||||
"x": 520.227356,
|
||||
"y": 178.920425,
|
||||
"z": 3517.59619
|
||||
},
|
||||
"Shoqa Tatone Shrine": {
|
||||
"x": 103.180023,
|
||||
"y": 110.684875,
|
||||
"z": 3840.47559
|
||||
},
|
||||
"Shora Hah Shrine": {
|
||||
"x": 1542.98059,
|
||||
"y": 507.347595,
|
||||
"z": -3112.85156
|
||||
},
|
||||
"Shae Mo'sah Shrine": {
|
||||
"x": 1751.25879,
|
||||
"y": 535.333435,
|
||||
"z": -2555.46045
|
||||
},
|
||||
"Mirro Shaz Shrine": {
|
||||
"x": 1222.80261,
|
||||
"y": 127.561447,
|
||||
"z": -1212.57983
|
||||
},
|
||||
"Qua Raym Shrine": {
|
||||
"x": 1816.14307,
|
||||
"y": 388.299194,
|
||||
"z": -1525.00012
|
||||
},
|
||||
"Sheh Rata Shrine": {
|
||||
"x": 1501.56445,
|
||||
"y": 128.418472,
|
||||
"z": -379.340057
|
||||
},
|
||||
"Daka Tuss Shrine": {
|
||||
"x": 1608.65613,
|
||||
"y": 117.713005,
|
||||
"z": 467.292908
|
||||
},
|
||||
"Ta'loh Naeg Shrine": {
|
||||
"x": 1835.50378,
|
||||
"y": 260.111206,
|
||||
"z": 896.980347
|
||||
},
|
||||
"Dueling Peaks Tower": {
|
||||
"x": 1016.77734,
|
||||
"y": 184.027893,
|
||||
"z": 1723.08203
|
||||
},
|
||||
"Shee Venath Shrine": {
|
||||
"x": 1253.2334,
|
||||
"y": 443.382111,
|
||||
"z": 1851.58447
|
||||
},
|
||||
"Shee Vaneer Shrine": {
|
||||
"x": 1274.46399,
|
||||
"y": 525.882019,
|
||||
"z": 1938.69971
|
||||
},
|
||||
"Ha Dahamar Shrine": {
|
||||
"x": 1667.96826,
|
||||
"y": 115.537102,
|
||||
"z": 1928.88806
|
||||
},
|
||||
"Ree Dahee Shrine": {
|
||||
"x": 1280.98743,
|
||||
"y": 137.687973,
|
||||
"z": 1845.33276
|
||||
},
|
||||
"Toto Sah Shrine": {
|
||||
"x": 1854.00134,
|
||||
"y": 131.520355,
|
||||
"z": 2470.28955
|
||||
},
|
||||
"Shoda Sah Shrine": {
|
||||
"x": 1788.41382,
|
||||
"y": 189.807953,
|
||||
"z": 3000.84961
|
||||
},
|
||||
"Shai Utoh Shrine": {
|
||||
"x": 1583.57227,
|
||||
"y": 167.007553,
|
||||
"z": 3606.29102
|
||||
},
|
||||
"Faron Tower": {
|
||||
"x": 1331.20312,
|
||||
"y": 269.952209,
|
||||
"z": 3282.72266
|
||||
},
|
||||
"Gorae Torr Shrine": {
|
||||
"x": 2668.50195,
|
||||
"y": 470.013,
|
||||
"z": -3463.00195
|
||||
},
|
||||
"Daqa Koh Shrine": {
|
||||
"x": 2057.80225,
|
||||
"y": 598.024353,
|
||||
"z": -2323.90479
|
||||
},
|
||||
"Kayra Mah Shrine": {
|
||||
"x": 2067.6377,
|
||||
"y": 520.781555,
|
||||
"z": -2039.32788
|
||||
},
|
||||
"Divine Beast Vah Rudania": {
|
||||
"x": 2468.43555,
|
||||
"y": 993.309692,
|
||||
"z": -2540.12866
|
||||
},
|
||||
"Eldin Tower": {
|
||||
"x": 2182.11182,
|
||||
"y": 508.749634,
|
||||
"z": -1552.58203
|
||||
},
|
||||
"Mo'a Keet Shrine": {
|
||||
"x": 2719.64087,
|
||||
"y": 285.424408,
|
||||
"z": -1157.72791
|
||||
},
|
||||
"Sah Dahaj Shrine": {
|
||||
"x": 2673.56616,
|
||||
"y": 247.924957,
|
||||
"z": -1576.90625
|
||||
},
|
||||
"Tah Muhl Shrine": {
|
||||
"x": 2308.04443,
|
||||
"y": 213.36116,
|
||||
"z": -935.842957
|
||||
},
|
||||
"Soh Kofi Shrine": {
|
||||
"x": 2245.73364,
|
||||
"y": 148.488892,
|
||||
"z": -287.465149
|
||||
},
|
||||
"Lanayru Tower": {
|
||||
"x": 2258.0,
|
||||
"y": 310.937622,
|
||||
"z": -99.9999695
|
||||
},
|
||||
"Lakna Rokee Shrine": {
|
||||
"x": 2032.60889,
|
||||
"y": 286.044403,
|
||||
"z": 967.483643
|
||||
},
|
||||
"Mezza Lo Shrine": {
|
||||
"x": 2621.77075,
|
||||
"y": 249.401108,
|
||||
"z": 387.427826
|
||||
},
|
||||
"Divine Beast Vah Ruta": {
|
||||
"x": 2949.8999,
|
||||
"y": 420.391296,
|
||||
"z": 72.9299927
|
||||
},
|
||||
"Dow Na'eh Shrine": {
|
||||
"x": 2689.5188,
|
||||
"y": 220.95256,
|
||||
"z": 1329.19531
|
||||
},
|
||||
"Kam Urog Shrine": {
|
||||
"x": 2507.22583,
|
||||
"y": 119.180603,
|
||||
"z": 1501.63342
|
||||
},
|
||||
"Hateno Tower": {
|
||||
"x": 2735.5,
|
||||
"y": 336.202209,
|
||||
"z": 2142.5
|
||||
},
|
||||
"Tawa Jinn Shrine": {
|
||||
"x": 2629.78784,
|
||||
"y": 318.180389,
|
||||
"z": 2829.43701
|
||||
},
|
||||
"Yah Rin Shrine": {
|
||||
"x": 2834.95483,
|
||||
"y": 152.767517,
|
||||
"z": 3320.02905
|
||||
},
|
||||
"Qukah Nata Shrine": {
|
||||
"x": 2015.28296,
|
||||
"y": 301.508789,
|
||||
"z": 3281.00684
|
||||
},
|
||||
"Zuna Kai Shrine": {
|
||||
"x": 3321.01758,
|
||||
"y": 298.699036,
|
||||
"z": -3428.96851
|
||||
},
|
||||
"Tutsuwa Nima Shrine": {
|
||||
"x": 3772.59546,
|
||||
"y": 108.900375,
|
||||
"z": -2697.32764
|
||||
},
|
||||
"Akkala Tower": {
|
||||
"x": 3301.10571,
|
||||
"y": 593.802246,
|
||||
"z": -1505.88513
|
||||
},
|
||||
"Dah Hesho Shrine": {
|
||||
"x": 3901.11426,
|
||||
"y": 354.78714,
|
||||
"z": -1311.8645
|
||||
},
|
||||
"Ze Kasho Shrine": {
|
||||
"x": 3036.3811,
|
||||
"y": 348.659454,
|
||||
"z": -1669.36365
|
||||
},
|
||||
"Ne'ez Yohma Shrine": {
|
||||
"x": 3319.81396,
|
||||
"y": 239.29567,
|
||||
"z": -510.441803
|
||||
},
|
||||
"Dagah Keek Shrine": {
|
||||
"x": 3141.9021,
|
||||
"y": 280.013,
|
||||
"z": -421.672607
|
||||
},
|
||||
"Rucco Maag Shrine": {
|
||||
"x": 3333.5,
|
||||
"y": 119.013,
|
||||
"z": 410.695312
|
||||
},
|
||||
"Jitan Sa'mi Shrine": {
|
||||
"x": 3890.45508,
|
||||
"y": 572.821472,
|
||||
"z": 1318.82422
|
||||
},
|
||||
"Hateno Ancient Tech Lab": {
|
||||
"x": 3779.7439,
|
||||
"y": 355.997833,
|
||||
"z": 2111.06787
|
||||
},
|
||||
"Myahm Agana Shrine": {
|
||||
"x": 3381.91187,
|
||||
"y": 242.605392,
|
||||
"z": 2209.33521
|
||||
},
|
||||
"Muwo Jeem Shrine": {
|
||||
"x": 3649.25928,
|
||||
"y": 350.349396,
|
||||
"z": 3305.84106
|
||||
},
|
||||
"Kah Yah Shrine": {
|
||||
"x": 3440.4873,
|
||||
"y": 120.68956,
|
||||
"z": 3324.7395
|
||||
},
|
||||
"Akkala Ancient Tech Lab": {
|
||||
"x": 4507.3999,
|
||||
"y": 351.41803,
|
||||
"z": -3146.30005
|
||||
},
|
||||
"Tu Ka'loh Shrine": {
|
||||
"x": 4655.0,
|
||||
"y": 237.41301,
|
||||
"z": -3700.80469
|
||||
},
|
||||
"Katosa Aug Shrine": {
|
||||
"x": 4287.65869,
|
||||
"y": 237.432098,
|
||||
"z": -2726.04053
|
||||
},
|
||||
"Ritaag Zumo Shrine": {
|
||||
"x": 4528.66455,
|
||||
"y": 107.7789,
|
||||
"z": -2135.74268
|
||||
},
|
||||
"Kah Mael Shrine": {
|
||||
"x": 4703.37354,
|
||||
"y": 242.511444,
|
||||
"z": -1303.16895
|
||||
},
|
||||
"Ke'nai Shakah Shrine": {
|
||||
"x": 4196.56006,
|
||||
"y": 323.127441,
|
||||
"z": -847.92334
|
||||
},
|
||||
"Shai Yota Shrine": {
|
||||
"x": 4242.79443,
|
||||
"y": 110.934875,
|
||||
"z": 261.727478
|
||||
},
|
||||
"Tahno O'ah Shrine": {
|
||||
"x": 4190.83545,
|
||||
"y": 288.162445,
|
||||
"z": 1685.13525
|
||||
},
|
||||
"Chaas Qeta Shrine": {
|
||||
"x": 4005.68848,
|
||||
"y": 107.195908,
|
||||
"z": 2984.03564
|
||||
},
|
||||
"Korgu Chideh Shrine": {
|
||||
"x": 4729.521,
|
||||
"y": 218.013153,
|
||||
"z": 3767.49438
|
||||
}
|
||||
}
|
BIN
C#/BOTW.DedicatedServer/Multiplayer_App_Icon_Server.ico
Normal file
BIN
C#/BOTW.DedicatedServer/Multiplayer_App_Icon_Server.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 253 KiB |
40
C#/BOTW.DedicatedServer/Program.cs
Normal file
40
C#/BOTW.DedicatedServer/Program.cs
Normal file
@ -0,0 +1,40 @@
|
||||
using BOTW.DedicatedServer;
|
||||
using BOTW.Logging;
|
||||
|
||||
try
|
||||
{
|
||||
Console.WriteLine("***************************************************************");
|
||||
Console.WriteLine("* *");
|
||||
Console.WriteLine("* Milk Bar Launcher Dedicated Server *");
|
||||
Console.WriteLine("* *");
|
||||
Console.WriteLine("***************************************************************\n");
|
||||
|
||||
Console.Write("VERSION: ");
|
||||
#if (DEBUG)
|
||||
Console.WriteLine("DEV");
|
||||
#else
|
||||
Console.WriteLine("DEV 2.0");
|
||||
#endif
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
DedicatedServer DedicatedServer = new DedicatedServer();
|
||||
Logger.Start(Logger.LogLevelEnum.DEBUG, Logger.LogLevelEnum.WARNING);
|
||||
|
||||
DedicatedServer.CopyAppdataFiles();
|
||||
|
||||
DedicatedServer.setupCommands();
|
||||
|
||||
DedicatedServer.setup();
|
||||
|
||||
while (true)
|
||||
{
|
||||
string input = Logger.LogInput("");
|
||||
DedicatedServer.process_commands(input);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.LogCritical(e.ToString());
|
||||
Logger.LogInput("Press any key to continue.");
|
||||
}
|
256
C#/BOTW.DedicatedServer/PropHuntLocations.json
Normal file
256
C#/BOTW.DedicatedServer/PropHuntLocations.json
Normal file
@ -0,0 +1,256 @@
|
||||
[
|
||||
{
|
||||
"Name": "Kakariko",
|
||||
"HunterStartingPosition": {
|
||||
"x": 1776.921,
|
||||
"y": 237,
|
||||
"z": 984.44684
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": 1810.4197,
|
||||
"y": 220,
|
||||
"z": 985.5576
|
||||
},
|
||||
"PossibleModels": [
|
||||
"TwnObj_Village_SheikerFurniture_A-00:TwnObj_Village_SheikerFrogStatue_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-00:TwnObj_Village_SheikerOutLighting_A_05",
|
||||
"TwnObj_Village_SheikerFurniture_A-01:TwnObj_Village_SheikerBox_A_02",
|
||||
"TwnObj_Village_SheikerFurniture_A-02:TwnObj_Village_SheikerBox_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-03:TwnObj_Village_SheikerPlate_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-04:TwnObj_Village_SheikerBox_A_04",
|
||||
"TwnObj_Village_SheikerFurniture_A-06:TwnObj_Village_SheikerBox_A_06",
|
||||
"TwnObj_Village_SheikerFurniture_A-08:TwnObj_Village_SheikerBox_A_03",
|
||||
"TwnObj_Village_SheikerFurniture_A-18:TwnObj_Village_SheikerFlowervase_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-21:TwnObj_Village_SheikerFlowervase_A_03",
|
||||
"TwnObj_Village_SheikerFurniture_A-22:TwnObj_Village_SheikerFlowervase_A_02",
|
||||
"TwnObj_Village_SheikerPot_A:TwnObj_Village_SheikerPot_A_LL_Act_01",
|
||||
"TwnObj_Village_SheikerPot_A:TwnObj_Village_SheikerPot_A_S_Act_01",
|
||||
"TwnObj_Village_Sheiker_A-00:TwnObj_Village_SheikerBirdClapper_A_03",
|
||||
"TwnObj_Village_Sheiker_A-00:TwnObj_Village_SheikerFence_A_01",
|
||||
"TwnObj_Village_SheikerGrocerySign_A_01",
|
||||
"TwnObj_Village_SheikerHotelSign_A_01",
|
||||
"TwnObj_Village_SheikerPharmacySign_A_01",
|
||||
"TwnObj_Village_SheikerTailorSign_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-09:TwnObj_Village_SheikerChest_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-10:TwnObj_Village_SheikerChest_A_03",
|
||||
"TwnObj_Village_SheikerFurniture_A-17:TwnObj_Village_SheikerChair_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-20:TwnObj_Village_SheikerTable_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-25:TwnObj_Village_SheikerBed_A_01",
|
||||
"TwnObj_Village_SheikerFurniture_A-26:TwnObj_Village_SheikerBed_A_02",
|
||||
"Obj_TreePine_A:Obj_TreePine_A_01",
|
||||
"Obj_CookSet_A:CookSet_A",
|
||||
"TwnObj_Village_SheikerFurniture_A:TwnObj_Village_SheikerTorchStand_A_01",
|
||||
"Animal_Kokko:Kokko"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "GerudoTown",
|
||||
"HunterStartingPosition": {
|
||||
"x": -3762.7722,
|
||||
"y": 150,
|
||||
"z": 2883.909
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": -3806.7585,
|
||||
"y": 150,
|
||||
"z": 2885.1467
|
||||
},
|
||||
"PossibleModels": [
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_City_GerudoClassChair_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_City_GerudoMayerBed_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_GerudoAudienceRoomPedestal_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_GerudoAudienceRoomPedestal_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_GerudoDollBlue_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_GerudoDollGreen_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_Gerudo_HotelBed_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_Gerudo_Light_A_01",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_Gerudo_Light_A_02",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_Gerudo_Light_A_03",
|
||||
"TwnObj_City_GerudoFurniture_A:TwnObj_Gerudo_Light_A_04",
|
||||
"TwnObj_City_GerudoPot_A:TwnObj_City_GerudoPot_A_LL_Act_02",
|
||||
"TwnObj_City_GerudoPot_A:TwnObj_City_GerudoPot_A_M_Act_01",
|
||||
"TwnObj_City_GerudoPot_A:TwnObj_City_GerudoPot_A_S_Act_01",
|
||||
"TwnObj_City_GerudoBaggage_A:TwnObj_City_GerudoBaggage_A_01",
|
||||
"TwnObj_City_GerudoBaggage_A:TwnObj_City_GerudoBaggage_A_02",
|
||||
"TwnObj_City_GerudoBaggage_A:TwnObj_City_GerudoBaggage_A_03",
|
||||
"TwnObj_City_GerudoBaggage_A:TwnObj_City_GerudoBaggage_A_05",
|
||||
"TwnObj_SmallOasis_A-00:TwnObj_SmallOasisArrowCase_A_01",
|
||||
"TwnObj_SmallOasis_A-00:TwnObj_SmallOasisChair_A_01",
|
||||
"TwnObj_City_Gerudo_A:TwnObj_City_GerudoSighboard_A_01",
|
||||
"TwnObj_City_Gerudo_A:TwnObj_City_GerudoTent_A_01"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "GoronCity",
|
||||
"HunterStartingPosition": {
|
||||
"x": 1575.2722,
|
||||
"y": 482,
|
||||
"z": -2423.22
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": 1659.2584,
|
||||
"y": 488.53653,
|
||||
"z": -2442.4885
|
||||
},
|
||||
"PossibleModels": [
|
||||
"TwnObj_City_GoronArtifact_B:TwnObj_City_GoronBox_B_01",
|
||||
"TwnObj_City_GoronArtifact_B:TwnObj_City_GoronLight_B_01",
|
||||
"TwnObj_City_GoronArtifact_B:TwnObj_City_GoronSignboard_B_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronBed_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronBed_B_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronBottle_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronBottle_A_02",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronChair_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronChair_A_02",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronChess_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronCup_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronFlowerBase_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronFlowerBase_A_02",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronHelmet_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronHouseholdShinto_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronKaraoke_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronPickaxe_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronTable_A_02",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronToyDarts_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronToy_A_01",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_GoronToy_A_02",
|
||||
"TwnObj_City_GoronFurniture_A:TwnObj_City_Goronkettle_A_01",
|
||||
"TwnObj_City_GoronPot_A:TwnObj_City_GoronPot_A_M_Act_01",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronGuidePost_A_02",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronGuidePost_A_03",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronHotelLight_A_01",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronIronWall_A_01",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronLightStone_A_01",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronLight_A_02",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronLight_A_03",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronLight_A_04",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronLight_A_05",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronRock_A_05",
|
||||
"TwnObj_City_Goron_A-00:TwnObj_City_GoronSmithWorkbench_A_01"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "YigaBase",
|
||||
"HunterStartingPosition": {
|
||||
"x": -3701.685,
|
||||
"y": 438,
|
||||
"z": 1367.77
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": -3623.5227,
|
||||
"y": 451,
|
||||
"z": 1378.4105
|
||||
},
|
||||
"PossibleModels": [
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseRockBlock_G_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseFrogStatue_A_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseLamp_A_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseLamp_B_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseLamp_B_02",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBasePrisonDoor_A_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseRockBlock_B_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseRockBlock_C_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseRockBlock_D_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBaseRockBlock_E_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBase_FenceA_01",
|
||||
"FldObj_SecretBase_A-00:FldObj_SecretBase_TorchStand_A_01",
|
||||
"Obj_FruitBanana_A:Obj_FruitBanana_A_01",
|
||||
"Obj_BoxWood_Desert_A:Obj_BoxWood_Desert_A",
|
||||
"Obj_Barrel_A:Obj_Barrel_Hide_A",
|
||||
"Obj_TBox_Field_Stone:TBox_Field_Stone",
|
||||
"Obj_CookSet_A:CookSet_A",
|
||||
"Obj_Pot_A:Obj_Pot_A_01",
|
||||
"Obj_Barrel_A:Obj_Barrel_A"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Lurelin",
|
||||
"HunterStartingPosition": {
|
||||
"x": 2827.8472,
|
||||
"y": 153,
|
||||
"z": 3321.092
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": 2865.9854,
|
||||
"y": 136,
|
||||
"z": 3474.8728
|
||||
},
|
||||
"PossibleModels": [
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingBed_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingBoatShopPlate_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingChair_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingFence_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingFence_A_02",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingFireTorch_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingFireTorch_A_02",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingLamp_A_02",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingLongTorch_A_02",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingPlantPot_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingPlantPot_A_02",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingPole_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingStair_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingTorchPole_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_FishingWoodGard_A_01",
|
||||
"TwnObj_Village_Fishing_A-00:TwnObj_Village_Fishing_Boat_A",
|
||||
"TwnObj_Village_FishingPot_A:TwnObj_Village_FishingPot_M_A_Act_01",
|
||||
"TwnObj_Village_Fishing_A-03:TwnObj_Village_FishingCloset_A_01",
|
||||
"TwnObj_Village_Fishing_A-05:TwnObj_Village_FishingCrowsNest_A_01",
|
||||
"Obj_TreePalmCoconut_A:Obj_TreePalmCoconut_A_01",
|
||||
"Obj_TreePalmCoconut_A:Obj_TreePalmCoconut_A_02",
|
||||
"Obj_BoxWood_Seaside_A:Obj_BoxWood_Seaside_A",
|
||||
"Obj_CookSet_A:CookSet_A",
|
||||
"Obj_Barrel_A:Obj_Barrel_A"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Hateno",
|
||||
"HunterStartingPosition": {
|
||||
"x": 3309.5654,
|
||||
"y": 240,
|
||||
"z": 2291.9185
|
||||
},
|
||||
"HidersStartingPosition": {
|
||||
"x": 3384.4749,
|
||||
"y": 228,
|
||||
"z": 2144.905
|
||||
},
|
||||
"PossibleModels": [
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoBanner_A_01",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoBanner_A_02",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoWoodLogStair_A_01",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoFence_A_02",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoFence_A_03",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoFence_A_04",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoFence_A_05",
|
||||
"TwnObj_Village_Hateno_A-00:TwnObj_Village_HatenoFence_A_06",
|
||||
"TwnObj_Village_Hateno_A-01:TwnObj_Village_HatenoBanner_A_03",
|
||||
"TwnObj_Village_Hateno_A-01:TwnObj_Village_HatenoBanner_A_04",
|
||||
"TwnObj_Village_Hateno_A-01:TwnObj_Village_HatenoLamp_A_03",
|
||||
"TwnObj_Village_Hateno_A-01:TwnObj_Village_HatenoLinkHouseNamePlate_A_01",
|
||||
"TwnObj_Village_Hateno_A-01:TwnObj_Village_HatenoSignboard_A_01",
|
||||
"TwnObj_Village_Hateno_A-02:TwnObj_Village_HatenoScarecrow_A_01",
|
||||
"TwnObj_Village_Hateno_A-02:TwnObj_Village_HatenoSignboard_A_02",
|
||||
"TwnObj_Village_Hateno_A-02:TwnObj_Village_HatenoSignboard_A_03",
|
||||
"TwnObj_Village_Hateno_A-02:TwnObj_Village_HatenoSignboard_A_04",
|
||||
"TwnObj_Village_Hateno_A-02:TwnObj_Village_HatenoStraw_A_01",
|
||||
"TwnObj_Village_Hateno_A-03:TwnObj_Village_HatenoMessageBoard_A_02",
|
||||
"TwnObj_Village_Hateno_A-04:TwnObj_Village_HatenoMessageBoard_A_01",
|
||||
"TwnObj_Village_Hateno_A-05:TwnObj_Village_HatenoRock_A_03",
|
||||
"TwnObj_Village_Hateno_A-06:TwnObj_Village_HatenoRock_A_02",
|
||||
"TwnObj_Village_Hateno_A-08:TwnObj_Village_HatenoJunkSet_A_02",
|
||||
"TwnObj_Village_Hateno_A-09:TwnObj_Village_HatenoJunkSet_A_03",
|
||||
"TwnObj_Village_Hateno_A-10:TwnObj_Village_HatenoJunkSet_A_04",
|
||||
"TwnObj_Village_Hateno_A-12:TwnObj_Village_HatenoJunkSet_A_01",
|
||||
"TwnObj_Village_Hateno_A-13:TwnObj_Village_HatenoLamp_A_04",
|
||||
"TwnObj_Village_HatenoFurniture_A:TwnObj_Village_HatenoBed_A_01",
|
||||
"TwnObj_Village_HatenoFurniture_A:TwnObj_Village_HatenoBed_A_02",
|
||||
"TwnObj_Village_HatenoFurniture_A:TwnObj_Village_HatenoChair_A_01",
|
||||
"TwnObj_Village_HatenoFurniture_A:TwnObj_Village_HatenoChair_A_02",
|
||||
"TwnObj_Village_HatenoGuidePost_A:TwnObj_Village_AncientCivilLaboSignboard_A_01",
|
||||
"TwnObj_Village_HatenoGuidePost_A:TwnObj_Village_HatenoGuidePost_A_01",
|
||||
"TwnObj_Village_HatenoPot_A:TwnObj_Village_HatenoPot_A_S_Act_01",
|
||||
"TwnObj_Village_HatenoPot_A:TwnObj_Village_HatenoPot_A_M_Act_01",
|
||||
"TwnObj_Village_HatenoPot_A:TwnObj_Village_HatenoPot_A_L_Act_01"
|
||||
]
|
||||
}
|
||||
]
|
63
C#/BOTW.DedicatedServer/Properties/Resources.Designer.cs
generated
Normal file
63
C#/BOTW.DedicatedServer/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Este código fue generado por una herramienta.
|
||||
// Versión de runtime:4.0.30319.42000
|
||||
//
|
||||
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
// se vuelve a generar el código.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace BOTW.DedicatedServer.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
|
||||
/// </summary>
|
||||
// StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||
// a través de una herramienta como ResGen o Visual Studio.
|
||||
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||
// con la opción /str o recompile su proyecto de VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BOTW.DedicatedServer.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
|
||||
/// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
101
C#/BOTW.DedicatedServer/Properties/Resources.resx
Normal file
101
C#/BOTW.DedicatedServer/Properties/Resources.resx
Normal file
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
24
C#/BOTW.DedicatedServer/ServerConfig.ini
Normal file
24
C#/BOTW.DedicatedServer/ServerConfig.ini
Normal file
@ -0,0 +1,24 @@
|
||||
[Connection]
|
||||
IP=localhost
|
||||
Port=5050
|
||||
Password=
|
||||
|
||||
[ServerInformation]
|
||||
Description=Explore Hyrule with Friends!
|
||||
|
||||
[Gamemode]
|
||||
# Set to False to be asked for gamemode when you start the server
|
||||
DefaultGamemode=False
|
||||
|
||||
[DefaultGamemode]
|
||||
# If default gamemode is True, the next options will be used
|
||||
Name=Custom
|
||||
EnemySync=False
|
||||
QuestSync=False
|
||||
KorokSync=False
|
||||
TowerSync=False
|
||||
ShrineSync=False
|
||||
LocationSync=False
|
||||
DungeonSync=False
|
||||
# 0 for no special gamemode, 1 for HunterVsSpeedrunner, 2 for DeathSwap
|
||||
Special=0
|
10
C#/BOTW.Logging/BOTWM.Logging.csproj
Normal file
10
C#/BOTW.Logging/BOTWM.Logging.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>MBL.Logging</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
120
C#/BOTW.Logging/Logger.cs
Normal file
120
C#/BOTW.Logging/Logger.cs
Normal file
@ -0,0 +1,120 @@
|
||||
namespace BOTW.Logging
|
||||
{
|
||||
public static class Logger
|
||||
{
|
||||
public enum LogLevelEnum : int
|
||||
{
|
||||
INFO = 2,
|
||||
WARNING = 3,
|
||||
DEBUG = 4
|
||||
}
|
||||
|
||||
public enum LogWriteLevelEnum : int
|
||||
{
|
||||
CRT = 0,
|
||||
ERR = 1,
|
||||
INF = 2,
|
||||
WRN = 3,
|
||||
DBG = 4
|
||||
}
|
||||
|
||||
private static LogLevelEnum CMDLevel;
|
||||
private static LogLevelEnum LogLevel;
|
||||
|
||||
private static string CurrentDirectory = Directory.GetCurrentDirectory();
|
||||
private static string LogPath = $"{CurrentDirectory}\\LatestLog.txt";
|
||||
private static string LogsFolder = $"{CurrentDirectory}\\Logs";
|
||||
|
||||
private static Mutex logMutex = new Mutex();
|
||||
|
||||
public static void Start(LogLevelEnum logLevel, LogLevelEnum cmdLevel)
|
||||
{
|
||||
LogLevel = logLevel;
|
||||
CMDLevel = cmdLevel;
|
||||
|
||||
SetupLogFile();
|
||||
}
|
||||
|
||||
public static void LogCritical(string message, string details = "", ConsoleColor color = ConsoleColor.DarkRed) => WriteToLog(LogWriteLevelEnum.CRT, message, details, color);
|
||||
public static void LogError(string message, string details = "", ConsoleColor color = ConsoleColor.DarkRed) => WriteToLog(LogWriteLevelEnum.ERR, message, details, color);
|
||||
public static void LogInformation(string message, string details = "", ConsoleColor color = ConsoleColor.White) => WriteToLog(LogWriteLevelEnum.INF, message, details, color);
|
||||
public static void LogWarning(string message, string details = "", ConsoleColor color = ConsoleColor.DarkYellow) => WriteToLog(LogWriteLevelEnum.WRN, message, details, color);
|
||||
public static void LogDebug(string message, string details = "", ConsoleColor color = ConsoleColor.Magenta) => WriteToLog(LogWriteLevelEnum.DBG, message, details, color);
|
||||
|
||||
public static string LogInput(string message)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(message))
|
||||
WriteToLog(LogWriteLevelEnum.INF, message, "", ConsoleColor.White, false);
|
||||
|
||||
string userInput = Console.ReadLine();
|
||||
|
||||
using (StreamWriter LogFile = new StreamWriter(LogPath, true))
|
||||
{
|
||||
LogFile.WriteLine(userInput);
|
||||
}
|
||||
|
||||
return userInput;
|
||||
}
|
||||
|
||||
private static void SetupLogFile()
|
||||
{
|
||||
if(File.Exists(LogPath))
|
||||
{
|
||||
string creationTime = File.GetCreationTime(LogPath).ToString("yyyy-MM-dd, HH-mm-ss");
|
||||
|
||||
if (!Directory.Exists(LogsFolder))
|
||||
Directory.CreateDirectory(LogsFolder);
|
||||
|
||||
File.Move(LogPath, $"{LogsFolder}\\{creationTime}.txt");
|
||||
}
|
||||
|
||||
File.CreateText(LogPath);
|
||||
}
|
||||
|
||||
private static void WriteToLog(LogWriteLevelEnum writeLevel, string message, string details, ConsoleColor color, bool newLine = true, bool writeToCMD = true)
|
||||
{
|
||||
string MessageTime = DateTime.Now.ToString("HH:mm:ss");
|
||||
|
||||
if(writeToCMD)
|
||||
WriteToConsole(writeLevel, message, MessageTime, color, newLine);
|
||||
|
||||
if ((int)writeLevel > (int)LogLevel)
|
||||
return;
|
||||
|
||||
logMutex.WaitOne(100);
|
||||
|
||||
using (StreamWriter LogFile = new StreamWriter(LogPath, true))
|
||||
{
|
||||
LogFile.Write($"[{MessageTime}] {message}");
|
||||
|
||||
if (!string.IsNullOrEmpty(details))
|
||||
LogFile.Write($" - Details: {details}");
|
||||
|
||||
if(newLine)
|
||||
LogFile.WriteLine();
|
||||
}
|
||||
|
||||
logMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
private static void WriteToConsole(LogWriteLevelEnum writeLevel, string message, string datetime, ConsoleColor color, bool newLine)
|
||||
{
|
||||
if ((int)writeLevel > (int)CMDLevel)
|
||||
return;
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
|
||||
Console.Write($"[{datetime}] ");
|
||||
|
||||
Console.ForegroundColor = color;
|
||||
|
||||
if (newLine)
|
||||
Console.WriteLine(message);
|
||||
else
|
||||
Console.Write(message);
|
||||
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
}
|
||||
}
|
||||
}
|
15
C#/BOTWM.ClientTesting/BOTWM.ClientTesting.csproj
Normal file
15
C#/BOTWM.ClientTesting/BOTWM.ClientTesting.csproj
Normal file
@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>MBL.ClientTesting</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BOTWM.Server\BOTWM.Server.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
48
C#/BOTWM.ClientTesting/BumiiLoader.cs
Normal file
48
C#/BOTWM.ClientTesting/BumiiLoader.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using BOTWM.Server.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace BOTWM.ClientTesting
|
||||
{
|
||||
public static class BumiiLoader
|
||||
{
|
||||
public static Tuple<string, BumiiDTO?> readBumii(string filePath, string bumiiIOPath)
|
||||
{
|
||||
BumiiDTO? bumii = null;
|
||||
string path = "";
|
||||
|
||||
string cmdOutput = runCMD(filePath, bumiiIOPath);
|
||||
|
||||
try
|
||||
{
|
||||
bumii = JsonConvert.DeserializeObject<BumiiDTO>(cmdOutput);
|
||||
path = filePath;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
throw new Exception("Error reading bumii file. Make sure the file is properly formatted.");
|
||||
}
|
||||
|
||||
return new Tuple<string, BumiiDTO?>(path, bumii);
|
||||
}
|
||||
|
||||
private static string runCMD(string bumiiPath, string bumiiIOPath)
|
||||
{
|
||||
ProcessStartInfo start = new ProcessStartInfo()
|
||||
{
|
||||
FileName = bumiiIOPath,
|
||||
Arguments = bumiiPath,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
CreateNoWindow = true
|
||||
};
|
||||
|
||||
var cmd = Process.Start(start);
|
||||
string output = cmd.StandardOutput.ReadToEnd();
|
||||
|
||||
cmd.WaitForExit();
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
298
C#/BOTWM.ClientTesting/Program.cs
Normal file
298
C#/BOTWM.ClientTesting/Program.cs
Normal file
@ -0,0 +1,298 @@
|
||||
using BOTWM.ClientTesting;
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
using BOTWM.Server.JSONBuilder;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
int SIZE = 7168;
|
||||
|
||||
byte[] info = new byte[SIZE];
|
||||
|
||||
Console.Write("Enter your IP: ");
|
||||
|
||||
string userIP = Console.ReadLine();
|
||||
|
||||
Console.Write("Write simulated ping in ms: ");
|
||||
string sPing = Console.ReadLine();
|
||||
int ping = 50;
|
||||
|
||||
if (sPing != "")
|
||||
Int16.Parse(sPing);
|
||||
|
||||
Console.Write("Copy data: ");
|
||||
string sCOPY = Console.ReadLine();
|
||||
bool COPY = false;
|
||||
|
||||
if(sCOPY == "")
|
||||
COPY = true;
|
||||
|
||||
Console.Write("ModelType (0 for armorSync, 1 for custom model, 2 for bumii): ");
|
||||
string sModelType = Console.ReadLine();
|
||||
int modelType = 1;
|
||||
|
||||
if (sModelType != "")
|
||||
modelType = Int16.Parse(sModelType);
|
||||
|
||||
BumiiDTO bumii = new BumiiDTO();
|
||||
string customModel = "";
|
||||
|
||||
if(modelType == 1)
|
||||
{
|
||||
Console.Write("Set model (empty for sidon): ");
|
||||
customModel = Console.ReadLine();
|
||||
|
||||
if (customModel == "")
|
||||
{
|
||||
customModel = "Npc_Zora_Hero:Npc_Zora_Hero";
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!customModel.Contains(":"))
|
||||
{
|
||||
customModel = $"{customModel}:{customModel}";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(modelType == 2)
|
||||
{
|
||||
Console.Write("Bumii path: ");
|
||||
string bumiiPath = Console.ReadLine();
|
||||
|
||||
if (bumiiPath == "")
|
||||
bumiiPath = @"D:\Mods\mpbumii\dummy.bumii";
|
||||
|
||||
Console.Write("BumiiIO path: ");
|
||||
string bumiiIOPath = Console.ReadLine();
|
||||
|
||||
if (bumiiIOPath == "")
|
||||
bumiiIOPath = "D:\\Mods\\mpbumii\\bumii_IO.exe";
|
||||
|
||||
bumii = BumiiLoader.readBumii(bumiiPath, bumiiIOPath).Item2;
|
||||
}
|
||||
|
||||
//Console.Write("Actor distance: ");
|
||||
//string sDistance = Console.ReadLine();
|
||||
//float distance = 1;
|
||||
|
||||
//if(sDistance != "")
|
||||
// distance = float.Parse(sDistance);
|
||||
|
||||
float distance = 0;
|
||||
|
||||
Console.WriteLine($"Connecting to {userIP}...");
|
||||
|
||||
List<Socket> Sockets = new List<Socket>();
|
||||
|
||||
int PlayerNumber = 1;
|
||||
|
||||
for (int i = 0; i < PlayerNumber; i++)
|
||||
{
|
||||
IPEndPoint ip = new IPEndPoint(IPAddress.Parse(userIP), 5050);
|
||||
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
s.Connect(ip);
|
||||
|
||||
Sockets.Add(s);
|
||||
|
||||
ModelDataDTO model = new ModelDataDTO();
|
||||
|
||||
model.ModelType = (byte)modelType;
|
||||
model.Model = customModel;
|
||||
model.Mii = bumii;
|
||||
|
||||
List<byte> message = new List<byte>() { 2 };
|
||||
message.AddRange(new JSONBuilder().BuildArrayOfBytes(new ConnectDTO() { Name = $"Taca_A_Xereca_Pra_Mim{i}", Password = "NoPassword", ModelData = model }, true));
|
||||
sendServerMessage(s, message);
|
||||
|
||||
string test = Encoding.UTF8.GetString(info);
|
||||
|
||||
var response = JsonConvert.DeserializeObject<ConnectResponseDTO>(test);
|
||||
distance = response.PlayerNumber + 1;
|
||||
}
|
||||
|
||||
Thread.Sleep(2000);
|
||||
|
||||
int count = 0;
|
||||
|
||||
List<EnemyData> enemyData = new List<EnemyData>();
|
||||
List<string> questList = new List<string>();
|
||||
|
||||
Dictionary<byte, string> models = new Dictionary<byte, string>();
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
enemyData.Add(new EnemyData(i, i));
|
||||
questList.Add($"C{i}00");
|
||||
}
|
||||
|
||||
ClientDTO client = new ClientDTO()
|
||||
{
|
||||
WorldData = new WorldDTO() { Time = 5, Day = 2, Weather = 0 },
|
||||
PlayerData = new ClientPlayerDTO()
|
||||
{
|
||||
Position = new Vec3f((float)1743.11, (float)115.56, (float)1937.63),
|
||||
Rotation1 = new Quaternion((float)-0.21, (float)-0.98, (float)0.98, (float)-0.21),
|
||||
Rotation2 = new Quaternion((float)0.78, (float)0.63, (float)0.78, (float)0.63),
|
||||
Rotation3 = new Quaternion((float)0.5, (float)0.5, (float)0.5, (float)0.5),
|
||||
Rotation4 = new Quaternion((float)0.5, (float)0.5, (float)0.5, (float)0.5),
|
||||
Animation = 3,
|
||||
Health = 30,
|
||||
AtkUp = 5,
|
||||
IsEquipped = true,
|
||||
Equipment = new CharacterEquipment()
|
||||
{
|
||||
WType = 1,
|
||||
Sword = 70,
|
||||
Shield = 2,
|
||||
Bow = 0,
|
||||
Head = 48,
|
||||
Upper = 48,
|
||||
Lower = 48
|
||||
},
|
||||
Location = new CharacterLocation() { Map = 1, Section = 29 },
|
||||
Bomb = new Vec3f(1000, 200, 30),
|
||||
Bomb2 = new Vec3f(50, 3, 2),
|
||||
BombCube = new Vec3f(1, 2, 3),
|
||||
BombCube2 = new Vec3f(2, 3, 1)
|
||||
},
|
||||
EnemyData = new EnemyDTO() { Health = enemyData },
|
||||
QuestData = new QuestsDTO() { Completed = questList }
|
||||
};
|
||||
|
||||
string first = "";
|
||||
bool firstCopy = true;
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
for (int i = 0; i < PlayerNumber; i++)
|
||||
{
|
||||
|
||||
List<byte> mes = new List<byte>() { 3 };
|
||||
|
||||
mes.AddRange(new JSONBuilder().BuildArrayOfBytes(client, true));
|
||||
|
||||
var watch = new System.Diagnostics.Stopwatch();
|
||||
|
||||
watch.Start();
|
||||
|
||||
if(i == 31)
|
||||
{
|
||||
var t = "a";
|
||||
}
|
||||
|
||||
int meslength = sendServerMessage(Sockets[i], mes, true);
|
||||
|
||||
watch.Stop();
|
||||
|
||||
ServerDTO serverData = new JSONBuilder().BuildFromBytesTest(info);
|
||||
|
||||
if (COPY && serverData.ClosePlayers.Count > 0)
|
||||
{
|
||||
if(firstCopy)
|
||||
{
|
||||
client.PlayerData.Position = serverData.ClosePlayers[0].Position;
|
||||
client.PlayerData.Position.z = client.PlayerData.Position.z + distance;
|
||||
client.PlayerData.Rotation1 = serverData.ClosePlayers[0].Rotation1;
|
||||
client.PlayerData.Rotation2 = serverData.ClosePlayers[0].Rotation2;
|
||||
client.PlayerData.Rotation3 = serverData.ClosePlayers[0].Rotation3;
|
||||
client.PlayerData.Rotation4 = serverData.ClosePlayers[0].Rotation4;
|
||||
}
|
||||
client.PlayerData.Animation = serverData.ClosePlayers[0].Animation;
|
||||
client.PlayerData.Health = serverData.ClosePlayers[0].Health;
|
||||
client.PlayerData.AtkUp = serverData.ClosePlayers[0].AtkUp;
|
||||
client.PlayerData.IsEquipped = serverData.ClosePlayers[0].IsEquipped;
|
||||
client.PlayerData.Equipment.WType = serverData.ClosePlayers[0].Equipment.WType;
|
||||
client.PlayerData.Equipment.Sword = serverData.ClosePlayers[0].Equipment.Sword;
|
||||
client.PlayerData.Equipment.Shield = serverData.ClosePlayers[0].Equipment.Shield;
|
||||
client.PlayerData.Equipment.Head = serverData.ClosePlayers[0].Equipment.Head;
|
||||
client.PlayerData.Equipment.Upper = serverData.ClosePlayers[0].Equipment.Upper;
|
||||
client.PlayerData.Equipment.Lower = serverData.ClosePlayers[0].Equipment.Lower;
|
||||
client.PlayerData.Bomb = CopyBombWithOffset(serverData.ClosePlayers[0].Bomb, distance);
|
||||
client.PlayerData.Bomb2 = CopyBombWithOffset(serverData.ClosePlayers[0].Bomb2, distance);
|
||||
client.PlayerData.BombCube = CopyBombWithOffset(serverData.ClosePlayers[0].BombCube, distance);
|
||||
client.PlayerData.BombCube2 = CopyBombWithOffset(serverData.ClosePlayers[0].BombCube2, distance);
|
||||
|
||||
firstCopy = true;
|
||||
}
|
||||
else if(COPY && serverData.ClosePlayers.Count == 0 && serverData.FarPlayers.Count > 0)
|
||||
{
|
||||
client.PlayerData.Position = serverData.FarPlayers[0].Position;
|
||||
client.PlayerData.Position.z = client.PlayerData.Position.z + distance;
|
||||
}
|
||||
|
||||
if (i == PlayerNumber - 1)
|
||||
{
|
||||
foreach(KeyValuePair<byte, ModelDataDTO> pair in serverData.ModelData.Models)
|
||||
{
|
||||
models[pair.Key] = pair.Value.Model;
|
||||
}
|
||||
|
||||
Console.Clear();
|
||||
//Console.WriteLine("\n\n\n");
|
||||
Console.WriteLine($"Message length: {meslength} bytes");
|
||||
|
||||
string json = JsonConvert.SerializeObject(serverData);
|
||||
|
||||
if (first == "")
|
||||
first = json;
|
||||
|
||||
//for (int j = 0; j < meslength; j++)
|
||||
// Console.Write($"0x{info[j]:X2}, ");
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine($"Old message length: {json.Length} bytes");
|
||||
Console.WriteLine($"Time elapsed: {watch.ElapsedMilliseconds} ms");
|
||||
|
||||
Console.WriteLine($"Information: {json}");
|
||||
|
||||
Console.WriteLine();
|
||||
|
||||
Console.WriteLine(JsonConvert.SerializeObject(models, Formatting.Indented));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
count++;
|
||||
|
||||
//Thread.Sleep(ping);
|
||||
|
||||
//Console.Write("Enter to continue... ");
|
||||
//string dummy = Console.ReadLine();
|
||||
|
||||
}
|
||||
|
||||
Vec3f CopyBombWithOffset(Vec3f original, float offset)
|
||||
{
|
||||
Vec3f response = new Vec3f();
|
||||
|
||||
if (response.x == 0 && response.y == 0 && response.z == 0)
|
||||
return original;
|
||||
|
||||
if (response.x == -1 && response.y == -1 && response.z == -1)
|
||||
return original;
|
||||
|
||||
response.x = original.x;
|
||||
response.y = original.y;
|
||||
response.z = original.z + offset;
|
||||
return response;
|
||||
}
|
||||
|
||||
int sendServerMessage(Socket s, List<byte> data, bool header = false)
|
||||
{
|
||||
while (data.Count < SIZE)
|
||||
data.Add(0);
|
||||
|
||||
s.Send(data.ToArray());
|
||||
|
||||
int length;
|
||||
|
||||
length = s.Receive(info, 0, info.Length, 0);
|
||||
|
||||
return length;
|
||||
}
|
42
C#/BOTWM.Server/BOTWM.Server.csproj
Normal file
42
C#/BOTWM.Server/BOTWM.Server.csproj
Normal file
@ -0,0 +1,42 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AssemblyName>MBL.Server</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MadMilkman.Ini" Version="1.0.6" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BOTW.Logging\BOTWM.Logging.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
182
C#/BOTWM.Server/DTO/BumiiDTO.cs
Normal file
182
C#/BOTWM.Server/DTO/BumiiDTO.cs
Normal file
@ -0,0 +1,182 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class BumiiDTO
|
||||
{
|
||||
public ffsdDTO ffsd;
|
||||
public bodyDTO body;
|
||||
public personalDTO personal;
|
||||
public commonDTO common;
|
||||
public shapeDTO shape;
|
||||
public hairDTO hair;
|
||||
public eyeDTO eye;
|
||||
public eye_ctrlDTO eye_ctrl;
|
||||
public eyebrowDTO eyebrow;
|
||||
public noseDTO nose;
|
||||
public mouthDTO mouth;
|
||||
public beardDTO beard;
|
||||
public glassDTO glass;
|
||||
public korogDTO korog;
|
||||
public goronDTO goron;
|
||||
public gerudoDTO gerudo;
|
||||
public ritoDTO rito;
|
||||
public zoraDTO zora;
|
||||
}
|
||||
|
||||
public class ffsdDTO
|
||||
{
|
||||
public bool no_use_ffsd;
|
||||
public short type;
|
||||
}
|
||||
|
||||
public class bodyDTO
|
||||
{
|
||||
public short race;
|
||||
public short type;
|
||||
public short number;
|
||||
public short weight;
|
||||
public short height;
|
||||
}
|
||||
|
||||
public class personalDTO
|
||||
{
|
||||
public short sex_age;
|
||||
public short fav_color;
|
||||
public short sub_color_1;
|
||||
public short sub_color_2;
|
||||
public short head_fav_color;
|
||||
public short shoulder_fav_color;
|
||||
public short shoulder_sub_color_1;
|
||||
}
|
||||
|
||||
public class commonDTO
|
||||
{
|
||||
public short backpack;
|
||||
public short hat;
|
||||
public bool no_hat_always;
|
||||
public short body_correct;
|
||||
public bool is_mid_age;
|
||||
public float rot_cravicle;
|
||||
public float rot_arm;
|
||||
public float rot_leg;
|
||||
public float rot_crotch;
|
||||
}
|
||||
|
||||
public class shapeDTO
|
||||
{
|
||||
public short jaw;
|
||||
public short wrinkle;
|
||||
public short make;
|
||||
public float trans_v;
|
||||
public float scale;
|
||||
public short skin_color;
|
||||
}
|
||||
|
||||
public class hairDTO
|
||||
{
|
||||
public short type;
|
||||
public short color;
|
||||
public bool flip;
|
||||
}
|
||||
|
||||
public class eyeDTO
|
||||
{
|
||||
public short type;
|
||||
public short color;
|
||||
public float trans_v;
|
||||
public float trans_u;
|
||||
public float rotate;
|
||||
public float scale;
|
||||
public float aspect;
|
||||
public float eyeball_trans_u;
|
||||
public float eyeball_trans_v;
|
||||
public float eyeball_scale;
|
||||
public short highlight_bright;
|
||||
}
|
||||
|
||||
public class eye_ctrlDTO
|
||||
{
|
||||
public Vec3f base_offset;
|
||||
public float translim_out;
|
||||
public float translim_in;
|
||||
public float translim_d;
|
||||
public float translim_u;
|
||||
public float neck_offset_ud;
|
||||
}
|
||||
|
||||
public class eyebrowDTO
|
||||
{
|
||||
public short type;
|
||||
public short color;
|
||||
public float trans_v;
|
||||
public float trans_u;
|
||||
public float rotate;
|
||||
public float scale;
|
||||
public float aspect;
|
||||
}
|
||||
|
||||
public class noseDTO
|
||||
{
|
||||
public short type;
|
||||
public float trans_v;
|
||||
public float scale;
|
||||
}
|
||||
|
||||
public class mouthDTO
|
||||
{
|
||||
public short type;
|
||||
public short color;
|
||||
public float trans_v;
|
||||
public float scale;
|
||||
public float aspect;
|
||||
}
|
||||
|
||||
public class beardDTO
|
||||
{
|
||||
public short mustache;
|
||||
public float scale;
|
||||
public short type;
|
||||
public short color;
|
||||
}
|
||||
|
||||
public class glassDTO
|
||||
{
|
||||
public short type;
|
||||
public short color;
|
||||
}
|
||||
|
||||
public class korogDTO
|
||||
{
|
||||
public short mask;
|
||||
public short skin_color;
|
||||
public short left_plant;
|
||||
public short right_plant;
|
||||
}
|
||||
|
||||
public class goronDTO
|
||||
{
|
||||
public short skin_color;
|
||||
}
|
||||
|
||||
public class gerudoDTO
|
||||
{
|
||||
public short hair;
|
||||
public short hair_color;
|
||||
public short glass;
|
||||
public short glass_color;
|
||||
public short skin_color;
|
||||
public short lip_color;
|
||||
}
|
||||
|
||||
public class ritoDTO
|
||||
{
|
||||
public short body_color;
|
||||
public short hair_color;
|
||||
}
|
||||
|
||||
public class zoraDTO
|
||||
{
|
||||
public short body_color;
|
||||
}
|
||||
}
|
10
C#/BOTWM.Server/DTO/ClientDTO.cs
Normal file
10
C#/BOTWM.Server/DTO/ClientDTO.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ClientDTO
|
||||
{
|
||||
public WorldDTO WorldData;
|
||||
public ClientPlayerDTO PlayerData;
|
||||
public EnemyDTO EnemyData;
|
||||
public QuestsDTO QuestData;
|
||||
}
|
||||
}
|
9
C#/BOTWM.Server/DTO/ConnectDTO.cs
Normal file
9
C#/BOTWM.Server/DTO/ConnectDTO.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ConnectDTO
|
||||
{
|
||||
public string Name;
|
||||
public string Password;
|
||||
public ModelDataDTO ModelData;
|
||||
}
|
||||
}
|
11
C#/BOTWM.Server/DTO/ConnectResponseDTO.cs
Normal file
11
C#/BOTWM.Server/DTO/ConnectResponseDTO.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ConnectResponseDTO
|
||||
{
|
||||
public int Response;
|
||||
public int PlayerNumber;
|
||||
public ServerSettings Settings;
|
||||
public bool QuestSync;
|
||||
public string EnemySyncList;
|
||||
}
|
||||
}
|
13
C#/BOTWM.Server/DTO/DisconnectDTO.cs
Normal file
13
C#/BOTWM.Server/DTO/DisconnectDTO.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class DisconnectDTO
|
||||
{
|
||||
string reason;
|
||||
}
|
||||
}
|
22
C#/BOTWM.Server/DTO/EnemyDTO.cs
Normal file
22
C#/BOTWM.Server/DTO/EnemyDTO.cs
Normal file
@ -0,0 +1,22 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
|
||||
public class EnemyData
|
||||
{
|
||||
|
||||
public int Hash;
|
||||
public int Health;
|
||||
|
||||
public EnemyData(int hash, int health)
|
||||
{
|
||||
Hash = hash;
|
||||
Health = health;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class EnemyDTO
|
||||
{
|
||||
public List<EnemyData> Health;
|
||||
}
|
||||
}
|
9
C#/BOTWM.Server/DTO/ModelDataDTO.cs
Normal file
9
C#/BOTWM.Server/DTO/ModelDataDTO.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ModelDataDTO
|
||||
{
|
||||
public byte ModelType;
|
||||
public string Model;
|
||||
public BumiiDTO Mii;
|
||||
}
|
||||
}
|
7
C#/BOTWM.Server/DTO/ModelsDTO.cs
Normal file
7
C#/BOTWM.Server/DTO/ModelsDTO.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ModelsDTO
|
||||
{
|
||||
public Dictionary<byte, ModelDataDTO> Models;
|
||||
}
|
||||
}
|
7
C#/BOTWM.Server/DTO/NamesDTO.cs
Normal file
7
C#/BOTWM.Server/DTO/NamesDTO.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class NamesDTO
|
||||
{
|
||||
public Dictionary<byte, string> Names;
|
||||
}
|
||||
}
|
22
C#/BOTWM.Server/DTO/NetworkDTO.cs
Normal file
22
C#/BOTWM.Server/DTO/NetworkDTO.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class NetworkDTO
|
||||
{
|
||||
public short SerializationRate;
|
||||
public short TargetFPS;
|
||||
public short SleepMultiplier;
|
||||
public bool isLocalTest;
|
||||
public bool isCharacterSpawn;
|
||||
public bool DisplayNames;
|
||||
public short GlyphDistance;
|
||||
public short GlyphTime;
|
||||
public bool isQuestSync;
|
||||
public bool isEnemySync;
|
||||
}
|
||||
}
|
11
C#/BOTWM.Server/DTO/PingDTO.cs
Normal file
11
C#/BOTWM.Server/DTO/PingDTO.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class PingDTO
|
||||
{
|
||||
public bool CorrectPassword { get; set; }
|
||||
public string Description { get; set; }
|
||||
public NamesDTO PlayerList { get; set; }
|
||||
public string GameMode { get; set; }
|
||||
public int PlayerLimit { get; set; }
|
||||
}
|
||||
}
|
60
C#/BOTWM.Server/DTO/PlayerDTO.cs
Normal file
60
C#/BOTWM.Server/DTO/PlayerDTO.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public enum PlayerStatus : byte
|
||||
{
|
||||
Close,
|
||||
Far
|
||||
}
|
||||
|
||||
public class ClosePlayerDTO
|
||||
{
|
||||
public byte PlayerNumber;
|
||||
public PlayerStatus Status { get { return PlayerStatus.Close; } }
|
||||
public bool Updated;
|
||||
public Vec3f Position;
|
||||
public Quaternion Rotation1;
|
||||
public Quaternion Rotation2;
|
||||
public Quaternion Rotation3;
|
||||
public Quaternion Rotation4;
|
||||
public int Animation;
|
||||
public int Health;
|
||||
public float AtkUp;
|
||||
public bool IsEquipped;
|
||||
public CharacterEquipment Equipment;
|
||||
public CharacterLocation Location;
|
||||
public Vec3f Bomb;
|
||||
public Vec3f Bomb2;
|
||||
public Vec3f BombCube;
|
||||
public Vec3f BombCube2;
|
||||
}
|
||||
|
||||
public class FarPlayerDTO
|
||||
{
|
||||
public byte PlayerNumber;
|
||||
public PlayerStatus Status { get { return PlayerStatus.Far; } }
|
||||
public bool Updated;
|
||||
public Vec3f Position;
|
||||
public CharacterLocation Location;
|
||||
}
|
||||
|
||||
public class ClientPlayerDTO
|
||||
{
|
||||
public Vec3f Position;
|
||||
public Quaternion Rotation1;
|
||||
public Quaternion Rotation2;
|
||||
public Quaternion Rotation3;
|
||||
public Quaternion Rotation4;
|
||||
public int Animation;
|
||||
public int Health;
|
||||
public float AtkUp;
|
||||
public bool IsEquipped;
|
||||
public CharacterEquipment Equipment;
|
||||
public CharacterLocation Location;
|
||||
public Vec3f Bomb;
|
||||
public Vec3f Bomb2;
|
||||
public Vec3f BombCube;
|
||||
public Vec3f BombCube2;
|
||||
}
|
||||
}
|
12
C#/BOTWM.Server/DTO/PropHuntDTO.cs
Normal file
12
C#/BOTWM.Server/DTO/PropHuntDTO.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class PropHuntDTO
|
||||
{
|
||||
public bool IsPlaying;
|
||||
public byte Phase;
|
||||
public Vec3f StartingPosition;
|
||||
public bool IsHunter;
|
||||
}
|
||||
}
|
14
C#/BOTWM.Server/DTO/QuestsDTO.cs
Normal file
14
C#/BOTWM.Server/DTO/QuestsDTO.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class QuestsDTO
|
||||
{
|
||||
public List<String> Completed;
|
||||
}
|
||||
|
||||
public class QuestsDTONew
|
||||
{
|
||||
public bool IsLoad;
|
||||
public Dictionary<int, int> Quests;
|
||||
}
|
||||
|
||||
}
|
34
C#/BOTWM.Server/DTO/ServerDTO.cs
Normal file
34
C#/BOTWM.Server/DTO/ServerDTO.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using BOTWM.Server.HelperTypes;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class ServerDTO
|
||||
{
|
||||
public ServerDTO()
|
||||
{
|
||||
WorldData = new WorldDTO();
|
||||
NameData = new NamesDTO();
|
||||
ModelData = new ModelsDTO();
|
||||
ClosePlayers = new List<ClosePlayerDTO>();
|
||||
FarPlayers = new List<FarPlayerDTO>();
|
||||
EnemyData = new EnemyDTO();
|
||||
QuestData = new QuestsDTO();
|
||||
NetworkData = new NetworkDTO();
|
||||
DeathSwapData = new DeathSwapDTO();
|
||||
TeleportData = new TeleportDTO();
|
||||
PropHuntData = new PropHuntDTO();
|
||||
}
|
||||
|
||||
public WorldDTO WorldData;
|
||||
public NamesDTO NameData;
|
||||
public ModelsDTO ModelData;
|
||||
public List<ClosePlayerDTO> ClosePlayers;
|
||||
public List<FarPlayerDTO> FarPlayers;
|
||||
public EnemyDTO EnemyData;
|
||||
public QuestsDTO QuestData;
|
||||
public NetworkDTO NetworkData;
|
||||
public DeathSwapDTO DeathSwapData;
|
||||
public TeleportDTO TeleportData;
|
||||
public PropHuntDTO PropHuntData;
|
||||
}
|
||||
}
|
9
C#/BOTWM.Server/DTO/TeleportDTO.cs
Normal file
9
C#/BOTWM.Server/DTO/TeleportDTO.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class TeleportDTO
|
||||
{
|
||||
public Vec3f Destination;
|
||||
}
|
||||
}
|
15
C#/BOTWM.Server/DTO/WorldDTO.cs
Normal file
15
C#/BOTWM.Server/DTO/WorldDTO.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server.DTO
|
||||
{
|
||||
public class WorldDTO
|
||||
{
|
||||
public float Time;
|
||||
public int Day;
|
||||
public int Weather;
|
||||
}
|
||||
}
|
17
C#/BOTWM.Server/DataTypes/CharacterEquipment.cs
Normal file
17
C#/BOTWM.Server/DataTypes/CharacterEquipment.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
|
||||
|
||||
public class CharacterEquipment
|
||||
{
|
||||
|
||||
public byte WType { get; set; }
|
||||
public short Sword { get; set; }
|
||||
public short Shield { get; set; }
|
||||
public short Bow { get; set; }
|
||||
public short Head { get; set; }
|
||||
public short Upper { get; set; }
|
||||
public short Lower { get; set; }
|
||||
|
||||
}
|
||||
}
|
9
C#/BOTWM.Server/DataTypes/CharacterLocation.cs
Normal file
9
C#/BOTWM.Server/DataTypes/CharacterLocation.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
|
||||
public class CharacterLocation
|
||||
{
|
||||
public byte Map { get; set; }
|
||||
public byte Section { get; set; }
|
||||
}
|
||||
}
|
10
C#/BOTWM.Server/DataTypes/PropHuntPhaseEnum.cs
Normal file
10
C#/BOTWM.Server/DataTypes/PropHuntPhaseEnum.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
public enum PropHuntPhaseEnum : byte
|
||||
{
|
||||
Stopped = 0,
|
||||
Hiding = 1,
|
||||
Running = 2,
|
||||
Countdown = 3
|
||||
}
|
||||
}
|
10
C#/BOTWM.Server/DataTypes/ProphuntLocation.cs
Normal file
10
C#/BOTWM.Server/DataTypes/ProphuntLocation.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
public class ProphuntLocation
|
||||
{
|
||||
public string Name;
|
||||
public Vec3f HunterStartingPosition;
|
||||
public Vec3f HidersStartingPosition;
|
||||
public List<string> PossibleModels;
|
||||
}
|
||||
}
|
105
C#/BOTWM.Server/DataTypes/Quaternion.cs
Normal file
105
C#/BOTWM.Server/DataTypes/Quaternion.cs
Normal file
@ -0,0 +1,105 @@
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
public class Quaternion
|
||||
{
|
||||
|
||||
public Quaternion() { _q1 = 0; _q2 = 0; _q3 = 0; _q4 = 0; }
|
||||
public Quaternion(float q1 = 0, float q2 = 0, float q3 = 0, float q4 = 0) { _q1 = q1; _q2 = q2; _q3 = q3; _q4 = q4; }
|
||||
public Quaternion(float[] val) { _q1 = val[0]; _q2 = val[1]; _q3 = val[2]; _q4 = val[3]; }
|
||||
public Quaternion(List<float> val) { _q1 = val[0]; _q2 = val[1]; _q3 = val[2]; _q4 = val[3]; }
|
||||
|
||||
private float _q1;
|
||||
|
||||
public float q1
|
||||
{
|
||||
get { return _q1; }
|
||||
set { _q1 = value; }
|
||||
}
|
||||
|
||||
private float _q2;
|
||||
|
||||
public float q2
|
||||
{
|
||||
get { return _q2; }
|
||||
set { _q2 = value; }
|
||||
}
|
||||
|
||||
private float _q3;
|
||||
|
||||
public float q3
|
||||
{
|
||||
get { return _q3; }
|
||||
set { _q3 = value; }
|
||||
}
|
||||
|
||||
private float _q4;
|
||||
|
||||
public float q4
|
||||
{
|
||||
get { return _q4; }
|
||||
set { _q4 = value; }
|
||||
}
|
||||
|
||||
public List<float> ToList()
|
||||
{
|
||||
return new List<float>() { _q1, _q2, _q3, _q4 };
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
return $"[{_q1}, {_q2}, {_q3}, {_q4}]";
|
||||
|
||||
}
|
||||
|
||||
public float this[int key]
|
||||
{
|
||||
get => GetValue(key);
|
||||
set => SetValue(key, value);
|
||||
}
|
||||
|
||||
public float GetValue(int key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case 0:
|
||||
return _q1;
|
||||
break;
|
||||
case 1:
|
||||
return _q2;
|
||||
break;
|
||||
case 2:
|
||||
return _q3;
|
||||
break;
|
||||
case 3:
|
||||
return _q4;
|
||||
break;
|
||||
default: throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetValue(int key, float value)
|
||||
{
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case 0:
|
||||
_q1 = value;
|
||||
break;
|
||||
case 1:
|
||||
_q2 = value;
|
||||
break;
|
||||
case 2:
|
||||
_q3 = value;
|
||||
break;
|
||||
case 3:
|
||||
_q4 = value;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
99
C#/BOTWM.Server/DataTypes/Vec3f.cs
Normal file
99
C#/BOTWM.Server/DataTypes/Vec3f.cs
Normal file
@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server.DataTypes
|
||||
{
|
||||
public class Vec3f
|
||||
{
|
||||
|
||||
public Vec3f() { _x = 0; _y = 0; _z = 0; }
|
||||
public Vec3f(float x = 0, float y = 0, float z = 0) { _x = x; _y = y; _z = z; }
|
||||
public Vec3f(float[] val) { _x = val[0]; _y = val[1]; _z = val[2]; }
|
||||
public Vec3f(List<float> val) { _x = val[0]; _y = val[1]; _z = val[2]; }
|
||||
|
||||
private float _x;
|
||||
|
||||
public float x
|
||||
{
|
||||
get { return _x; }
|
||||
set { _x = value; }
|
||||
}
|
||||
|
||||
private float _y;
|
||||
|
||||
public float y
|
||||
{
|
||||
get { return _y; }
|
||||
set { _y = value; }
|
||||
}
|
||||
|
||||
private float _z;
|
||||
|
||||
public float z
|
||||
{
|
||||
get { return _z; }
|
||||
set { _z = value; }
|
||||
}
|
||||
|
||||
public float GetDistance(Vec3f Coords) { return (float)Math.Sqrt(Math.Pow(this.x - Coords.x, 2) + Math.Pow(this.z - Coords.z, 2)); }
|
||||
|
||||
public List<float> ToList()
|
||||
{
|
||||
return new List<float>() { _x, _y, _z };
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
return $"[{_x}, {_y}, {_z}]";
|
||||
|
||||
}
|
||||
|
||||
public float this[int key]
|
||||
{
|
||||
get => GetValue(key);
|
||||
set => SetValue(key, value);
|
||||
}
|
||||
|
||||
public float GetValue(int key)
|
||||
{
|
||||
switch(key)
|
||||
{
|
||||
case 0:
|
||||
return _x;
|
||||
break;
|
||||
case 1:
|
||||
return _y;
|
||||
break;
|
||||
case 2:
|
||||
return _z;
|
||||
break;
|
||||
default: throw new ArgumentException();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetValue(int key, float value)
|
||||
{
|
||||
|
||||
switch(key)
|
||||
{
|
||||
case 0:
|
||||
_x = value;
|
||||
break;
|
||||
case 1:
|
||||
_y = value;
|
||||
break;
|
||||
case 2:
|
||||
_z = value;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
10
C#/BOTWM.Server/HelperTypes/DeathSwapDTO.cs
Normal file
10
C#/BOTWM.Server/HelperTypes/DeathSwapDTO.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
|
||||
namespace BOTWM.Server.HelperTypes
|
||||
{
|
||||
public class DeathSwapDTO
|
||||
{
|
||||
public byte Phase = 0;
|
||||
public Vec3f Position = new Vec3f();
|
||||
}
|
||||
}
|
144
C#/BOTWM.Server/HelperTypes/DeathSwapSettings.cs
Normal file
144
C#/BOTWM.Server/HelperTypes/DeathSwapSettings.cs
Normal file
@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server.HelperTypes
|
||||
{
|
||||
public class DeathSwapSettings
|
||||
{
|
||||
|
||||
public class Limit
|
||||
{
|
||||
public int Lower;
|
||||
public int Upper;
|
||||
public int Value;
|
||||
public bool random = true;
|
||||
}
|
||||
|
||||
public bool Enabled = false;
|
||||
public bool Running = false;
|
||||
public DateTime LastTime;
|
||||
public Limit TimerLimit;
|
||||
|
||||
public DeathSwapSettings()
|
||||
{
|
||||
|
||||
TimerLimit = new Limit()
|
||||
{
|
||||
Lower = 5,
|
||||
Upper = 10,
|
||||
Value = -1
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public bool ShouldSwap()
|
||||
{
|
||||
|
||||
if (TimerLimit.Value == -1 || Running == false)
|
||||
{
|
||||
LastTime = DateTime.Now;
|
||||
|
||||
if (TimerLimit.random)
|
||||
CalculateNewLimit();
|
||||
|
||||
Running = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DateTime.Now.Subtract(LastTime).TotalMinutes > TimerLimit.Value)
|
||||
{
|
||||
LastTime = DateTime.Now;
|
||||
|
||||
if (TimerLimit.random)
|
||||
CalculateNewLimit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public byte GetSwapPhase()
|
||||
{
|
||||
|
||||
if (TimerLimit.Value == -1 || Running == false)
|
||||
{
|
||||
LastTime = DateTime.Now;
|
||||
|
||||
if (TimerLimit.random)
|
||||
CalculateNewLimit();
|
||||
|
||||
Running = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (DateTime.Now.Subtract(LastTime).TotalMinutes > TimerLimit.Value)
|
||||
{
|
||||
Console.WriteLine("Swapping...");
|
||||
LastTime = DateTime.Now;
|
||||
|
||||
if (TimerLimit.random)
|
||||
CalculateNewLimit();
|
||||
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DateTime.Now.Subtract(LastTime).TotalMinutes > Convert.ToDouble(TimerLimit.Value) - 0.08)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
public double TimeLeft()
|
||||
{
|
||||
|
||||
if (!Running)
|
||||
return 0;
|
||||
|
||||
return TimerLimit.Value - DateTime.Now.Subtract(LastTime).TotalMinutes;
|
||||
|
||||
}
|
||||
|
||||
public int CalculateNewLimit()
|
||||
{
|
||||
|
||||
TimerLimit.Value = new Random().Next(TimerLimit.Lower, TimerLimit.Upper);
|
||||
|
||||
return TimerLimit.Value;
|
||||
|
||||
}
|
||||
|
||||
public void ChangeLimits(int lower = -1, int upper = -1, int value = -1, int random = -1)
|
||||
{
|
||||
|
||||
if(lower != -1)
|
||||
TimerLimit.Lower = lower;
|
||||
if (upper != -1)
|
||||
TimerLimit.Upper = upper;
|
||||
if (value != -1)
|
||||
{
|
||||
TimerLimit.Value = value;
|
||||
LastTime = DateTime.Now;
|
||||
}
|
||||
if (random != -1)
|
||||
TimerLimit.random = random == 0 ? false : true;
|
||||
|
||||
}
|
||||
|
||||
public void RestartTimer()
|
||||
{
|
||||
|
||||
LastTime = DateTime.Now;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
20
C#/BOTWM.Server/HelperTypes/Mapper.cs
Normal file
20
C#/BOTWM.Server/HelperTypes/Mapper.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace BOTWM.Server.HelperTypes
|
||||
{
|
||||
static public class AutoMapperExtensions
|
||||
{
|
||||
static public void Map<T>(this T Dst, object Src)
|
||||
{
|
||||
foreach (FieldInfo field in typeof(T).GetFields())
|
||||
{
|
||||
if (!Src.GetType().GetFields().Any(fld => fld.Name == field.Name && fld.FieldType == field.FieldType))
|
||||
continue;
|
||||
|
||||
FieldInfo SrcField = Src.GetType().GetFields().Where(fld => fld.Name == field.Name && fld.FieldType == field.FieldType).First();
|
||||
|
||||
field.SetValue(Dst, SrcField.GetValue(Src));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
59
C#/BOTWM.Server/HelperTypes/ServerConfig.cs
Normal file
59
C#/BOTWM.Server/HelperTypes/ServerConfig.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using MadMilkman.Ini;
|
||||
|
||||
namespace BOTWM.Server.HelperTypes
|
||||
{
|
||||
public class ServerConfig
|
||||
{
|
||||
|
||||
public class ConnectionData
|
||||
{
|
||||
public string IP;
|
||||
public int Port;
|
||||
public string Password;
|
||||
}
|
||||
|
||||
public class ServerInformationData
|
||||
{
|
||||
public string Description;
|
||||
}
|
||||
|
||||
public class GamemodeData
|
||||
{
|
||||
public bool DefaultGamemode;
|
||||
}
|
||||
|
||||
public class DefaultGamemodeData
|
||||
{
|
||||
public string Name;
|
||||
public bool EnemySync;
|
||||
public bool QuestSync;
|
||||
public bool KorokSync;
|
||||
public bool TowerSync;
|
||||
public bool ShrineSync;
|
||||
public bool LocationSync;
|
||||
public bool DungeonSync;
|
||||
public int Special;
|
||||
}
|
||||
|
||||
public ConnectionData Connection;
|
||||
public ServerInformationData ServerInformation;
|
||||
public GamemodeData Gamemode;
|
||||
public DefaultGamemodeData DefaultGamemode;
|
||||
|
||||
public ServerConfig()
|
||||
{
|
||||
IniFile ini = new IniFile();
|
||||
ini.Load("ServerConfig.ini");
|
||||
|
||||
foreach(var section in this.GetType().GetFields())
|
||||
{
|
||||
var field = Activator.CreateInstance(section.FieldType);
|
||||
|
||||
foreach (var key in section.FieldType.GetFields())
|
||||
key.SetValue(field, Convert.ChangeType(ini.Sections[section.Name].Keys[key.Name].Value, key.FieldType));
|
||||
|
||||
section.SetValue(this, field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
427
C#/BOTWM.Server/JSONBuilder/JSONBuilder.cs
Normal file
427
C#/BOTWM.Server/JSONBuilder/JSONBuilder.cs
Normal file
@ -0,0 +1,427 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace BOTWM.Server.JSONBuilder
|
||||
{
|
||||
|
||||
public enum MessageType
|
||||
{
|
||||
error,
|
||||
ping,
|
||||
connect,
|
||||
update,
|
||||
disconnect
|
||||
}
|
||||
|
||||
public class JSONBuilder
|
||||
{
|
||||
byte[] Data;
|
||||
List<byte> ByteData;
|
||||
|
||||
public ServerDTO BuildFromBytesTest(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
|
||||
GetArray(2);
|
||||
|
||||
string SerializedJson = JsonConvert.SerializeObject(GetJson(typeof(ServerDTO)));
|
||||
|
||||
ServerDTO Object = JsonConvert.DeserializeObject<ServerDTO>(SerializedJson);
|
||||
|
||||
return Object;
|
||||
}
|
||||
|
||||
public Tuple<MessageType, object> BuildFromBytes(byte[] data)
|
||||
{
|
||||
Data = data;
|
||||
|
||||
MessageType messageType = (MessageType)(int)GetArray(1)[0];
|
||||
|
||||
object Object = null;
|
||||
|
||||
if (messageType == MessageType.connect)
|
||||
{
|
||||
string SerializedJson = JsonConvert.SerializeObject(GetJson(typeof(ConnectDTO)));
|
||||
|
||||
Object = JsonConvert.DeserializeObject<ConnectDTO>(SerializedJson);
|
||||
}
|
||||
else if (messageType == MessageType.update)
|
||||
{
|
||||
string SerializedJson = JsonConvert.SerializeObject(GetJson(typeof(ClientDTO)));
|
||||
|
||||
Object = JsonConvert.DeserializeObject<ClientDTO>(SerializedJson);
|
||||
}
|
||||
else if(messageType == MessageType.ping)
|
||||
{
|
||||
Object = Encoding.UTF8.GetString(Data).Replace("\0", "");
|
||||
}
|
||||
else if(messageType == MessageType.disconnect)
|
||||
{
|
||||
Object = Encoding.UTF8.GetString(Data).Replace("\0", "");
|
||||
}
|
||||
|
||||
return new Tuple<MessageType, object>(messageType, Object);
|
||||
}
|
||||
|
||||
public byte[] BuildArrayOfBytes(object original, bool debug = false)
|
||||
{
|
||||
ByteData = new List<byte>();
|
||||
|
||||
GetByteData(original);
|
||||
|
||||
if(!debug)
|
||||
ByteData.InsertRange(0, BitConverter.GetBytes((short)ByteData.Count));
|
||||
|
||||
return ByteData.ToArray();
|
||||
}
|
||||
|
||||
private object GetJson(Type original)
|
||||
{
|
||||
object value = null;
|
||||
|
||||
if (original == typeof(int))
|
||||
value = BitConverter.ToInt32(GetArray(4), 0);
|
||||
else if (original == typeof(float))
|
||||
value = BitConverter.ToSingle(GetArray(4), 0);
|
||||
else if (original == typeof(bool))
|
||||
value = GetArray(1)[0] == 0x0 ? false : true;
|
||||
else if (original == typeof(byte))
|
||||
value = GetArray(1)[0];
|
||||
else if (original == typeof(short))
|
||||
value = BitConverter.ToInt16(GetArray(2), 0);
|
||||
else if (original == typeof(string))
|
||||
{
|
||||
int stringSize = GetArray(1)[0];
|
||||
|
||||
if (stringSize == 0)
|
||||
value = "";
|
||||
else
|
||||
value = Encoding.UTF8.GetString(GetArray(stringSize));
|
||||
}
|
||||
else if (original == typeof(Vec3f))
|
||||
{
|
||||
Vec3f result = new Vec3f();
|
||||
|
||||
result.x = BitConverter.ToSingle(GetArray(4), 0);
|
||||
result.y = BitConverter.ToSingle(GetArray(4), 0);
|
||||
result.z = BitConverter.ToSingle(GetArray(4), 0);
|
||||
|
||||
value = result;
|
||||
|
||||
}
|
||||
else if(original == typeof(Quaternion))
|
||||
{
|
||||
Quaternion result = new Quaternion();
|
||||
|
||||
result.q1 = BitConverter.ToSingle(GetArray(4), 0);
|
||||
result.q2 = BitConverter.ToSingle(GetArray(4), 0);
|
||||
result.q3 = BitConverter.ToSingle(GetArray(4), 0);
|
||||
result.q4 = BitConverter.ToSingle(GetArray(4), 0);
|
||||
|
||||
value = result;
|
||||
}
|
||||
else if (original == typeof(CharacterLocation))
|
||||
{
|
||||
|
||||
CharacterLocation result = new CharacterLocation();
|
||||
|
||||
result.Map = GetArray(1)[0];
|
||||
result.Section = GetArray(1)[0];
|
||||
|
||||
value = result;
|
||||
|
||||
}
|
||||
else if (original == typeof(CharacterEquipment))
|
||||
{
|
||||
|
||||
CharacterEquipment result = new CharacterEquipment();
|
||||
|
||||
result.WType = GetArray(1)[0];
|
||||
result.Sword = BitConverter.ToInt16(GetArray(2), 0);
|
||||
result.Shield = BitConverter.ToInt16(GetArray(2), 0);
|
||||
result.Bow = BitConverter.ToInt16(GetArray(2), 0);
|
||||
result.Head = BitConverter.ToInt16(GetArray(2), 0);
|
||||
result.Upper = BitConverter.ToInt16(GetArray(2), 0);
|
||||
result.Lower = BitConverter.ToInt16(GetArray(2), 0);
|
||||
|
||||
value = result;
|
||||
|
||||
}
|
||||
else if (original.IsGenericType && typeof(System.Collections.IList).IsAssignableFrom(original))
|
||||
{
|
||||
|
||||
int ListSize = GetArray(1)[0];
|
||||
|
||||
List<object> result = new List<object>();
|
||||
|
||||
for (int i = 0; i < ListSize; i++)
|
||||
{
|
||||
|
||||
result.Add(GetJson(original.GetGenericArguments()[0]));
|
||||
|
||||
}
|
||||
|
||||
value = result;
|
||||
}
|
||||
else if (original == typeof(Dictionary<byte, ModelDataDTO>))
|
||||
{
|
||||
int DictionarySize = GetArray(1)[0];
|
||||
|
||||
Dictionary<object, object> result = new Dictionary<object, object>();
|
||||
|
||||
for (int i = 0; i < DictionarySize; i++)
|
||||
{
|
||||
byte Key = GetArray(1)[0];
|
||||
|
||||
ModelDataDTO modelData = new ModelDataDTO();
|
||||
|
||||
modelData.ModelType = GetArray(1)[0];
|
||||
|
||||
if (modelData.ModelType < 2)
|
||||
{
|
||||
byte stringSize = GetArray(1)[0];
|
||||
string model = Encoding.UTF8.GetString(GetArray(stringSize));
|
||||
modelData.Model = model;
|
||||
modelData.Mii = new BumiiDTO();
|
||||
}
|
||||
else
|
||||
{
|
||||
modelData.Model = "";
|
||||
string sBumii = JsonConvert.SerializeObject(GetJson(typeof(BumiiDTO)));
|
||||
modelData.Mii = JsonConvert.DeserializeObject<BumiiDTO>(sBumii);
|
||||
}
|
||||
|
||||
result.Add(Key, modelData);
|
||||
}
|
||||
|
||||
value = result;
|
||||
}
|
||||
else if (original.IsGenericType && typeof(System.Collections.IDictionary).IsAssignableFrom(original))
|
||||
{
|
||||
int DictionarySize = GetArray(1)[0];
|
||||
|
||||
Dictionary<object, object> result = new Dictionary<object, object>();
|
||||
|
||||
for (int i = 0; i < DictionarySize; i++)
|
||||
{
|
||||
object Key = GetJson(original.GetGenericArguments()[0]);
|
||||
object Value = GetJson(original.GetGenericArguments()[1]);
|
||||
|
||||
result.Add(Key, Value);
|
||||
}
|
||||
|
||||
value = result;
|
||||
}
|
||||
else if (original == typeof(ConnectDTO))
|
||||
{
|
||||
ConnectDTO result = new ConnectDTO();
|
||||
|
||||
int stringSize = GetArray(1)[0];
|
||||
result.Name = Encoding.UTF8.GetString(GetArray(stringSize));
|
||||
|
||||
stringSize = GetArray(1)[0];
|
||||
result.Password = Encoding.UTF8.GetString(GetArray(stringSize));
|
||||
|
||||
result.ModelData = new ModelDataDTO();
|
||||
|
||||
stringSize = GetArray(1)[0];
|
||||
result.ModelData.ModelType = byte.Parse(Encoding.UTF8.GetString(GetArray(stringSize)));
|
||||
|
||||
stringSize = BitConverter.ToInt16(GetArray(2), 0);
|
||||
string model = Encoding.UTF8.GetString(GetArray(stringSize));
|
||||
|
||||
if(result.ModelData.ModelType < 2)
|
||||
{
|
||||
result.ModelData.Model = model;
|
||||
result.ModelData.Mii = new BumiiDTO();
|
||||
}
|
||||
else
|
||||
{
|
||||
result.ModelData.Model = "";
|
||||
result.ModelData.Mii = JsonConvert.DeserializeObject<BumiiDTO>(model);
|
||||
}
|
||||
|
||||
value = result;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
|
||||
foreach (var item in original.GetFields())
|
||||
{
|
||||
|
||||
if (item.Name == "Schedule")
|
||||
continue;
|
||||
|
||||
var res = GetJson(item.FieldType);
|
||||
|
||||
result.Add(item.Name, res);
|
||||
|
||||
}
|
||||
|
||||
value = result;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
private void GetByteData(object original)
|
||||
{
|
||||
if (original.GetType() == typeof(int))
|
||||
AddBytes(BitConverter.GetBytes((int)original));
|
||||
else if (original.GetType() == typeof(float))
|
||||
AddBytes(BitConverter.GetBytes((float)original));
|
||||
else if (original.GetType() == typeof(bool))
|
||||
ByteData.Add((bool)original ? (byte)1 : (byte)0);
|
||||
else if (original.GetType() == typeof(byte))
|
||||
ByteData.Add((byte)original);
|
||||
else if (original.GetType() == typeof(short))
|
||||
AddBytes(BitConverter.GetBytes((short)original));
|
||||
else if (original.GetType() == typeof(string))
|
||||
{
|
||||
ByteData.Add((byte)((string)original).Length);
|
||||
AddBytes(Encoding.UTF8.GetBytes((string)original), false);
|
||||
}
|
||||
else if(original.GetType() == typeof(ConnectDTO))
|
||||
{
|
||||
ConnectDTO origDTO = (ConnectDTO)original;
|
||||
|
||||
ByteData.Add((byte)((string)origDTO.Name).Length);
|
||||
AddBytes(Encoding.UTF8.GetBytes((string)origDTO.Name), false);
|
||||
|
||||
ByteData.Add((byte)((string)origDTO.Password).Length);
|
||||
AddBytes(Encoding.UTF8.GetBytes((string)origDTO.Password), false);
|
||||
|
||||
string modelType = origDTO.ModelData.ModelType.ToString();
|
||||
|
||||
ByteData.Add((byte)modelType.Length);
|
||||
AddBytes(Encoding.UTF8.GetBytes(modelType), false);
|
||||
|
||||
if (origDTO.ModelData.ModelType < 2)
|
||||
{
|
||||
AddBytes(BitConverter.GetBytes((short)origDTO.ModelData.Model.Length));
|
||||
AddBytes(Encoding.UTF8.GetBytes((string)origDTO.ModelData.Model), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
string MiiData = JsonConvert.SerializeObject(origDTO.ModelData.Mii);
|
||||
AddBytes(BitConverter.GetBytes((short)MiiData.Length));
|
||||
AddBytes(Encoding.UTF8.GetBytes(MiiData), false);
|
||||
}
|
||||
}
|
||||
else if(original.GetType() == typeof(ModelDataDTO))
|
||||
{
|
||||
ModelDataDTO dtoObj = (ModelDataDTO)original;
|
||||
ByteData.Add(dtoObj.ModelType);
|
||||
|
||||
if(dtoObj.ModelType < 2)
|
||||
{
|
||||
ByteData.Add((byte)(dtoObj.Model).Length);
|
||||
AddBytes(Encoding.UTF8.GetBytes(dtoObj.Model), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetByteData(dtoObj.Mii);
|
||||
}
|
||||
}
|
||||
else if (original.GetType() == typeof(Vec3f))
|
||||
{
|
||||
Vec3f originalVec3f = (Vec3f)original;
|
||||
|
||||
AddBytes(BitConverter.GetBytes(originalVec3f.x));
|
||||
AddBytes(BitConverter.GetBytes(originalVec3f.y));
|
||||
AddBytes(BitConverter.GetBytes(originalVec3f.z));
|
||||
}
|
||||
else if(original.GetType() == typeof(Quaternion))
|
||||
{
|
||||
Quaternion originalQuaternion = (Quaternion)original;
|
||||
|
||||
AddBytes(BitConverter.GetBytes(originalQuaternion.q1));
|
||||
AddBytes(BitConverter.GetBytes(originalQuaternion.q2));
|
||||
AddBytes(BitConverter.GetBytes(originalQuaternion.q3));
|
||||
AddBytes(BitConverter.GetBytes(originalQuaternion.q4));
|
||||
}
|
||||
else if (original.GetType() == typeof(CharacterLocation))
|
||||
{
|
||||
CharacterLocation originalLocation = (CharacterLocation)original;
|
||||
|
||||
ByteData.Add((byte)originalLocation.Map);
|
||||
ByteData.Add((byte)originalLocation.Section);
|
||||
}
|
||||
else if (original.GetType() == typeof(CharacterEquipment))
|
||||
{
|
||||
CharacterEquipment originalEquipment = (CharacterEquipment)original;
|
||||
|
||||
//AddBytes(BitConverter.GetBytes(originalEquipment.WType));
|
||||
ByteData.Add((byte)originalEquipment.WType);
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Sword));
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Shield));
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Bow));
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Head));
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Upper));
|
||||
AddBytes(BitConverter.GetBytes(originalEquipment.Lower));
|
||||
}
|
||||
else if (original.GetType().IsGenericType && typeof(System.Collections.IList).IsAssignableFrom(original.GetType()))
|
||||
{
|
||||
typeof(JSONBuilder).GetMethod("AddListData").MakeGenericMethod(original.GetType().GenericTypeArguments).Invoke(this, new[] { original });
|
||||
}
|
||||
else if (original.GetType().IsGenericType && typeof(System.Collections.IDictionary).IsAssignableFrom(original.GetType()))
|
||||
{
|
||||
typeof(JSONBuilder).GetMethod("AddDictData").MakeGenericMethod(original.GetType().GenericTypeArguments).Invoke(this, new[] { original });
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in original.GetType().GetFields())
|
||||
GetByteData(item.GetValue(original));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private byte[] GetArray(int length, bool Reverse = true)
|
||||
{
|
||||
|
||||
byte[] bytes = Data.Take(length).ToArray();
|
||||
|
||||
Data = Data.Skip(length).ToArray();
|
||||
|
||||
return bytes;
|
||||
|
||||
}
|
||||
|
||||
public void AddListData<T>(object original)
|
||||
{
|
||||
|
||||
List<T> OriginalList = (List<T>)original;
|
||||
|
||||
ByteData.Add((byte)OriginalList.Count);
|
||||
|
||||
for (int i = 0; i < OriginalList.Count; i++)
|
||||
{
|
||||
GetByteData(OriginalList[i]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void AddDictData<K, V>(object original)
|
||||
{
|
||||
Dictionary<K, V> OriginalDict = (Dictionary<K, V>)original;
|
||||
|
||||
ByteData.Add((byte)OriginalDict.Count);
|
||||
|
||||
for (int i = 0; i < OriginalDict.Count; i++)
|
||||
{
|
||||
GetByteData(OriginalDict.ElementAt(i).Key);
|
||||
GetByteData(OriginalDict.ElementAt(i).Value);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddBytes(byte[] bytes, bool Reverse = true)
|
||||
{
|
||||
ByteData.AddRange(bytes);
|
||||
}
|
||||
}
|
||||
}
|
35
C#/BOTWM.Server/JSONBuilder/JSONFormat.cs
Normal file
35
C#/BOTWM.Server/JSONBuilder/JSONFormat.cs
Normal file
@ -0,0 +1,35 @@
|
||||
namespace BOTWM.Server.JSONBuilder
|
||||
{
|
||||
|
||||
public class JSONFormat<T>
|
||||
{
|
||||
|
||||
private bool UsesLambda = false;
|
||||
public int Size;
|
||||
public string Function;
|
||||
public Func<T> Lambda;
|
||||
|
||||
public JSONFormat(int size, string function = "", Func<T> lambda = null)
|
||||
{
|
||||
this.Size = size;
|
||||
|
||||
if(function != null)
|
||||
Function = function;
|
||||
else
|
||||
{
|
||||
Lambda = lambda;
|
||||
UsesLambda = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public T ToObject(byte[] data)
|
||||
{
|
||||
|
||||
return (T)typeof(BitConverter).GetMethod(Function).Invoke(null, new[] {data});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
93
C#/BOTWM.Server/Resources.Designer.cs
generated
Normal file
93
C#/BOTWM.Server/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,93 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Este código fue generado por una herramienta.
|
||||
// Versión de runtime:4.0.30319.42000
|
||||
//
|
||||
// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si
|
||||
// se vuelve a generar el código.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace BOTWM.Server {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clase de recurso fuertemente tipado, para buscar cadenas traducidas, etc.
|
||||
/// </summary>
|
||||
// StronglyTypedResourceBuilder generó automáticamente esta clase
|
||||
// a través de una herramienta como ResGen o Visual Studio.
|
||||
// Para agregar o quitar un miembro, edite el archivo .ResX y, a continuación, vuelva a ejecutar ResGen
|
||||
// con la opción /str o recompile su proyecto de VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Devuelve la instancia de ResourceManager almacenada en caché utilizada por esta clase.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BOTWM.Server.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reemplaza la propiedad CurrentUICulture del subproceso actual para todas las
|
||||
/// búsquedas de recursos mediante esta clase de recurso fuertemente tipado.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a <?xml version="1.0" ?>
|
||||
///<root>
|
||||
/// <animation>
|
||||
/// <Name>Float</Name>
|
||||
/// <Hash>140800401</Hash>
|
||||
/// <Schedule>1</Schedule>
|
||||
/// <Animation>1</Animation>
|
||||
/// </animation>
|
||||
/// <animation>
|
||||
/// <Name>Bow_Attack_Motorcycle_Draw_Lower_B</Name>
|
||||
/// <Hash>-846693611</Hash>
|
||||
/// <Schedule>1</Schedule>
|
||||
/// <Animation>2</Animation>
|
||||
/// </animation>
|
||||
/// <animation>
|
||||
/// <Name>Bow_Attack_Horse_Draw_Lower_B</Name>
|
||||
/// <Hash>238917901</Hash>
|
||||
/// <Schedule>1</Schedule>
|
||||
/// <Animation>3</Animation>
|
||||
/// </animation>
|
||||
/// <animation>
|
||||
/// <Name>Bow_Attack_ [resto de la cadena truncado]";.
|
||||
/// </summary>
|
||||
internal static string animationHashes {
|
||||
get {
|
||||
return ResourceManager.GetString("animationHashes", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
124
C#/BOTWM.Server/Resources.resx
Normal file
124
C#/BOTWM.Server/Resources.resx
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="animationHashes" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>Resources\animationHashes.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
</root>
|
7761
C#/BOTWM.Server/Resources/animationHashes.xml
Normal file
7761
C#/BOTWM.Server/Resources/animationHashes.xml
Normal file
File diff suppressed because it is too large
Load Diff
272
C#/BOTWM.Server/Server.cs
Normal file
272
C#/BOTWM.Server/Server.cs
Normal file
@ -0,0 +1,272 @@
|
||||
using BOTWM.Server.DTO;
|
||||
using BOTWM.Server.HelperTypes;
|
||||
using BOTWM.Server.ServerClasses;
|
||||
using Newtonsoft.Json;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using BOTWM.Server.JSONBuilder;
|
||||
using System.Diagnostics;
|
||||
using BOTW.Logging;
|
||||
|
||||
namespace BOTWM.Server
|
||||
{
|
||||
public class Server
|
||||
{
|
||||
bool serverOpen = false;
|
||||
|
||||
public string Version = "0.20.0";
|
||||
|
||||
public short SerializationRate = 60;
|
||||
public short TargetFPS = 60;
|
||||
public short SleepMultiplier = 1;
|
||||
public bool isLocalTest = false;
|
||||
public bool ischaracterSpawn = true;
|
||||
public bool DisplayNames = true;
|
||||
public short GlyphDistance = 250;
|
||||
public short GlyphTime = 60;
|
||||
public bool isQuestSync = false;
|
||||
public bool isEnemySync = false;
|
||||
public string Gamemode = "";
|
||||
|
||||
public bool EnemyLog { get; set; }
|
||||
|
||||
public int ClientLog { get; set; }
|
||||
public bool ServerLog { get; set; }
|
||||
|
||||
Socket listen;
|
||||
Thread listenThread;
|
||||
List<Thread> clientThreads = new List<Thread>();
|
||||
|
||||
public bool serverStart(string ip, int port, string password, string description, ServerSettings settings)
|
||||
{
|
||||
|
||||
this.Gamemode = settings.SettingsName;
|
||||
|
||||
Dictionary<string, string> ipAddresses = new Dictionary<string, string>();
|
||||
|
||||
if (ip == "localhost")
|
||||
{
|
||||
var host = Dns.GetHostEntry(Dns.GetHostName());
|
||||
|
||||
foreach (NetworkInterface item in NetworkInterface.GetAllNetworkInterfaces())
|
||||
{
|
||||
if (item.OperationalStatus == OperationalStatus.Up)
|
||||
{
|
||||
foreach (UnicastIPAddressInformation uip in item.GetIPProperties().UnicastAddresses)
|
||||
{
|
||||
if (uip.Address.AddressFamily == AddressFamily.InterNetwork && host.AddressList.Contains(uip.Address))
|
||||
{
|
||||
ipAddresses.Add(item.Name.ToString(), uip.Address.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ipAddresses.Add("custom IP", ip);
|
||||
}
|
||||
|
||||
foreach (var key in ipAddresses.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
listen = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
|
||||
listen.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false);
|
||||
string IP = ipAddresses[key].ToString();
|
||||
|
||||
IPEndPoint connect = new IPEndPoint(IPAddress.Parse(IP), port);
|
||||
listen.Bind(connect);
|
||||
|
||||
Logger.LogInformation("Server opened on " + key + ".");
|
||||
|
||||
ServerData.Startup(ip, port, password, description, settings);
|
||||
|
||||
serverOpen = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError(ex.ToString());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void stopServer()
|
||||
{
|
||||
serverOpen = false;
|
||||
listen.Close();
|
||||
|
||||
if (listenThread != null)
|
||||
listenThread.Abort();
|
||||
|
||||
foreach (Thread clientThread in clientThreads)
|
||||
clientThread.Abort();
|
||||
}
|
||||
|
||||
public void startListen()
|
||||
{
|
||||
listenThread = new Thread(serverListen);
|
||||
listenThread.IsBackground = true;
|
||||
listenThread.Start();
|
||||
}
|
||||
|
||||
public void serverListen()
|
||||
{
|
||||
while(true)
|
||||
{
|
||||
Socket connection;
|
||||
|
||||
listen.Listen(100);
|
||||
|
||||
connection = listen.Accept();
|
||||
|
||||
var clientThread = new Thread(() => handleClient(connection));
|
||||
clientThread.Start();
|
||||
clientThreads.Add(clientThread);
|
||||
}
|
||||
}
|
||||
|
||||
public void handleClient(Socket connection)
|
||||
{
|
||||
int SIZE = 10240;
|
||||
|
||||
byte[] info = new byte[SIZE];
|
||||
List<byte> data = new List<byte>();
|
||||
int totalLength = 0;
|
||||
int retries = 0;
|
||||
Stopwatch RetryWatch = new Stopwatch();
|
||||
|
||||
bool ClientConnected = true;
|
||||
int PlayerNumber = -1;
|
||||
string PlayerName = "";
|
||||
|
||||
while(serverOpen && ClientConnected)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (retries == 0)
|
||||
RetryWatch.Restart();
|
||||
|
||||
totalLength += connection.Receive(info, 0, info.Length, 0);
|
||||
|
||||
data.AddRange(info.ToList());
|
||||
|
||||
if (totalLength < 6144)
|
||||
{
|
||||
retries++;
|
||||
|
||||
if (retries > 10 && totalLength == 0)
|
||||
throw new ApplicationException("Connection lost with player.");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
Tuple<MessageType, object> ClientMessage = new JSONBuilder.JSONBuilder().BuildFromBytes(data.ToArray());
|
||||
|
||||
data.Clear();
|
||||
totalLength = 0;
|
||||
|
||||
if(retries > 0)
|
||||
{
|
||||
Logger.LogInformation($"[{PlayerName}] Retried {retries} times and took {RetryWatch.ElapsedMilliseconds} milliseconds");
|
||||
retries = 0;
|
||||
}
|
||||
|
||||
if (ClientMessage.Item1 == MessageType.error)
|
||||
{
|
||||
throw new Exception($"[{PlayerName}] Error receiving message. Disconnecting player...");
|
||||
}
|
||||
else if(ClientMessage.Item1 == MessageType.ping)
|
||||
{
|
||||
var PingResult = new PingDTO();
|
||||
|
||||
if(ServerData.Configuration.PASSWORD != (string)ClientMessage.Item2)
|
||||
PingResult = new PingDTO()
|
||||
{
|
||||
CorrectPassword = false,
|
||||
Description = "",
|
||||
PlayerList = new NamesDTO(),
|
||||
GameMode = "",
|
||||
PlayerLimit = 32
|
||||
};
|
||||
else
|
||||
PingResult = new PingDTO()
|
||||
{
|
||||
CorrectPassword = true,
|
||||
Description = ServerData.Configuration.DESCRIPTION,
|
||||
PlayerList = ServerData.GetPlayers(),
|
||||
GameMode = this.Gamemode,
|
||||
PlayerLimit = 32
|
||||
};
|
||||
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(PingResult)));
|
||||
|
||||
connection.Close();
|
||||
ClientConnected = false;
|
||||
|
||||
}
|
||||
else if(ClientMessage.Item1 == MessageType.connect)
|
||||
{
|
||||
ConnectDTO UserConfiguration = (ConnectDTO)ClientMessage.Item2;
|
||||
ConnectResponseDTO AssignationResult = ServerData.TryAssigning(UserConfiguration);
|
||||
|
||||
if(AssignationResult.Response != 1)
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(AssignationResult)));
|
||||
connection.Close();
|
||||
ClientConnected = false;
|
||||
Logger.LogInformation($"Player {UserConfiguration.Name} tried to connect but failed with error {AssignationResult.Response}");
|
||||
break;
|
||||
}
|
||||
|
||||
PlayerNumber = AssignationResult.PlayerNumber;
|
||||
PlayerName = ServerData.PlayerList[PlayerNumber].Name;
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(AssignationResult)));
|
||||
|
||||
Logger.LogInformation($"Player {UserConfiguration.Name} joined the server. Assigned to player {AssignationResult.PlayerNumber + 1}.");
|
||||
}
|
||||
else if(ClientMessage.Item1 == MessageType.update)
|
||||
{
|
||||
ServerData.SetConnection(PlayerNumber, true);
|
||||
|
||||
ClientDTO UserInformation = (ClientDTO)ClientMessage.Item2;
|
||||
|
||||
ServerData.UpdateWorldData(UserInformation.WorldData, PlayerNumber);
|
||||
ServerData.UpdatePlayerData(UserInformation.PlayerData, PlayerNumber);
|
||||
ServerData.UpdateEnemyData(UserInformation.EnemyData);
|
||||
ServerData.UpdateQuestData(UserInformation.QuestData);
|
||||
|
||||
ServerDTO serverDTO = ServerData.GetData(PlayerNumber);
|
||||
serverDTO.NetworkData.Map(this);
|
||||
|
||||
connection.Send(new JSONBuilder.JSONBuilder().BuildArrayOfBytes(serverDTO));
|
||||
|
||||
ServerData.ClearDeathSwap(PlayerNumber);
|
||||
}
|
||||
else if(ClientMessage.Item1 == MessageType.disconnect)
|
||||
{
|
||||
Logger.LogInformation($"Player {ServerData.GetPlayer(PlayerNumber).Name} disconnected. {(string)ClientMessage.Item2}");
|
||||
connection.Close();
|
||||
ClientConnected = false;
|
||||
ServerData.SetConnection(PlayerNumber, false);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogInformation($"Player {ServerData.GetPlayer(PlayerNumber).Name} disconnected.", ex.Message);
|
||||
Logger.LogDebug(ex.StackTrace);
|
||||
ServerData.SetConnection(PlayerNumber, false);
|
||||
connection.Close();
|
||||
ClientConnected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
103
C#/BOTWM.Server/ServerClasses/Enemy.cs
Normal file
103
C#/BOTWM.Server/ServerClasses/Enemy.cs
Normal file
@ -0,0 +1,103 @@
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Enemy
|
||||
{
|
||||
const int CLEARMINUTES = 60;
|
||||
|
||||
public Mutex EMutex = new Mutex();
|
||||
public bool isEnemySync;
|
||||
private DateTime LastClear;
|
||||
|
||||
public Dictionary<int, int> EnemyList;
|
||||
public List<Dictionary<int, int>> Queue;
|
||||
|
||||
public Enemy(int playerLimit, bool enemySync)
|
||||
{
|
||||
EnemyList = new Dictionary<int, int>();
|
||||
Queue = new List<Dictionary<int, int>>();
|
||||
for (int i = 0; i < playerLimit; i++)
|
||||
Queue.Add(new Dictionary<int, int>());
|
||||
UpdateServiceStatus(enemySync);
|
||||
LastClear = DateTime.Now;
|
||||
}
|
||||
|
||||
public void UpdateServiceStatus(bool newStatus)
|
||||
{
|
||||
isEnemySync = newStatus;
|
||||
}
|
||||
|
||||
public void Update(EnemyDTO userData)
|
||||
{
|
||||
double TimeSinceLastClear = DateTime.Now.Subtract(LastClear).TotalMinutes;
|
||||
|
||||
if (!isEnemySync || TimeSinceLastClear > CLEARMINUTES)
|
||||
{
|
||||
ClearEnemyData();
|
||||
return;
|
||||
}
|
||||
|
||||
EMutex.WaitOne(100);
|
||||
|
||||
foreach (EnemyData Enemy in userData.Health)
|
||||
UpdateEnemyHealth(Enemy.Hash, Enemy.Health);
|
||||
|
||||
EMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void ClearEnemyData()
|
||||
{
|
||||
EMutex.WaitOne(100);
|
||||
|
||||
EnemyList.Clear();
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i].Clear();
|
||||
|
||||
LastClear = DateTime.Now;
|
||||
|
||||
EMutex.ReleaseMutex();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void FillQueue(int playerNumber)
|
||||
{
|
||||
EMutex.WaitOne(100);
|
||||
|
||||
Queue[playerNumber].Clear();
|
||||
|
||||
foreach (KeyValuePair<int, int> kvp in EnemyList)
|
||||
Queue[playerNumber].Add(kvp.Key, kvp.Value);
|
||||
|
||||
EMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public List<EnemyData> GetQueue(int playerNumber)
|
||||
{
|
||||
List<EnemyData> Data = new List<EnemyData>();
|
||||
|
||||
EMutex.WaitOne(100);
|
||||
|
||||
foreach(KeyValuePair<int, int> kvp in Queue[playerNumber])
|
||||
Data.Add(new EnemyData(kvp.Key, kvp.Value));
|
||||
|
||||
Queue[playerNumber].Clear();
|
||||
|
||||
EMutex.ReleaseMutex();
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
private void UpdateEnemyHealth(int hash, int health)
|
||||
{
|
||||
if (!EnemyList.ContainsKey(hash) || (EnemyList.ContainsKey(hash) && EnemyList[hash] > health))
|
||||
{
|
||||
EnemyList[hash] = health; // TODO: Make sure that we can add new entries to dictionaries through this method
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i][hash] = health;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
94
C#/BOTWM.Server/ServerClasses/Models.cs
Normal file
94
C#/BOTWM.Server/ServerClasses/Models.cs
Normal file
@ -0,0 +1,94 @@
|
||||
using BOTW.Logging;
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Models
|
||||
{
|
||||
public Mutex MMutex = new Mutex();
|
||||
|
||||
public Dictionary<byte, ModelDataDTO> PlayerModels;
|
||||
public List<Dictionary<byte, ModelDataDTO>> Queue;
|
||||
|
||||
public Models(int playerLimit)
|
||||
{
|
||||
PlayerModels = new Dictionary<byte, ModelDataDTO>();
|
||||
Queue = new List<Dictionary<byte, ModelDataDTO>>();
|
||||
|
||||
for (int i = 0; i < playerLimit; i++)
|
||||
Queue.Add(new Dictionary<byte, ModelDataDTO>());
|
||||
}
|
||||
|
||||
public void AddModel(byte playerNumber, ModelDataDTO model)
|
||||
{
|
||||
MMutex.WaitOne(100);
|
||||
PlayerModels[playerNumber] = model;
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i][playerNumber] = model;
|
||||
|
||||
MMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void RemoveModel(byte playerNumber)
|
||||
{
|
||||
MMutex.WaitOne(100);
|
||||
PlayerModels.Remove(playerNumber);
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i].Remove(playerNumber);
|
||||
|
||||
MMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void FillQueue(int playerNumber)
|
||||
{
|
||||
MMutex.WaitOne(100);
|
||||
|
||||
foreach (KeyValuePair<byte, ModelDataDTO> kvp in PlayerModels)
|
||||
Queue[playerNumber][kvp.Key] = kvp.Value;
|
||||
|
||||
MMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public Dictionary<byte, ModelDataDTO> GetQueue(int playerNumber)
|
||||
{
|
||||
Dictionary<byte, ModelDataDTO> Data = new Dictionary<byte, ModelDataDTO>();
|
||||
|
||||
MMutex.WaitOne(100);
|
||||
|
||||
int queueCount = Queue[playerNumber].Count;
|
||||
|
||||
for(int i = 0; i < queueCount && i < 5; i++)
|
||||
{
|
||||
KeyValuePair<byte, ModelDataDTO> kvp = Queue[playerNumber].First();
|
||||
Data.Add(kvp.Key, kvp.Value);
|
||||
Queue[playerNumber].Remove(kvp.Key);
|
||||
}
|
||||
|
||||
//foreach (KeyValuePair<byte, ModelDataDTO> kvp in Queue[playerNumber])
|
||||
// Data.Add(kvp.Key, kvp.Value);
|
||||
|
||||
//Queue[playerNumber].Clear();
|
||||
|
||||
MMutex.ReleaseMutex();
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
public ModelsDTO GetAllPlayers()
|
||||
{
|
||||
MMutex.WaitOne(100);
|
||||
|
||||
var result = new ModelsDTO()
|
||||
{
|
||||
Models = this.PlayerModels
|
||||
};
|
||||
|
||||
MMutex.ReleaseMutex();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
84
C#/BOTWM.Server/ServerClasses/Names.cs
Normal file
84
C#/BOTWM.Server/ServerClasses/Names.cs
Normal file
@ -0,0 +1,84 @@
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Names
|
||||
{
|
||||
public Mutex NMutex = new Mutex();
|
||||
|
||||
public Dictionary<byte, string> PlayerNames;
|
||||
public List<Dictionary<byte, string>> Queue;
|
||||
|
||||
public Names(int playerLimit)
|
||||
{
|
||||
PlayerNames = new Dictionary<byte, string>();
|
||||
Queue = new List<Dictionary<byte, string>>();
|
||||
|
||||
for (int i = 0; i < playerLimit; i++)
|
||||
Queue.Add(new Dictionary<byte, string>());
|
||||
}
|
||||
|
||||
public void AddName(byte playerNumber, string name)
|
||||
{
|
||||
NMutex.WaitOne(100);
|
||||
PlayerNames[playerNumber] = name;
|
||||
|
||||
for(int i = 0; i < Queue.Count; i++)
|
||||
Queue[i][playerNumber] = name;
|
||||
|
||||
NMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void RemoveName(byte playerNumber)
|
||||
{
|
||||
NMutex.WaitOne(100);
|
||||
PlayerNames.Remove(playerNumber);
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i].Remove(playerNumber);
|
||||
|
||||
NMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void FillQueue(int playerNumber)
|
||||
{
|
||||
NMutex.WaitOne(100);
|
||||
|
||||
foreach (KeyValuePair<byte, string> kvp in PlayerNames)
|
||||
Queue[playerNumber][kvp.Key] = kvp.Value;
|
||||
|
||||
NMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public Dictionary<byte, string> GetQueue(int playerNumber)
|
||||
{
|
||||
Dictionary<byte, string> Data = new Dictionary<byte, string>();
|
||||
|
||||
NMutex.WaitOne(100);
|
||||
|
||||
foreach (KeyValuePair<byte, string> kvp in Queue[playerNumber])
|
||||
Data.Add(kvp.Key, kvp.Value);
|
||||
|
||||
Queue[playerNumber].Clear();
|
||||
|
||||
NMutex.ReleaseMutex();
|
||||
|
||||
return Data;
|
||||
}
|
||||
|
||||
public NamesDTO GetAllPlayers()
|
||||
{
|
||||
NMutex.WaitOne(100);
|
||||
|
||||
var result = new NamesDTO()
|
||||
{
|
||||
Names = this.PlayerNames
|
||||
};
|
||||
|
||||
NMutex.ReleaseMutex();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
49
C#/BOTWM.Server/ServerClasses/Player.cs
Normal file
49
C#/BOTWM.Server/ServerClasses/Player.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
using BOTWM.Server.HelperTypes;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Player
|
||||
{
|
||||
public bool Connected;
|
||||
public byte PlayerNumber;
|
||||
public string Name;
|
||||
public Vec3f Position;
|
||||
public Quaternion Rotation1;
|
||||
public Quaternion Rotation2;
|
||||
public Quaternion Rotation3;
|
||||
public Quaternion Rotation4;
|
||||
public int Animation;
|
||||
public int Health;
|
||||
public float AtkUp;
|
||||
public bool IsEquipped;
|
||||
public CharacterEquipment Equipment;
|
||||
public CharacterLocation Location;
|
||||
public Vec3f Bomb;
|
||||
public Vec3f Bomb2;
|
||||
public Vec3f BombCube;
|
||||
public Vec3f BombCube2;
|
||||
public byte ModelType;
|
||||
public string Model;
|
||||
public BumiiDTO MiiData;
|
||||
|
||||
public Player(byte playerNumber)
|
||||
{
|
||||
Connected = false;
|
||||
this.PlayerNumber = playerNumber;
|
||||
}
|
||||
|
||||
public void AssignPlayer(string name)
|
||||
{
|
||||
this.Connected = true;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
public void Update(ClientPlayerDTO userData)
|
||||
{
|
||||
this.Map(userData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
211
C#/BOTWM.Server/ServerClasses/PropHunt.cs
Normal file
211
C#/BOTWM.Server/ServerClasses/PropHunt.cs
Normal file
@ -0,0 +1,211 @@
|
||||
using BOTW.Logging;
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using System.Numerics;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class PlayerData
|
||||
{
|
||||
public bool Hunter { get; set; }
|
||||
public bool Alive { get; set; }
|
||||
public TimeSpan TimeToFind { get; set; } = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public class PropHunt
|
||||
{
|
||||
public Mutex PHMutex = new Mutex();
|
||||
public DateTime PropHuntStartTime { get; set; }
|
||||
public bool InitialCountdown { get; set; } = false;
|
||||
public DateTime InitialCountdownFinishTime { get; set; }
|
||||
public Dictionary<byte, ModelDataDTO> OriginalModels { get; set; }
|
||||
public Dictionary<byte, PlayerData> Players { get; set; }
|
||||
public PropHuntPhaseEnum CurrentPhase { get; set; }
|
||||
|
||||
private ProphuntLocation Settings { get; set; }
|
||||
|
||||
public DateTime HidingTime { get; set; }
|
||||
|
||||
public PropHunt()
|
||||
{
|
||||
this.PropHuntStartTime = DateTime.MinValue;
|
||||
this.OriginalModels = new Dictionary<byte, ModelDataDTO>();
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Stopped;
|
||||
this.Players = new Dictionary<byte, PlayerData>();
|
||||
this.HidingTime = DateTime.Now;
|
||||
}
|
||||
|
||||
public void Start(ProphuntLocation location, int hidingTime)
|
||||
{
|
||||
PHMutex.WaitOne(100);
|
||||
|
||||
if(this.CurrentPhase == PropHuntPhaseEnum.Stopped)
|
||||
{
|
||||
this.Settings = location;
|
||||
|
||||
//this.OriginalModels = new Dictionary<byte, ModelDataDTO>(ServerData.ModelData.GetAllPlayers().Models);
|
||||
this.OriginalModels = JsonConvert.DeserializeObject<Dictionary<byte, ModelDataDTO>>(JsonConvert.SerializeObject(ServerData.ModelData.GetAllPlayers().Models));
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Countdown;
|
||||
this.InitialCountdownFinishTime = DateTime.Now.AddSeconds(3);
|
||||
this.InitialCountdown = true;
|
||||
this.HidingTime = DateTime.Now.AddSeconds(hidingTime + 3);
|
||||
this.Players.Clear();
|
||||
Random rng = new Random();
|
||||
|
||||
foreach(Player player in ServerData.PlayerList.Where(p => p.Connected))
|
||||
{
|
||||
this.Players[player.PlayerNumber] = new PlayerData() { Hunter = false, Alive = true };
|
||||
}
|
||||
|
||||
int numberOfHunters = (int)Math.Floor(ServerData.GetPlayers().Names.Count() * 0.25);
|
||||
if (numberOfHunters == 0) numberOfHunters = 1;
|
||||
|
||||
while(numberOfHunters > 0)
|
||||
{
|
||||
int randomPlayer = rng.Next(this.Players.Count);
|
||||
//int randomPlayer = 1;
|
||||
if (this.Players.ContainsKey((byte)randomPlayer) && !this.Players[(byte)randomPlayer].Hunter)
|
||||
{
|
||||
this.Players[(byte)randomPlayer].Hunter = true;
|
||||
this.Players[(byte)randomPlayer].Alive = false;
|
||||
numberOfHunters--;
|
||||
}
|
||||
}
|
||||
|
||||
foreach(KeyValuePair<byte, PlayerData> player in this.Players.Where(kvp => !kvp.Value.Hunter))
|
||||
{
|
||||
ModelDataDTO playerModel = ServerData.ModelData.PlayerModels[player.Key];
|
||||
playerModel.ModelType = 1;
|
||||
playerModel.Model = this.Settings.PossibleModels[rng.Next(this.Settings.PossibleModels.Count())];
|
||||
ServerData.ModelData.AddModel(player.Key, playerModel);
|
||||
}
|
||||
|
||||
Logger.LogInformation($"Started prophunt with {this.Players.Count} players");
|
||||
|
||||
IEnumerable<string> hunterNames = ServerData.NameData.GetAllPlayers().Names
|
||||
.Where(name => this.Players.Where(kvp => kvp.Value.Hunter)
|
||||
.Select(kvp => kvp.Key)
|
||||
.Contains(name.Key))
|
||||
.Select(name => name.Value);
|
||||
|
||||
string endOfMessage = hunterNames.Count() == 1 ? "is the hunter" : "are the hunters";
|
||||
|
||||
Logger.LogInformation($"Hiding phase started! {String.Join(" ,", hunterNames)} {endOfMessage}");
|
||||
}
|
||||
|
||||
PHMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void UpdateStatus()
|
||||
{
|
||||
PHMutex.WaitOne(100);
|
||||
|
||||
if(this.CurrentPhase == PropHuntPhaseEnum.Countdown && DateTime.Now > this.InitialCountdownFinishTime && this.InitialCountdown)
|
||||
{
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Hiding;
|
||||
this.InitialCountdown = false;
|
||||
}
|
||||
|
||||
if(this.CurrentPhase == PropHuntPhaseEnum.Hiding && DateTime.Now > this.HidingTime.AddSeconds(-3))
|
||||
{
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Countdown;
|
||||
}
|
||||
|
||||
if(this.CurrentPhase == PropHuntPhaseEnum.Countdown && DateTime.Now > this.HidingTime)
|
||||
{
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Running;
|
||||
this.PropHuntStartTime = DateTime.Now;
|
||||
Logger.LogInformation($"Hunting phase started!");
|
||||
}
|
||||
else if(this.CurrentPhase == PropHuntPhaseEnum.Running)
|
||||
{
|
||||
foreach(Player player in ServerData.PlayerList.Where(p => p.Connected))
|
||||
{
|
||||
if(player.Health <= 0 && this.Players.ContainsKey(player.PlayerNumber))
|
||||
{
|
||||
this.Players[player.PlayerNumber].Alive = false;
|
||||
this.Players[player.PlayerNumber].TimeToFind = DateTime.Now - this.PropHuntStartTime;
|
||||
ServerData.ModelData.AddModel(player.PlayerNumber, this.OriginalModels[player.PlayerNumber]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!this.Players.Any(p => p.Value.Alive))
|
||||
{
|
||||
Logger.LogInformation("Hunters found all of the props! Results:");
|
||||
int positions = 1;
|
||||
|
||||
Logger.LogDebug(JsonConvert.SerializeObject(this.Players, Formatting.Indented));
|
||||
foreach(KeyValuePair<byte, PlayerData> player in this.Players.Where(p => !p.Value.Hunter).OrderByDescending(p => p.Value.TimeToFind))
|
||||
{
|
||||
Logger.LogInformation($"({positions}°) {ServerData.NameData.GetAllPlayers().Names[player.Key]}: {player.Value.TimeToFind.TotalSeconds} seconds");
|
||||
positions++;
|
||||
}
|
||||
|
||||
this.StopGameMode();
|
||||
}
|
||||
|
||||
if(!this.Players.Where(p => p.Value.Alive && !p.Value.Hunter).Any(p => ServerData.GetPlayer((int)p.Key).Connected))
|
||||
{
|
||||
Logger.LogInformation("Prop hunt match finished because of player disconnection");
|
||||
this.StopGameMode();
|
||||
}
|
||||
}
|
||||
|
||||
PHMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
PHMutex.WaitOne(100);
|
||||
|
||||
this.StopGameMode();
|
||||
|
||||
PHMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
private void StopGameMode()
|
||||
{
|
||||
this.CurrentPhase = PropHuntPhaseEnum.Stopped;
|
||||
|
||||
foreach(KeyValuePair<byte, PlayerData> player in this.Players)
|
||||
{
|
||||
ServerData.ModelData.AddModel(player.Key, this.OriginalModels[player.Key]);
|
||||
}
|
||||
|
||||
this.OriginalModels.Clear();
|
||||
this.Players.Clear();
|
||||
this.Settings = null;
|
||||
}
|
||||
|
||||
public PropHuntDTO GetData(byte playerNumber)
|
||||
{
|
||||
if (this.Players.ContainsKey(playerNumber))
|
||||
{
|
||||
PHMutex.WaitOne(100);
|
||||
|
||||
PropHuntPhaseEnum phase = this.CurrentPhase;
|
||||
bool isHunter = this.Players[playerNumber].Hunter;
|
||||
Vec3f startingPosition = this.Players[playerNumber].Hunter ? this.Settings.HunterStartingPosition : this.Settings.HidersStartingPosition;
|
||||
|
||||
PHMutex.ReleaseMutex();
|
||||
|
||||
return new PropHuntDTO()
|
||||
{
|
||||
IsPlaying = true,
|
||||
Phase = (byte)phase,
|
||||
IsHunter = isHunter,
|
||||
StartingPosition = startingPosition
|
||||
};
|
||||
}
|
||||
|
||||
return new PropHuntDTO()
|
||||
{
|
||||
IsPlaying = false,
|
||||
Phase = 0,
|
||||
IsHunter = false,
|
||||
StartingPosition = new Vec3f(0, 0, 0)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
135
C#/BOTWM.Server/ServerClasses/Quests.cs
Normal file
135
C#/BOTWM.Server/ServerClasses/Quests.cs
Normal file
@ -0,0 +1,135 @@
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Quests
|
||||
{
|
||||
public Mutex QMutex = new Mutex();
|
||||
|
||||
public bool isQuestSync;
|
||||
|
||||
public List<string> ServerQuests;
|
||||
public List<List<string>> Queue = new List<List<string>>();
|
||||
|
||||
public Quests(int playerLimit, bool questSync)
|
||||
{
|
||||
ServerQuests = new List<string>();
|
||||
|
||||
for (int i = 0; i < playerLimit; i++)
|
||||
Queue.Add(new List<string>());
|
||||
|
||||
UpdateServiceStatus(questSync);
|
||||
}
|
||||
|
||||
public void UpdateServiceStatus(bool newStatus)
|
||||
{
|
||||
isQuestSync = newStatus;
|
||||
}
|
||||
|
||||
public void Update(QuestsDTO userData)
|
||||
{
|
||||
|
||||
if (!isQuestSync)
|
||||
{
|
||||
ClearQuests();
|
||||
return;
|
||||
}
|
||||
|
||||
QMutex.WaitOne(100);
|
||||
|
||||
ProcessQuests(userData);
|
||||
|
||||
QMutex.ReleaseMutex();
|
||||
|
||||
}
|
||||
|
||||
public void ProcessQuests(QuestsDTO userData)
|
||||
{
|
||||
foreach(string Quest in userData.Completed)
|
||||
{
|
||||
if (!ServerQuests.Contains(Quest))
|
||||
{
|
||||
ServerQuests.Add(Quest);
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
Queue[i].Add(Quest);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessQuests(List<string> Quests)
|
||||
{
|
||||
foreach (string Quest in Quests)
|
||||
{
|
||||
if (!ServerQuests.Contains(Quest))
|
||||
{
|
||||
ServerQuests.Add(Quest);
|
||||
|
||||
for(int i = 0; i < Queue.Count; i++)
|
||||
Queue[i].Add(Quest);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void ClearQuests()
|
||||
{
|
||||
QMutex.WaitOne(100);
|
||||
|
||||
ServerQuests.Clear();
|
||||
|
||||
for (int i = 0; i < Queue.Count; i++)
|
||||
{
|
||||
Queue[i].Clear();
|
||||
}
|
||||
|
||||
QMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void FillQueue(int playerNumber)
|
||||
{
|
||||
QMutex.WaitOne(100);
|
||||
|
||||
Queue[playerNumber].Clear();
|
||||
|
||||
foreach(string Quest in ServerQuests)
|
||||
Queue[playerNumber].Add(Quest);
|
||||
|
||||
QMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public List<string> GetQuests(int playerNumber)
|
||||
{
|
||||
QMutex.WaitOne(100);
|
||||
|
||||
List<string> QuestData = new List<string>(Queue[playerNumber]);
|
||||
|
||||
Queue[playerNumber].Clear();
|
||||
|
||||
QMutex.ReleaseMutex();
|
||||
|
||||
return QuestData;
|
||||
}
|
||||
|
||||
public List<string> GetPlayerQuests(int playerNumber)
|
||||
{
|
||||
List<string> PlayerQuests = new List<string>();
|
||||
|
||||
QMutex.WaitOne(100);
|
||||
|
||||
for(int i = 0; i < 100; i++)
|
||||
{
|
||||
if (Queue[playerNumber].Count == 0)
|
||||
break;
|
||||
|
||||
PlayerQuests.Add(Queue[playerNumber][0]);
|
||||
Queue[playerNumber].RemoveAt(0);
|
||||
}
|
||||
|
||||
QMutex.ReleaseMutex();
|
||||
|
||||
return PlayerQuests;
|
||||
}
|
||||
}
|
||||
}
|
381
C#/BOTWM.Server/ServerClasses/ServerData.cs
Normal file
381
C#/BOTWM.Server/ServerClasses/ServerData.cs
Normal file
@ -0,0 +1,381 @@
|
||||
using BOTW.Logging;
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
using BOTWM.Server.HelperTypes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
static public class ServerData
|
||||
{
|
||||
public struct ServerConfiguration
|
||||
{
|
||||
public string IP;
|
||||
public int PORT;
|
||||
public string PASSWORD;
|
||||
public string DESCRIPTION;
|
||||
public ServerSettings Settings;
|
||||
|
||||
public ServerConfiguration(string ip, int port, string password, string description, ServerSettings settings)
|
||||
{
|
||||
this.IP = ip;
|
||||
this.PORT = port;
|
||||
this.PASSWORD = password;
|
||||
this.DESCRIPTION = description;
|
||||
this.Settings = settings;
|
||||
}
|
||||
}
|
||||
|
||||
public const int PLAYERLIMIT = 32;
|
||||
|
||||
static Dictionary<string, string> ArmorMappings;
|
||||
static bool IsEnemySync;
|
||||
static bool IsQuestSync;
|
||||
|
||||
public static World WorldData;
|
||||
public static Names NameData;
|
||||
public static Models ModelData;
|
||||
public static List<Player> PlayerList;
|
||||
public static Enemy EnemyData;
|
||||
public static Quests QuestData;
|
||||
public static DeathSwapSettings DeathSwap;
|
||||
public static Teleport TeleportData;
|
||||
public static PropHunt PropHuntData;
|
||||
public static ServerConfiguration Configuration;
|
||||
static List<List<bool>> Updated = new List<List<bool>>();
|
||||
static List<DeathSwapDTO> DeathSwapQueue = new List<DeathSwapDTO>();
|
||||
|
||||
static Mutex DataMutex = new Mutex();
|
||||
public static Mutex DeathSwapMutex = new Mutex();
|
||||
|
||||
static public void Startup(string ip, int port, string password, string description, ServerSettings settings)
|
||||
{
|
||||
WorldData = new World();
|
||||
PlayerList = new List<Player>();
|
||||
|
||||
for (int i = 0; i < PLAYERLIMIT; i++)
|
||||
{
|
||||
PlayerList.Add(new Player((byte)i));
|
||||
|
||||
Updated.Add(new List<bool>());
|
||||
|
||||
for (int j = 0; j < PLAYERLIMIT; j++)
|
||||
Updated[i].Add(false);
|
||||
|
||||
DeathSwapQueue.Add(new DeathSwapDTO());
|
||||
}
|
||||
|
||||
EnemyData = new Enemy(PLAYERLIMIT, settings.EnemySync);
|
||||
QuestData = new Quests(PLAYERLIMIT, settings.QuestSyncSettings.AnyTrue);
|
||||
NameData = new Names(PLAYERLIMIT);
|
||||
ModelData = new Models(PLAYERLIMIT);
|
||||
|
||||
IsEnemySync = settings.EnemySync;
|
||||
IsQuestSync = settings.QuestSyncSettings.AnyTrue;
|
||||
|
||||
ArmorMappings = ReadArmorMappingJson();
|
||||
|
||||
Configuration = new ServerConfiguration(ip, port, password, description, settings);
|
||||
DeathSwap = new DeathSwapSettings();
|
||||
TeleportData = new Teleport(PLAYERLIMIT);
|
||||
PropHuntData = new PropHunt();
|
||||
}
|
||||
|
||||
#region Update
|
||||
|
||||
static public void UpdateWorldData(WorldDTO userData, int playerNumber)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
|
||||
WorldData.UpdateTime(userData);
|
||||
|
||||
if (playerNumber != -1 && WorldData.isForcedWeather)
|
||||
{
|
||||
DataMutex.ReleaseMutex();
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = playerNumber - 1; i >= 0; i--)
|
||||
{
|
||||
if (PlayerList[i].Connected)
|
||||
{
|
||||
DataMutex.ReleaseMutex();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
WorldData.UpdateWeather(userData);
|
||||
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
static public void UpdatePlayerData(ClientPlayerDTO userData, int playerNumber)
|
||||
{
|
||||
|
||||
userData.Equipment = ProcessArmors(userData.Equipment);
|
||||
|
||||
//TODO: Implement animation mapping
|
||||
|
||||
DataMutex.WaitOne(100);
|
||||
PlayerList[playerNumber].Update(userData);
|
||||
|
||||
foreach(List<bool> UpdatedList in Updated)
|
||||
UpdatedList[playerNumber] = true;
|
||||
|
||||
if(playerNumber == 0)
|
||||
{
|
||||
if (Configuration.Settings.GameMode == Gamemode.DeathSwap && playerNumber == 0)
|
||||
{
|
||||
DeathSwapMutex.WaitOne(100);
|
||||
|
||||
if (DeathSwap.Enabled && PlayerList[1].Connected)
|
||||
{
|
||||
byte NewDeathSwapPhase = DeathSwap.GetSwapPhase();
|
||||
|
||||
for (int i = 0; i < PLAYERLIMIT; i++)
|
||||
if (DeathSwapQueue[i].Phase != 2)
|
||||
DeathSwapQueue[i].Phase = NewDeathSwapPhase;
|
||||
|
||||
if (NewDeathSwapPhase == 2)
|
||||
{
|
||||
DeathSwapQueue[0].Position = new Vec3f(PlayerList[1].Position.ToList());
|
||||
|
||||
DeathSwapQueue[1].Position = new Vec3f(PlayerList[0].Position.ToList());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DeathSwap.Running = false;
|
||||
DeathSwap.RestartTimer();
|
||||
}
|
||||
|
||||
DeathSwapMutex.ReleaseMutex();
|
||||
}
|
||||
}
|
||||
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
static public void UpdateEnemyData(EnemyDTO userData)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
EnemyData.Update(userData);
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
static public void UpdateQuestData(QuestsDTO userData)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
QuestData.Update(userData);
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
static public void SetConnection(int playerNumber, bool status)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
if (status)
|
||||
PlayerList[playerNumber].Connected = true;
|
||||
else
|
||||
{
|
||||
PlayerList[playerNumber] = new Player((byte)playerNumber);
|
||||
NameData.RemoveName((byte)playerNumber);
|
||||
ModelData.RemoveModel((byte)playerNumber);
|
||||
PropHuntData.Players.Remove((byte)playerNumber);
|
||||
PropHuntData.UpdateStatus();
|
||||
}
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
static public void ProcessExternalQuests(List<string> Quests)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
QuestData.ProcessQuests(Quests);
|
||||
DataMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get data
|
||||
|
||||
public static ServerDTO GetData(int playerNumber)
|
||||
{
|
||||
ServerDTO serverInformation = new ServerDTO();
|
||||
|
||||
DataMutex.WaitOne(100);
|
||||
|
||||
serverInformation.WorldData.Time = WorldData.Time;
|
||||
serverInformation.WorldData.Day = WorldData.Day;
|
||||
serverInformation.WorldData.Weather = WorldData.Weather;
|
||||
serverInformation.NameData.Names = NameData.GetQueue((byte)playerNumber);
|
||||
serverInformation.ModelData.Models = ModelData.GetQueue((byte)playerNumber);
|
||||
|
||||
foreach (Player player in PlayerList)
|
||||
{
|
||||
if (!player.Connected)
|
||||
continue;
|
||||
|
||||
if (player.PlayerNumber == playerNumber && (PropHuntData.CurrentPhase == 0 || PropHuntData.Players[(byte)playerNumber].Hunter))
|
||||
continue;
|
||||
|
||||
if (player.Position.GetDistance(PlayerList[playerNumber].Position) >= 100)
|
||||
{
|
||||
FarPlayerDTO playerDataToAdd = new FarPlayerDTO();
|
||||
|
||||
playerDataToAdd.Map(player);
|
||||
|
||||
playerDataToAdd.Updated = Updated[playerNumber][player.PlayerNumber];
|
||||
Updated[playerNumber][player.PlayerNumber] = false;
|
||||
serverInformation.FarPlayers.Add(playerDataToAdd);
|
||||
}
|
||||
else
|
||||
{
|
||||
ClosePlayerDTO playerDataToAdd = new ClosePlayerDTO();
|
||||
|
||||
playerDataToAdd.Map(player);
|
||||
|
||||
playerDataToAdd.Updated = Updated[playerNumber][player.PlayerNumber];
|
||||
Updated[playerNumber][player.PlayerNumber] = false;
|
||||
if (playerDataToAdd.PlayerNumber == playerNumber) playerDataToAdd.PlayerNumber = 31;
|
||||
serverInformation.ClosePlayers.Add(playerDataToAdd);
|
||||
}
|
||||
}
|
||||
|
||||
serverInformation.EnemyData.Health = EnemyData.GetQueue(playerNumber);
|
||||
serverInformation.QuestData.Completed = QuestData.GetPlayerQuests(playerNumber);
|
||||
|
||||
DeathSwapMutex.WaitOne(100);
|
||||
serverInformation.DeathSwapData = DeathSwapQueue[playerNumber];
|
||||
DeathSwapMutex.ReleaseMutex();
|
||||
|
||||
serverInformation.TeleportData = TeleportData.GetTp(playerNumber);
|
||||
|
||||
if(((byte)PropHuntData.CurrentPhase) > 0)
|
||||
{
|
||||
PropHuntData.UpdateStatus();
|
||||
}
|
||||
|
||||
serverInformation.PropHuntData = PropHuntData.GetData((byte)playerNumber);
|
||||
|
||||
DataMutex.ReleaseMutex();
|
||||
|
||||
return serverInformation;
|
||||
}
|
||||
|
||||
public static void ClearDeathSwap(int playerNumber)
|
||||
{
|
||||
DeathSwapMutex.WaitOne(100);
|
||||
DeathSwapQueue[playerNumber].Phase = 0;
|
||||
DeathSwapMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region HelperMethods
|
||||
|
||||
static public ConnectResponseDTO TryAssigning(ConnectDTO UserConfiguration)
|
||||
{
|
||||
if (Configuration.PASSWORD != "" && Configuration.PASSWORD != UserConfiguration.Password)
|
||||
return new ConnectResponseDTO() { Response = 3 };
|
||||
|
||||
DataMutex.WaitOne(100);
|
||||
|
||||
int counter = 0;
|
||||
int playerNumber = -1;
|
||||
foreach(Player player in PlayerList)
|
||||
{
|
||||
if (string.IsNullOrEmpty(player.Name))
|
||||
{
|
||||
playerNumber = counter;
|
||||
player.Name = UserConfiguration.Name;
|
||||
player.PlayerNumber = (byte)playerNumber;
|
||||
player.ModelType = UserConfiguration.ModelData.ModelType;
|
||||
player.Model = UserConfiguration.ModelData.Model;
|
||||
player.MiiData = UserConfiguration.ModelData.Mii;
|
||||
break;
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
|
||||
DataMutex.ReleaseMutex();
|
||||
|
||||
if (playerNumber == -1)
|
||||
return new ConnectResponseDTO() { Response = 2 };
|
||||
|
||||
NameData.AddName((byte)playerNumber, UserConfiguration.Name);
|
||||
ModelData.AddModel((byte)playerNumber, UserConfiguration.ModelData);
|
||||
|
||||
EnemyData.FillQueue(playerNumber);
|
||||
QuestData.FillQueue(playerNumber);
|
||||
NameData.FillQueue(playerNumber);
|
||||
ModelData.FillQueue(playerNumber);
|
||||
|
||||
return new ConnectResponseDTO()
|
||||
{
|
||||
Response = 1,
|
||||
PlayerNumber = playerNumber,
|
||||
Settings = Configuration.Settings,
|
||||
QuestSync = IsQuestSync,
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
static public Player GetPlayer(int playerNumber)
|
||||
{
|
||||
DataMutex.WaitOne(100);
|
||||
Player result = PlayerList[playerNumber];
|
||||
DataMutex.ReleaseMutex();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static public NamesDTO GetPlayers()
|
||||
{
|
||||
return NameData.GetAllPlayers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private methods
|
||||
|
||||
static private CharacterEquipment ProcessArmors(CharacterEquipment EquipmentData)
|
||||
{
|
||||
|
||||
string HeadString = AddZeros(EquipmentData.Head.ToString(), 3);
|
||||
string UpperString = AddZeros(EquipmentData.Upper.ToString(), 3);
|
||||
string LowerString = AddZeros(EquipmentData.Lower.ToString(), 3);
|
||||
|
||||
if (ArmorMappings.ContainsKey(HeadString))
|
||||
EquipmentData.Head = Int16.Parse(ArmorMappings[HeadString]);
|
||||
|
||||
if (ArmorMappings.ContainsKey(UpperString))
|
||||
EquipmentData.Upper = Int16.Parse(ArmorMappings[UpperString]);
|
||||
|
||||
if (ArmorMappings.ContainsKey(LowerString))
|
||||
EquipmentData.Lower = Int16.Parse(ArmorMappings[LowerString]);
|
||||
|
||||
return EquipmentData;
|
||||
}
|
||||
|
||||
static private string AddZeros(string original, int numberOfZeros)
|
||||
{
|
||||
int zeroesToAdd = numberOfZeros - original.Length;
|
||||
|
||||
for (int i = 0; i < zeroesToAdd; i++)
|
||||
{
|
||||
original = "0" + original;
|
||||
}
|
||||
|
||||
return original;
|
||||
}
|
||||
|
||||
static private Dictionary<string, string> ReadArmorMappingJson()
|
||||
{
|
||||
string AppdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BOTWM";
|
||||
string ArmorMappingJson = File.ReadAllText(AppdataFolder + "\\ArmorMapping.txt");
|
||||
|
||||
return JsonConvert.DeserializeObject<Dictionary<string, string>>(ArmorMappingJson);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
43
C#/BOTWM.Server/ServerClasses/Teleport.cs
Normal file
43
C#/BOTWM.Server/ServerClasses/Teleport.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using BOTWM.Server.DataTypes;
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class Teleport
|
||||
{
|
||||
public Mutex TMutex = new Mutex();
|
||||
public List<Vec3f> Queue = new List<Vec3f>();
|
||||
|
||||
public Teleport(int playerLimit)
|
||||
{
|
||||
for (int i = 0; i < playerLimit; i++)
|
||||
Queue.Add(new Vec3f());
|
||||
}
|
||||
|
||||
public void AddTp(List<int> players, Vec3f destination)
|
||||
{
|
||||
TMutex.WaitOne();
|
||||
players.ForEach(p => Queue[p] = destination);
|
||||
TMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void ClearTp(int player)
|
||||
{
|
||||
TMutex.WaitOne();
|
||||
Queue[player] = new Vec3f();
|
||||
TMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public TeleportDTO GetTp(int player)
|
||||
{
|
||||
TeleportDTO result;
|
||||
|
||||
TMutex.WaitOne();
|
||||
result = new TeleportDTO() { Destination = Queue[player] };
|
||||
Queue[player] = new Vec3f();
|
||||
TMutex.ReleaseMutex();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
52
C#/BOTWM.Server/ServerClasses/World.cs
Normal file
52
C#/BOTWM.Server/ServerClasses/World.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using BOTWM.Server.DTO;
|
||||
|
||||
namespace BOTWM.Server.ServerClasses
|
||||
{
|
||||
public class World
|
||||
{
|
||||
public float Time;
|
||||
public int Day;
|
||||
public int Weather;
|
||||
|
||||
public bool isForcedWeather;
|
||||
|
||||
private Mutex WMutex = new Mutex();
|
||||
|
||||
public World()
|
||||
{
|
||||
Day = -1;
|
||||
Time = -1;
|
||||
Weather = 0;
|
||||
}
|
||||
|
||||
public void UpdateTime(WorldDTO userData)
|
||||
{
|
||||
WMutex.WaitOne(100);
|
||||
if(this.Day == -1 || this.Time == -1)
|
||||
{
|
||||
this.Day = 0;
|
||||
this.Time = userData.Time;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(userData.Day - this.Day == 1)
|
||||
{
|
||||
this.Day = userData.Day;
|
||||
this.Time = userData.Time;
|
||||
}
|
||||
else if(userData.Day == this.Day && userData.Time - this.Time > 0)
|
||||
{
|
||||
this.Day = userData.Day;
|
||||
this.Time = userData.Time;
|
||||
}
|
||||
}
|
||||
|
||||
WMutex.ReleaseMutex();
|
||||
}
|
||||
|
||||
public void UpdateWeather(WorldDTO userData)
|
||||
{
|
||||
this.Weather = userData.Weather;
|
||||
}
|
||||
}
|
||||
}
|
1212
C#/BOTWM.Server/ServerOld.cs
Normal file
1212
C#/BOTWM.Server/ServerOld.cs
Normal file
File diff suppressed because it is too large
Load Diff
78
C#/BOTWM.Server/ServerSettings.cs
Normal file
78
C#/BOTWM.Server/ServerSettings.cs
Normal file
@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BOTWM.Server
|
||||
{
|
||||
|
||||
public class QuestSettings
|
||||
{
|
||||
public bool Vanilla;
|
||||
public bool Koroks;
|
||||
public bool Towers;
|
||||
public bool Shrines;
|
||||
public bool Locations;
|
||||
public bool DivineBeast;
|
||||
|
||||
public bool AnyTrue {
|
||||
get
|
||||
{
|
||||
return Vanilla || Koroks || Towers || Shrines || Locations || DivineBeast;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Gamemode
|
||||
{
|
||||
NoGamemode,
|
||||
HunterVsSpeedrunner,
|
||||
DeathSwap,
|
||||
PropHunt
|
||||
}
|
||||
|
||||
public class ServerSettings
|
||||
{
|
||||
|
||||
public string SettingsName;
|
||||
|
||||
public bool EnemySync = false;
|
||||
public Gamemode GameMode;
|
||||
public QuestSettings QuestSyncSettings;
|
||||
|
||||
public ServerSettings(string settingsName, bool enemySync = false, bool vanillaQuests = false, bool korokSync = false, bool towerSync = false, bool shrineSync = false, bool locationSync = false, bool divineBeasts = false, Gamemode gamemode = Gamemode.NoGamemode)
|
||||
{
|
||||
SettingsName = settingsName;
|
||||
EnemySync = enemySync;
|
||||
QuestSyncSettings = new QuestSettings()
|
||||
{
|
||||
Vanilla = vanillaQuests,
|
||||
Koroks = korokSync,
|
||||
Towers = towerSync,
|
||||
Shrines = shrineSync,
|
||||
Locations = locationSync,
|
||||
DivineBeast = divineBeasts
|
||||
};
|
||||
|
||||
GameMode = gamemode;
|
||||
}
|
||||
|
||||
public bool CompareSettings(ServerSettings settingsToCompare)
|
||||
{
|
||||
|
||||
if (settingsToCompare.EnemySync == this.EnemySync &&
|
||||
settingsToCompare.QuestSyncSettings.Vanilla == this.QuestSyncSettings.Vanilla &&
|
||||
settingsToCompare.QuestSyncSettings.Koroks == this.QuestSyncSettings.Koroks &&
|
||||
settingsToCompare.QuestSyncSettings.Towers == this.QuestSyncSettings.Towers &&
|
||||
settingsToCompare.QuestSyncSettings.Shrines == this.QuestSyncSettings.Shrines &&
|
||||
settingsToCompare.QuestSyncSettings.Locations == this.QuestSyncSettings.Locations &&
|
||||
settingsToCompare.QuestSyncSettings.DivineBeast == this.QuestSyncSettings.DivineBeast &&
|
||||
settingsToCompare.GameMode == this.GameMode)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
61
C#/BOTWM.Server/readXML.cs
Normal file
61
C#/BOTWM.Server/readXML.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
namespace BOTWM.Server
|
||||
{
|
||||
static public class readXML
|
||||
{
|
||||
|
||||
static public Dictionary<string, Dictionary<string, string>> readAnimationFile()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> result = new Dictionary<string, Dictionary<string, string>>();
|
||||
XmlTextReader reader = new XmlTextReader(new StringReader(Resources.animationHashes));
|
||||
Dictionary<string, string> animation = new Dictionary<string, string>();
|
||||
Dictionary<string, string> animationCopy = new Dictionary<string, string>();
|
||||
string[] acceptedStrings = { "Hash", "Schedule", "Animation", "Name" };
|
||||
string next = "";
|
||||
string hash = "";
|
||||
|
||||
animation.Add("Schedule", "");
|
||||
animation.Add("Animation", "");
|
||||
animation.Add("Name", "");
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
switch (reader.NodeType)
|
||||
{
|
||||
case XmlNodeType.Element:
|
||||
if (acceptedStrings.Contains(reader.Name))
|
||||
{
|
||||
next = reader.Name;
|
||||
}
|
||||
break;
|
||||
|
||||
case XmlNodeType.Text:
|
||||
if (next != "")
|
||||
{
|
||||
if (next == "Hash")
|
||||
{
|
||||
hash = reader.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
animation[next] = reader.Value;
|
||||
if (next == "Animation")
|
||||
{
|
||||
animationCopy = new Dictionary<string, string>(animation);
|
||||
result.Add(hash, animationCopy);
|
||||
next = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
28
C#/BOTWM.Tests/BOTWM.Tests.csproj
Normal file
28
C#/BOTWM.Tests/BOTWM.Tests.csproj
Normal file
@ -0,0 +1,28 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
|
||||
<PackageReference Include="xunit" Version="2.4.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BOTWM.Server\BOTWM.Server.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
27
C#/BOTWM.Tests/ServerShould.cs
Normal file
27
C#/BOTWM.Tests/ServerShould.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using BOTWM.Server;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
namespace BOTWM.Tests
|
||||
{
|
||||
public class ServerShould
|
||||
{
|
||||
|
||||
public ServerShould()
|
||||
{
|
||||
|
||||
IPEndPoint íp = new IPEndPoint(IPAddress.Parse("25.79.17.118"), 5050);
|
||||
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
s.Connect(íp);
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
1
C#/BOTWM.Tests/Usings.cs
Normal file
1
C#/BOTWM.Tests/Usings.cs
Normal file
@ -0,0 +1 @@
|
||||
global using Xunit;
|
62
C#/GUIApp/App.config
Normal file
62
C#/GUIApp/App.config
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="GUIApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<GUIApp.Properties.Settings>
|
||||
<setting name="playerName" serializeAs="String">
|
||||
<value>Link</value>
|
||||
</setting>
|
||||
<setting name="lastServerName" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastDescription" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastPassword" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastIP" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastPort" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="lastEnemySync" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="lastGlyphSync" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="EnemiesSynced" serializeAs="String">
|
||||
<value>-1</value>
|
||||
</setting>
|
||||
<setting name="lastQuestSync" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</GUIApp.Properties.Settings>
|
||||
</userSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
<!--<probing privatePath="libs" />-->
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.3" newVersion="6.0.0.3" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
276
C#/GUIApp/BOTWM.csproj
Normal file
276
C#/GUIApp/BOTWM.csproj
Normal file
@ -0,0 +1,276 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D72127C5-BC12-4D1F-9B47-287016257B68}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>GUIApp</RootNamespace>
|
||||
<AssemblyName>Milk Bar Launcher</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\..\BOTW.Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>unknown.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</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>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Memory.4.5.5\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>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=6.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Text.Json.6.0.5\lib\net461\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Classes\discordClass.cs" />
|
||||
<Compile Include="DiscordGameSDK\ActivityManager.cs" />
|
||||
<Compile Include="DiscordGameSDK\Constants.cs" />
|
||||
<Compile Include="DiscordGameSDK\Core.cs" />
|
||||
<Compile Include="DiscordGameSDK\ImageManager.cs" />
|
||||
<Compile Include="DiscordGameSDK\LobbyManager.cs" />
|
||||
<Compile Include="DiscordGameSDK\StorageManager.cs" />
|
||||
<Compile Include="DiscordGameSDK\StoreManager.cs" />
|
||||
<Compile Include="Forms\addServer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\addServer.Designer.cs">
|
||||
<DependentUpon>addServer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Classes\addControls.cs" />
|
||||
<Compile Include="Forms\DebugWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\DebugWindow.Designer.cs">
|
||||
<DependentUpon>DebugWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HostServer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\HostServer.Designer.cs">
|
||||
<DependentUpon>HostServer.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Classes\Injector.cs" />
|
||||
<Compile Include="Connection\NamedPipes.cs" />
|
||||
<Compile Include="Forms\messageBoxUnclosable.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\messageBoxUnclosable.Designer.cs">
|
||||
<DependentUpon>messageBoxUnclosable.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Connection\Server.cs" />
|
||||
<Compile Include="Forms\serverList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\serverList.Designer.cs">
|
||||
<DependentUpon>serverList.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Classes\readXML.cs" />
|
||||
<Compile Include="Forms\serverInterface.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\serverInterface.Designer.cs">
|
||||
<DependentUpon>serverInterface.cs</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Forms\addServer.resx">
|
||||
<DependentUpon>addServer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\DebugWindow.resx">
|
||||
<DependentUpon>DebugWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\HostServer.resx">
|
||||
<DependentUpon>HostServer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\messageBoxUnclosable.resx">
|
||||
<DependentUpon>messageBoxUnclosable.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Forms\serverList.resx">
|
||||
<DependentUpon>serverList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\serverInterface.resx">
|
||||
<DependentUpon>serverInterface.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\ArmorMapping.json" />
|
||||
<None Include="Resources\Icon1.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 y x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon2.ico" />
|
||||
<None Include="Resources\check-placeholder.png" />
|
||||
<None Include="Resources\x-placeholder.png" />
|
||||
<Content Include="Resources\animationHashes.xml" />
|
||||
<None Include="Resources\ArmorMapping.txt" />
|
||||
<Content Include="Resources\InjectDLL.dll" />
|
||||
<None Include="Resources\QuestFlags.txt" />
|
||||
<None Include="Resources\WeaponDamages.txt" />
|
||||
<None Include="Resources\serverList.xml" />
|
||||
<None Include="Resources\serverLista.xml" />
|
||||
<None Include="Resources\QuestFlagsNames.txt" />
|
||||
<Content Include="unknown.ico" />
|
||||
<None Include="Resources\animationHashes2.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\gear.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Settings.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Help.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\BotW_Mipha_Artwork.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Mipha.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Daruk.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Mipha2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Revali.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Urbosa.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="packages\System.Text.Json.6.0.5\build\System.Text.Json.targets" Condition="Exists('packages\System.Text.Json.6.0.5\build\System.Text.Json.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\System.Text.Json.6.0.5\build\System.Text.Json.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\System.Text.Json.6.0.5\build\System.Text.Json.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
97
C#/GUIApp/Classes/Injector.cs
Normal file
97
C#/GUIApp/Classes/Injector.cs
Normal file
@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public class Injector
|
||||
{
|
||||
|
||||
static readonly IntPtr INTPTR_ZERO = (IntPtr)0;
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern IntPtr OpenProcess(uint dwDesiredAccess, int bInheritHandle, uint dwProcessId);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern int CloseHandle(IntPtr hObject);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
static extern IntPtr GetModuleHandle(string lpModuleName);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern IntPtr VirtualAllocEx(IntPtr hProcess, IntPtr lpAddress, IntPtr dwSize, uint flAllocationType, uint flProtect);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern int WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] buffer, uint size, int lpNumberOfBytesWritten);
|
||||
[DllImport("kernel32.dll", SetLastError = true)]
|
||||
static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, uint dwStackSize, IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, IntPtr lpThreadId);
|
||||
|
||||
Form1 MainWindow;
|
||||
|
||||
public Injector(Form1 sender)
|
||||
{
|
||||
this.MainWindow = sender;
|
||||
}
|
||||
|
||||
public bool SI(uint P, string DLLP)
|
||||
{
|
||||
IntPtr hndProc = OpenProcess((0x2 | 0x8 | 0x10 | 0x20 | 0x400), 1, P);
|
||||
|
||||
if (hndProc == INTPTR_ZERO) { return false; }
|
||||
|
||||
IntPtr lpAddress = VirtualAllocEx(hndProc, (IntPtr)null, (IntPtr)DLLP.Length, (0x1000 | 0x2000), 0x40);
|
||||
|
||||
if (lpAddress == INTPTR_ZERO)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
byte[] bytes = Encoding.ASCII.GetBytes(DLLP);
|
||||
|
||||
if (WriteProcessMemory(hndProc, lpAddress, bytes, (uint)bytes.Length, 0) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
IntPtr loadlibAddy = GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
|
||||
|
||||
|
||||
IntPtr hThread = CreateRemoteThread(hndProc, IntPtr.Zero, 0, loadlibAddy, lpAddress, 0, IntPtr.Zero);
|
||||
|
||||
CloseHandle(hThread);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public int injectDLL(string PN, string DLLP)
|
||||
{
|
||||
|
||||
if (!File.Exists(DLLP)){ return 1; }
|
||||
|
||||
uint _procId = 0;
|
||||
Process[] _procs = Process.GetProcesses();
|
||||
|
||||
for (int i = 0; i < _procs.Length; i++)
|
||||
{
|
||||
if (_procs[i].ProcessName == PN)
|
||||
{
|
||||
_procId = (uint)_procs[i].Id;
|
||||
}
|
||||
}
|
||||
|
||||
if (_procId == 0) { return 2; }
|
||||
|
||||
if (!SI(_procId, DLLP))
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
return 4;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
46
C#/GUIApp/Classes/addControls.cs
Normal file
46
C#/GUIApp/Classes/addControls.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
static public class addControls
|
||||
{
|
||||
|
||||
static public Label createLabel(string Text, int x, int y)
|
||||
{
|
||||
Label label = new Label();
|
||||
label.Text = Text;
|
||||
label.AutoSize = true;
|
||||
label.Location = new Point(x, y);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
static public PictureBox createPB(Bitmap Image, int x, int y, int width, int heigth)
|
||||
{
|
||||
PictureBox pictureBox = new PictureBox();
|
||||
pictureBox.Image = Image;
|
||||
pictureBox.Size = new Size(width, heigth);
|
||||
pictureBox.Location = new Point(x, y);
|
||||
pictureBox.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
|
||||
return pictureBox;
|
||||
}
|
||||
|
||||
static public Button createButton(string Text, int x, int y, int width, int height)
|
||||
{
|
||||
Button button = new Button();
|
||||
button.Text = Text;
|
||||
button.Size = new Size(width, height);
|
||||
button.Location = new Point(x, y);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
41
C#/GUIApp/Classes/discordClass.cs
Normal file
41
C#/GUIApp/Classes/discordClass.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public class discordClass
|
||||
{
|
||||
|
||||
Discord.Discord discord = new Discord.Discord(946199926847705088, (UInt64)Discord.CreateFlags.Default);
|
||||
|
||||
public discordClass()
|
||||
{
|
||||
var activityManager = discord.GetActivityManager();
|
||||
|
||||
var activity = new Discord.Activity
|
||||
{
|
||||
State = "Exclusive version :eyes: ",
|
||||
Assets =
|
||||
{
|
||||
LargeImage = "logo",
|
||||
}
|
||||
};
|
||||
|
||||
activityManager.UpdateActivity(activity, (res) =>
|
||||
{
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public void update()
|
||||
{
|
||||
discord.RunCallbacks();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
284
C#/GUIApp/Classes/readXML.cs
Normal file
284
C#/GUIApp/Classes/readXML.cs
Normal file
@ -0,0 +1,284 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
static public class readXML
|
||||
{
|
||||
|
||||
static private string ResourcesPath = Directory.GetCurrentDirectory() + "/Resources/";
|
||||
static private string AppdataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BOTWM";
|
||||
|
||||
static public Dictionary<string, string>[] getServerList()
|
||||
{
|
||||
//XmlTextReader reader = new XmlTextReader(Directory.GetCurrentDirectory() + "/Resources/serverList.xml");
|
||||
//XmlTextReader reader = new XmlTextReader(Properties.Resources.serverLista);
|
||||
XmlTextReader reader = new XmlTextReader(AppdataFolder + "/serverList.xml");
|
||||
Dictionary<string, string>[] svList = new Dictionary<string, string>[1];
|
||||
Dictionary<string, string> serverRead = new Dictionary<string, string>();
|
||||
Dictionary<string, string> serverReadCopy;
|
||||
//serverRead.Add("Name", "");
|
||||
serverRead.Add("IP", "");
|
||||
serverRead.Add("PORT", "");
|
||||
serverRead.Add("PASSWORD", "");
|
||||
int counter = 0;
|
||||
string next = "";
|
||||
string[] acceptedStrings = { "IP", "PORT", "PASSWORD" };
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
switch (reader.NodeType)
|
||||
{
|
||||
case XmlNodeType.Element:
|
||||
if (acceptedStrings.Contains(reader.Name))
|
||||
{
|
||||
next = reader.Name;
|
||||
}else
|
||||
{
|
||||
next = "";
|
||||
}
|
||||
break;
|
||||
|
||||
case XmlNodeType.Text:
|
||||
if (next != "")
|
||||
{
|
||||
serverRead[next] = reader.Value;
|
||||
if (next == "PORT")
|
||||
{
|
||||
serverReadCopy = new Dictionary<string, string>(serverRead);
|
||||
Array.Resize(ref svList, counter + 1);
|
||||
svList[counter] = serverReadCopy;
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
|
||||
return svList;
|
||||
|
||||
}
|
||||
|
||||
static public Dictionary<string, string>[] getServerList(int a)
|
||||
{
|
||||
|
||||
Dictionary<string, string>[] svList = new Dictionary<string, string>[4];
|
||||
|
||||
return svList;
|
||||
|
||||
}
|
||||
|
||||
static public Dictionary<string, Dictionary<string, string>> readAnimationFile()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> result = new Dictionary<string, Dictionary<string, string>>();
|
||||
XmlTextReader reader = new XmlTextReader(new StringReader(Properties.Resources.animationHashes));
|
||||
Dictionary<string, string> animation = new Dictionary<string, string>();
|
||||
Dictionary<string, string> animationCopy = new Dictionary<string, string>();
|
||||
string[] acceptedStrings = { "Hash", "Schedule", "Animation", "Name"};
|
||||
string next = "";
|
||||
string hash = "";
|
||||
|
||||
animation.Add("Schedule", "");
|
||||
animation.Add("Animation", "");
|
||||
animation.Add("Name", "");
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
switch (reader.NodeType)
|
||||
{
|
||||
case XmlNodeType.Element:
|
||||
if (acceptedStrings.Contains(reader.Name))
|
||||
{
|
||||
next = reader.Name;
|
||||
}
|
||||
break;
|
||||
|
||||
case XmlNodeType.Text:
|
||||
if (next != "")
|
||||
{
|
||||
if(next == "Hash")
|
||||
{
|
||||
hash = reader.Value;
|
||||
}else
|
||||
{
|
||||
animation[next] = reader.Value;
|
||||
if (next == "Animation")
|
||||
{
|
||||
animationCopy = new Dictionary<string, string>(animation);
|
||||
result.Add(hash, animationCopy);
|
||||
next = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static public void addServerToList(Dictionary<string, string>[] currentServerList, string IP, string PORT, string PASSWORD)
|
||||
{
|
||||
using (XmlTextWriter writer = new XmlTextWriter(AppdataFolder + "serverList.xml", Encoding.UTF8))
|
||||
{
|
||||
writer.Formatting = Formatting.Indented;
|
||||
writer.WriteStartDocument();
|
||||
writer.WriteStartElement("serverList");
|
||||
|
||||
foreach(Dictionary<string, string> server in currentServerList)
|
||||
{
|
||||
|
||||
writer.WriteStartElement("server");
|
||||
|
||||
foreach (string key in server.Keys)
|
||||
{
|
||||
|
||||
writer.WriteStartElement(key);
|
||||
|
||||
writer.WriteString(server[key]);
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
|
||||
}
|
||||
|
||||
writer.WriteEndElement();
|
||||
}
|
||||
|
||||
writer.WriteStartElement("server");
|
||||
|
||||
writer.WriteStartElement("IP");
|
||||
|
||||
writer.WriteString(IP);
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("PORT");
|
||||
|
||||
writer.WriteString(PORT);
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteStartElement("PASSWORD");
|
||||
|
||||
writer.WriteString(PASSWORD);
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
writer.WriteEndElement();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static public void copyQuestFlags()
|
||||
{
|
||||
|
||||
//string folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BOTWM";
|
||||
string fileName = "\\QuestFlags.txt";
|
||||
|
||||
if (!Directory.Exists(AppdataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(AppdataFolder);
|
||||
}
|
||||
|
||||
TextWriter tw = new StreamWriter(AppdataFolder + fileName);
|
||||
tw.Write(Properties.Resources.QuestFlags);
|
||||
tw.Close();
|
||||
|
||||
fileName = "\\QuestFlagsNames.txt";
|
||||
|
||||
if (!Directory.Exists(AppdataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(AppdataFolder);
|
||||
}
|
||||
|
||||
tw = new StreamWriter(AppdataFolder + fileName);
|
||||
tw.Write(Properties.Resources.QuestFlagsNames);
|
||||
tw.Close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
static public void copyWeaponDamages()
|
||||
{
|
||||
|
||||
string fileName = "\\WeaponDamages.txt";
|
||||
|
||||
if (!Directory.Exists(AppdataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(AppdataFolder);
|
||||
}
|
||||
|
||||
TextWriter tw = new StreamWriter(AppdataFolder + fileName);
|
||||
tw.Write(Properties.Resources.WeaponDamages);
|
||||
tw.Close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
static public void copyServerList()
|
||||
{
|
||||
|
||||
//string folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BOTWM";
|
||||
string fileName = "\\serverList.xml";
|
||||
|
||||
if (!Directory.Exists(AppdataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(AppdataFolder);
|
||||
}else
|
||||
{
|
||||
if(File.Exists(AppdataFolder + fileName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TextWriter tw = new StreamWriter(AppdataFolder + fileName);
|
||||
tw.Write(Properties.Resources.serverList);
|
||||
tw.Close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
static public void copyArmorMappings()
|
||||
{
|
||||
|
||||
//string folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BOTWM";
|
||||
string fileName = "\\ArmorMapping.txt";
|
||||
|
||||
if (!Directory.Exists(AppdataFolder))
|
||||
{
|
||||
Directory.CreateDirectory(AppdataFolder);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(AppdataFolder + fileName))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TextWriter tw = new StreamWriter(AppdataFolder + fileName);
|
||||
tw.Write(Properties.Resources.ArmorMapping);
|
||||
tw.Close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
74
C#/GUIApp/Connection/NamedPipes.cs
Normal file
74
C#/GUIApp/Connection/NamedPipes.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO.Pipes;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public class NamedPipes
|
||||
{
|
||||
|
||||
private NamedPipeServerStream _server;
|
||||
private Form1 MainWindow;
|
||||
public bool isConnected = false;
|
||||
public bool isConnecting = false;
|
||||
|
||||
public NamedPipes(Form1 sender)
|
||||
{
|
||||
this._server = new NamedPipeServerStream(@"languageConnectionPipe", PipeDirection.InOut, 1, PipeTransmissionMode.Message);
|
||||
MainWindow = sender;
|
||||
}
|
||||
|
||||
public void WaitForConnection()
|
||||
{
|
||||
isConnecting = true;
|
||||
_server.WaitForConnection();
|
||||
isConnected = true;
|
||||
isConnecting = true;
|
||||
Thread.CurrentThread.Join();
|
||||
}
|
||||
|
||||
public bool sendInstruction(string instruction)
|
||||
{
|
||||
|
||||
byte[] buff = Encoding.UTF8.GetBytes(instruction + ";[END]");
|
||||
|
||||
try
|
||||
{
|
||||
_server.Write(buff, 0, buff.Length);
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
if(isConnected)
|
||||
{
|
||||
_server.Disconnect();
|
||||
}
|
||||
isConnected = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public string receiveResponse()
|
||||
{
|
||||
byte[] buff = new byte[1024];
|
||||
|
||||
try
|
||||
{
|
||||
_server.Read(buff, 0, buff.Length);
|
||||
return Encoding.UTF8.GetString(buff);
|
||||
|
||||
}catch
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
769
C#/GUIApp/Connection/Server.cs
Normal file
769
C#/GUIApp/Connection/Server.cs
Normal file
@ -0,0 +1,769 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
|
||||
public class ServerClass
|
||||
{
|
||||
|
||||
public string IP;
|
||||
int PORT;
|
||||
string PASSWORD;
|
||||
bool[] SETTINGS;
|
||||
string SERVERNAME;
|
||||
string enemySyncList;
|
||||
public string NetworkInterfaceName;
|
||||
bool serverOpen = false;
|
||||
int CLEARMINUTES = 5;
|
||||
|
||||
public int SerializationRate { get; set; }
|
||||
public int TargetFPS { get; set; }
|
||||
public int SleepMultiplier { get; set; }
|
||||
public int isLocalTest { get; set; }
|
||||
public int ischaracterSpawn { get; set; }
|
||||
|
||||
Form1 mainWindow;
|
||||
Socket listen;
|
||||
Thread listenThread;
|
||||
Thread EnemyClearThread;
|
||||
List<Thread> clientThreads = new List<Thread>();
|
||||
|
||||
public List<Dictionary<string, object>> serverData = new List<Dictionary<string, object>>();
|
||||
public List<Dictionary<string, object>> extraData = new List<Dictionary<string, object>>();
|
||||
|
||||
public Dictionary<string, int> serverEnemyData = new Dictionary<string, int>();
|
||||
List<Dictionary<string, int>> enemyDataQueue = new List<Dictionary<string, int>>();
|
||||
List<bool> AccessingEnemyData = new List<bool>() { false, false, false, false };
|
||||
List<List<bool>> Updated = new List<List<bool>>();
|
||||
bool ClearingData = false;
|
||||
DateTime lastClear;
|
||||
|
||||
public List<string> serverQuestData = new List<string>();
|
||||
List<List<string>> questDataQueue = new List<List<string>>();
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> animationData = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
public ServerClass(Form1 mW)
|
||||
{
|
||||
|
||||
if(mW != null) this.mainWindow = mW;
|
||||
this.animationData = readXML.readAnimationFile();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
Dictionary<string, object> player = new Dictionary<string, object>();
|
||||
player.Add("Con", false);
|
||||
|
||||
serverData.Add(player);
|
||||
|
||||
Dictionary<string, int> dataQueue = new Dictionary<string, int>();
|
||||
enemyDataQueue.Add(dataQueue);
|
||||
|
||||
List<string> qDataQueue = new List<string>();
|
||||
questDataQueue.Add(qDataQueue);
|
||||
|
||||
Dictionary<string, object> extra = new Dictionary<string, object>();
|
||||
extraData.Add(extra);
|
||||
|
||||
List<bool> updated = new List<bool>() { false, false, false, false };
|
||||
Updated.Add(updated);
|
||||
|
||||
}
|
||||
|
||||
this.SerializationRate = 60;
|
||||
this.TargetFPS = 60;
|
||||
this.SleepMultiplier = 1;
|
||||
this.isLocalTest = 0;
|
||||
this.ischaracterSpawn = 1;
|
||||
|
||||
lastClear = DateTime.Now;
|
||||
|
||||
}
|
||||
|
||||
public bool serverStart(string serverName, string IP, int PORT, string PASSWORD, bool[] SETTINGS, string ESList)
|
||||
{
|
||||
|
||||
this.SERVERNAME = serverName;
|
||||
this.PORT = PORT;
|
||||
this.PASSWORD = PASSWORD;
|
||||
this.SETTINGS = SETTINGS;
|
||||
this.enemySyncList = ESList;
|
||||
Dictionary<string, string> ipAddresses = new Dictionary<string, string>();
|
||||
|
||||
if (IP == "localhost")
|
||||
{
|
||||
|
||||
var host = Dns.GetHostEntry(Dns.GetHostName());
|
||||
|
||||
foreach (NetworkInterface item in NetworkInterface.GetAllNetworkInterfaces())
|
||||
{
|
||||
if (item.OperationalStatus == OperationalStatus.Up)
|
||||
{
|
||||
foreach (UnicastIPAddressInformation ip in item.GetIPProperties().UnicastAddresses)
|
||||
{
|
||||
if (ip.Address.AddressFamily == AddressFamily.InterNetwork && host.AddressList.Contains(ip.Address))
|
||||
{
|
||||
ipAddresses.Add(item.Name.ToString(), ip.Address.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
ipAddresses.Add("custom IP", IP);
|
||||
}
|
||||
|
||||
foreach(var key in ipAddresses.Keys)
|
||||
{
|
||||
try
|
||||
{
|
||||
listen = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||
this.IP = ipAddresses[key].ToString();
|
||||
|
||||
IPEndPoint connect = new IPEndPoint(IPAddress.Parse(this.IP), PORT);
|
||||
listen.Bind(connect);
|
||||
|
||||
this.NetworkInterfaceName = key;
|
||||
|
||||
if(mainWindow != null)
|
||||
{
|
||||
mainWindow.changeServerStatus("Server opened on " + this.NetworkInterfaceName + ".");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Server opened on " + this.NetworkInterfaceName + ".");
|
||||
}
|
||||
serverOpen = true;
|
||||
|
||||
return true;
|
||||
|
||||
}catch
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public void stopServer()
|
||||
{
|
||||
|
||||
serverOpen = false;
|
||||
listen.Close();
|
||||
|
||||
if(listenThread != null)
|
||||
listenThread.Abort();
|
||||
|
||||
foreach(Thread clientThread in clientThreads)
|
||||
{
|
||||
clientThread.Abort();
|
||||
}
|
||||
}
|
||||
|
||||
public void startListen()
|
||||
{
|
||||
listenThread = new Thread(serverListen);
|
||||
listenThread.IsBackground = true;
|
||||
listenThread.Start();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void serverListen()
|
||||
{
|
||||
|
||||
while(true)
|
||||
{
|
||||
Socket connection;
|
||||
|
||||
listen.Listen(4);
|
||||
|
||||
connection = listen.Accept();
|
||||
|
||||
var thread2 = new Thread(() => handleClient(connection));
|
||||
thread2.Start();
|
||||
clientThreads.Add(thread2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void handleClient(Socket connection)
|
||||
{
|
||||
|
||||
int SIZE = 2048;
|
||||
|
||||
byte[] info = new byte[SIZE];
|
||||
string data = "";
|
||||
int array_size = 0;
|
||||
bool clientConnected = true;
|
||||
int playerNumber = 0;
|
||||
|
||||
string temporaryMessage = "";
|
||||
while (serverOpen && clientConnected)
|
||||
{
|
||||
try
|
||||
{
|
||||
array_size = connection.Receive(info, 0, info.Length, 0);
|
||||
|
||||
Array.Resize(ref info, array_size);
|
||||
data = Encoding.UTF8.GetString(info);
|
||||
|
||||
if(data.Length < 18)
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes("FW-01"));
|
||||
continue;
|
||||
}
|
||||
|
||||
int data_size;
|
||||
string command;
|
||||
|
||||
if(!Int32.TryParse(data.Substring(0,5), out data_size))
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes("FW-01"));
|
||||
continue;
|
||||
}else
|
||||
{
|
||||
|
||||
if (data.Length < data_size)
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes("FW-01"));
|
||||
continue;
|
||||
}
|
||||
|
||||
command = data.Substring(5, 11);
|
||||
|
||||
List<string> possibleCommands = new List<string> { "!ping", "!host", "!connect", "!update", "!disconnect" };
|
||||
|
||||
bool correct = false;
|
||||
|
||||
for (int i = 0; i < possibleCommands.Count; i++)
|
||||
{
|
||||
if (command.Contains(possibleCommands[i]))
|
||||
{
|
||||
correct = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!correct)
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes("FW-01"));
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Dictionary<string, object> playerExtraData = new Dictionary<string, object>();
|
||||
|
||||
//playerExtraData.Add("Animation", animationName);
|
||||
//playerExtraData.Add("Hash", animationHash);
|
||||
playerExtraData.Add("Message", data);
|
||||
|
||||
|
||||
string message;
|
||||
|
||||
try
|
||||
{
|
||||
message = data.Substring(17, data_size);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
connection.Send(Encoding.UTF8.GetBytes("FW-01"));
|
||||
continue;
|
||||
}
|
||||
|
||||
temporaryMessage = message;
|
||||
|
||||
if (command.Contains("!ping"))
|
||||
{
|
||||
|
||||
connection.Send(Encoding.UTF8.GetBytes(SERVERNAME + ";" + mainWindow.serverInterfaceForm.serverDescription));
|
||||
connection.Close();
|
||||
clientConnected = false;
|
||||
|
||||
}else if(command.Contains("!host"))
|
||||
{
|
||||
playerNumber = 0;
|
||||
connection.Send(Encoding.UTF8.GetBytes("Connection successful"));
|
||||
}
|
||||
else if (command.Contains("!connect"))
|
||||
{
|
||||
int counter = 0;
|
||||
foreach (Dictionary<string, object> item in serverData)
|
||||
{
|
||||
if (!(bool)item["Con"])
|
||||
{
|
||||
playerNumber = counter;
|
||||
break;
|
||||
}
|
||||
counter++;
|
||||
}
|
||||
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
|
||||
if (playerNumber == -1)
|
||||
{
|
||||
sendData["Response"] = 2;
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(sendData)));
|
||||
connection.Close();
|
||||
clientConnected = false;
|
||||
break;
|
||||
}
|
||||
|
||||
string[] splittedMessage = message.Split(';');
|
||||
|
||||
if(splittedMessage[1] == this.PASSWORD || this.PASSWORD == "")
|
||||
{
|
||||
serverData[playerNumber]["Name"] = splittedMessage[0];
|
||||
//serverData[playerNumber]["Con"] = true;
|
||||
}else
|
||||
{
|
||||
sendData["Response"] = 3;
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(sendData)));
|
||||
connection.Close();
|
||||
clientConnected = false;
|
||||
break;
|
||||
}
|
||||
|
||||
int enemySync = SETTINGS[0] ? 1 : 0;
|
||||
int glyphSync = SETTINGS[1] ? 1 : 0;
|
||||
|
||||
sendData["Response"] = 1;
|
||||
sendData["playerNumber"] = playerNumber;
|
||||
sendData["isEnemySync"] = SETTINGS[0];
|
||||
sendData["isGlyphSync"] = SETTINGS[1];
|
||||
sendData["isQuestSync"] = SETTINGS[2];
|
||||
sendData["enemySyncList"] = enemySyncList;
|
||||
sendData["serverName"] = SERVERNAME;
|
||||
|
||||
foreach(KeyValuePair<string, int> kvp in serverEnemyData)
|
||||
{
|
||||
|
||||
enemyDataQueue[playerNumber].Add(kvp.Key, kvp.Value);
|
||||
|
||||
}
|
||||
|
||||
foreach(string item in serverQuestData)
|
||||
{
|
||||
|
||||
questDataQueue[playerNumber].Add(item);
|
||||
|
||||
}
|
||||
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(sendData)));
|
||||
|
||||
}
|
||||
else if (command.Contains("!update"))
|
||||
{
|
||||
|
||||
Dictionary<string, object> playerData = new Dictionary<string, object>();
|
||||
playerData.Add("Con", true);
|
||||
playerData.Add("Name", serverData[playerNumber]["Name"]);
|
||||
|
||||
if(message.Contains("Initial connection"))
|
||||
{
|
||||
serverData[playerNumber] = playerData;
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonSerializer.Serialize("Added to server")));
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
Dictionary<string, JsonElement> svDict = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(message);
|
||||
|
||||
// Player data
|
||||
|
||||
Dictionary<string, JsonElement> playerDataDict = svDict["PD"].Deserialize<Dictionary<string, JsonElement>>();
|
||||
|
||||
string animationName = "";
|
||||
string animationHash = "";
|
||||
|
||||
foreach(KeyValuePair<string, JsonElement> pair in playerDataDict)
|
||||
{
|
||||
if(pair.Key == "A")
|
||||
{
|
||||
|
||||
int[] animData = readAnimation(pair.Value.GetInt32());
|
||||
playerData.Add("Schd", animData[0]);
|
||||
playerData.Add("Anim", animData[1]);
|
||||
|
||||
if (animationData.ContainsKey(pair.Value.GetInt32().ToString()))
|
||||
{
|
||||
animationName = animationData[pair.Value.GetInt32().ToString()]["Name"];
|
||||
animationHash = pair.Value.GetInt32().ToString();
|
||||
playerExtraData.Add("animationName", animationName);
|
||||
playerExtraData.Add("animationHash", animationHash);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (pair.Value.ValueKind == JsonValueKind.Object)
|
||||
{
|
||||
|
||||
if(pair.Key != "E")
|
||||
{
|
||||
|
||||
playerData.Add(pair.Key, playerDataReadMap(playerDataDict[pair.Key].Deserialize<Dictionary<string, JsonElement>>()));
|
||||
|
||||
}else
|
||||
{
|
||||
|
||||
playerData.Add(pair.Key, playerDataReadEq(playerDataDict[pair.Key].Deserialize<Dictionary<string, JsonElement>>(), playerNumber));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (pair.Value.ValueKind == JsonValueKind.Number)
|
||||
{
|
||||
|
||||
float value = (float)Math.Round(pair.Value.GetDouble(), 4);
|
||||
|
||||
if (value % 1 == 0)
|
||||
{
|
||||
|
||||
playerData.Add(pair.Key, Convert.ToInt32(value));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
playerData.Add(pair.Key, value);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
playerData.Add(pair.Key, pair.Value.GetString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
serverData[playerNumber] = playerData;
|
||||
|
||||
// Enemy data
|
||||
|
||||
if (playerNumber == 0)
|
||||
{
|
||||
|
||||
double currentTime = DateTime.Now.Subtract(lastClear).TotalMinutes;
|
||||
|
||||
if (DateTime.Now.Subtract(lastClear).TotalMinutes > CLEARMINUTES)
|
||||
{
|
||||
|
||||
ClearingData = true;
|
||||
|
||||
while (AccessingEnemyData[0] || AccessingEnemyData[1] || AccessingEnemyData[2] || AccessingEnemyData[3]) { }
|
||||
|
||||
serverEnemyData.Clear();
|
||||
|
||||
ClearingData = false;
|
||||
|
||||
lastClear = DateTime.Now;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!ClearingData)
|
||||
{
|
||||
|
||||
AccessingEnemyData[playerNumber] = true;
|
||||
|
||||
Dictionary<string, JsonElement> enemyData = svDict["ED"].Deserialize<Dictionary<string, JsonElement>>()["H"].Deserialize<Dictionary<string, JsonElement>>();
|
||||
|
||||
foreach (KeyValuePair<string, JsonElement> kvp in enemyData)
|
||||
{
|
||||
|
||||
if (serverEnemyData.ContainsKey(kvp.Key))
|
||||
{
|
||||
|
||||
if (serverEnemyData[kvp.Key] > kvp.Value.GetInt32())
|
||||
{
|
||||
|
||||
serverEnemyData[kvp.Key] = kvp.Value.GetInt32();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
if ((bool)serverData[i]["Con"])
|
||||
{
|
||||
|
||||
if (enemyDataQueue[i].ContainsKey(kvp.Key))
|
||||
{
|
||||
enemyDataQueue[i][kvp.Key] = kvp.Value.GetInt32();
|
||||
}
|
||||
else
|
||||
{
|
||||
enemyDataQueue[i].Add(kvp.Key, kvp.Value.GetInt32());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
serverEnemyData[kvp.Key] = kvp.Value.GetInt32();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
if ((bool)serverData[i]["Con"])
|
||||
{
|
||||
|
||||
enemyDataQueue[i].Add(kvp.Key, kvp.Value.GetInt32());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AccessingEnemyData[playerNumber] = false;
|
||||
|
||||
}
|
||||
|
||||
// Quest data
|
||||
|
||||
JsonElement quests = svDict["QD"].Deserialize<Dictionary<string, JsonElement>>()["C"];
|
||||
|
||||
for(int i = 0; i < quests.GetArrayLength(); i++)
|
||||
{
|
||||
|
||||
if(!serverQuestData.Contains(quests[i].GetString()))
|
||||
{
|
||||
|
||||
serverQuestData.Add(quests[i].GetString());
|
||||
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
|
||||
if((bool)serverData[j]["Con"])
|
||||
{
|
||||
|
||||
questDataQueue[j].Add(quests[i].GetString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<string> playerQuestQueue = new List<string>();
|
||||
|
||||
for(int i = 0; i < 100; i++)
|
||||
{
|
||||
|
||||
if(questDataQueue[playerNumber].Count > 0)
|
||||
{
|
||||
|
||||
playerQuestQueue.Add(questDataQueue[playerNumber][0]);
|
||||
questDataQueue[playerNumber].RemoveAt(0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
Updated[i][playerNumber] = true;
|
||||
|
||||
}
|
||||
|
||||
Dictionary<string, object> sendData = new Dictionary<string, object>();
|
||||
|
||||
//serverDataAnim = new List<Dictionary<string, object>>(serverData);
|
||||
//serverDataAnim[playerNumber]["Animation"] = animationName;
|
||||
//serverDataAnim[playerNumber]["Hash"] = animationHash;
|
||||
|
||||
Dictionary<string, int> NetworkData = new Dictionary<string, int>();
|
||||
List<int> UpdatedData = new List<int>();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
UpdatedData.Add(Updated[playerNumber][i] ? 1 : 0);
|
||||
Updated[playerNumber][i] = false;
|
||||
|
||||
}
|
||||
|
||||
NetworkData["SR"] = this.SerializationRate;
|
||||
NetworkData["TFPS"] = this.TargetFPS;
|
||||
NetworkData["SM"] = this.SleepMultiplier;
|
||||
NetworkData["LT"] = this.isLocalTest;
|
||||
NetworkData["CS"] = this.ischaracterSpawn;
|
||||
|
||||
extraData[playerNumber] = playerExtraData;
|
||||
|
||||
sendData.Add("PD", serverData);
|
||||
sendData.Add("ED", enemyDataQueue[playerNumber]);
|
||||
sendData.Add("QD", playerQuestQueue);
|
||||
sendData.Add("ND", NetworkData);
|
||||
sendData.Add("UD", UpdatedData);
|
||||
|
||||
connection.Send(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(sendData)));
|
||||
|
||||
enemyDataQueue[playerNumber].Clear();
|
||||
|
||||
}
|
||||
else if(command.Contains("!disconnect"))
|
||||
{
|
||||
connection.Close();
|
||||
clientConnected = false;
|
||||
serverData[playerNumber]["Con"] = false;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if(mainWindow != null)
|
||||
{
|
||||
mainWindow.serverInterfaceForm.AppendLog(e.ToString(), Color.Black);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
connection.Close();
|
||||
clientConnected = false;
|
||||
serverData[playerNumber]["Name"] = "";
|
||||
serverData[playerNumber]["Con"] = false;
|
||||
enemyDataQueue[playerNumber].Clear();
|
||||
questDataQueue[playerNumber].Clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Thread.CurrentThread.Join();
|
||||
|
||||
}
|
||||
|
||||
private List<object> playerDataReadMap(Dictionary<string, JsonElement> data)
|
||||
{
|
||||
|
||||
//object[] result = new object[3];
|
||||
List<object> result = new List<object>();
|
||||
|
||||
foreach(KeyValuePair<string, JsonElement> kvp in data)
|
||||
{
|
||||
|
||||
if (kvp.Value.ValueKind == JsonValueKind.Number)
|
||||
{
|
||||
|
||||
float value = (float)Math.Round(kvp.Value.GetDouble(), 4);
|
||||
|
||||
if (value % 1 == 0)
|
||||
{
|
||||
result.Add(Convert.ToInt32(value));
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Add(value);
|
||||
}
|
||||
|
||||
}
|
||||
else if (kvp.Value.ValueKind == JsonValueKind.String)
|
||||
{
|
||||
result.Add(kvp.Value.GetString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private Dictionary<string, string> playerDataReadEq(Dictionary<string, JsonElement> data, int playerNumber)
|
||||
{
|
||||
|
||||
//object[] result = new object[3];
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
int i = 0;
|
||||
|
||||
foreach (KeyValuePair<string, JsonElement> kvp in data)
|
||||
{
|
||||
|
||||
//if (kvp.Value.ValueKind == JsonValueKind.Number)
|
||||
//{
|
||||
|
||||
// float value = (float)Math.Round(kvp.Value.GetDouble(), 4);
|
||||
|
||||
// if (value % 1 == 0)
|
||||
// {
|
||||
// result.Add(Convert.ToInt32(value));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// result.Add(value);
|
||||
// }
|
||||
|
||||
//}
|
||||
//else if (kvp.Value.ValueKind == JsonValueKind.String)
|
||||
//{
|
||||
// result.Add(kvp.Value.GetString());
|
||||
//}
|
||||
|
||||
if(kvp.Value.ToString() != ".")
|
||||
{
|
||||
result[kvp.Key] = kvp.Value.ToString();
|
||||
}else
|
||||
{
|
||||
Dictionary<string, string> serverEqData = (Dictionary<string, string>)serverData[playerNumber]["E"];
|
||||
result[kvp.Key] = serverEqData[kvp.Key];
|
||||
}
|
||||
|
||||
//i++;
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
private int[] readAnimation(int animationHash)
|
||||
{
|
||||
|
||||
string animationHashMsg = animationHash.ToString();
|
||||
|
||||
int[] result = { 0, 0 };
|
||||
|
||||
if (animationData.ContainsKey(animationHashMsg))
|
||||
{
|
||||
result[0] = Convert.ToInt32(animationData[animationHashMsg]["Schedule"]);
|
||||
result[1] = Convert.ToInt32(animationData[animationHashMsg]["Animation"]);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
12
C#/GUIApp/DiscordGameSDK/ActivityManager.cs
Normal file
12
C#/GUIApp/DiscordGameSDK/ActivityManager.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public partial class ActivityManager
|
||||
{
|
||||
public void RegisterCommand()
|
||||
{
|
||||
RegisterCommand(null);
|
||||
}
|
||||
}
|
||||
}
|
9
C#/GUIApp/DiscordGameSDK/Constants.cs
Normal file
9
C#/GUIApp/DiscordGameSDK/Constants.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
static class Constants
|
||||
{
|
||||
public const string DllName = "libs/discord_game_sdk";
|
||||
}
|
||||
}
|
4199
C#/GUIApp/DiscordGameSDK/Core.cs
Normal file
4199
C#/GUIApp/DiscordGameSDK/Core.cs
Normal file
File diff suppressed because it is too large
Load Diff
53
C#/GUIApp/DiscordGameSDK/ImageManager.cs
Normal file
53
C#/GUIApp/DiscordGameSDK/ImageManager.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public partial struct ImageHandle
|
||||
{
|
||||
static public ImageHandle User(Int64 id)
|
||||
{
|
||||
return User(id, 128);
|
||||
}
|
||||
|
||||
static public ImageHandle User(Int64 id, UInt32 size)
|
||||
{
|
||||
return new ImageHandle
|
||||
{
|
||||
Type = ImageType.User,
|
||||
Id = id,
|
||||
Size = size,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ImageManager
|
||||
{
|
||||
public void Fetch(ImageHandle handle, FetchHandler callback)
|
||||
{
|
||||
Fetch(handle, false, callback);
|
||||
}
|
||||
|
||||
public byte[] GetData(ImageHandle handle)
|
||||
{
|
||||
var dimensions = GetDimensions(handle);
|
||||
var data = new byte[dimensions.Width * dimensions.Height * 4];
|
||||
GetData(handle, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
public Texture2D GetTexture(ImageHandle handle)
|
||||
{
|
||||
var dimensions = GetDimensions(handle);
|
||||
var texture = new Texture2D((int)dimensions.Width, (int)dimensions.Height, TextureFormat.RGBA32, false, true);
|
||||
texture.LoadRawTextureData(GetData(handle));
|
||||
texture.Apply();
|
||||
return texture;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
26
C#/GUIApp/DiscordGameSDK/LobbyManager.cs
Normal file
26
C#/GUIApp/DiscordGameSDK/LobbyManager.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public partial class LobbyManager
|
||||
{
|
||||
public IEnumerable<User> GetMemberUsers(Int64 lobbyID)
|
||||
{
|
||||
var memberCount = MemberCount(lobbyID);
|
||||
var members = new List<User>();
|
||||
for (var i = 0; i < memberCount; i++)
|
||||
{
|
||||
members.Add(GetMemberUser(lobbyID, GetMemberUserId(lobbyID, i)));
|
||||
}
|
||||
return members;
|
||||
}
|
||||
|
||||
public void SendLobbyMessage(Int64 lobbyID, string data, SendLobbyMessageHandler handler)
|
||||
{
|
||||
SendLobbyMessage(lobbyID, Encoding.UTF8.GetBytes(data), handler);
|
||||
}
|
||||
}
|
||||
}
|
20
C#/GUIApp/DiscordGameSDK/StorageManager.cs
Normal file
20
C#/GUIApp/DiscordGameSDK/StorageManager.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public partial class StorageManager
|
||||
{
|
||||
public IEnumerable<FileStat> Files()
|
||||
{
|
||||
var fileCount = Count();
|
||||
var files = new List<FileStat>();
|
||||
for (var i = 0; i < fileCount; i++)
|
||||
{
|
||||
files.Add(StatAt(i));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
}
|
||||
}
|
32
C#/GUIApp/DiscordGameSDK/StoreManager.cs
Normal file
32
C#/GUIApp/DiscordGameSDK/StoreManager.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public partial class StoreManager
|
||||
{
|
||||
public IEnumerable<Entitlement> GetEntitlements()
|
||||
{
|
||||
var count = CountEntitlements();
|
||||
var entitlements = new List<Entitlement>();
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
entitlements.Add(GetEntitlementAt(i));
|
||||
}
|
||||
return entitlements;
|
||||
}
|
||||
|
||||
public IEnumerable<Sku> GetSkus()
|
||||
{
|
||||
var count = CountSkus();
|
||||
var skus = new List<Sku>();
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
skus.Add(GetSkuAt(i));
|
||||
}
|
||||
return skus;
|
||||
}
|
||||
}
|
||||
}
|
249
C#/GUIApp/Forms/DebugWindow.Designer.cs
generated
Normal file
249
C#/GUIApp/Forms/DebugWindow.Designer.cs
generated
Normal file
@ -0,0 +1,249 @@
|
||||
namespace GUIApp.Forms
|
||||
{
|
||||
partial class DebugWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.TreeNode treeNode13 = new System.Windows.Forms.TreeNode("Player 1");
|
||||
System.Windows.Forms.TreeNode treeNode14 = new System.Windows.Forms.TreeNode("Player 2");
|
||||
System.Windows.Forms.TreeNode treeNode15 = new System.Windows.Forms.TreeNode("Player 3");
|
||||
System.Windows.Forms.TreeNode treeNode16 = new System.Windows.Forms.TreeNode("Player 4");
|
||||
System.Windows.Forms.TreeNode treeNode17 = new System.Windows.Forms.TreeNode("Player data", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode13,
|
||||
treeNode14,
|
||||
treeNode15,
|
||||
treeNode16});
|
||||
System.Windows.Forms.TreeNode treeNode18 = new System.Windows.Forms.TreeNode("Enemy data");
|
||||
System.Windows.Forms.TreeNode treeNode19 = new System.Windows.Forms.TreeNode("Quest data");
|
||||
System.Windows.Forms.TreeNode treeNode20 = new System.Windows.Forms.TreeNode("Player 1");
|
||||
System.Windows.Forms.TreeNode treeNode21 = new System.Windows.Forms.TreeNode("Player 2");
|
||||
System.Windows.Forms.TreeNode treeNode22 = new System.Windows.Forms.TreeNode("Player 3");
|
||||
System.Windows.Forms.TreeNode treeNode23 = new System.Windows.Forms.TreeNode("Player 4");
|
||||
System.Windows.Forms.TreeNode treeNode24 = new System.Windows.Forms.TreeNode("Extra data", new System.Windows.Forms.TreeNode[] {
|
||||
treeNode20,
|
||||
treeNode21,
|
||||
treeNode22,
|
||||
treeNode23});
|
||||
this.treeView1 = new System.Windows.Forms.TreeView();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.Update = new System.Windows.Forms.Button();
|
||||
this.SRTextbox = new System.Windows.Forms.TextBox();
|
||||
this.FPSTextbox = new System.Windows.Forms.TextBox();
|
||||
this.SMTextbox = new System.Windows.Forms.TextBox();
|
||||
this.islocalCB = new System.Windows.Forms.CheckBox();
|
||||
this.isSpawnActorsCB = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// treeView1
|
||||
//
|
||||
this.treeView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.treeView1.Location = new System.Drawing.Point(0, 0);
|
||||
this.treeView1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.treeView1.Name = "treeView1";
|
||||
treeNode13.Name = "player1";
|
||||
treeNode13.Text = "Player 1";
|
||||
treeNode14.Name = "player2";
|
||||
treeNode14.Text = "Player 2";
|
||||
treeNode15.Name = "player3";
|
||||
treeNode15.Text = "Player 3";
|
||||
treeNode16.Name = "player4";
|
||||
treeNode16.Text = "Player 4";
|
||||
treeNode17.Name = "playerData";
|
||||
treeNode17.Text = "Player data";
|
||||
treeNode18.Name = "enemyData";
|
||||
treeNode18.Text = "Enemy data";
|
||||
treeNode19.Name = "questData";
|
||||
treeNode19.Text = "Quest data";
|
||||
treeNode20.Name = "player1";
|
||||
treeNode20.Text = "Player 1";
|
||||
treeNode21.Name = "player2";
|
||||
treeNode21.Text = "Player 2";
|
||||
treeNode22.Name = "player3";
|
||||
treeNode22.Text = "Player 3";
|
||||
treeNode23.Name = "player4";
|
||||
treeNode23.Text = "Player 4";
|
||||
treeNode24.Name = "extraData";
|
||||
treeNode24.Text = "Extra data";
|
||||
this.treeView1.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||
treeNode17,
|
||||
treeNode18,
|
||||
treeNode19,
|
||||
treeNode24});
|
||||
this.treeView1.Size = new System.Drawing.Size(583, 708);
|
||||
this.treeView1.TabIndex = 0;
|
||||
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 5000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(7, 729);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(192, 29);
|
||||
this.label1.TabIndex = 3;
|
||||
this.label1.Text = "Serialization rate";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(219, 729);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(137, 29);
|
||||
this.label2.TabIndex = 4;
|
||||
this.label2.Text = "Target FPS";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(383, 729);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(182, 29);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Sleep Multiplier";
|
||||
//
|
||||
// Update
|
||||
//
|
||||
this.Update.Font = new System.Drawing.Font("Curlz MT", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Update.Location = new System.Drawing.Point(405, 811);
|
||||
this.Update.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Update.Name = "Update";
|
||||
this.Update.Size = new System.Drawing.Size(123, 47);
|
||||
this.Update.TabIndex = 1;
|
||||
this.Update.Text = "Update";
|
||||
this.Update.UseVisualStyleBackColor = true;
|
||||
this.Update.Click += new System.EventHandler(this.Update_Click);
|
||||
//
|
||||
// SRTextbox
|
||||
//
|
||||
this.SRTextbox.BackColor = System.Drawing.Color.RosyBrown;
|
||||
this.SRTextbox.Font = new System.Drawing.Font("Century Schoolbook", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SRTextbox.Location = new System.Drawing.Point(12, 761);
|
||||
this.SRTextbox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.SRTextbox.Name = "SRTextbox";
|
||||
this.SRTextbox.Size = new System.Drawing.Size(187, 35);
|
||||
this.SRTextbox.TabIndex = 2;
|
||||
this.SRTextbox.Text = "60";
|
||||
this.SRTextbox.TextChanged += new System.EventHandler(this.SRTextbox_TextChanged);
|
||||
//
|
||||
// FPSTextbox
|
||||
//
|
||||
this.FPSTextbox.BackColor = System.Drawing.SystemColors.Info;
|
||||
this.FPSTextbox.Font = new System.Drawing.Font("Century Schoolbook", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FPSTextbox.Location = new System.Drawing.Point(224, 761);
|
||||
this.FPSTextbox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.FPSTextbox.Name = "FPSTextbox";
|
||||
this.FPSTextbox.Size = new System.Drawing.Size(132, 35);
|
||||
this.FPSTextbox.TabIndex = 6;
|
||||
this.FPSTextbox.Text = "60";
|
||||
//
|
||||
// SMTextbox
|
||||
//
|
||||
this.SMTextbox.BackColor = System.Drawing.SystemColors.Highlight;
|
||||
this.SMTextbox.Font = new System.Drawing.Font("Century Schoolbook", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SMTextbox.Location = new System.Drawing.Point(388, 761);
|
||||
this.SMTextbox.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.SMTextbox.Name = "SMTextbox";
|
||||
this.SMTextbox.Size = new System.Drawing.Size(177, 35);
|
||||
this.SMTextbox.TabIndex = 7;
|
||||
this.SMTextbox.Text = "1";
|
||||
//
|
||||
// islocalCB
|
||||
//
|
||||
this.islocalCB.AutoSize = true;
|
||||
this.islocalCB.Font = new System.Drawing.Font("Microsoft Sans Serif", 4.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.islocalCB.Location = new System.Drawing.Point(36, 826);
|
||||
this.islocalCB.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.islocalCB.Name = "islocalCB";
|
||||
this.islocalCB.Size = new System.Drawing.Size(65, 17);
|
||||
this.islocalCB.TabIndex = 8;
|
||||
this.islocalCB.Text = "Is local test";
|
||||
this.islocalCB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// isSpawnActorsCB
|
||||
//
|
||||
this.isSpawnActorsCB.AutoSize = true;
|
||||
this.isSpawnActorsCB.Checked = true;
|
||||
this.isSpawnActorsCB.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.isSpawnActorsCB.Font = new System.Drawing.Font("Microsoft Sans Serif", 22.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.isSpawnActorsCB.Location = new System.Drawing.Point(107, 811);
|
||||
this.isSpawnActorsCB.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.isSpawnActorsCB.Name = "isSpawnActorsCB";
|
||||
this.isSpawnActorsCB.Size = new System.Drawing.Size(261, 46);
|
||||
this.isSpawnActorsCB.TabIndex = 9;
|
||||
this.isSpawnActorsCB.Text = "spawn actors";
|
||||
this.isSpawnActorsCB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DebugWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ActiveBorder;
|
||||
this.ClientSize = new System.Drawing.Size(583, 870);
|
||||
this.Controls.Add(this.isSpawnActorsCB);
|
||||
this.Controls.Add(this.islocalCB);
|
||||
this.Controls.Add(this.SMTextbox);
|
||||
this.Controls.Add(this.FPSTextbox);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.SRTextbox);
|
||||
this.Controls.Add(this.Update);
|
||||
this.Controls.Add(this.treeView1);
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "DebugWindow";
|
||||
this.Text = "DebugWindow";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public System.Windows.Forms.TreeView treeView1;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button Update;
|
||||
private System.Windows.Forms.TextBox SRTextbox;
|
||||
private System.Windows.Forms.TextBox FPSTextbox;
|
||||
private System.Windows.Forms.TextBox SMTextbox;
|
||||
private System.Windows.Forms.CheckBox islocalCB;
|
||||
private System.Windows.Forms.CheckBox isSpawnActorsCB;
|
||||
}
|
||||
}
|
165
C#/GUIApp/Forms/DebugWindow.cs
Normal file
165
C#/GUIApp/Forms/DebugWindow.cs
Normal file
@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp.Forms
|
||||
{
|
||||
public partial class DebugWindow : Form
|
||||
{
|
||||
|
||||
Form1 mainWindow;
|
||||
|
||||
public DebugWindow(Form1 mW)
|
||||
{
|
||||
InitializeComponent();
|
||||
//timer1.Enabled = true;
|
||||
this.mainWindow = mW;
|
||||
}
|
||||
|
||||
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
UpdateData();
|
||||
|
||||
}
|
||||
|
||||
private void UpdateData()
|
||||
{
|
||||
List<Dictionary<string, object>> playerData = new List<Dictionary<string, object>>(mainWindow.Server.serverData);
|
||||
Dictionary<string, int> enemyData = new Dictionary<string, int>(mainWindow.Server.serverEnemyData);
|
||||
List<string> questData = new List<string>(mainWindow.Server.serverQuestData);
|
||||
List<Dictionary<string, object>> extraData = new List<Dictionary<string, object>>(mainWindow.Server.extraData);
|
||||
|
||||
for (int i = 1; i < 5; i++)
|
||||
{
|
||||
|
||||
foreach (KeyValuePair<string, object> kvp in playerData[i - 1])
|
||||
{
|
||||
|
||||
if (!treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes.ContainsKey(kvp.Key))
|
||||
{
|
||||
|
||||
if (kvp.Value.GetType().ToString() != "System.Collections.Generic.List`1[System.Object]")
|
||||
{
|
||||
|
||||
treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes.Add(kvp.Key, kvp.Key + ": " + kvp.Value.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes.Add(kvp.Key, kvp.Key);
|
||||
|
||||
List<object> value = (List<object>)kvp.Value;
|
||||
for (int j = 0; j < value.Count(); j++)
|
||||
{
|
||||
|
||||
treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes[kvp.Key].Nodes.Add(j.ToString(), value[j].ToString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (kvp.Value.GetType().ToString() != "System.Collections.Generic.List`1[System.Object]")
|
||||
{
|
||||
|
||||
treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes[kvp.Key].Text = kvp.Key + ": " + kvp.Value.ToString();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
List<object> value = (List<object>)kvp.Value;
|
||||
for (int j = 0; j < value.Count(); j++)
|
||||
{
|
||||
|
||||
treeView1.Nodes["playerData"].Nodes["player" + i.ToString()].Nodes[kvp.Key].Nodes[j.ToString()].Text = value[j].ToString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, object> kvp in extraData[i - 1])
|
||||
{
|
||||
|
||||
if (!treeView1.Nodes["extraData"].Nodes["player" + i.ToString()].Nodes.ContainsKey(kvp.Key))
|
||||
{
|
||||
|
||||
treeView1.Nodes["extraData"].Nodes["player" + i.ToString()].Nodes.Add(kvp.Key, kvp.Key + ": " + kvp.Value.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
treeView1.Nodes["extraData"].Nodes["player" + i.ToString()].Nodes[kvp.Key].Text = kvp.Key + ": " + kvp.Value.ToString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (KeyValuePair<string, int> kvp in enemyData)
|
||||
{
|
||||
|
||||
if (!treeView1.Nodes["enemyData"].Nodes.ContainsKey(kvp.Key))
|
||||
{
|
||||
|
||||
treeView1.Nodes["enemyData"].Nodes.Add(kvp.Key, kvp.Key + ": " + kvp.Value.ToString());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
treeView1.Nodes["enemyData"].Nodes[kvp.Key].Text = kvp.Key + ": " + kvp.Value.ToString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < questData.Count; i++)
|
||||
{
|
||||
|
||||
if (!treeView1.Nodes["questData"].Nodes.ContainsKey(questData[i]))
|
||||
{
|
||||
|
||||
treeView1.Nodes["questData"].Nodes.Add(questData[i], questData[i]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void Update_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
mainWindow.Server.SerializationRate = Int32.Parse(SRTextbox.Text);
|
||||
mainWindow.Server.TargetFPS = Int32.Parse(FPSTextbox.Text);
|
||||
mainWindow.Server.SleepMultiplier = Int32.Parse(SMTextbox.Text);
|
||||
mainWindow.Server.isLocalTest = islocalCB.Checked ? 1 : 0;
|
||||
mainWindow.Server.ischaracterSpawn = isSpawnActorsCB.Checked ? 1 : 0;
|
||||
UpdateData();
|
||||
|
||||
}
|
||||
|
||||
private void SRTextbox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
126
C#/GUIApp/Forms/DebugWindow.resx
Normal file
126
C#/GUIApp/Forms/DebugWindow.resx
Normal file
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>21, 18</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
282
C#/GUIApp/Forms/Form1.Designer.cs
generated
Normal file
282
C#/GUIApp/Forms/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,282 @@
|
||||
namespace GUIApp
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.settingsPanel = new System.Windows.Forms.Panel();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.titleBarPanel = new System.Windows.Forms.Panel();
|
||||
this.debugButton = new System.Windows.Forms.Button();
|
||||
this.minimizeButton = new System.Windows.Forms.Button();
|
||||
this.maximizeButton = new System.Windows.Forms.Button();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
this.settingsPanelStateButton = new System.Windows.Forms.Button();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.mainPanel = new System.Windows.Forms.Panel();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.serverStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.hookedToCemuLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.timer2 = new System.Windows.Forms.Timer(this.components);
|
||||
this.settingsPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.titleBarPanel.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// settingsPanel
|
||||
//
|
||||
this.settingsPanel.BackColor = System.Drawing.SystemColors.ActiveCaption;
|
||||
this.settingsPanel.Controls.Add(this.pictureBox2);
|
||||
this.settingsPanel.Controls.Add(this.pictureBox1);
|
||||
this.settingsPanel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.settingsPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.settingsPanel.Margin = new System.Windows.Forms.Padding(5);
|
||||
this.settingsPanel.Name = "settingsPanel";
|
||||
this.settingsPanel.Size = new System.Drawing.Size(250, 784);
|
||||
this.settingsPanel.TabIndex = 0;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
|
||||
this.pictureBox2.Location = new System.Drawing.Point(5, 96);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(240, 70);
|
||||
this.pictureBox2.TabIndex = 3;
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(5, 14);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(240, 70);
|
||||
this.pictureBox1.TabIndex = 2;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// titleBarPanel
|
||||
//
|
||||
this.titleBarPanel.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||
this.titleBarPanel.Controls.Add(this.debugButton);
|
||||
this.titleBarPanel.Controls.Add(this.minimizeButton);
|
||||
this.titleBarPanel.Controls.Add(this.maximizeButton);
|
||||
this.titleBarPanel.Controls.Add(this.closeButton);
|
||||
this.titleBarPanel.Controls.Add(this.settingsPanelStateButton);
|
||||
this.titleBarPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.titleBarPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.titleBarPanel.Name = "titleBarPanel";
|
||||
this.titleBarPanel.Size = new System.Drawing.Size(1190, 34);
|
||||
this.titleBarPanel.TabIndex = 0;
|
||||
this.titleBarPanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.titleBarPanel_MouseDown);
|
||||
//
|
||||
// debugButton
|
||||
//
|
||||
this.debugButton.Location = new System.Drawing.Point(56, 7);
|
||||
this.debugButton.Name = "debugButton";
|
||||
this.debugButton.Size = new System.Drawing.Size(84, 23);
|
||||
this.debugButton.TabIndex = 4;
|
||||
this.debugButton.Text = "Debug";
|
||||
this.debugButton.UseVisualStyleBackColor = true;
|
||||
this.debugButton.Visible = false;
|
||||
this.debugButton.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// minimizeButton
|
||||
//
|
||||
this.minimizeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.minimizeButton.Location = new System.Drawing.Point(1070, 6);
|
||||
this.minimizeButton.Name = "minimizeButton";
|
||||
this.minimizeButton.Size = new System.Drawing.Size(32, 23);
|
||||
this.minimizeButton.TabIndex = 3;
|
||||
this.minimizeButton.Text = "-";
|
||||
this.minimizeButton.UseVisualStyleBackColor = true;
|
||||
this.minimizeButton.Click += new System.EventHandler(this.minimizeButton_Click);
|
||||
//
|
||||
// maximizeButton
|
||||
//
|
||||
this.maximizeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.maximizeButton.Location = new System.Drawing.Point(1107, 6);
|
||||
this.maximizeButton.Name = "maximizeButton";
|
||||
this.maximizeButton.Size = new System.Drawing.Size(32, 23);
|
||||
this.maximizeButton.TabIndex = 2;
|
||||
this.maximizeButton.Text = "▢";
|
||||
this.maximizeButton.UseVisualStyleBackColor = true;
|
||||
this.maximizeButton.Click += new System.EventHandler(this.maximizeButton_Click);
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.closeButton.Location = new System.Drawing.Point(1146, 6);
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.Size = new System.Drawing.Size(32, 23);
|
||||
this.closeButton.TabIndex = 1;
|
||||
this.closeButton.Text = "X";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// settingsPanelStateButton
|
||||
//
|
||||
this.settingsPanelStateButton.Location = new System.Drawing.Point(8, 5);
|
||||
this.settingsPanelStateButton.Name = "settingsPanelStateButton";
|
||||
this.settingsPanelStateButton.Size = new System.Drawing.Size(42, 25);
|
||||
this.settingsPanelStateButton.TabIndex = 0;
|
||||
this.settingsPanelStateButton.Text = "<-";
|
||||
this.settingsPanelStateButton.UseVisualStyleBackColor = true;
|
||||
this.settingsPanelStateButton.Click += new System.EventHandler(this.settingsPanelStateButton_Click);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.mainPanel);
|
||||
this.panel2.Controls.Add(this.titleBarPanel);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(250, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(1190, 784);
|
||||
this.panel2.TabIndex = 2;
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainPanel.Location = new System.Drawing.Point(0, 34);
|
||||
this.mainPanel.Name = "mainPanel";
|
||||
this.mainPanel.Size = new System.Drawing.Size(1190, 750);
|
||||
this.mainPanel.TabIndex = 1;
|
||||
this.mainPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.mainPanel_Paint);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.serverStatusLabel,
|
||||
this.toolStripStatusLabel2,
|
||||
this.hookedToCemuLabel});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 784);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1440, 26);
|
||||
this.statusStrip1.TabIndex = 3;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// serverStatusLabel
|
||||
//
|
||||
this.serverStatusLabel.Name = "serverStatusLabel";
|
||||
this.serverStatusLabel.Size = new System.Drawing.Size(110, 20);
|
||||
this.serverStatusLabel.Text = "Not connected.";
|
||||
//
|
||||
// toolStripStatusLabel2
|
||||
//
|
||||
this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
|
||||
this.toolStripStatusLabel2.Size = new System.Drawing.Size(1169, 20);
|
||||
this.toolStripStatusLabel2.Spring = true;
|
||||
//
|
||||
// hookedToCemuLabel
|
||||
//
|
||||
this.hookedToCemuLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.hookedToCemuLabel.Name = "hookedToCemuLabel";
|
||||
this.hookedToCemuLabel.Size = new System.Drawing.Size(146, 20);
|
||||
this.hookedToCemuLabel.Text = "CEMU is not hooked.";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.panel2);
|
||||
this.panel1.Controls.Add(this.settingsPanel);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(1440, 784);
|
||||
this.panel1.TabIndex = 4;
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// timer2
|
||||
//
|
||||
this.timer2.Interval = 10;
|
||||
this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1440, 810);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(5);
|
||||
this.MinimumSize = new System.Drawing.Size(1440, 810);
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Breath of the Wild Multiplayer";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged);
|
||||
this.settingsPanel.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.titleBarPanel.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Panel settingsPanel;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.Panel titleBarPanel;
|
||||
private System.Windows.Forms.Button settingsPanelStateButton;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.Button maximizeButton;
|
||||
private System.Windows.Forms.Button minimizeButton;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Panel mainPanel;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel serverStatusLabel;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
|
||||
private System.Windows.Forms.ToolStripStatusLabel hookedToCemuLabel;
|
||||
public System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.Timer timer2;
|
||||
public System.Windows.Forms.Button debugButton;
|
||||
}
|
||||
}
|
||||
|
250
C#/GUIApp/Forms/Form1.cs
Normal file
250
C#/GUIApp/Forms/Form1.cs
Normal file
@ -0,0 +1,250 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
using System.Text.Json;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
[DllImport("user32.dll", EntryPoint = "ReleaseCapture")]
|
||||
private extern static void ReleaseCapture();
|
||||
|
||||
[DllImport("user32.dll", EntryPoint = "SendMessage")]
|
||||
private extern static void SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
|
||||
|
||||
public ServerClass Server;
|
||||
|
||||
public serverList serverListForm;
|
||||
public serverInterface serverInterfaceForm;
|
||||
|
||||
public Forms.DebugWindow debugWindow;
|
||||
|
||||
public NamedPipes namedPipe;
|
||||
|
||||
bool isHooked = false;
|
||||
public bool isHost = false;
|
||||
|
||||
public discordClass discord;
|
||||
|
||||
public bool isDevBuild = true;
|
||||
|
||||
const string VERSION = "0.20.0";
|
||||
|
||||
|
||||
public Form1()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
this.serverListForm = new serverList(this);
|
||||
this.serverInterfaceForm = new serverInterface(this);
|
||||
this.Server = new ServerClass(this);
|
||||
//this.discord = new discordClass();
|
||||
this.debugWindow = new Forms.DebugWindow(this);
|
||||
namedPipe = new NamedPipes(this);
|
||||
readXML.copyQuestFlags();
|
||||
readXML.copyWeaponDamages();
|
||||
readXML.copyServerList();
|
||||
readXML.copyArmorMappings();
|
||||
|
||||
File.WriteAllText(Directory.GetCurrentDirectory() + "/version.txt", VERSION);
|
||||
|
||||
string Branch = "main";
|
||||
|
||||
if(File.Exists(Directory.GetCurrentDirectory() + "/Branch.txt"))
|
||||
Branch = File.ReadAllText(Directory.GetCurrentDirectory() + "/Branch.txt");
|
||||
|
||||
using (var client = new HttpClient())
|
||||
{
|
||||
client.DefaultRequestHeaders.Add("User-Agent", "request");
|
||||
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("token", "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");
|
||||
var contentsUrl = $"https://api.github.com/repos/edgarcantuco/BOTW.Release/contents/version.txt?ref={Branch}";
|
||||
|
||||
var response = Task.Run(() => client.GetStringAsync(contentsUrl));
|
||||
response.Wait();
|
||||
|
||||
var json = JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(response.Result);
|
||||
if(VERSION != System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(json["content"].ToString())))
|
||||
{
|
||||
runCMD(Directory.GetCurrentDirectory() + "/BOTWMUpdater.py");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void runCMD(string path)
|
||||
{
|
||||
|
||||
var entries = Environment.GetEnvironmentVariable("path").Split(';');
|
||||
string python_location = null;
|
||||
|
||||
foreach (string entry in entries)
|
||||
{
|
||||
if (entry.ToLower().Contains("python"))
|
||||
{
|
||||
var variables = entry.Split('\\');
|
||||
foreach (string variable in variables)
|
||||
{
|
||||
if (variable.ToLower().Contains("python"))
|
||||
{
|
||||
python_location += variable + '\\';
|
||||
break;
|
||||
}
|
||||
python_location += variable + '\\';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ProcessStartInfo start = new ProcessStartInfo();
|
||||
start.FileName = Directory.GetDirectories(python_location)[0] + "/python.exe";
|
||||
start.Arguments = $"{Directory.GetCurrentDirectory()}/BOTWMUpdater.py";
|
||||
start.UseShellExecute = false;
|
||||
//start.RedirectStandardOutput = true;
|
||||
|
||||
using (Process process = Process.Start(start))
|
||||
{
|
||||
|
||||
}
|
||||
Environment.Exit(Environment.ExitCode);
|
||||
|
||||
}
|
||||
|
||||
private void changeSettingsPanelState()
|
||||
{
|
||||
if (settingsPanel.Width == 250)
|
||||
{
|
||||
settingsPanel.Width = 75;
|
||||
settingsPanelStateButton.Text = "->";
|
||||
}
|
||||
else
|
||||
{
|
||||
settingsPanel.Width = 250;
|
||||
settingsPanelStateButton.Text = "<-";
|
||||
}
|
||||
}
|
||||
|
||||
public void changePanel(Form FTL)
|
||||
{
|
||||
if(mainPanel.Controls.Count > 0)
|
||||
mainPanel.Controls.RemoveAt(0);
|
||||
|
||||
FTL.TopLevel = false;
|
||||
FTL.Dock = DockStyle.Fill;
|
||||
|
||||
mainPanel.Controls.Add(FTL);
|
||||
mainPanel.Tag = FTL;
|
||||
|
||||
FTL.Show();
|
||||
}
|
||||
|
||||
private void Form1_SizeChanged(object sender, EventArgs e)
|
||||
{
|
||||
serverListForm.fixServerListSize();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
changePanel(serverListForm);
|
||||
serverListForm.reloadServerList();
|
||||
//discord.update();
|
||||
//timer2.Enabled = true;
|
||||
}
|
||||
|
||||
private void titleBarPanel_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(this.Handle, 0x112, 0xf012, 0);
|
||||
}
|
||||
|
||||
private void settingsPanelStateButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
changeSettingsPanelState();
|
||||
}
|
||||
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
Environment.Exit(Environment.ExitCode);
|
||||
}
|
||||
|
||||
private void maximizeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(this.WindowState == FormWindowState.Maximized)
|
||||
{
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
}
|
||||
}
|
||||
|
||||
private void minimizeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
|
||||
public void changeServerStatus(string Text)
|
||||
{
|
||||
serverStatusLabel.Text = Text;
|
||||
}
|
||||
|
||||
public int hookToCemu()
|
||||
{
|
||||
Injector inj = new Injector(this);
|
||||
|
||||
//return inj.injectDLL("Cemu", "D:\\BreathOfTheWildMultiplayer\\PythonProject\\Github\\SecretBOTWMultiplayer\\DLL\\InjectDLL\\x64\\Debug\\InjectDLL.dll");
|
||||
int injectResult = inj.injectDLL("Cemu", Directory.GetCurrentDirectory() + "\\Resources\\InjectDLL.dll");
|
||||
|
||||
hookedToCemuLabel.Text = injectResult.ToString();
|
||||
|
||||
return injectResult;
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (isHooked)
|
||||
{
|
||||
timer1.Enabled = false;
|
||||
hookedToCemuLabel.Text = "Hooked to CEMU";
|
||||
}
|
||||
else
|
||||
{
|
||||
hookedToCemuLabel.Text = "Failed to hook to CEMU. Trying again...";
|
||||
}
|
||||
}
|
||||
|
||||
private void timer2_Tick(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
//discord.update();
|
||||
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
debugWindow.Show();
|
||||
|
||||
}
|
||||
|
||||
private void mainPanel_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
213
C#/GUIApp/Forms/Form1.resx
Normal file
213
C#/GUIApp/Forms/Form1.resx
Normal file
@ -0,0 +1,213 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAV4SURBVHhe7dtZyG1jHMfxg2Me4hgyXCDjMWa8kSHDBTe4
|
||||
MCQXks4JpVyQIS5ESYYkUkgps6LImJBMmUvHUBSikAiFY9h+v91Zb8/7vN+199r//+qtk3Xx6a1/e633
|
||||
t/7tvZ9nPevZS0aj0QBgcTA0phUWB0NjWmFxMDSmFRYHPTZm+arVZCPZRQ6T6+RO+UxGU7wr98iVcpDs
|
||||
LBsK/Y8xypSBxYgq6HqynZwlLwtd/CxekNNkG1lX6v+HmTKwGFEFPUBeFLrIqH/lWdlH1pF5/5MyZWAx
|
||||
ogi5vdwqfwldYIbP+bUcJ+X/xEwZWIwoQu4pfXx8JvlSjpS1qjEnyK9CF9Qnf6z2lbWiMRvLJUIXYt/L
|
||||
03KTnCMXyhPyntDrJ/HH6mpZXzBTBhYjHE72lqeELsQNOV32l82kPOYYuUY+Fjq2zZtyiGCmDCxGOJyc
|
||||
KD9KfQGeu3gu07yuzSni0azrF/dvcoUspUwZWIxQOM8xLha6gBXiyV7dCHKwvCJ0HvKg7EiZMrAYoXAr
|
||||
5fE1YUtfyE5SN2ASv3O+kfpc5Ek5mjJlYDFC4e6TT9aEbXhS5i/ILaW++Gmukn+kPB95S86nTBlYjFC4
|
||||
z4uwjZ9lL6kvuouT5Vupz1l7Q1ZQpgwsRijc21J/ad4g5Qg0C49ez0h5PuKRaSVlysBihMLtJr4Yf3na
|
||||
geIv5AX3NR3tKvcLNaPkL+qzKVMGFiMUrm+7y8NCzSh5fnQsZcrAYoTC9c0Tt9eFmlG6S5ZRpgwsRihc
|
||||
33zL8JNQMxq/i29BMFMGFiMcrkfbSpePkVf6xnfZlCkDixEO1yNPFr8TakbDcySPeuMlT8qUgcUIh+uJ
|
||||
14hfEmpGaZUcJePjKFMGFiOagEkbiGfQ1IiS50sXyNyxlCkDixFlyIRLxWs21IzSo+LhfO5YypSBxYgy
|
||||
ZNBJ8qn4u4Oa0XhePJH0k4i54ylTBhYjypAB+8kHMu2msVmYWvAIhTJlYDGiDjqDHaTLRO5VOVzoHJgp
|
||||
A4sRFLYDP5R7TKgRpYektSlGmTKwGEFhp9ha7hBqRMMfrQdkD6FzzKFMGViMoLATbCqXCTWj8Yv4+fW8
|
||||
0acNZcrAYgSFbeGZ6pnyg1BDzPdIt4gbSOdYgDJlYDGCwrY4Qjy6UEPMq37XylKh4xFlysBiBIUFHmZv
|
||||
F2qIrZaLZN4cpQvKlIHFCAoL/NzpI6GmmJuyidCxE1GmDCxGUFhwm7Q9TPM03zeQdNxUlCkDixEUtrKV
|
||||
0ONbD8kfivfU4KagLihTBhYjKGzFi+OvSd2Yv+U8oWM6o0wZWIygsBWPRn7EUjbF7xY/yPdkj47pjDJl
|
||||
YDGCwlYOlXqY9ijkjxe9fiaUKQOLERS24ufXXjIoG+OPkffGLBM6pjPKlIHFCAoLPJv1u6Rujofp6BPL
|
||||
McqUgcUICguOF9o95VsALz7RMZ1QpgwsRlDYFt5DQ6t08zYbzooyZWAxgsK28AYi74Iqm+LVO285o9d3
|
||||
QpkysBhBYSfYQrzj0kua/ust8X5CQK/thDJlYDGCwi4mypSBxQgKu5goUwYWIyjsYqJMGViMoLAtvJnI
|
||||
yw/ezVA6QzotYxLKlIHFCAoLPFe5UbxKV45KjUfEw/bE3yYRypSBxQgKW/E7xfv/qSGld8Q3nHSOVpQp
|
||||
A4sRFLZyvfwh1IzazTLT8iZlysBiBIWteKMyNYH4tcuFzoMoUwYWIyhspe3HF8Sv/d80pl5ymOQ5memm
|
||||
kjJlYDGCwlbuFmoCuVc2FzoPokwZWIygsBX/TPh9oUaUvpJThc7RijJlYDGCwgL/PsDb4P8UaorXhM+V
|
||||
md4tRpkysBhBYYGXHPz7ac9V6qb4Wfbl4vkOHTsRZcrA4mBoTCssDobGtBgt+Q8qpkFI9KqC6QAAAABJ
|
||||
RU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAASCSURBVHhe7dBLjtxKDERRb8f738tbjCdtsaAoRFBXpUx9
|
||||
+gFGD86AhQimir++vr5+gBh+//fnu30Byj3KbyAxUOlBdBSh/GP8BhIDlR5EBxHKP8ZvIDFQ6UF0EKH8
|
||||
Y/wGEgOVHkQHEco/xm8gMVCpufPjfVdH+VnD+/wGEgOVjD809OAHtKuj3qipfX4DiYFKK3pIKP8J7dhD
|
||||
/SO0RygfN5AYqLSgBzrqOeqcQbsddbpNz28gMUCJFu+52p9x9a3o+g0khl5Y0NJPzvbOuvqdL34DiaEX
|
||||
FrT0XxD/028gMfTCihbfgd5y1LnD5i2/gcRApRU9MIv2zqCds2hv3EBioJKhh0bQrivojRG068VvIDFQ
|
||||
qaEH91D/TvTmHuq/+Q0kBioBerij3hPo7Y56wW8gMVBpB31Aoex3oG8plN3wG0gMVAL0AYWyR2iPUP4T
|
||||
2lEoG/wGEgOVGnpYKE+oe4T2dNQTyr/5DSQGKjX0aKEsoe4M2umoUyj75jeQGKhk6MFC2Y56Z9F+R51C
|
||||
2Re/gcRAJTP1mKHeVfSOm+r4DSQGKq3ooUJZR53uzp5QvlA2biAxUGk1/EhDPaF8Rz2hvBvu+A0kBiqt
|
||||
hh8x1CmUPUJ7CmVlOO83kBiotKAHCmXdmc4ntK9Qtgxn/QYSA5UWww8Y6hTKjqJ9hbIylPcbSAxQosWF
|
||||
su5MZ8TsXsqXyPkNJIY1SIu6WNxQvlB2Fu0tlC2U7eIGEgOU9vQPcLP5WTP7KbvhN5AYqLSjf4Cbzc+a
|
||||
2U/ZDb+BxLCE7kCPU+6s2/f7DSQGKp1w+4c3t+/3G0gMVDrh9g9vbt/vN5AYlhA9SjbLzWx+1sx+ym74
|
||||
DSQGKu3oH+AoXyg7i/YWyhbKbvgNJIYlNLrMHydnOiNm91K+ixtIDBUCuOwAdQplR9G+QlmhfImc30Bi
|
||||
6IXV4WJAnULZUbSvUFaG8n4DiYFKq6EHGuoUyh6hPYWyQvmyyfoNJAYqrYYeANQTynfUE8q74Y7fQGKg
|
||||
0mr4kYZ63Z09N9zxG0gMVFrRI4WyHfWuonccdQpl4wYSA5XM8EOAumfR/m6q5zeQGKhk6LFC2T3Un0E7
|
||||
O+oVyr74DSQGKjX0YKHsHuofoT2EuoWyb34DiYFKDT0qlD9Ce4Tyn9AOofyb30BioBKghwtlvxN9U6Fs
|
||||
8BtIDFTaQR9QKPsd6FsKZTf8BhIDlQB9QEe9J9DbHfWC30BioFJDD++h/p3ozT3Uf/MbSAxUMvTgCNp1
|
||||
Bb0xgna9+A0kBiqt6KFZtHcG7ZxFe+MGEgOVFvTAHegtR507bN7yG0gMUKLF/4L4n34DiaEXFrT0k7O9
|
||||
s65+54vfQGLohQUt3XO1P+PqW9H1G0gMvbCixR31HHXOoN2OOt2m5zeQGKi0ogeE8kdoD6HuEdojlI8b
|
||||
SAxUMsMPDaBdHfVGTe3zG0gMVGr8kY+PDdAuQvlZw/v8BhIDlR7kH95R/jF+A4mBSg+igwjlH+M3kBio
|
||||
9CA6iFD+MX4DiYFKD6KDCOUf4zeQGKj0sP/9KMVvIPjjj5/D7Pj69Rfw/QcbtA+LhQAAAABJRU5ErkJg
|
||||
gg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>133, 17</value>
|
||||
</metadata>
|
||||
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>220, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>104</value>
|
||||
</metadata>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAAAAAAAEAIACEBAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAQDAAAArly1VQAAAA9Q
|
||||
TFRFmDAS+fV7SHojDHHC/KxlkPm+VgAAAAFvck5UAc+id5oAAAQjSURBVHja5drZjdtAEEVRTQh0VQTO
|
||||
oGAl0MDkH5MpiqK49FLLh+pB+h3w9QEuPNaQvN1in5+/wc8NHTD9+XLAzzR9OWCaog3AAXOBaANwwOP8
|
||||
YANswFIg2AAb8Dw/1gAasBaINYAGvM4PNUAGbAVCDZAB7/MjDYABuwKRBsCA/fmBBriAQ4FAA1zA8Xx/
|
||||
A1jAqYC/ASzgfL67ASrgUsDdABVwPd/bABRQKeBtAAqone9sgAmoFnA2wATUz/c1gAQ0CvgaQAJa57sa
|
||||
IAKaBVwNEAHt8z0NAAGdAp4GgIDe+Y4GeIBuAUcDPED/fHsDOMCggL0BHGB0vrkBGmBYwNwADTA+39oA
|
||||
DKAoYG0ABtCcb2yABVAVMDbAAujOtzWAAigL2BpAAbTnmxogAdQFTA2QAPrzLQ2AAIYClgZAAMv5hgY4
|
||||
AFMBQwMcgO18fQMYgLGAvgEMwHq+ugEKwFxA3QAFYD9f2wAE4CigbQAC8JyvbIABcBVQNsAA+M7XNYAA
|
||||
OAvoGkAAvOerGiAA3AVUDRAA/vM1DQAAgQKaBgCAyPmKBvkBoQKKBvkBsfPHDdIDggXGDW7/+h8Z/Pz+
|
||||
2/+Uwc9/R4CJYoCJvxxQpikGkGnCBsz/DDgEmAcIGVAevwkiAHkMIAOW34UcACwDhAsoz/8O/AB5DuAC
|
||||
1v8Q2Q1YBwgVUF7fCbwAeQ2gArZvRewEbAOECSjvL4Y+gLwHMAG7r8bsAuwGCBFQ9n8deACyH0AEHP4+
|
||||
YgfgMEB4gHL8E9EOkOMAHuD0RzKbAacBQgOU830CK0DOA2iAy50SNgIuA4QFKNebRTaAXAewAJXbZWwC
|
||||
VAYICVBqdwwtAKkNIAGq90zZAKgOEA6g1G8b6wFSH8ABNG6csxrQGCAUQGk9O9ACpDWAAmg+PWEloDlA
|
||||
GIDSfoCkA0h7AAPQeYTGKkBngBAApfcUUQOQ3gACoPsclRWA7gDlB5T+o+QxQPoD+QGDh+k8BAwGKDug
|
||||
jN4nGAFkNDAADF9o4OyA4QB1AcMClwbZADIe6AIUb7VwboBigDoARYFzg2QA0Qx0AKpXmzgzQDVATYCq
|
||||
wKlBLoDoBpoA5fttnBegHKAGQFng2CAVQLQDDYD6JUfOClAPUBWgLnBokAkg+oEqwPCmK+cEGAaoAjAU
|
||||
2DdIBBDLQAVget2ZMwJMA3QBmArsGuQBiG3gAjC+8875AMYBOgGMBd4N0gDEOnACWC/fGqQBmAfoADAX
|
||||
2BpkAYh94ACwX/5qkAXgGKAdwFHg1SAJQDwDO4Dn8rVBEoBrgDaAq8DaIAdAfAMbwHf5s0EOgHOAVoCz
|
||||
wLNBCoB4B1aA9/KlQQqAe4AWgLvA0iADQPwDC8B/+aNBBkBggGZAoMCjQQKARAZmQOTyuUECQGiA7qEC
|
||||
c4PPAyQ2cI9dPvHnAdOHP/8Beza+ZegWNVEAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
371
C#/GUIApp/Forms/HostServer.Designer.cs
generated
Normal file
371
C#/GUIApp/Forms/HostServer.Designer.cs
generated
Normal file
@ -0,0 +1,371 @@
|
||||
namespace GUIApp
|
||||
{
|
||||
partial class HostServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.ipLabel = new System.Windows.Forms.Label();
|
||||
this.portLabel = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.IPTxt = new System.Windows.Forms.TextBox();
|
||||
this.portTxt = new System.Windows.Forms.TextBox();
|
||||
this.serverNameTxt = new System.Windows.Forms.TextBox();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.descriptionTxt = new System.Windows.Forms.TextBox();
|
||||
this.passwordTxt = new System.Windows.Forms.TextBox();
|
||||
this.seePasswordButton = new System.Windows.Forms.PictureBox();
|
||||
this.showIPButton = new System.Windows.Forms.PictureBox();
|
||||
this.enemySyncPB = new System.Windows.Forms.PictureBox();
|
||||
this.glyphSyncPB = new System.Windows.Forms.PictureBox();
|
||||
this.hostButton = new System.Windows.Forms.Button();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.serverConfigPanel = new System.Windows.Forms.Panel();
|
||||
this.serverSettingsButton = new System.Windows.Forms.Button();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.questSyncPB = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.seePasswordButton)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.showIPButton)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.enemySyncPB)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.glyphSyncPB)).BeginInit();
|
||||
this.serverConfigPanel.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.questSyncPB)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(208, 11);
|
||||
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(165, 31);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Host server";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(17, 48);
|
||||
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(165, 29);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Server name:";
|
||||
//
|
||||
// ipLabel
|
||||
//
|
||||
this.ipLabel.AutoSize = true;
|
||||
this.ipLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ipLabel.Location = new System.Drawing.Point(4, 11);
|
||||
this.ipLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.ipLabel.Name = "ipLabel";
|
||||
this.ipLabel.Size = new System.Drawing.Size(43, 29);
|
||||
this.ipLabel.TabIndex = 2;
|
||||
this.ipLabel.Text = "IP:";
|
||||
//
|
||||
// portLabel
|
||||
//
|
||||
this.portLabel.AutoSize = true;
|
||||
this.portLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.portLabel.Location = new System.Drawing.Point(423, 11);
|
||||
this.portLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.portLabel.Name = "portLabel";
|
||||
this.portLabel.Size = new System.Drawing.Size(89, 29);
|
||||
this.portLabel.TabIndex = 3;
|
||||
this.portLabel.Text = "PORT:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.Location = new System.Drawing.Point(20, 433);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(112, 29);
|
||||
this.label5.TabIndex = 4;
|
||||
this.label5.Text = "Settings:";
|
||||
//
|
||||
// IPTxt
|
||||
//
|
||||
this.IPTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.IPTxt.Location = new System.Drawing.Point(11, 46);
|
||||
this.IPTxt.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.IPTxt.Name = "IPTxt";
|
||||
this.IPTxt.Size = new System.Drawing.Size(360, 36);
|
||||
this.IPTxt.TabIndex = 3;
|
||||
this.IPTxt.Tag = "3";
|
||||
this.toolTip1.SetToolTip(this.IPTxt, "Sets the IP the server will be opened on.\r\nIf set to localhost it will loop throu" +
|
||||
"gh the IPv4 IPs on your computer and open the server on the first one that succe" +
|
||||
"ds.\r\n");
|
||||
this.IPTxt.UseSystemPasswordChar = true;
|
||||
//
|
||||
// portTxt
|
||||
//
|
||||
this.portTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.portTxt.Location = new System.Drawing.Point(429, 46);
|
||||
this.portTxt.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.portTxt.Name = "portTxt";
|
||||
this.portTxt.Size = new System.Drawing.Size(132, 36);
|
||||
this.portTxt.TabIndex = 4;
|
||||
this.portTxt.Tag = "4";
|
||||
//
|
||||
// serverNameTxt
|
||||
//
|
||||
this.serverNameTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.serverNameTxt.Location = new System.Drawing.Point(24, 82);
|
||||
this.serverNameTxt.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverNameTxt.Name = "serverNameTxt";
|
||||
this.serverNameTxt.Size = new System.Drawing.Size(551, 36);
|
||||
this.serverNameTxt.TabIndex = 0;
|
||||
this.serverNameTxt.Tag = "0";
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label6.Location = new System.Drawing.Point(17, 130);
|
||||
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(147, 29);
|
||||
this.label6.TabIndex = 8;
|
||||
this.label6.Text = "Description:";
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label7.Location = new System.Drawing.Point(17, 213);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(131, 29);
|
||||
this.label7.TabIndex = 9;
|
||||
this.label7.Text = "Password:";
|
||||
//
|
||||
// descriptionTxt
|
||||
//
|
||||
this.descriptionTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.descriptionTxt.Location = new System.Drawing.Point(24, 165);
|
||||
this.descriptionTxt.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.descriptionTxt.Name = "descriptionTxt";
|
||||
this.descriptionTxt.Size = new System.Drawing.Size(551, 36);
|
||||
this.descriptionTxt.TabIndex = 1;
|
||||
this.descriptionTxt.Tag = "1";
|
||||
//
|
||||
// passwordTxt
|
||||
//
|
||||
this.passwordTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.passwordTxt.Location = new System.Drawing.Point(24, 247);
|
||||
this.passwordTxt.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.passwordTxt.Name = "passwordTxt";
|
||||
this.passwordTxt.Size = new System.Drawing.Size(503, 36);
|
||||
this.passwordTxt.TabIndex = 2;
|
||||
this.passwordTxt.Tag = "2";
|
||||
this.passwordTxt.UseSystemPasswordChar = true;
|
||||
//
|
||||
// seePasswordButton
|
||||
//
|
||||
this.seePasswordButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.seePasswordButton.Location = new System.Drawing.Point(536, 247);
|
||||
this.seePasswordButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.seePasswordButton.Name = "seePasswordButton";
|
||||
this.seePasswordButton.Size = new System.Drawing.Size(39, 36);
|
||||
this.seePasswordButton.TabIndex = 10;
|
||||
this.seePasswordButton.TabStop = false;
|
||||
this.seePasswordButton.Click += new System.EventHandler(this.seePasswordButton_Click);
|
||||
//
|
||||
// showIPButton
|
||||
//
|
||||
this.showIPButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.showIPButton.Location = new System.Drawing.Point(381, 46);
|
||||
this.showIPButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.showIPButton.Name = "showIPButton";
|
||||
this.showIPButton.Size = new System.Drawing.Size(39, 36);
|
||||
this.showIPButton.TabIndex = 11;
|
||||
this.showIPButton.TabStop = false;
|
||||
this.showIPButton.Click += new System.EventHandler(this.showIPButton_Click);
|
||||
//
|
||||
// enemySyncPB
|
||||
//
|
||||
this.enemySyncPB.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.enemySyncPB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.enemySyncPB.Location = new System.Drawing.Point(27, 480);
|
||||
this.enemySyncPB.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.enemySyncPB.Name = "enemySyncPB";
|
||||
this.enemySyncPB.Size = new System.Drawing.Size(79, 73);
|
||||
this.enemySyncPB.TabIndex = 12;
|
||||
this.enemySyncPB.TabStop = false;
|
||||
this.enemySyncPB.Click += new System.EventHandler(this.enemySyncPB_Click);
|
||||
//
|
||||
// glyphSyncPB
|
||||
//
|
||||
this.glyphSyncPB.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.glyphSyncPB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.glyphSyncPB.Location = new System.Drawing.Point(133, 480);
|
||||
this.glyphSyncPB.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.glyphSyncPB.Name = "glyphSyncPB";
|
||||
this.glyphSyncPB.Size = new System.Drawing.Size(79, 73);
|
||||
this.glyphSyncPB.TabIndex = 13;
|
||||
this.glyphSyncPB.TabStop = false;
|
||||
this.glyphSyncPB.Click += new System.EventHandler(this.glyphSyncPB_Click);
|
||||
//
|
||||
// hostButton
|
||||
//
|
||||
this.hostButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.hostButton.Location = new System.Drawing.Point(127, 587);
|
||||
this.hostButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.hostButton.Name = "hostButton";
|
||||
this.hostButton.Size = new System.Drawing.Size(156, 58);
|
||||
this.hostButton.TabIndex = 15;
|
||||
this.hostButton.Text = "Host";
|
||||
this.hostButton.UseVisualStyleBackColor = true;
|
||||
this.hostButton.Click += new System.EventHandler(this.hostButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(309, 587);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(156, 58);
|
||||
this.cancelButton.TabIndex = 16;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// serverConfigPanel
|
||||
//
|
||||
this.serverConfigPanel.Controls.Add(this.ipLabel);
|
||||
this.serverConfigPanel.Controls.Add(this.portLabel);
|
||||
this.serverConfigPanel.Controls.Add(this.IPTxt);
|
||||
this.serverConfigPanel.Controls.Add(this.portTxt);
|
||||
this.serverConfigPanel.Controls.Add(this.showIPButton);
|
||||
this.serverConfigPanel.Location = new System.Drawing.Point(16, 329);
|
||||
this.serverConfigPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverConfigPanel.Name = "serverConfigPanel";
|
||||
this.serverConfigPanel.Size = new System.Drawing.Size(568, 0);
|
||||
this.serverConfigPanel.TabIndex = 17;
|
||||
//
|
||||
// serverSettingsButton
|
||||
//
|
||||
this.serverSettingsButton.FlatAppearance.BorderSize = 0;
|
||||
this.serverSettingsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.serverSettingsButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.serverSettingsButton.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this.serverSettingsButton.Location = new System.Drawing.Point(16, 294);
|
||||
this.serverSettingsButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverSettingsButton.Name = "serverSettingsButton";
|
||||
this.serverSettingsButton.Size = new System.Drawing.Size(552, 42);
|
||||
this.serverSettingsButton.TabIndex = 19;
|
||||
this.serverSettingsButton.Text = "Server settings ˅";
|
||||
this.serverSettingsButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.toolTip1.SetToolTip(this.serverSettingsButton, "Click to change the IP and Port.\r\nDefault values can be changed on the settings p" +
|
||||
"anel.");
|
||||
this.serverSettingsButton.UseVisualStyleBackColor = true;
|
||||
this.serverSettingsButton.Click += new System.EventHandler(this.serverSettingsButton_Click);
|
||||
//
|
||||
// questSyncPB
|
||||
//
|
||||
this.questSyncPB.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.questSyncPB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.questSyncPB.Location = new System.Drawing.Point(239, 480);
|
||||
this.questSyncPB.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.questSyncPB.Name = "questSyncPB";
|
||||
this.questSyncPB.Size = new System.Drawing.Size(79, 73);
|
||||
this.questSyncPB.TabIndex = 20;
|
||||
this.questSyncPB.TabStop = false;
|
||||
this.questSyncPB.Click += new System.EventHandler(this.questSyncPB_Click);
|
||||
//
|
||||
// HostServer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.ClientSize = new System.Drawing.Size(593, 663);
|
||||
this.Controls.Add(this.questSyncPB);
|
||||
this.Controls.Add(this.serverSettingsButton);
|
||||
this.Controls.Add(this.serverConfigPanel);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.hostButton);
|
||||
this.Controls.Add(this.glyphSyncPB);
|
||||
this.Controls.Add(this.enemySyncPB);
|
||||
this.Controls.Add(this.seePasswordButton);
|
||||
this.Controls.Add(this.passwordTxt);
|
||||
this.Controls.Add(this.descriptionTxt);
|
||||
this.Controls.Add(this.label7);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.serverNameTxt);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "HostServer";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Load += new System.EventHandler(this.HostServer_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.seePasswordButton)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.showIPButton)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.enemySyncPB)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.glyphSyncPB)).EndInit();
|
||||
this.serverConfigPanel.ResumeLayout(false);
|
||||
this.serverConfigPanel.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.questSyncPB)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Label ipLabel;
|
||||
private System.Windows.Forms.Label portLabel;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox IPTxt;
|
||||
private System.Windows.Forms.TextBox portTxt;
|
||||
private System.Windows.Forms.TextBox serverNameTxt;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.TextBox descriptionTxt;
|
||||
private System.Windows.Forms.TextBox passwordTxt;
|
||||
private System.Windows.Forms.PictureBox seePasswordButton;
|
||||
private System.Windows.Forms.PictureBox showIPButton;
|
||||
private System.Windows.Forms.PictureBox enemySyncPB;
|
||||
private System.Windows.Forms.PictureBox glyphSyncPB;
|
||||
private System.Windows.Forms.Button hostButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Panel serverConfigPanel;
|
||||
private System.Windows.Forms.Button serverSettingsButton;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.PictureBox questSyncPB;
|
||||
}
|
||||
}
|
266
C#/GUIApp/Forms/HostServer.cs
Normal file
266
C#/GUIApp/Forms/HostServer.cs
Normal file
@ -0,0 +1,266 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public partial class HostServer : Form
|
||||
{
|
||||
|
||||
string[] placeholderTexts = { Properties.Settings.Default.playerName + "'s server", "Breath of the Wild Multiplayer server", "", "localhost", "5050" };
|
||||
string[] lastTexts = { "lastServerName", "lastDescription", "lastPassword", "lastIP", "lastPort" };
|
||||
|
||||
public bool[] lastSettings = { Properties.Settings.Default.lastEnemySync, Properties.Settings.Default.lastGlyphSync, Properties.Settings.Default.lastQuestSync };
|
||||
|
||||
public string[] results = { "", "", "", "", ""};
|
||||
Form1 mainWindow;
|
||||
|
||||
public HostServer(Form1 mW)
|
||||
{
|
||||
InitializeComponent();
|
||||
mainWindow = mW;
|
||||
}
|
||||
|
||||
private void HostServer_Load(object sender, EventArgs e)
|
||||
{
|
||||
foreach(Control ctrl in this.Controls)
|
||||
{
|
||||
if(ctrl.GetType() == typeof(TextBox))
|
||||
{
|
||||
|
||||
if(Properties.Settings.Default[lastTexts[Int32.Parse(ctrl.Tag.ToString())]].ToString() != "")
|
||||
{
|
||||
ctrl.Text = Properties.Settings.Default[lastTexts[Int32.Parse(ctrl.Tag.ToString())]].ToString();
|
||||
ctrl.ForeColor = Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrl.Text = placeholderTexts[Int32.Parse(ctrl.Tag.ToString())];
|
||||
ctrl.ForeColor = Color.Gray;
|
||||
}
|
||||
|
||||
ctrl.GotFocus += new EventHandler(TxtGotFocus);
|
||||
ctrl.LostFocus += new EventHandler(TxtLostFocus);
|
||||
}else if(ctrl.GetType() == typeof(Panel))
|
||||
{
|
||||
foreach(Control ctrlChild in ctrl.Controls)
|
||||
{
|
||||
if(ctrlChild.GetType() == typeof(TextBox))
|
||||
{
|
||||
if (Properties.Settings.Default[lastTexts[Int32.Parse(ctrlChild.Tag.ToString())]].ToString() != "")
|
||||
{
|
||||
ctrlChild.Text = Properties.Settings.Default[lastTexts[Int32.Parse(ctrlChild.Tag.ToString())]].ToString();
|
||||
ctrlChild.ForeColor = Color.Black;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrlChild.Text = placeholderTexts[Int32.Parse(ctrlChild.Tag.ToString())];
|
||||
ctrlChild.ForeColor = Color.Gray;
|
||||
}
|
||||
|
||||
ctrlChild.GotFocus += new EventHandler(TxtGotFocus);
|
||||
ctrlChild.LostFocus += new EventHandler(TxtLostFocus);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updatePB(enemySyncPB, lastSettings[0]);
|
||||
updatePB(glyphSyncPB, lastSettings[1]);
|
||||
updatePB(questSyncPB, lastSettings[2]);
|
||||
|
||||
}
|
||||
|
||||
public void TxtGotFocus(object sender, EventArgs e)
|
||||
{
|
||||
TextBox txt = (TextBox)sender;
|
||||
if (txt.Text == placeholderTexts[Int32.Parse(txt.Tag.ToString())])
|
||||
{
|
||||
txt.Text = "";
|
||||
txt.ForeColor = Color.Black;
|
||||
}
|
||||
}
|
||||
|
||||
public void TxtLostFocus(object sender, EventArgs e)
|
||||
{
|
||||
TextBox txt = (TextBox)sender;
|
||||
|
||||
if(txt.Text == "")
|
||||
{
|
||||
txt.Text = placeholderTexts[Int32.Parse(txt.Tag.ToString())];
|
||||
txt.ForeColor = Color.Gray;
|
||||
}
|
||||
}
|
||||
|
||||
private void seePasswordButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
passwordTxt.UseSystemPasswordChar = !passwordTxt.UseSystemPasswordChar;
|
||||
}
|
||||
|
||||
private void showIPButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
IPTxt.UseSystemPasswordChar = !IPTxt.UseSystemPasswordChar;
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void hostButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
foreach(Control ctrl in this.Controls)
|
||||
{
|
||||
if(ctrl.GetType() == typeof(Label))
|
||||
{
|
||||
ctrl.ForeColor = Color.Black;
|
||||
}
|
||||
else if(ctrl.GetType() == typeof(Panel))
|
||||
{
|
||||
foreach(Control ctrlChild in ctrl.Controls)
|
||||
{
|
||||
if(ctrlChild.GetType() == typeof(Label))
|
||||
{
|
||||
ctrlChild.ForeColor = Color.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serverSettingsButton.ForeColor = Color.Black;
|
||||
|
||||
if (!int.TryParse(portTxt.Text, out int port))
|
||||
{
|
||||
MessageBox.Show("The port must be an integer.");
|
||||
portLabel.ForeColor = Color.IndianRed;
|
||||
serverSettingsButton.ForeColor = Color.IndianRed;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mainWindow.Server.serverStart(serverNameTxt.Text, IPTxt.Text, port, passwordTxt.Text, lastSettings, Properties.Settings.Default.EnemiesSynced))
|
||||
{
|
||||
MessageBox.Show("Server start failed, check your IP and PORT");
|
||||
ipLabel.ForeColor = Color.IndianRed;
|
||||
portLabel.ForeColor = Color.IndianRed;
|
||||
serverSettingsButton.ForeColor = Color.IndianRed;
|
||||
return;
|
||||
}
|
||||
|
||||
int textboxID;
|
||||
|
||||
foreach(Control ctrl in this.Controls)
|
||||
{
|
||||
if(ctrl.GetType() == typeof(TextBox))
|
||||
{
|
||||
|
||||
textboxID = Int32.Parse(ctrl.Tag.ToString());
|
||||
|
||||
if (ctrl.Text != "" && ctrl.Text != placeholderTexts[textboxID])
|
||||
{
|
||||
Properties.Settings.Default[lastTexts[textboxID]] = ctrl.Text;
|
||||
results[textboxID] = ctrl.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default[lastTexts[textboxID]] = "";
|
||||
results[textboxID] = placeholderTexts[textboxID];
|
||||
}
|
||||
}else if(ctrl.GetType() == typeof(Panel))
|
||||
{
|
||||
foreach(Control ctrlChild in ctrl.Controls)
|
||||
{
|
||||
if(ctrlChild.GetType() == typeof(TextBox))
|
||||
{
|
||||
|
||||
textboxID = Int32.Parse(ctrlChild.Tag.ToString());
|
||||
|
||||
if (ctrlChild.Text != "" && ctrlChild.Text != placeholderTexts[textboxID])
|
||||
{
|
||||
Properties.Settings.Default[lastTexts[textboxID]] = ctrlChild.Text;
|
||||
results[textboxID] = ctrlChild.Text;
|
||||
}
|
||||
else
|
||||
{
|
||||
Properties.Settings.Default[lastTexts[textboxID]] = "";
|
||||
results[textboxID] = placeholderTexts[textboxID];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Properties.Settings.Default.lastEnemySync = lastSettings[0];
|
||||
Properties.Settings.Default.lastGlyphSync = lastSettings[1];
|
||||
Properties.Settings.Default.lastQuestSync = lastSettings[2];
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
|
||||
this.Close();
|
||||
|
||||
}
|
||||
|
||||
private void serverSettingsButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (serverConfigPanel.Height == 75)
|
||||
{
|
||||
serverConfigPanel.Height = 0;
|
||||
serverSettingsButton.Text = "Server settings ˅";
|
||||
}
|
||||
else
|
||||
{
|
||||
serverConfigPanel.Height = 75;
|
||||
serverSettingsButton.Text = "Server settings ˄";
|
||||
}
|
||||
}
|
||||
|
||||
private void enemySyncPB_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
lastSettings[0] = !lastSettings[0];
|
||||
|
||||
updatePB(enemySyncPB, lastSettings[0]);
|
||||
|
||||
}
|
||||
|
||||
private void glyphSyncPB_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
lastSettings[1] = !lastSettings[1];
|
||||
|
||||
updatePB(glyphSyncPB, lastSettings[1]);
|
||||
|
||||
}
|
||||
|
||||
private void updatePB(PictureBox pbToChange, bool state)
|
||||
{
|
||||
|
||||
if(state)
|
||||
{
|
||||
pbToChange.Image = Properties.Resources.check_placeholder;
|
||||
}
|
||||
else
|
||||
{
|
||||
pbToChange.Image = Properties.Resources.x_placeholder;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void questSyncPB_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
lastSettings[2] = !lastSettings[2];
|
||||
|
||||
updatePB(questSyncPB, lastSettings[2]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
123
C#/GUIApp/Forms/HostServer.resx
Normal file
123
C#/GUIApp/Forms/HostServer.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>23, 12</value>
|
||||
</metadata>
|
||||
</root>
|
198
C#/GUIApp/Forms/addServer.Designer.cs
generated
Normal file
198
C#/GUIApp/Forms/addServer.Designer.cs
generated
Normal file
@ -0,0 +1,198 @@
|
||||
namespace GUIApp
|
||||
{
|
||||
partial class addServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.ipLabel = new System.Windows.Forms.Label();
|
||||
this.portLabel = new System.Windows.Forms.Label();
|
||||
this.IPTxt = new System.Windows.Forms.TextBox();
|
||||
this.portTxt = new System.Windows.Forms.TextBox();
|
||||
this.showIPButton = new System.Windows.Forms.PictureBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.passwordTxt = new System.Windows.Forms.TextBox();
|
||||
this.showPassword = new System.Windows.Forms.PictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.showIPButton)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.showPassword)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(159, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(126, 25);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Add server";
|
||||
//
|
||||
// ipLabel
|
||||
//
|
||||
this.ipLabel.AutoSize = true;
|
||||
this.ipLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ipLabel.Location = new System.Drawing.Point(13, 50);
|
||||
this.ipLabel.Name = "ipLabel";
|
||||
this.ipLabel.Size = new System.Drawing.Size(36, 25);
|
||||
this.ipLabel.TabIndex = 2;
|
||||
this.ipLabel.Text = "IP:";
|
||||
//
|
||||
// portLabel
|
||||
//
|
||||
this.portLabel.AutoSize = true;
|
||||
this.portLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.portLabel.Location = new System.Drawing.Point(327, 50);
|
||||
this.portLabel.Name = "portLabel";
|
||||
this.portLabel.Size = new System.Drawing.Size(73, 25);
|
||||
this.portLabel.TabIndex = 3;
|
||||
this.portLabel.Text = "PORT:";
|
||||
//
|
||||
// IPTxt
|
||||
//
|
||||
this.IPTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.IPTxt.Location = new System.Drawing.Point(18, 78);
|
||||
this.IPTxt.Name = "IPTxt";
|
||||
this.IPTxt.Size = new System.Drawing.Size(271, 30);
|
||||
this.IPTxt.TabIndex = 3;
|
||||
this.IPTxt.Tag = "3";
|
||||
this.IPTxt.UseSystemPasswordChar = true;
|
||||
//
|
||||
// portTxt
|
||||
//
|
||||
this.portTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.portTxt.Location = new System.Drawing.Point(332, 78);
|
||||
this.portTxt.Name = "portTxt";
|
||||
this.portTxt.Size = new System.Drawing.Size(100, 30);
|
||||
this.portTxt.TabIndex = 4;
|
||||
this.portTxt.Tag = "4";
|
||||
//
|
||||
// showIPButton
|
||||
//
|
||||
this.showIPButton.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.showIPButton.Location = new System.Drawing.Point(296, 78);
|
||||
this.showIPButton.Name = "showIPButton";
|
||||
this.showIPButton.Size = new System.Drawing.Size(30, 30);
|
||||
this.showIPButton.TabIndex = 11;
|
||||
this.showIPButton.TabStop = false;
|
||||
this.showIPButton.Click += new System.EventHandler(this.showIPButton_Click);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(232, 199);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(117, 47);
|
||||
this.cancelButton.TabIndex = 22;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
this.addButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.addButton.Location = new System.Drawing.Point(95, 199);
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.Size = new System.Drawing.Size(117, 47);
|
||||
this.addButton.TabIndex = 21;
|
||||
this.addButton.Text = "Add";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label2.Location = new System.Drawing.Point(13, 117);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(104, 25);
|
||||
this.label2.TabIndex = 23;
|
||||
this.label2.Text = "Password:";
|
||||
//
|
||||
// passwordTxt
|
||||
//
|
||||
this.passwordTxt.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.passwordTxt.Location = new System.Drawing.Point(18, 145);
|
||||
this.passwordTxt.Name = "passwordTxt";
|
||||
this.passwordTxt.Size = new System.Drawing.Size(378, 30);
|
||||
this.passwordTxt.TabIndex = 24;
|
||||
this.passwordTxt.Tag = "3";
|
||||
this.passwordTxt.UseSystemPasswordChar = true;
|
||||
//
|
||||
// showPassword
|
||||
//
|
||||
this.showPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.showPassword.Location = new System.Drawing.Point(402, 145);
|
||||
this.showPassword.Name = "showPassword";
|
||||
this.showPassword.Size = new System.Drawing.Size(30, 30);
|
||||
this.showPassword.TabIndex = 25;
|
||||
this.showPassword.TabStop = false;
|
||||
this.showPassword.Click += new System.EventHandler(this.showPassword_Click);
|
||||
//
|
||||
// addServer
|
||||
//
|
||||
this.AcceptButton = this.addButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(445, 258);
|
||||
this.Controls.Add(this.showPassword);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.passwordTxt);
|
||||
this.Controls.Add(this.ipLabel);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.portLabel);
|
||||
this.Controls.Add(this.addButton);
|
||||
this.Controls.Add(this.IPTxt);
|
||||
this.Controls.Add(this.portTxt);
|
||||
this.Controls.Add(this.showIPButton);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
|
||||
this.Name = "addServer";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
((System.ComponentModel.ISupportInitialize)(this.showIPButton)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.showPassword)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label ipLabel;
|
||||
private System.Windows.Forms.Label portLabel;
|
||||
private System.Windows.Forms.TextBox IPTxt;
|
||||
private System.Windows.Forms.TextBox portTxt;
|
||||
private System.Windows.Forms.PictureBox showIPButton;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox passwordTxt;
|
||||
private System.Windows.Forms.PictureBox showPassword;
|
||||
}
|
||||
}
|
74
C#/GUIApp/Forms/addServer.cs
Normal file
74
C#/GUIApp/Forms/addServer.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public partial class addServer : Form
|
||||
{
|
||||
|
||||
public string[] results;
|
||||
|
||||
public addServer()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
foreach(Control ctrl in this.Controls)
|
||||
{
|
||||
if(ctrl.GetType() == typeof(Label))
|
||||
{
|
||||
ctrl.ForeColor = Color.Black;
|
||||
}
|
||||
}
|
||||
|
||||
if(!checkButtons())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.results = new string[] { IPTxt.Text, portTxt.Text, passwordTxt.Text };
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private bool checkButtons()
|
||||
{
|
||||
if(IPTxt.Text == "")
|
||||
{
|
||||
MessageBox.Show("The IP box cannot be empty.");
|
||||
ipLabel.ForeColor = Color.IndianRed;
|
||||
return false;
|
||||
}else if(!int.TryParse(portTxt.Text, out int port))
|
||||
{
|
||||
portLabel.ForeColor = Color.IndianRed;
|
||||
MessageBox.Show("The port box cannot be empty and must be an integer.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void showIPButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
IPTxt.UseSystemPasswordChar = !IPTxt.UseSystemPasswordChar;
|
||||
|
||||
}
|
||||
|
||||
private void showPassword_Click(object sender, EventArgs e)
|
||||
{
|
||||
passwordTxt.UseSystemPasswordChar = !passwordTxt.UseSystemPasswordChar;
|
||||
}
|
||||
}
|
||||
}
|
120
C#/GUIApp/Forms/addServer.resx
Normal file
120
C#/GUIApp/Forms/addServer.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
119
C#/GUIApp/Forms/messageBoxUnclosable.Designer.cs
generated
Normal file
119
C#/GUIApp/Forms/messageBoxUnclosable.Designer.cs
generated
Normal file
@ -0,0 +1,119 @@
|
||||
namespace GUIApp
|
||||
{
|
||||
partial class messageBoxUnclosable
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.hookingLabel = new System.Windows.Forms.Label();
|
||||
this.connectingLabel = new System.Windows.Forms.Label();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.panel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// hookingLabel
|
||||
//
|
||||
this.hookingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.hookingLabel.Location = new System.Drawing.Point(1, 14);
|
||||
this.hookingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.hookingLabel.Name = "hookingLabel";
|
||||
this.hookingLabel.Size = new System.Drawing.Size(301, 30);
|
||||
this.hookingLabel.TabIndex = 0;
|
||||
this.hookingLabel.Text = " Hooking to CEMU...";
|
||||
this.hookingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// connectingLabel
|
||||
//
|
||||
this.connectingLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.connectingLabel.Location = new System.Drawing.Point(1, 59);
|
||||
this.connectingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.connectingLabel.Name = "connectingLabel";
|
||||
this.connectingLabel.Size = new System.Drawing.Size(301, 30);
|
||||
this.connectingLabel.TabIndex = 1;
|
||||
this.connectingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cancelButton.Location = new System.Drawing.Point(85, 105);
|
||||
this.cancelButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.Size = new System.Drawing.Size(136, 43);
|
||||
this.cancelButton.TabIndex = 2;
|
||||
this.cancelButton.Text = "Cancel";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 500;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.cancelButton);
|
||||
this.panel1.Controls.Add(this.connectingLabel);
|
||||
this.panel1.Controls.Add(this.hookingLabel);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(307, 172);
|
||||
this.panel1.TabIndex = 3;
|
||||
//
|
||||
// messageBoxUnclosable
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.ClientSize = new System.Drawing.Size(307, 172);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Name = "messageBoxUnclosable";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "messageBoxUnclosable";
|
||||
this.Load += new System.EventHandler(this.messageBoxUnclosable_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label hookingLabel;
|
||||
private System.Windows.Forms.Label connectingLabel;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
}
|
||||
}
|
121
C#/GUIApp/Forms/messageBoxUnclosable.cs
Normal file
121
C#/GUIApp/Forms/messageBoxUnclosable.cs
Normal file
@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
|
||||
namespace GUIApp
|
||||
{
|
||||
public partial class messageBoxUnclosable : Form
|
||||
{
|
||||
|
||||
public Form1 mainWindow;
|
||||
int currentStep = 0;
|
||||
string IP;
|
||||
string PORT;
|
||||
string PASSWORD;
|
||||
|
||||
public messageBoxUnclosable(Form1 mW, string IP, string PORT, string PASSWORD)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.mainWindow = mW;
|
||||
this.IP = IP;
|
||||
this.PORT = PORT;
|
||||
this.PASSWORD = PASSWORD;
|
||||
}
|
||||
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if(currentStep == 0)
|
||||
{
|
||||
if(!mainWindow.namedPipe.sendInstruction("Check hook"))
|
||||
{
|
||||
|
||||
if (mainWindow.hookToCemu() != 4)
|
||||
{
|
||||
if (hookingLabel.Text == " Hooking to CEMU...")
|
||||
{
|
||||
hookingLabel.Text = "Hooking to CEMU";
|
||||
}
|
||||
else
|
||||
{
|
||||
//hookingLabel.Text = " " + hookingLabel.Text + ".";
|
||||
hookingLabel.Text = "Hook problem.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
currentStep++;
|
||||
}
|
||||
}else
|
||||
{
|
||||
currentStep++;
|
||||
}
|
||||
|
||||
}else if(currentStep == 1)
|
||||
{
|
||||
if(!mainWindow.namedPipe.isConnected)
|
||||
{
|
||||
if(!mainWindow.namedPipe.isConnecting)
|
||||
{
|
||||
Thread thread1 = new Thread(mainWindow.namedPipe.WaitForConnection);
|
||||
thread1.Start();
|
||||
}
|
||||
|
||||
if (hookingLabel.Text == " Hooking to CEMU...")
|
||||
{
|
||||
hookingLabel.Text = "Hooking to CEMU";
|
||||
}
|
||||
else
|
||||
{
|
||||
//hookingLabel.Text = " " + hookingLabel.Text + ".";
|
||||
hookingLabel.Text = "Connection problem";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hookingLabel.Text = "Hooked to CEMU.";
|
||||
currentStep++;
|
||||
if(PASSWORD == "")
|
||||
{
|
||||
PASSWORD = "NoPassword";
|
||||
}
|
||||
mainWindow.namedPipe.sendInstruction("!connect;" + IP + ";" + PORT + ";" + PASSWORD + ";" + Properties.Settings.Default.playerName + ";");
|
||||
connectingLabel.Text = "Connecting to server...";
|
||||
this.Cursor = Cursors.AppStarting;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if(currentStep == 2)
|
||||
{
|
||||
|
||||
if (mainWindow.namedPipe.receiveResponse().Contains("Succeeded"))
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
timer1.Enabled = false;
|
||||
connectingLabel.Text = "Connected to server.";
|
||||
this.DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void messageBoxUnclosable_Load(object sender, EventArgs e)
|
||||
{
|
||||
timer1.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
123
C#/GUIApp/Forms/messageBoxUnclosable.resx
Normal file
123
C#/GUIApp/Forms/messageBoxUnclosable.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
878
C#/GUIApp/Forms/serverInterface.Designer.cs
generated
Normal file
878
C#/GUIApp/Forms/serverInterface.Designer.cs
generated
Normal file
@ -0,0 +1,878 @@
|
||||
namespace GUIApp
|
||||
{
|
||||
partial class serverInterface
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.serverSettingsPanel = new System.Windows.Forms.Panel();
|
||||
this.serverInformationPanel = new System.Windows.Forms.Panel();
|
||||
this.disconnectButton = new System.Windows.Forms.Button();
|
||||
this.serverDescriptionLabel = new System.Windows.Forms.Label();
|
||||
this.serverNameLabel = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.mainPanel = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.label13 = new System.Windows.Forms.Label();
|
||||
this.pictureBox22 = new System.Windows.Forms.PictureBox();
|
||||
this.label14 = new System.Windows.Forms.Label();
|
||||
this.pictureBox23 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox24 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox25 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox26 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox27 = new System.Windows.Forms.PictureBox();
|
||||
this.label15 = new System.Windows.Forms.Label();
|
||||
this.pictureBox28 = new System.Windows.Forms.PictureBox();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.label10 = new System.Windows.Forms.Label();
|
||||
this.pictureBox15 = new System.Windows.Forms.PictureBox();
|
||||
this.label11 = new System.Windows.Forms.Label();
|
||||
this.pictureBox16 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox17 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox18 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox19 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox20 = new System.Windows.Forms.PictureBox();
|
||||
this.label12 = new System.Windows.Forms.Label();
|
||||
this.pictureBox21 = new System.Windows.Forms.PictureBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.pictureBox8 = new System.Windows.Forms.PictureBox();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
this.pictureBox9 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox10 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox11 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox12 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox13 = new System.Windows.Forms.PictureBox();
|
||||
this.label9 = new System.Windows.Forms.Label();
|
||||
this.pictureBox14 = new System.Windows.Forms.PictureBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.jugador1_Position = new System.Windows.Forms.Label();
|
||||
this.pictureBox7 = new System.Windows.Forms.PictureBox();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.pictureBox6 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox5 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox2 = new System.Windows.Forms.PictureBox();
|
||||
this.jugador1_nameLabel = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.serverLog = new System.Windows.Forms.RichTextBox();
|
||||
this.serverInformationPanel.SuspendLayout();
|
||||
this.mainPanel.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.tableLayoutPanel2.SuspendLayout();
|
||||
this.panel4.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox22)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox23)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox24)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox25)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox26)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox27)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox28)).BeginInit();
|
||||
this.panel3.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox21)).BeginInit();
|
||||
this.panel2.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).BeginInit();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// serverSettingsPanel
|
||||
//
|
||||
this.serverSettingsPanel.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.serverSettingsPanel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.serverSettingsPanel.Location = new System.Drawing.Point(1238, 0);
|
||||
this.serverSettingsPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverSettingsPanel.Name = "serverSettingsPanel";
|
||||
this.serverSettingsPanel.Size = new System.Drawing.Size(250, 970);
|
||||
this.serverSettingsPanel.TabIndex = 0;
|
||||
//
|
||||
// serverInformationPanel
|
||||
//
|
||||
this.serverInformationPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.serverInformationPanel.Controls.Add(this.disconnectButton);
|
||||
this.serverInformationPanel.Controls.Add(this.serverDescriptionLabel);
|
||||
this.serverInformationPanel.Controls.Add(this.serverNameLabel);
|
||||
this.serverInformationPanel.Controls.Add(this.label3);
|
||||
this.serverInformationPanel.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.serverInformationPanel.Location = new System.Drawing.Point(0, 0);
|
||||
this.serverInformationPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverInformationPanel.Name = "serverInformationPanel";
|
||||
this.serverInformationPanel.Size = new System.Drawing.Size(1238, 124);
|
||||
this.serverInformationPanel.TabIndex = 1;
|
||||
//
|
||||
// disconnectButton
|
||||
//
|
||||
this.disconnectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.disconnectButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.disconnectButton.Location = new System.Drawing.Point(979, 12);
|
||||
this.disconnectButton.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.disconnectButton.Name = "disconnectButton";
|
||||
this.disconnectButton.Size = new System.Drawing.Size(250, 101);
|
||||
this.disconnectButton.TabIndex = 5;
|
||||
this.disconnectButton.Text = "Disconnect";
|
||||
this.disconnectButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// serverDescriptionLabel
|
||||
//
|
||||
this.serverDescriptionLabel.AutoSize = true;
|
||||
this.serverDescriptionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.serverDescriptionLabel.Location = new System.Drawing.Point(51, 45);
|
||||
this.serverDescriptionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.serverDescriptionLabel.Name = "serverDescriptionLabel";
|
||||
this.serverDescriptionLabel.Size = new System.Drawing.Size(194, 29);
|
||||
this.serverDescriptionLabel.TabIndex = 4;
|
||||
this.serverDescriptionLabel.Text = "Placeholder text";
|
||||
//
|
||||
// serverNameLabel
|
||||
//
|
||||
this.serverNameLabel.AutoSize = true;
|
||||
this.serverNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.serverNameLabel.Location = new System.Drawing.Point(51, 12);
|
||||
this.serverNameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.serverNameLabel.Name = "serverNameLabel";
|
||||
this.serverNameLabel.Size = new System.Drawing.Size(210, 29);
|
||||
this.serverNameLabel.TabIndex = 3;
|
||||
this.serverNameLabel.Text = "Placeholder text";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(51, 78);
|
||||
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(82, 29);
|
||||
this.label3.TabIndex = 2;
|
||||
this.label3.Text = "Mods:";
|
||||
//
|
||||
// mainPanel
|
||||
//
|
||||
this.mainPanel.Controls.Add(this.tableLayoutPanel1);
|
||||
this.mainPanel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.mainPanel.Location = new System.Drawing.Point(0, 124);
|
||||
this.mainPanel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.mainPanel.Name = "mainPanel";
|
||||
this.mainPanel.Size = new System.Drawing.Size(1238, 846);
|
||||
this.mainPanel.TabIndex = 2;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single;
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.serverLog, 0, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 396F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(1238, 846);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.OutsetDouble;
|
||||
this.tableLayoutPanel2.ColumnCount = 2;
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.Controls.Add(this.panel4, 1, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.panel3, 0, 1);
|
||||
this.tableLayoutPanel2.Controls.Add(this.panel2, 1, 0);
|
||||
this.tableLayoutPanel2.Controls.Add(this.panel1, 0, 0);
|
||||
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 5);
|
||||
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
|
||||
this.tableLayoutPanel2.RowCount = 2;
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel2.Size = new System.Drawing.Size(1228, 388);
|
||||
this.tableLayoutPanel2.TabIndex = 1;
|
||||
//
|
||||
// panel4
|
||||
//
|
||||
this.panel4.Controls.Add(this.label13);
|
||||
this.panel4.Controls.Add(this.pictureBox22);
|
||||
this.panel4.Controls.Add(this.label14);
|
||||
this.panel4.Controls.Add(this.pictureBox23);
|
||||
this.panel4.Controls.Add(this.pictureBox24);
|
||||
this.panel4.Controls.Add(this.pictureBox25);
|
||||
this.panel4.Controls.Add(this.pictureBox26);
|
||||
this.panel4.Controls.Add(this.pictureBox27);
|
||||
this.panel4.Controls.Add(this.label15);
|
||||
this.panel4.Controls.Add(this.pictureBox28);
|
||||
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel4.Location = new System.Drawing.Point(619, 199);
|
||||
this.panel4.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.panel4.Name = "panel4";
|
||||
this.panel4.Size = new System.Drawing.Size(602, 182);
|
||||
this.panel4.TabIndex = 3;
|
||||
//
|
||||
// label13
|
||||
//
|
||||
this.label13.AutoSize = true;
|
||||
this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label13.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label13.Location = new System.Drawing.Point(264, 64);
|
||||
this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label13.Name = "label13";
|
||||
this.label13.Size = new System.Drawing.Size(152, 25);
|
||||
this.label13.TabIndex = 14;
|
||||
this.label13.Text = "MainField:Town";
|
||||
//
|
||||
// pictureBox22
|
||||
//
|
||||
this.pictureBox22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox22.Location = new System.Drawing.Point(434, 34);
|
||||
this.pictureBox22.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox22.Name = "pictureBox22";
|
||||
this.pictureBox22.Size = new System.Drawing.Size(31, 31);
|
||||
this.pictureBox22.TabIndex = 13;
|
||||
this.pictureBox22.TabStop = false;
|
||||
//
|
||||
// label14
|
||||
//
|
||||
this.label14.AutoSize = true;
|
||||
this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label14.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label14.Location = new System.Drawing.Point(214, 64);
|
||||
this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label14.Name = "label14";
|
||||
this.label14.Size = new System.Drawing.Size(44, 25);
|
||||
this.label14.TabIndex = 12;
|
||||
this.label14.Text = "x12";
|
||||
//
|
||||
// pictureBox23
|
||||
//
|
||||
this.pictureBox23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox23.Location = new System.Drawing.Point(402, 95);
|
||||
this.pictureBox23.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox23.Name = "pictureBox23";
|
||||
this.pictureBox23.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox23.TabIndex = 11;
|
||||
this.pictureBox23.TabStop = false;
|
||||
//
|
||||
// pictureBox24
|
||||
//
|
||||
this.pictureBox24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox24.Location = new System.Drawing.Point(329, 95);
|
||||
this.pictureBox24.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox24.Name = "pictureBox24";
|
||||
this.pictureBox24.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox24.TabIndex = 10;
|
||||
this.pictureBox24.TabStop = false;
|
||||
//
|
||||
// pictureBox25
|
||||
//
|
||||
this.pictureBox25.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox25.Location = new System.Drawing.Point(255, 95);
|
||||
this.pictureBox25.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox25.Name = "pictureBox25";
|
||||
this.pictureBox25.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox25.TabIndex = 9;
|
||||
this.pictureBox25.TabStop = false;
|
||||
//
|
||||
// pictureBox26
|
||||
//
|
||||
this.pictureBox26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox26.Location = new System.Drawing.Point(181, 95);
|
||||
this.pictureBox26.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox26.Name = "pictureBox26";
|
||||
this.pictureBox26.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox26.TabIndex = 8;
|
||||
this.pictureBox26.TabStop = false;
|
||||
//
|
||||
// pictureBox27
|
||||
//
|
||||
this.pictureBox27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox27.Location = new System.Drawing.Point(181, 64);
|
||||
this.pictureBox27.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox27.Name = "pictureBox27";
|
||||
this.pictureBox27.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox27.TabIndex = 7;
|
||||
this.pictureBox27.TabStop = false;
|
||||
//
|
||||
// label15
|
||||
//
|
||||
this.label15.AutoSize = true;
|
||||
this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label15.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label15.Location = new System.Drawing.Point(175, 32);
|
||||
this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label15.Name = "label15";
|
||||
this.label15.Size = new System.Drawing.Size(167, 29);
|
||||
this.label15.TabIndex = 6;
|
||||
this.label15.Text = "Disconnected";
|
||||
//
|
||||
// pictureBox28
|
||||
//
|
||||
this.pictureBox28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox28.Image = global::GUIApp.Properties.Resources.Daruk;
|
||||
this.pictureBox28.Location = new System.Drawing.Point(28, 32);
|
||||
this.pictureBox28.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox28.Name = "pictureBox28";
|
||||
this.pictureBox28.Size = new System.Drawing.Size(124, 124);
|
||||
this.pictureBox28.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox28.TabIndex = 0;
|
||||
this.pictureBox28.TabStop = false;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.label10);
|
||||
this.panel3.Controls.Add(this.pictureBox15);
|
||||
this.panel3.Controls.Add(this.label11);
|
||||
this.panel3.Controls.Add(this.pictureBox16);
|
||||
this.panel3.Controls.Add(this.pictureBox17);
|
||||
this.panel3.Controls.Add(this.pictureBox18);
|
||||
this.panel3.Controls.Add(this.pictureBox19);
|
||||
this.panel3.Controls.Add(this.pictureBox20);
|
||||
this.panel3.Controls.Add(this.label12);
|
||||
this.panel3.Controls.Add(this.pictureBox21);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(7, 199);
|
||||
this.panel3.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(601, 182);
|
||||
this.panel3.TabIndex = 2;
|
||||
//
|
||||
// label10
|
||||
//
|
||||
this.label10.AutoSize = true;
|
||||
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label10.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label10.Location = new System.Drawing.Point(264, 64);
|
||||
this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label10.Name = "label10";
|
||||
this.label10.Size = new System.Drawing.Size(152, 25);
|
||||
this.label10.TabIndex = 14;
|
||||
this.label10.Text = "MainField:Town";
|
||||
//
|
||||
// pictureBox15
|
||||
//
|
||||
this.pictureBox15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox15.Location = new System.Drawing.Point(434, 34);
|
||||
this.pictureBox15.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox15.Name = "pictureBox15";
|
||||
this.pictureBox15.Size = new System.Drawing.Size(31, 31);
|
||||
this.pictureBox15.TabIndex = 13;
|
||||
this.pictureBox15.TabStop = false;
|
||||
//
|
||||
// label11
|
||||
//
|
||||
this.label11.AutoSize = true;
|
||||
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label11.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label11.Location = new System.Drawing.Point(214, 64);
|
||||
this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label11.Name = "label11";
|
||||
this.label11.Size = new System.Drawing.Size(44, 25);
|
||||
this.label11.TabIndex = 12;
|
||||
this.label11.Text = "x12";
|
||||
//
|
||||
// pictureBox16
|
||||
//
|
||||
this.pictureBox16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox16.Location = new System.Drawing.Point(402, 95);
|
||||
this.pictureBox16.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox16.Name = "pictureBox16";
|
||||
this.pictureBox16.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox16.TabIndex = 11;
|
||||
this.pictureBox16.TabStop = false;
|
||||
//
|
||||
// pictureBox17
|
||||
//
|
||||
this.pictureBox17.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox17.Location = new System.Drawing.Point(329, 95);
|
||||
this.pictureBox17.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox17.Name = "pictureBox17";
|
||||
this.pictureBox17.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox17.TabIndex = 10;
|
||||
this.pictureBox17.TabStop = false;
|
||||
//
|
||||
// pictureBox18
|
||||
//
|
||||
this.pictureBox18.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox18.Location = new System.Drawing.Point(255, 95);
|
||||
this.pictureBox18.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox18.Name = "pictureBox18";
|
||||
this.pictureBox18.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox18.TabIndex = 9;
|
||||
this.pictureBox18.TabStop = false;
|
||||
//
|
||||
// pictureBox19
|
||||
//
|
||||
this.pictureBox19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox19.Location = new System.Drawing.Point(181, 95);
|
||||
this.pictureBox19.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox19.Name = "pictureBox19";
|
||||
this.pictureBox19.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox19.TabIndex = 8;
|
||||
this.pictureBox19.TabStop = false;
|
||||
//
|
||||
// pictureBox20
|
||||
//
|
||||
this.pictureBox20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox20.Location = new System.Drawing.Point(181, 64);
|
||||
this.pictureBox20.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox20.Name = "pictureBox20";
|
||||
this.pictureBox20.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox20.TabIndex = 7;
|
||||
this.pictureBox20.TabStop = false;
|
||||
//
|
||||
// label12
|
||||
//
|
||||
this.label12.AutoSize = true;
|
||||
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label12.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label12.Location = new System.Drawing.Point(175, 32);
|
||||
this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label12.Name = "label12";
|
||||
this.label12.Size = new System.Drawing.Size(167, 29);
|
||||
this.label12.TabIndex = 6;
|
||||
this.label12.Text = "Disconnected";
|
||||
//
|
||||
// pictureBox21
|
||||
//
|
||||
this.pictureBox21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox21.Image = global::GUIApp.Properties.Resources.Urbosa;
|
||||
this.pictureBox21.Location = new System.Drawing.Point(28, 32);
|
||||
this.pictureBox21.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox21.Name = "pictureBox21";
|
||||
this.pictureBox21.Size = new System.Drawing.Size(124, 124);
|
||||
this.pictureBox21.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox21.TabIndex = 0;
|
||||
this.pictureBox21.TabStop = false;
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.label7);
|
||||
this.panel2.Controls.Add(this.pictureBox8);
|
||||
this.panel2.Controls.Add(this.label8);
|
||||
this.panel2.Controls.Add(this.pictureBox9);
|
||||
this.panel2.Controls.Add(this.pictureBox10);
|
||||
this.panel2.Controls.Add(this.pictureBox11);
|
||||
this.panel2.Controls.Add(this.pictureBox12);
|
||||
this.panel2.Controls.Add(this.pictureBox13);
|
||||
this.panel2.Controls.Add(this.label9);
|
||||
this.panel2.Controls.Add(this.pictureBox14);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(619, 7);
|
||||
this.panel2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(602, 181);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label7.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label7.Location = new System.Drawing.Point(264, 64);
|
||||
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(152, 25);
|
||||
this.label7.TabIndex = 14;
|
||||
this.label7.Text = "MainField:Town";
|
||||
//
|
||||
// pictureBox8
|
||||
//
|
||||
this.pictureBox8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox8.Location = new System.Drawing.Point(434, 34);
|
||||
this.pictureBox8.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox8.Name = "pictureBox8";
|
||||
this.pictureBox8.Size = new System.Drawing.Size(31, 31);
|
||||
this.pictureBox8.TabIndex = 13;
|
||||
this.pictureBox8.TabStop = false;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label8.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label8.Location = new System.Drawing.Point(214, 64);
|
||||
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(44, 25);
|
||||
this.label8.TabIndex = 12;
|
||||
this.label8.Text = "x12";
|
||||
//
|
||||
// pictureBox9
|
||||
//
|
||||
this.pictureBox9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox9.Location = new System.Drawing.Point(402, 95);
|
||||
this.pictureBox9.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox9.Name = "pictureBox9";
|
||||
this.pictureBox9.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox9.TabIndex = 11;
|
||||
this.pictureBox9.TabStop = false;
|
||||
//
|
||||
// pictureBox10
|
||||
//
|
||||
this.pictureBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox10.Location = new System.Drawing.Point(329, 95);
|
||||
this.pictureBox10.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox10.Name = "pictureBox10";
|
||||
this.pictureBox10.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox10.TabIndex = 10;
|
||||
this.pictureBox10.TabStop = false;
|
||||
//
|
||||
// pictureBox11
|
||||
//
|
||||
this.pictureBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox11.Location = new System.Drawing.Point(255, 95);
|
||||
this.pictureBox11.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox11.Name = "pictureBox11";
|
||||
this.pictureBox11.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox11.TabIndex = 9;
|
||||
this.pictureBox11.TabStop = false;
|
||||
//
|
||||
// pictureBox12
|
||||
//
|
||||
this.pictureBox12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox12.Location = new System.Drawing.Point(181, 95);
|
||||
this.pictureBox12.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox12.Name = "pictureBox12";
|
||||
this.pictureBox12.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox12.TabIndex = 8;
|
||||
this.pictureBox12.TabStop = false;
|
||||
//
|
||||
// pictureBox13
|
||||
//
|
||||
this.pictureBox13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox13.Location = new System.Drawing.Point(181, 64);
|
||||
this.pictureBox13.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox13.Name = "pictureBox13";
|
||||
this.pictureBox13.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox13.TabIndex = 7;
|
||||
this.pictureBox13.TabStop = false;
|
||||
//
|
||||
// label9
|
||||
//
|
||||
this.label9.AutoSize = true;
|
||||
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label9.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label9.Location = new System.Drawing.Point(175, 32);
|
||||
this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label9.Name = "label9";
|
||||
this.label9.Size = new System.Drawing.Size(167, 29);
|
||||
this.label9.TabIndex = 6;
|
||||
this.label9.Text = "Disconnected";
|
||||
//
|
||||
// pictureBox14
|
||||
//
|
||||
this.pictureBox14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox14.Image = global::GUIApp.Properties.Resources.Revali;
|
||||
this.pictureBox14.Location = new System.Drawing.Point(28, 32);
|
||||
this.pictureBox14.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox14.Name = "pictureBox14";
|
||||
this.pictureBox14.Size = new System.Drawing.Size(124, 124);
|
||||
this.pictureBox14.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox14.TabIndex = 0;
|
||||
this.pictureBox14.TabStop = false;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.jugador1_Position);
|
||||
this.panel1.Controls.Add(this.pictureBox7);
|
||||
this.panel1.Controls.Add(this.label5);
|
||||
this.panel1.Controls.Add(this.pictureBox6);
|
||||
this.panel1.Controls.Add(this.pictureBox5);
|
||||
this.panel1.Controls.Add(this.pictureBox4);
|
||||
this.panel1.Controls.Add(this.pictureBox3);
|
||||
this.panel1.Controls.Add(this.pictureBox2);
|
||||
this.panel1.Controls.Add(this.jugador1_nameLabel);
|
||||
this.panel1.Controls.Add(this.pictureBox1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(7, 7);
|
||||
this.panel1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(601, 181);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// jugador1_Position
|
||||
//
|
||||
this.jugador1_Position.AutoSize = true;
|
||||
this.jugador1_Position.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.jugador1_Position.ForeColor = System.Drawing.Color.Gray;
|
||||
this.jugador1_Position.Location = new System.Drawing.Point(264, 64);
|
||||
this.jugador1_Position.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.jugador1_Position.Name = "jugador1_Position";
|
||||
this.jugador1_Position.Size = new System.Drawing.Size(152, 25);
|
||||
this.jugador1_Position.TabIndex = 14;
|
||||
this.jugador1_Position.Text = "MainField:Town";
|
||||
//
|
||||
// pictureBox7
|
||||
//
|
||||
this.pictureBox7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox7.Location = new System.Drawing.Point(434, 34);
|
||||
this.pictureBox7.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox7.Name = "pictureBox7";
|
||||
this.pictureBox7.Size = new System.Drawing.Size(31, 31);
|
||||
this.pictureBox7.TabIndex = 13;
|
||||
this.pictureBox7.TabStop = false;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label5.ForeColor = System.Drawing.Color.Gray;
|
||||
this.label5.Location = new System.Drawing.Point(214, 64);
|
||||
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(44, 25);
|
||||
this.label5.TabIndex = 12;
|
||||
this.label5.Text = "x12";
|
||||
//
|
||||
// pictureBox6
|
||||
//
|
||||
this.pictureBox6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox6.Location = new System.Drawing.Point(402, 95);
|
||||
this.pictureBox6.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox6.Name = "pictureBox6";
|
||||
this.pictureBox6.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox6.TabIndex = 11;
|
||||
this.pictureBox6.TabStop = false;
|
||||
//
|
||||
// pictureBox5
|
||||
//
|
||||
this.pictureBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox5.Location = new System.Drawing.Point(329, 95);
|
||||
this.pictureBox5.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox5.Name = "pictureBox5";
|
||||
this.pictureBox5.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox5.TabIndex = 10;
|
||||
this.pictureBox5.TabStop = false;
|
||||
//
|
||||
// pictureBox4
|
||||
//
|
||||
this.pictureBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox4.Location = new System.Drawing.Point(255, 95);
|
||||
this.pictureBox4.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox4.Name = "pictureBox4";
|
||||
this.pictureBox4.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox4.TabIndex = 9;
|
||||
this.pictureBox4.TabStop = false;
|
||||
//
|
||||
// pictureBox3
|
||||
//
|
||||
this.pictureBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox3.Location = new System.Drawing.Point(181, 95);
|
||||
this.pictureBox3.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox3.Name = "pictureBox3";
|
||||
this.pictureBox3.Size = new System.Drawing.Size(62, 62);
|
||||
this.pictureBox3.TabIndex = 8;
|
||||
this.pictureBox3.TabStop = false;
|
||||
//
|
||||
// pictureBox2
|
||||
//
|
||||
this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox2.Location = new System.Drawing.Point(181, 64);
|
||||
this.pictureBox2.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox2.Name = "pictureBox2";
|
||||
this.pictureBox2.Size = new System.Drawing.Size(24, 24);
|
||||
this.pictureBox2.TabIndex = 7;
|
||||
this.pictureBox2.TabStop = false;
|
||||
//
|
||||
// jugador1_nameLabel
|
||||
//
|
||||
this.jugador1_nameLabel.AutoSize = true;
|
||||
this.jugador1_nameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.jugador1_nameLabel.ForeColor = System.Drawing.Color.Gray;
|
||||
this.jugador1_nameLabel.Location = new System.Drawing.Point(175, 32);
|
||||
this.jugador1_nameLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.jugador1_nameLabel.Name = "jugador1_nameLabel";
|
||||
this.jugador1_nameLabel.Size = new System.Drawing.Size(259, 29);
|
||||
this.jugador1_nameLabel.TabIndex = 6;
|
||||
this.jugador1_nameLabel.Text = "Disconnected (HOST)";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.pictureBox1.Image = global::GUIApp.Properties.Resources.Mipha2;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(28, 32);
|
||||
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(124, 124);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// serverLog
|
||||
//
|
||||
this.serverLog.BackColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.serverLog.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.serverLog.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.serverLog.Location = new System.Drawing.Point(5, 402);
|
||||
this.serverLog.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.serverLog.Name = "serverLog";
|
||||
this.serverLog.ReadOnly = true;
|
||||
this.serverLog.Size = new System.Drawing.Size(1228, 439);
|
||||
this.serverLog.TabIndex = 2;
|
||||
this.serverLog.Text = "";
|
||||
this.serverLog.TextChanged += new System.EventHandler(this.serverLog_TextChanged);
|
||||
//
|
||||
// serverInterface
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.AutoSize = true;
|
||||
this.ClientSize = new System.Drawing.Size(1488, 970);
|
||||
this.Controls.Add(this.mainPanel);
|
||||
this.Controls.Add(this.serverInformationPanel);
|
||||
this.Controls.Add(this.serverSettingsPanel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "serverInterface";
|
||||
this.Text = "serverInterface";
|
||||
this.Load += new System.EventHandler(this.serverInterface_Load);
|
||||
this.serverInformationPanel.ResumeLayout(false);
|
||||
this.serverInformationPanel.PerformLayout();
|
||||
this.mainPanel.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel2.ResumeLayout(false);
|
||||
this.panel4.ResumeLayout(false);
|
||||
this.panel4.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox22)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox23)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox24)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox25)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox26)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox27)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox28)).EndInit();
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel3.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox15)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox16)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox17)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox18)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox19)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox20)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox21)).EndInit();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox11)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox12)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox13)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox14)).EndInit();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel serverSettingsPanel;
|
||||
private System.Windows.Forms.Panel serverInformationPanel;
|
||||
private System.Windows.Forms.Panel mainPanel;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Button disconnectButton;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.PictureBox pictureBox6;
|
||||
private System.Windows.Forms.PictureBox pictureBox5;
|
||||
private System.Windows.Forms.PictureBox pictureBox4;
|
||||
private System.Windows.Forms.PictureBox pictureBox3;
|
||||
private System.Windows.Forms.PictureBox pictureBox2;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Label jugador1_Position;
|
||||
private System.Windows.Forms.PictureBox pictureBox7;
|
||||
private System.Windows.Forms.Panel panel4;
|
||||
private System.Windows.Forms.Label label13;
|
||||
private System.Windows.Forms.PictureBox pictureBox22;
|
||||
private System.Windows.Forms.Label label14;
|
||||
private System.Windows.Forms.PictureBox pictureBox23;
|
||||
private System.Windows.Forms.PictureBox pictureBox24;
|
||||
private System.Windows.Forms.PictureBox pictureBox25;
|
||||
private System.Windows.Forms.PictureBox pictureBox26;
|
||||
private System.Windows.Forms.PictureBox pictureBox27;
|
||||
private System.Windows.Forms.Label label15;
|
||||
private System.Windows.Forms.PictureBox pictureBox28;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Label label10;
|
||||
private System.Windows.Forms.PictureBox pictureBox15;
|
||||
private System.Windows.Forms.Label label11;
|
||||
private System.Windows.Forms.PictureBox pictureBox16;
|
||||
private System.Windows.Forms.PictureBox pictureBox17;
|
||||
private System.Windows.Forms.PictureBox pictureBox18;
|
||||
private System.Windows.Forms.PictureBox pictureBox19;
|
||||
private System.Windows.Forms.PictureBox pictureBox20;
|
||||
private System.Windows.Forms.Label label12;
|
||||
private System.Windows.Forms.PictureBox pictureBox21;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.PictureBox pictureBox8;
|
||||
private System.Windows.Forms.Label label8;
|
||||
private System.Windows.Forms.PictureBox pictureBox9;
|
||||
private System.Windows.Forms.PictureBox pictureBox10;
|
||||
private System.Windows.Forms.PictureBox pictureBox11;
|
||||
private System.Windows.Forms.PictureBox pictureBox12;
|
||||
private System.Windows.Forms.PictureBox pictureBox13;
|
||||
private System.Windows.Forms.Label label9;
|
||||
private System.Windows.Forms.PictureBox pictureBox14;
|
||||
private System.Windows.Forms.RichTextBox serverLog;
|
||||
public System.Windows.Forms.Label serverDescriptionLabel;
|
||||
public System.Windows.Forms.Label serverNameLabel;
|
||||
public System.Windows.Forms.Label jugador1_nameLabel;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user