From e6181c24124d97f2fbc932b8a68311e625463156 Mon Sep 17 00:00:00 2001 From: uzvkl Date: Tue, 11 Jun 2019 23:05:52 +0200 Subject: Move dsa related stuff to subfolder --- DSACore/Controllers/CommandsController.cs | 56 --- DSACore/Controllers/LobbyController.cs | 32 -- DSACore/Controllers/TokensController.cs | 25 -- DSACore/Controllers/ValuesController.cs | 45 -- DSACore/DSACore.csproj | 28 -- DSACore/Hubs/Login.cs | 205 --------- DSACore/Models/Network/Group.cs | 43 -- DSACore/Models/Network/Token.cs | 21 - DSACore/Models/Network/User.cs | 9 - DSACore/Program.cs | 24 -- .../Properties/DSALib-Auxiliary-CommandInfo.json | 101 ----- .../DSALib-DSA_Game-Characters-Character.json | 290 ------------- .../PublishProfiles/FolderProfile.pubxml | 23 - .../PublishProfiles/FolderProfile1.pubxml | 23 - DSACore/Properties/launchSettings.json | 30 -- DSACore/Startup.cs | 47 -- DSACore/appsettings.Development.json | 9 - DSACore/appsettings.json | 10 - DSALib/Auxiliary/Calculator/Argument.cs | 35 -- DSALib/Auxiliary/Calculator/ISolvable.cs | 10 - DSALib/Auxiliary/Calculator/Operator.cs | 51 --- DSALib/Auxiliary/Calculator/Ops.cs | 13 - DSALib/Auxiliary/Calculator/StringSolver.cs | 183 -------- DSALib/Auxiliary/CommandInfo.cs | 28 -- DSALib/Auxiliary/Dice.cs | 45 -- DSALib/Auxiliary/Extensions.cs | 25 -- DSALib/Auxiliary/IDataObjectEnumerableExtension.cs | 25 -- DSALib/Auxiliary/RandomMisc.cs | 52 --- DSALib/Auxiliary/SpellCorrect.cs | 61 --- DSALib/Auxiliary/TalentEnumerableExtension.cs | 74 ---- DSALib/Auxiliary/WeaponImporter.cs | 175 -------- DSALib/Characters/Being.cs | 17 - DSALib/Characters/Critter.cs | 88 ---- DSALib/Characters/Entity.cs | 12 - DSALib/Characters/ICharacter.cs | 15 - DSALib/Characters/ICombatant.cs | 20 - DSALib/Commands/CommandHandler.cs | 135 ------ DSALib/Commands/CommandTypes.cs | 13 - DSALib/Commands/FileHandler.cs | 32 -- DSALib/Commands/Gm.cs | 176 -------- DSALib/Commands/HeldList.cs | 174 -------- DSALib/Commands/Help.cs | 54 --- DSALib/Commands/LebenUndAstral.cs | 172 -------- DSALib/Commands/List.cs | 39 -- DSALib/Commands/MiscCommands.cs | 219 ---------- DSALib/Commands/NpcCommands.cs | 35 -- DSALib/Commands/ProbenTest.cs | 85 ---- DSALib/DSALib.csproj | 11 - DSALib/DSA_Game/Characters/Character.cs | 269 ------------ DSALib/DSA_Game/Characters/NPC.cs | 83 ---- DSALib/DSA_Game/Characters/SaveChar.cs | 38 -- DSALib/DSA_Game/Dsa.cs | 95 ---- DSALib/DSA_Game/Save/Properties.cs | 74 ---- DSALib/DSA_Game/Save/SaveCommand.cs | 66 --- DSALib/DSA_Game/Save/Session.cs | 51 --- DSALib/FireBase/Database.cs | 270 ------------ DSALib/Models/Database/DSA/Advantage.cs | 16 - DSALib/Models/Database/DSA/CharSpell.cs | 16 - DSALib/Models/Database/DSA/DatabaseChar.cs | 63 --- DSALib/Models/Database/DSA/Field.cs | 16 - DSALib/Models/Database/DSA/GeneralSpell.cs | 20 - DSALib/Models/Database/DSA/GroupChar.cs | 13 - DSALib/Models/Database/DSA/Inventory.cs | 12 - DSALib/Models/Database/DSA/Talent.cs | 24 -- DSALib/Models/Database/DSA/Weapon.cs | 52 --- DSALib/Models/Database/DSA/WeaponTalent.cs | 18 - DSALib/Models/Database/DataObject.cs | 13 - DSALib/Models/Database/Groups/DSAGroup.cs | 10 - DSALib/Models/Database/Groups/Group.cs | 9 - DSALib/Models/Database/IDataObject.cs | 7 - DSALib/Models/Dsa/CritterAttack.cs | 19 - DSALib/Models/Dsa/KampfTalent.cs | 16 - DSALib/Models/Dsa/Talent.cs | 43 -- DSALib/Models/Dsa/Vorteil.cs | 16 - DSALib/Models/Dsa/Zauber.cs | 16 - DSALib/Models/Network/Command.cs | 18 - DSALib/Models/Network/CommandResponse.cs | 28 -- .../Properties-DSACore-Auxiliary-CommandInfo.json | 101 ----- ...ties-DSACore-DSA_Game-Characters-Character.json | 290 ------------- .../PropertiesNewtonsoft-Json-Linq-JProperty.json | 30 -- DiscoBot.sln | 23 +- DiscoBot/App.config | 42 -- DiscoBot/Auxiliary/CommandExtension.cs | 98 ----- DiscoBot/Auxiliary/Dice.cs | 31 -- DiscoBot/Auxiliary/Permissions.cs | 32 -- DiscoBot/Auxiliary/RandomMisc.cs | 36 -- DiscoBot/Auxiliary/SpellCorrect.cs | 105 ----- DiscoBot/Commands/CommandExtension.cs | 119 ----- DiscoBot/Commands/FileHandler.cs | 25 -- DiscoBot/Commands/MiscCommands.cs | 189 -------- DiscoBot/DiscoBot.csproj | 149 ------- DiscoBot/Help.json | 120 ------ DiscoBot/Program.cs | 113 ----- DiscoBot/Properties.json | 129 ------ DiscoBot/Properties/AssemblyInfo.cs | 35 -- DiscoBot/Properties/DiscoBot-Audio-Sound.json | 7 - .../Properties/DiscoBot-Auxiliary-CommandInfo.json | 101 ----- .../DiscoBot-DSA_Game-Characters-Character.json | 290 ------------- DiscoBot/Properties/Settings.Designer.cs | 38 -- DiscoBot/Properties/Settings.settings | 9 - DiscoBot/Rework/Permissions.cs | 43 -- DiscoBot/Token | 1 - DiscoBot/packages.config | 63 --- DiscoBot/session.json | 6 - DiscoBot/sessions/TheCrew/TheCrew-0.json | 83 ---- DiscoBot/sessions/copy/copy-0.json | 79 ---- DiscoBot/sessions/test/test-0.json | 79 ---- DiscoBot/sessions/test/test-1.json | 79 ---- DiscoBot/sessions/test/test-2.json | 81 ---- DiscoBot/sessions/test/test-3.json | 81 ---- DiscoBot/sessions/test/test-4.json | 81 ---- FireBase/ExceptionEventArgs.cs | 28 -- FireBase/Extensions/ObservableExtensions.cs | 41 -- FireBase/Extensions/TaskExtensions.cs | 23 - FireBase/FireBase.csproj | 13 - FireBase/FirebaseClient.cs | 49 --- FireBase/FirebaseException.cs | 53 --- FireBase/FirebaseKeyGenerator.cs | 79 ---- FireBase/FirebaseObject.cs | 27 -- FireBase/FirebaseOptions.cs | 52 --- FireBase/Http/HttpClientExtensions.cs | 123 ------ FireBase/Http/PostResult.cs | 13 - FireBase/ObservableExtensions.cs | 40 -- FireBase/Offline/ConcurrentOfflineDatabase.cs | 233 ---------- FireBase/Offline/DatabaseExtensions.cs | 257 ----------- FireBase/Offline/ISetHandler.cs | 10 - FireBase/Offline/InitialPullStrategy.cs | 23 - FireBase/Offline/Internals/MemberAccessVisitor.cs | 46 -- FireBase/Offline/OfflineCacheAdapter.cs | 152 ------- FireBase/Offline/OfflineDatabase.cs | 228 ---------- FireBase/Offline/OfflineEntry.cs | 99 ----- FireBase/Offline/RealtimeDatabase.cs | 479 --------------------- FireBase/Offline/SetHandler.cs | 19 - FireBase/Offline/StreamingOptions.cs | 23 - FireBase/Offline/SyncOptions.cs | 28 -- FireBase/Query/AuthQuery.cs | 34 -- FireBase/Query/ChildQuery.cs | 50 --- FireBase/Query/FilterQuery.cs | 77 ---- FireBase/Query/FirebaseQuery.cs | 314 -------------- FireBase/Query/IFirebaseQuery.cs | 40 -- FireBase/Query/OrderQuery.cs | 34 -- FireBase/Query/ParameterQuery.cs | 43 -- FireBase/Query/QueryExtensions.cs | 210 --------- FireBase/Query/QueryFactoryExtensions.cs | 187 -------- FireBase/Query/SilentQuery.cs | 18 - FireBase/Settings.StyleCop | 77 ---- FireBase/Streaming/FirebaseCache.cs | 181 -------- FireBase/Streaming/FirebaseEvent.cs | 37 -- FireBase/Streaming/FirebaseEventSource.cs | 38 -- FireBase/Streaming/FirebaseEventType.cs | 18 - FireBase/Streaming/FirebaseServerEventType.cs | 15 - FireBase/Streaming/FirebaseSubscription.cs | 217 ---------- FireBase/Streaming/NonBlockingStreamReader.cs | 63 --- .../Auxiliary/Calculator/ArgumentTests.cs | 59 --- .../Auxiliary/Calculator/StringSolverTests.cs | 105 ----- NUnitTestProject1/Auxiliary/DiceTests.cs | 71 --- NUnitTestProject1/NUnitTest.csproj | 20 - dsa/DSACore/Controllers/CommandsController.cs | 56 +++ dsa/DSACore/Controllers/LobbyController.cs | 32 ++ dsa/DSACore/Controllers/TokensController.cs | 25 ++ dsa/DSACore/Controllers/ValuesController.cs | 45 ++ dsa/DSACore/DSACore.csproj | 28 ++ dsa/DSACore/Hubs/Login.cs | 205 +++++++++ dsa/DSACore/Models/Network/Group.cs | 43 ++ dsa/DSACore/Models/Network/Token.cs | 21 + dsa/DSACore/Models/Network/User.cs | 9 + dsa/DSACore/Program.cs | 24 ++ .../Properties/DSALib-Auxiliary-CommandInfo.json | 101 +++++ .../DSALib-DSA_Game-Characters-Character.json | 290 +++++++++++++ .../PublishProfiles/FolderProfile.pubxml | 23 + .../PublishProfiles/FolderProfile1.pubxml | 23 + dsa/DSACore/Properties/launchSettings.json | 30 ++ .../PropertiesDSALib-Auxiliary-CommandInfo.json | 101 +++++ ...ertiesDSALib-DSA_Game-Characters-Character.json | 290 +++++++++++++ .../PropertiesNewtonsoft-Json-Linq-JProperty.json | 30 ++ dsa/DSACore/Startup.cs | 47 ++ dsa/DSACore/Token | 1 + dsa/DSACore/appsettings.Development.json | 9 + dsa/DSACore/appsettings.json | 10 + dsa/DSALib/Auxiliary/Calculator/Argument.cs | 35 ++ dsa/DSALib/Auxiliary/Calculator/ISolvable.cs | 10 + dsa/DSALib/Auxiliary/Calculator/Operator.cs | 51 +++ dsa/DSALib/Auxiliary/Calculator/Ops.cs | 13 + dsa/DSALib/Auxiliary/Calculator/StringSolver.cs | 183 ++++++++ dsa/DSALib/Auxiliary/CommandInfo.cs | 28 ++ dsa/DSALib/Auxiliary/Dice.cs | 45 ++ dsa/DSALib/Auxiliary/Extensions.cs | 25 ++ .../Auxiliary/IDataObjectEnumerableExtension.cs | 25 ++ dsa/DSALib/Auxiliary/RandomMisc.cs | 52 +++ dsa/DSALib/Auxiliary/SpellCorrect.cs | 61 +++ dsa/DSALib/Auxiliary/TalentEnumerableExtension.cs | 74 ++++ dsa/DSALib/Auxiliary/WeaponImporter.cs | 175 ++++++++ dsa/DSALib/Characters/Being.cs | 17 + dsa/DSALib/Characters/Critter.cs | 88 ++++ dsa/DSALib/Characters/Entity.cs | 12 + dsa/DSALib/Characters/ICharacter.cs | 15 + dsa/DSALib/Characters/ICombatant.cs | 20 + dsa/DSALib/Commands/CommandHandler.cs | 135 ++++++ dsa/DSALib/Commands/CommandTypes.cs | 13 + dsa/DSALib/Commands/FileHandler.cs | 32 ++ dsa/DSALib/Commands/Gm.cs | 176 ++++++++ dsa/DSALib/Commands/HeldList.cs | 174 ++++++++ dsa/DSALib/Commands/Help.cs | 54 +++ dsa/DSALib/Commands/LebenUndAstral.cs | 172 ++++++++ dsa/DSALib/Commands/List.cs | 39 ++ dsa/DSALib/Commands/MiscCommands.cs | 219 ++++++++++ dsa/DSALib/Commands/NpcCommands.cs | 35 ++ dsa/DSALib/Commands/ProbenTest.cs | 85 ++++ dsa/DSALib/DSALib.csproj | 11 + dsa/DSALib/DSA_Game/Characters/Character.cs | 269 ++++++++++++ dsa/DSALib/DSA_Game/Characters/NPC.cs | 83 ++++ dsa/DSALib/DSA_Game/Characters/SaveChar.cs | 38 ++ dsa/DSALib/DSA_Game/Dsa.cs | 95 ++++ dsa/DSALib/DSA_Game/Save/Properties.cs | 74 ++++ dsa/DSALib/DSA_Game/Save/SaveCommand.cs | 66 +++ dsa/DSALib/DSA_Game/Save/Session.cs | 51 +++ dsa/DSALib/FireBase/Database.cs | 270 ++++++++++++ dsa/DSALib/Models/Database/DataObject.cs | 13 + dsa/DSALib/Models/Database/Dsa/Advantage.cs | 16 + dsa/DSALib/Models/Database/Dsa/CharSpell.cs | 16 + dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs | 63 +++ dsa/DSALib/Models/Database/Dsa/Field.cs | 16 + dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs | 20 + dsa/DSALib/Models/Database/Dsa/GroupChar.cs | 13 + dsa/DSALib/Models/Database/Dsa/Inventory.cs | 12 + dsa/DSALib/Models/Database/Dsa/Talent.cs | 24 ++ dsa/DSALib/Models/Database/Dsa/Weapon.cs | 52 +++ dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs | 18 + dsa/DSALib/Models/Database/Groups/DSAGroup.cs | 10 + dsa/DSALib/Models/Database/Groups/Group.cs | 9 + dsa/DSALib/Models/Database/IDataObject.cs | 7 + dsa/DSALib/Models/Dsa/CritterAttack.cs | 19 + dsa/DSALib/Models/Dsa/KampfTalent.cs | 16 + dsa/DSALib/Models/Dsa/Talent.cs | 43 ++ dsa/DSALib/Models/Dsa/Vorteil.cs | 16 + dsa/DSALib/Models/Dsa/Zauber.cs | 16 + dsa/DSALib/Models/Network/Command.cs | 18 + dsa/DSALib/Models/Network/CommandResponse.cs | 28 ++ .../Properties-DSACore-Auxiliary-CommandInfo.json | 101 +++++ ...ties-DSACore-DSA_Game-Characters-Character.json | 290 +++++++++++++ .../PropertiesNewtonsoft-Json-Linq-JProperty.json | 30 ++ dsa/DiscoBot/App.config | 42 ++ dsa/DiscoBot/Auxiliary/CommandExtension.cs | 98 +++++ dsa/DiscoBot/Auxiliary/Dice.cs | 31 ++ dsa/DiscoBot/Auxiliary/Permissions.cs | 32 ++ dsa/DiscoBot/Auxiliary/RandomMisc.cs | 36 ++ dsa/DiscoBot/Auxiliary/SpellCorrect.cs | 105 +++++ dsa/DiscoBot/Commands/CommandExtension.cs | 119 +++++ dsa/DiscoBot/Commands/FileHandler.cs | 25 ++ dsa/DiscoBot/Commands/MiscCommands.cs | 189 ++++++++ dsa/DiscoBot/DiscoBot.csproj | 149 +++++++ dsa/DiscoBot/Help.json | 120 ++++++ dsa/DiscoBot/Program.cs | 113 +++++ dsa/DiscoBot/Properties.json | 129 ++++++ dsa/DiscoBot/Properties/AssemblyInfo.cs | 35 ++ dsa/DiscoBot/Properties/DiscoBot-Audio-Sound.json | 7 + .../Properties/DiscoBot-Auxiliary-CommandInfo.json | 101 +++++ .../DiscoBot-DSA_Game-Characters-Character.json | 290 +++++++++++++ dsa/DiscoBot/Properties/Settings.Designer.cs | 38 ++ dsa/DiscoBot/Properties/Settings.settings | 9 + dsa/DiscoBot/Rework/Permissions.cs | 43 ++ dsa/DiscoBot/Token | 1 + dsa/DiscoBot/packages.config | 63 +++ dsa/DiscoBot/session.json | 6 + dsa/DiscoBot/sessions/TheCrew/TheCrew-0.json | 83 ++++ dsa/DiscoBot/sessions/copy/copy-0.json | 79 ++++ dsa/DiscoBot/sessions/test/test-0.json | 79 ++++ dsa/DiscoBot/sessions/test/test-1.json | 79 ++++ dsa/DiscoBot/sessions/test/test-2.json | 81 ++++ dsa/DiscoBot/sessions/test/test-3.json | 81 ++++ dsa/DiscoBot/sessions/test/test-4.json | 81 ++++ dsa/FireBase/ExceptionEventArgs.cs | 28 ++ dsa/FireBase/Extensions/ObservableExtensions.cs | 41 ++ dsa/FireBase/Extensions/TaskExtensions.cs | 23 + dsa/FireBase/FireBase.csproj | 13 + dsa/FireBase/FirebaseClient.cs | 49 +++ dsa/FireBase/FirebaseException.cs | 53 +++ dsa/FireBase/FirebaseKeyGenerator.cs | 79 ++++ dsa/FireBase/FirebaseObject.cs | 27 ++ dsa/FireBase/FirebaseOptions.cs | 52 +++ dsa/FireBase/Http/HttpClientExtensions.cs | 123 ++++++ dsa/FireBase/Http/PostResult.cs | 13 + dsa/FireBase/ObservableExtensions.cs | 40 ++ dsa/FireBase/Offline/ConcurrentOfflineDatabase.cs | 233 ++++++++++ dsa/FireBase/Offline/DatabaseExtensions.cs | 257 +++++++++++ dsa/FireBase/Offline/ISetHandler.cs | 10 + dsa/FireBase/Offline/InitialPullStrategy.cs | 23 + .../Offline/Internals/MemberAccessVisitor.cs | 46 ++ dsa/FireBase/Offline/OfflineCacheAdapter.cs | 152 +++++++ dsa/FireBase/Offline/OfflineDatabase.cs | 228 ++++++++++ dsa/FireBase/Offline/OfflineEntry.cs | 99 +++++ dsa/FireBase/Offline/RealtimeDatabase.cs | 479 +++++++++++++++++++++ dsa/FireBase/Offline/SetHandler.cs | 19 + dsa/FireBase/Offline/StreamingOptions.cs | 23 + dsa/FireBase/Offline/SyncOptions.cs | 28 ++ dsa/FireBase/Query/AuthQuery.cs | 34 ++ dsa/FireBase/Query/ChildQuery.cs | 50 +++ dsa/FireBase/Query/FilterQuery.cs | 77 ++++ dsa/FireBase/Query/FirebaseQuery.cs | 314 ++++++++++++++ dsa/FireBase/Query/IFirebaseQuery.cs | 40 ++ dsa/FireBase/Query/OrderQuery.cs | 34 ++ dsa/FireBase/Query/ParameterQuery.cs | 43 ++ dsa/FireBase/Query/QueryExtensions.cs | 210 +++++++++ dsa/FireBase/Query/QueryFactoryExtensions.cs | 187 ++++++++ dsa/FireBase/Query/SilentQuery.cs | 18 + dsa/FireBase/Settings.StyleCop | 77 ++++ dsa/FireBase/Streaming/FirebaseCache.cs | 181 ++++++++ dsa/FireBase/Streaming/FirebaseEvent.cs | 37 ++ dsa/FireBase/Streaming/FirebaseEventSource.cs | 38 ++ dsa/FireBase/Streaming/FirebaseEventType.cs | 18 + dsa/FireBase/Streaming/FirebaseServerEventType.cs | 15 + dsa/FireBase/Streaming/FirebaseSubscription.cs | 217 ++++++++++ dsa/FireBase/Streaming/NonBlockingStreamReader.cs | 63 +++ .../Auxiliary/Calculator/ArgumentTests.cs | 59 +++ .../Auxiliary/Calculator/StringSolverTests.cs | 105 +++++ dsa/NUnitTestProject1/Auxiliary/DiceTests.cs | 71 +++ dsa/NUnitTestProject1/NUnitTest.csproj | 20 + 317 files changed, 11723 insertions(+), 11316 deletions(-) delete mode 100644 DSACore/Controllers/CommandsController.cs delete mode 100644 DSACore/Controllers/LobbyController.cs delete mode 100644 DSACore/Controllers/TokensController.cs delete mode 100644 DSACore/Controllers/ValuesController.cs delete mode 100644 DSACore/DSACore.csproj delete mode 100644 DSACore/Hubs/Login.cs delete mode 100644 DSACore/Models/Network/Group.cs delete mode 100644 DSACore/Models/Network/Token.cs delete mode 100644 DSACore/Models/Network/User.cs delete mode 100644 DSACore/Program.cs delete mode 100644 DSACore/Properties/DSALib-Auxiliary-CommandInfo.json delete mode 100644 DSACore/Properties/DSALib-DSA_Game-Characters-Character.json delete mode 100644 DSACore/Properties/PublishProfiles/FolderProfile.pubxml delete mode 100644 DSACore/Properties/PublishProfiles/FolderProfile1.pubxml delete mode 100644 DSACore/Properties/launchSettings.json delete mode 100644 DSACore/Startup.cs delete mode 100644 DSACore/appsettings.Development.json delete mode 100644 DSACore/appsettings.json delete mode 100644 DSALib/Auxiliary/Calculator/Argument.cs delete mode 100644 DSALib/Auxiliary/Calculator/ISolvable.cs delete mode 100644 DSALib/Auxiliary/Calculator/Operator.cs delete mode 100644 DSALib/Auxiliary/Calculator/Ops.cs delete mode 100644 DSALib/Auxiliary/Calculator/StringSolver.cs delete mode 100644 DSALib/Auxiliary/CommandInfo.cs delete mode 100644 DSALib/Auxiliary/Dice.cs delete mode 100644 DSALib/Auxiliary/Extensions.cs delete mode 100644 DSALib/Auxiliary/IDataObjectEnumerableExtension.cs delete mode 100644 DSALib/Auxiliary/RandomMisc.cs delete mode 100644 DSALib/Auxiliary/SpellCorrect.cs delete mode 100644 DSALib/Auxiliary/TalentEnumerableExtension.cs delete mode 100644 DSALib/Auxiliary/WeaponImporter.cs delete mode 100644 DSALib/Characters/Being.cs delete mode 100644 DSALib/Characters/Critter.cs delete mode 100644 DSALib/Characters/Entity.cs delete mode 100644 DSALib/Characters/ICharacter.cs delete mode 100644 DSALib/Characters/ICombatant.cs delete mode 100644 DSALib/Commands/CommandHandler.cs delete mode 100644 DSALib/Commands/CommandTypes.cs delete mode 100644 DSALib/Commands/FileHandler.cs delete mode 100644 DSALib/Commands/Gm.cs delete mode 100644 DSALib/Commands/HeldList.cs delete mode 100644 DSALib/Commands/Help.cs delete mode 100644 DSALib/Commands/LebenUndAstral.cs delete mode 100644 DSALib/Commands/List.cs delete mode 100644 DSALib/Commands/MiscCommands.cs delete mode 100644 DSALib/Commands/NpcCommands.cs delete mode 100644 DSALib/Commands/ProbenTest.cs delete mode 100644 DSALib/DSALib.csproj delete mode 100644 DSALib/DSA_Game/Characters/Character.cs delete mode 100644 DSALib/DSA_Game/Characters/NPC.cs delete mode 100644 DSALib/DSA_Game/Characters/SaveChar.cs delete mode 100644 DSALib/DSA_Game/Dsa.cs delete mode 100644 DSALib/DSA_Game/Save/Properties.cs delete mode 100644 DSALib/DSA_Game/Save/SaveCommand.cs delete mode 100644 DSALib/DSA_Game/Save/Session.cs delete mode 100644 DSALib/FireBase/Database.cs delete mode 100644 DSALib/Models/Database/DSA/Advantage.cs delete mode 100644 DSALib/Models/Database/DSA/CharSpell.cs delete mode 100644 DSALib/Models/Database/DSA/DatabaseChar.cs delete mode 100644 DSALib/Models/Database/DSA/Field.cs delete mode 100644 DSALib/Models/Database/DSA/GeneralSpell.cs delete mode 100644 DSALib/Models/Database/DSA/GroupChar.cs delete mode 100644 DSALib/Models/Database/DSA/Inventory.cs delete mode 100644 DSALib/Models/Database/DSA/Talent.cs delete mode 100644 DSALib/Models/Database/DSA/Weapon.cs delete mode 100644 DSALib/Models/Database/DSA/WeaponTalent.cs delete mode 100644 DSALib/Models/Database/DataObject.cs delete mode 100644 DSALib/Models/Database/Groups/DSAGroup.cs delete mode 100644 DSALib/Models/Database/Groups/Group.cs delete mode 100644 DSALib/Models/Database/IDataObject.cs delete mode 100644 DSALib/Models/Dsa/CritterAttack.cs delete mode 100644 DSALib/Models/Dsa/KampfTalent.cs delete mode 100644 DSALib/Models/Dsa/Talent.cs delete mode 100644 DSALib/Models/Dsa/Vorteil.cs delete mode 100644 DSALib/Models/Dsa/Zauber.cs delete mode 100644 DSALib/Models/Network/Command.cs delete mode 100644 DSALib/Models/Network/CommandResponse.cs delete mode 100644 DSALib/Properties-DSACore-Auxiliary-CommandInfo.json delete mode 100644 DSALib/Properties-DSACore-DSA_Game-Characters-Character.json delete mode 100644 DSALib/PropertiesNewtonsoft-Json-Linq-JProperty.json delete mode 100644 DiscoBot/App.config delete mode 100644 DiscoBot/Auxiliary/CommandExtension.cs delete mode 100644 DiscoBot/Auxiliary/Dice.cs delete mode 100644 DiscoBot/Auxiliary/Permissions.cs delete mode 100644 DiscoBot/Auxiliary/RandomMisc.cs delete mode 100644 DiscoBot/Auxiliary/SpellCorrect.cs delete mode 100644 DiscoBot/Commands/CommandExtension.cs delete mode 100644 DiscoBot/Commands/FileHandler.cs delete mode 100644 DiscoBot/Commands/MiscCommands.cs delete mode 100644 DiscoBot/DiscoBot.csproj delete mode 100644 DiscoBot/Help.json delete mode 100644 DiscoBot/Program.cs delete mode 100644 DiscoBot/Properties.json delete mode 100644 DiscoBot/Properties/AssemblyInfo.cs delete mode 100644 DiscoBot/Properties/DiscoBot-Audio-Sound.json delete mode 100644 DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json delete mode 100644 DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json delete mode 100644 DiscoBot/Properties/Settings.Designer.cs delete mode 100644 DiscoBot/Properties/Settings.settings delete mode 100644 DiscoBot/Rework/Permissions.cs delete mode 100644 DiscoBot/Token delete mode 100644 DiscoBot/packages.config delete mode 100644 DiscoBot/session.json delete mode 100644 DiscoBot/sessions/TheCrew/TheCrew-0.json delete mode 100644 DiscoBot/sessions/copy/copy-0.json delete mode 100644 DiscoBot/sessions/test/test-0.json delete mode 100644 DiscoBot/sessions/test/test-1.json delete mode 100644 DiscoBot/sessions/test/test-2.json delete mode 100644 DiscoBot/sessions/test/test-3.json delete mode 100644 DiscoBot/sessions/test/test-4.json delete mode 100644 FireBase/ExceptionEventArgs.cs delete mode 100644 FireBase/Extensions/ObservableExtensions.cs delete mode 100644 FireBase/Extensions/TaskExtensions.cs delete mode 100644 FireBase/FireBase.csproj delete mode 100644 FireBase/FirebaseClient.cs delete mode 100644 FireBase/FirebaseException.cs delete mode 100644 FireBase/FirebaseKeyGenerator.cs delete mode 100644 FireBase/FirebaseObject.cs delete mode 100644 FireBase/FirebaseOptions.cs delete mode 100644 FireBase/Http/HttpClientExtensions.cs delete mode 100644 FireBase/Http/PostResult.cs delete mode 100644 FireBase/ObservableExtensions.cs delete mode 100644 FireBase/Offline/ConcurrentOfflineDatabase.cs delete mode 100644 FireBase/Offline/DatabaseExtensions.cs delete mode 100644 FireBase/Offline/ISetHandler.cs delete mode 100644 FireBase/Offline/InitialPullStrategy.cs delete mode 100644 FireBase/Offline/Internals/MemberAccessVisitor.cs delete mode 100644 FireBase/Offline/OfflineCacheAdapter.cs delete mode 100644 FireBase/Offline/OfflineDatabase.cs delete mode 100644 FireBase/Offline/OfflineEntry.cs delete mode 100644 FireBase/Offline/RealtimeDatabase.cs delete mode 100644 FireBase/Offline/SetHandler.cs delete mode 100644 FireBase/Offline/StreamingOptions.cs delete mode 100644 FireBase/Offline/SyncOptions.cs delete mode 100644 FireBase/Query/AuthQuery.cs delete mode 100644 FireBase/Query/ChildQuery.cs delete mode 100644 FireBase/Query/FilterQuery.cs delete mode 100644 FireBase/Query/FirebaseQuery.cs delete mode 100644 FireBase/Query/IFirebaseQuery.cs delete mode 100644 FireBase/Query/OrderQuery.cs delete mode 100644 FireBase/Query/ParameterQuery.cs delete mode 100644 FireBase/Query/QueryExtensions.cs delete mode 100644 FireBase/Query/QueryFactoryExtensions.cs delete mode 100644 FireBase/Query/SilentQuery.cs delete mode 100644 FireBase/Settings.StyleCop delete mode 100644 FireBase/Streaming/FirebaseCache.cs delete mode 100644 FireBase/Streaming/FirebaseEvent.cs delete mode 100644 FireBase/Streaming/FirebaseEventSource.cs delete mode 100644 FireBase/Streaming/FirebaseEventType.cs delete mode 100644 FireBase/Streaming/FirebaseServerEventType.cs delete mode 100644 FireBase/Streaming/FirebaseSubscription.cs delete mode 100644 FireBase/Streaming/NonBlockingStreamReader.cs delete mode 100644 NUnitTestProject1/Auxiliary/Calculator/ArgumentTests.cs delete mode 100644 NUnitTestProject1/Auxiliary/Calculator/StringSolverTests.cs delete mode 100644 NUnitTestProject1/Auxiliary/DiceTests.cs delete mode 100644 NUnitTestProject1/NUnitTest.csproj create mode 100644 dsa/DSACore/Controllers/CommandsController.cs create mode 100644 dsa/DSACore/Controllers/LobbyController.cs create mode 100644 dsa/DSACore/Controllers/TokensController.cs create mode 100644 dsa/DSACore/Controllers/ValuesController.cs create mode 100644 dsa/DSACore/DSACore.csproj create mode 100644 dsa/DSACore/Hubs/Login.cs create mode 100644 dsa/DSACore/Models/Network/Group.cs create mode 100644 dsa/DSACore/Models/Network/Token.cs create mode 100644 dsa/DSACore/Models/Network/User.cs create mode 100644 dsa/DSACore/Program.cs create mode 100644 dsa/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json create mode 100644 dsa/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json create mode 100644 dsa/DSACore/Properties/PublishProfiles/FolderProfile.pubxml create mode 100644 dsa/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml create mode 100644 dsa/DSACore/Properties/launchSettings.json create mode 100644 dsa/DSACore/PropertiesDSALib-Auxiliary-CommandInfo.json create mode 100644 dsa/DSACore/PropertiesDSALib-DSA_Game-Characters-Character.json create mode 100644 dsa/DSACore/PropertiesNewtonsoft-Json-Linq-JProperty.json create mode 100644 dsa/DSACore/Startup.cs create mode 100644 dsa/DSACore/Token create mode 100644 dsa/DSACore/appsettings.Development.json create mode 100644 dsa/DSACore/appsettings.json create mode 100644 dsa/DSALib/Auxiliary/Calculator/Argument.cs create mode 100644 dsa/DSALib/Auxiliary/Calculator/ISolvable.cs create mode 100644 dsa/DSALib/Auxiliary/Calculator/Operator.cs create mode 100644 dsa/DSALib/Auxiliary/Calculator/Ops.cs create mode 100644 dsa/DSALib/Auxiliary/Calculator/StringSolver.cs create mode 100644 dsa/DSALib/Auxiliary/CommandInfo.cs create mode 100644 dsa/DSALib/Auxiliary/Dice.cs create mode 100644 dsa/DSALib/Auxiliary/Extensions.cs create mode 100644 dsa/DSALib/Auxiliary/IDataObjectEnumerableExtension.cs create mode 100644 dsa/DSALib/Auxiliary/RandomMisc.cs create mode 100644 dsa/DSALib/Auxiliary/SpellCorrect.cs create mode 100644 dsa/DSALib/Auxiliary/TalentEnumerableExtension.cs create mode 100644 dsa/DSALib/Auxiliary/WeaponImporter.cs create mode 100644 dsa/DSALib/Characters/Being.cs create mode 100644 dsa/DSALib/Characters/Critter.cs create mode 100644 dsa/DSALib/Characters/Entity.cs create mode 100644 dsa/DSALib/Characters/ICharacter.cs create mode 100644 dsa/DSALib/Characters/ICombatant.cs create mode 100644 dsa/DSALib/Commands/CommandHandler.cs create mode 100644 dsa/DSALib/Commands/CommandTypes.cs create mode 100644 dsa/DSALib/Commands/FileHandler.cs create mode 100644 dsa/DSALib/Commands/Gm.cs create mode 100644 dsa/DSALib/Commands/HeldList.cs create mode 100644 dsa/DSALib/Commands/Help.cs create mode 100644 dsa/DSALib/Commands/LebenUndAstral.cs create mode 100644 dsa/DSALib/Commands/List.cs create mode 100644 dsa/DSALib/Commands/MiscCommands.cs create mode 100644 dsa/DSALib/Commands/NpcCommands.cs create mode 100644 dsa/DSALib/Commands/ProbenTest.cs create mode 100644 dsa/DSALib/DSALib.csproj create mode 100644 dsa/DSALib/DSA_Game/Characters/Character.cs create mode 100644 dsa/DSALib/DSA_Game/Characters/NPC.cs create mode 100644 dsa/DSALib/DSA_Game/Characters/SaveChar.cs create mode 100644 dsa/DSALib/DSA_Game/Dsa.cs create mode 100644 dsa/DSALib/DSA_Game/Save/Properties.cs create mode 100644 dsa/DSALib/DSA_Game/Save/SaveCommand.cs create mode 100644 dsa/DSALib/DSA_Game/Save/Session.cs create mode 100644 dsa/DSALib/FireBase/Database.cs create mode 100644 dsa/DSALib/Models/Database/DataObject.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/Advantage.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/CharSpell.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/DatabaseChar.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/Field.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/GeneralSpell.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/GroupChar.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/Inventory.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/Talent.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/Weapon.cs create mode 100644 dsa/DSALib/Models/Database/Dsa/WeaponTalent.cs create mode 100644 dsa/DSALib/Models/Database/Groups/DSAGroup.cs create mode 100644 dsa/DSALib/Models/Database/Groups/Group.cs create mode 100644 dsa/DSALib/Models/Database/IDataObject.cs create mode 100644 dsa/DSALib/Models/Dsa/CritterAttack.cs create mode 100644 dsa/DSALib/Models/Dsa/KampfTalent.cs create mode 100644 dsa/DSALib/Models/Dsa/Talent.cs create mode 100644 dsa/DSALib/Models/Dsa/Vorteil.cs create mode 100644 dsa/DSALib/Models/Dsa/Zauber.cs create mode 100644 dsa/DSALib/Models/Network/Command.cs create mode 100644 dsa/DSALib/Models/Network/CommandResponse.cs create mode 100644 dsa/DSALib/Properties-DSACore-Auxiliary-CommandInfo.json create mode 100644 dsa/DSALib/Properties-DSACore-DSA_Game-Characters-Character.json create mode 100644 dsa/DSALib/PropertiesNewtonsoft-Json-Linq-JProperty.json create mode 100644 dsa/DiscoBot/App.config create mode 100644 dsa/DiscoBot/Auxiliary/CommandExtension.cs create mode 100644 dsa/DiscoBot/Auxiliary/Dice.cs create mode 100644 dsa/DiscoBot/Auxiliary/Permissions.cs create mode 100644 dsa/DiscoBot/Auxiliary/RandomMisc.cs create mode 100644 dsa/DiscoBot/Auxiliary/SpellCorrect.cs create mode 100644 dsa/DiscoBot/Commands/CommandExtension.cs create mode 100644 dsa/DiscoBot/Commands/FileHandler.cs create mode 100644 dsa/DiscoBot/Commands/MiscCommands.cs create mode 100644 dsa/DiscoBot/DiscoBot.csproj create mode 100644 dsa/DiscoBot/Help.json create mode 100644 dsa/DiscoBot/Program.cs create mode 100644 dsa/DiscoBot/Properties.json create mode 100644 dsa/DiscoBot/Properties/AssemblyInfo.cs create mode 100644 dsa/DiscoBot/Properties/DiscoBot-Audio-Sound.json create mode 100644 dsa/DiscoBot/Properties/DiscoBot-Auxiliary-CommandInfo.json create mode 100644 dsa/DiscoBot/Properties/DiscoBot-DSA_Game-Characters-Character.json create mode 100644 dsa/DiscoBot/Properties/Settings.Designer.cs create mode 100644 dsa/DiscoBot/Properties/Settings.settings create mode 100644 dsa/DiscoBot/Rework/Permissions.cs create mode 100644 dsa/DiscoBot/Token create mode 100644 dsa/DiscoBot/packages.config create mode 100644 dsa/DiscoBot/session.json create mode 100644 dsa/DiscoBot/sessions/TheCrew/TheCrew-0.json create mode 100644 dsa/DiscoBot/sessions/copy/copy-0.json create mode 100644 dsa/DiscoBot/sessions/test/test-0.json create mode 100644 dsa/DiscoBot/sessions/test/test-1.json create mode 100644 dsa/DiscoBot/sessions/test/test-2.json create mode 100644 dsa/DiscoBot/sessions/test/test-3.json create mode 100644 dsa/DiscoBot/sessions/test/test-4.json create mode 100644 dsa/FireBase/ExceptionEventArgs.cs create mode 100644 dsa/FireBase/Extensions/ObservableExtensions.cs create mode 100644 dsa/FireBase/Extensions/TaskExtensions.cs create mode 100644 dsa/FireBase/FireBase.csproj create mode 100644 dsa/FireBase/FirebaseClient.cs create mode 100644 dsa/FireBase/FirebaseException.cs create mode 100644 dsa/FireBase/FirebaseKeyGenerator.cs create mode 100644 dsa/FireBase/FirebaseObject.cs create mode 100644 dsa/FireBase/FirebaseOptions.cs create mode 100644 dsa/FireBase/Http/HttpClientExtensions.cs create mode 100644 dsa/FireBase/Http/PostResult.cs create mode 100644 dsa/FireBase/ObservableExtensions.cs create mode 100644 dsa/FireBase/Offline/ConcurrentOfflineDatabase.cs create mode 100644 dsa/FireBase/Offline/DatabaseExtensions.cs create mode 100644 dsa/FireBase/Offline/ISetHandler.cs create mode 100644 dsa/FireBase/Offline/InitialPullStrategy.cs create mode 100644 dsa/FireBase/Offline/Internals/MemberAccessVisitor.cs create mode 100644 dsa/FireBase/Offline/OfflineCacheAdapter.cs create mode 100644 dsa/FireBase/Offline/OfflineDatabase.cs create mode 100644 dsa/FireBase/Offline/OfflineEntry.cs create mode 100644 dsa/FireBase/Offline/RealtimeDatabase.cs create mode 100644 dsa/FireBase/Offline/SetHandler.cs create mode 100644 dsa/FireBase/Offline/StreamingOptions.cs create mode 100644 dsa/FireBase/Offline/SyncOptions.cs create mode 100644 dsa/FireBase/Query/AuthQuery.cs create mode 100644 dsa/FireBase/Query/ChildQuery.cs create mode 100644 dsa/FireBase/Query/FilterQuery.cs create mode 100644 dsa/FireBase/Query/FirebaseQuery.cs create mode 100644 dsa/FireBase/Query/IFirebaseQuery.cs create mode 100644 dsa/FireBase/Query/OrderQuery.cs create mode 100644 dsa/FireBase/Query/ParameterQuery.cs create mode 100644 dsa/FireBase/Query/QueryExtensions.cs create mode 100644 dsa/FireBase/Query/QueryFactoryExtensions.cs create mode 100644 dsa/FireBase/Query/SilentQuery.cs create mode 100644 dsa/FireBase/Settings.StyleCop create mode 100644 dsa/FireBase/Streaming/FirebaseCache.cs create mode 100644 dsa/FireBase/Streaming/FirebaseEvent.cs create mode 100644 dsa/FireBase/Streaming/FirebaseEventSource.cs create mode 100644 dsa/FireBase/Streaming/FirebaseEventType.cs create mode 100644 dsa/FireBase/Streaming/FirebaseServerEventType.cs create mode 100644 dsa/FireBase/Streaming/FirebaseSubscription.cs create mode 100644 dsa/FireBase/Streaming/NonBlockingStreamReader.cs create mode 100644 dsa/NUnitTestProject1/Auxiliary/Calculator/ArgumentTests.cs create mode 100644 dsa/NUnitTestProject1/Auxiliary/Calculator/StringSolverTests.cs create mode 100644 dsa/NUnitTestProject1/Auxiliary/DiceTests.cs create mode 100644 dsa/NUnitTestProject1/NUnitTest.csproj diff --git a/DSACore/Controllers/CommandsController.cs b/DSACore/Controllers/CommandsController.cs deleted file mode 100644 index b6e0be2..0000000 --- a/DSACore/Controllers/CommandsController.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using DSACore.Models.Network; -using DSALib.Commands; -using DSALib.Models.Network; -using Microsoft.AspNetCore.Mvc; - -// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 - -namespace DSACore.Controllers -{ - [Route("dsa/[controller]")] - public class CommandsController : Controller - { - // GET: api/ - [HttpGet] - public string Get() - { - return "Usage: post the command to execute"; - } - - // GET api//5 - /*[HttpGet("{id}")] - public string Get(int id) - { - return "value"; - }*/ - - // POST api//Felis - [HttpPost] - public string Post([FromBody] Command cmd) - { - try - { - return CommandHandler.ExecuteCommand(cmd).message; - } - catch (Exception e) - { - return $"Ein Fehler ist aufgetreten: \n {e.Message}"; - } - } - -/* - - // PUT api//5 - [HttpPut("{id}")] - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api//5 - [HttpDelete("{id}")] - public void Delete(int id) - { - }*/ - } -} \ No newline at end of file diff --git a/DSACore/Controllers/LobbyController.cs b/DSACore/Controllers/LobbyController.cs deleted file mode 100644 index 7890b4f..0000000 --- a/DSACore/Controllers/LobbyController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using DSACore.Models.Network; -using DSALib.Commands; -using DSALib.Models.Network; -using Microsoft.AspNetCore.Mvc; - -namespace DSACore.Controllers -{ - public class ScribbleController : Controller - { - [Route("[controller]")] - // GET: api/ - [HttpGet] - public string Get() - { - return "Usage: get /tokens/{Token}"; - } - - [HttpPost] - public string Post([FromBody] Command cmd) - { - try - { - return CommandHandler.ExecuteCommand(cmd).message; - } - catch (Exception e) - { - return $"Ein Fehler ist aufgetreten: \n {e.Message}"; - } - } - } -} \ No newline at end of file diff --git a/DSACore/Controllers/TokensController.cs b/DSACore/Controllers/TokensController.cs deleted file mode 100644 index a85cabe..0000000 --- a/DSACore/Controllers/TokensController.cs +++ /dev/null @@ -1,25 +0,0 @@ -using DSACore.Hubs; -using Microsoft.AspNetCore.Mvc; - -namespace DSACore.Controllers -{ - [Route("lobby/[controller]")] - [ApiController] - public class TokensController : Controller - { - // GET - [HttpGet("{token}")] - public ActionResult Get(string token) - { - if (!int.TryParse(token, out var intToken)) - return BadRequest("The token has to be a 32 bit unsigned integer"); - - if (intToken == 42) return Ok("Scribble"); - - if (!Users.Tokens.Exists(x => x.GetHashCode() == intToken)) return NotFound(); - - var group = Users.Tokens.Find(x => x.GetHashCode() == intToken); - return Ok(group.Group); - } - } -} \ No newline at end of file diff --git a/DSACore/Controllers/ValuesController.cs b/DSACore/Controllers/ValuesController.cs deleted file mode 100644 index eb08898..0000000 --- a/DSACore/Controllers/ValuesController.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace DSACore.Controllers -{ - [Route("api/[controller]")] - [ApiController] - public class ValuesController : ControllerBase - { - // GET api/values - [HttpGet] - public ActionResult> Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/values/5 - [HttpGet("{id}")] - public ActionResult Get(int id) - { - return "value"; - } - - // POST api/values - [HttpPost] - public void Post([FromBody] string value) - { - } - - // PUT api/values/5 - [HttpPut("{id}")] - public void Put(int id, [FromBody] string value) - { - } - - // DELETE api/values/5 - [HttpDelete("{id}")] - public void Delete(int id) - { - } - } -} diff --git a/DSACore/DSACore.csproj b/DSACore/DSACore.csproj deleted file mode 100644 index f7def31..0000000 --- a/DSACore/DSACore.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - netcoreapp2.2 - DSACore.Program - - - - - - - - - - - - - - - - - - - - - - - diff --git a/DSACore/Hubs/Login.cs b/DSACore/Hubs/Login.cs deleted file mode 100644 index f08c24a..0000000 --- a/DSACore/Hubs/Login.cs +++ /dev/null @@ -1,205 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using DSACore.Models.Network; -using DSALib.Commands; -using DSALib.DSA_Game.Characters; -using DSALib.FireBase; -using DSALib.Models.Network; -using Microsoft.AspNetCore.SignalR; -using Group = DSACore.Models.Network.Group; - -namespace DSACore.Hubs -{ - public class Users : Hub - { - //private static Dictionary UserGroup = new Dictionary(); - - private const string ReceiveMethod = "ReceiveMessage"; //receiveMethod; - - static Users() { - DsaGroups = Database.GetGroups().Result.Select(x=>new Group(x.Item1, x.Item2)).ToList(); - DsaGroups.Add(new Group("login", "")); - DsaGroups.Add(new Group("online", "")); - //AddGroups(); - } - - private static List DsaGroups { get; } - public static List Tokens { get; } = new List(); - - - public async Task SendMessage(string user, string message) - { - try - { - var group = getGroup(Context.ConnectionId).Name; - } - catch (InvalidOperationException) - { - await Clients.Caller.SendCoreAsync(ReceiveMethod, - new object[] { "Nutzer ist in keiner Gruppe. Erst joinen!" }); - } - - if (message[0] == '/') - { - var args = message.Split(' ', StringSplitOptions.RemoveEmptyEntries).ToList(); - - var Timon = args.Any(x => x == "hallo"); - - var ident = args.First().Replace("/", ""); - if (args.Count > 0) args.RemoveAt(0); - - var ret = CommandHandler.ExecuteCommand(new Command - { - CharId = 0, - CmdIdentifier = ident, - CmdTexts = args, - Name = user - }); - - switch (ret.ResponseType) - { - case ResponseType.Caller: - case ResponseType.Error: - await Clients.Caller.SendAsync(ReceiveMethod, ret.message); - break; - case ResponseType.Broadcast: - await SendToGroup(ret.message); - break; - } - } - else - { - await SendToGroup(message); - } - } - - private Task SendToGroup(string message) - { - try - { - var group = getGroup(Context.ConnectionId).Name; - return Clients.Group(group).SendCoreAsync(ReceiveMethod, - new object[] {getUser(Context.ConnectionId).Name, message}); - } - catch (InvalidOperationException) - { - return Clients.Caller.SendCoreAsync(ReceiveMethod, - new object[] {"Nutzer ist in keiner Gruppe. Erst joinen!"}); - } - } - - private Group getGroup(string id) - { - return DsaGroups.First(x => x.Users.Exists(y => y.ConnectionId.Equals(id))); - } - - private User getUser(string id) - { - return DsaGroups.First(x => x.Users.Exists(y => y.ConnectionId.Equals(id))).Users - .First(z => z.ConnectionId.Equals(id)); - } - - public async Task GetGroups() { - var test = await Database.GetGroups(); - foreach (var group in test.Select(x => new Group(x.Item1, x.Item2)).ToList()) - if (!DsaGroups.Exists(x => x.Name.Equals(group.Name))) - DsaGroups.Add(group); - - await Clients.Caller.SendCoreAsync("ListGroups", new object[] {DsaGroups.Select(x => x.SendGroup())}); - //throw new NotImplementedException("add database call to get groups"); - } - - public async Task AddGroup(string group, string password) - { - DsaGroups.Add(new Group(group, password)); - var Dgroup = new DSALib.Models.Database.Groups.Group {Name = group, Id = DsaGroups.Count - 1}; - //Database.AddGroup(Dgroup); - await Clients.Caller.SendCoreAsync(ReceiveMethod, new[] {$"group {group} sucessfully added"}); - //throw new NotImplementedException("add database call to add groups"); - } - - public async Task UploadChar(string xml) - { - var group = getGroup(Context.ConnectionId); - - await Database.AddChar(new Character(new MemoryStream(Encoding.UTF8.GetBytes(xml))), group.Name); - //throw new NotImplementedException("add database call to add groups"); - } - - public async Task Login(string group, string user, string hash) - { - //string password = System.Text.Encoding.UTF8.GetString(hash); - if (hash == DsaGroups.First(x => x.Name == group).Password) - { - var gGroup = DsaGroups.First(x => x.Name.Equals(group)); - if (!gGroup.Users.Exists(x => x.Name.Equals(user))) - { - await Groups.RemoveFromGroupAsync(Context.ConnectionId, "login"); - await Groups.AddToGroupAsync(Context.ConnectionId, group); - gGroup.Users.Add(new User {ConnectionId = Context.ConnectionId, Name = user}); - await SendToGroup("Ein neuer Nutzer hat die Gruppe betreten"); - await Clients.Caller.SendAsync("LoginResponse", 0); - await Clients.Caller.SendAsync("PlayerStatusChanged", new[] {user, "online"}); - - Tokens.Add(new Token(group)); - await Clients.Caller.SendAsync("Token", Tokens.Last().GetHashCode()); - purgeTokens(); - } - else - { - await Clients.Caller.SendAsync("LoginResponse", 1); - } - } - else - { - await Clients.Caller.SendAsync("LoginResponse", 2); - //await Clients.Caller.SendAsync(receiveMethod, "Falsches Passwort!"); - } - } - - private void purgeTokens() - { - Tokens.RemoveAll(x => !x.IsValid()); - } - - public override Task OnDisconnectedAsync(Exception exception) - { - Disconnect().Wait(); - return base.OnDisconnectedAsync(exception); - } - - public override Task OnConnectedAsync() - { - Groups.AddToGroupAsync(Context.ConnectionId, "login").Wait(); - Groups.AddToGroupAsync(Context.ConnectionId, "online").Wait(); - return base.OnConnectedAsync(); - } - - public async Task Disconnect() - { - await Groups.RemoveFromGroupAsync(Context.ConnectionId, "online"); - if (DsaGroups.Exists(x => x.Users.Exists(y => y.ConnectionId == Context.ConnectionId))) - try - { - var group = getGroup(Context.ConnectionId); - - - var user = getUser(Context.ConnectionId); - - await Clients.Caller.SendAsync("PlayerStatusChanged", new[] {user.Name, "offline"}); - //await SendToGroup(user.Name + " disconnected from the Server"); - group.Users.Remove(user); - await Groups.RemoveFromGroupAsync(Context.ConnectionId, group.Name); - } - catch (Exception e) - { - Console.WriteLine(e); - //throw; - } - } - } -} \ No newline at end of file diff --git a/DSACore/Models/Network/Group.cs b/DSACore/Models/Network/Group.cs deleted file mode 100644 index efe12ee..0000000 --- a/DSACore/Models/Network/Group.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace DSACore.Models.Network -{ - public class Group - { - public Group(string name, string password) - { - Name = name; - Password = password; - } - - public Group(string name, int userOnline) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - } - - public string Name { get; set; } - public string Password { get; set; } - public List Users { get; set; } = new List(); - - public int UserCount => Users.Count; - - public SendGroup SendGroup() - { - return new SendGroup(Name, UserCount); - } - } - - public class SendGroup - { - public SendGroup(string name, int userCount) - { - Name = name ?? throw new ArgumentNullException(nameof(name)); - UserCount = userCount; - } - - public string Name { get; set; } - - public int UserCount { get; set; } - } -} \ No newline at end of file diff --git a/DSACore/Models/Network/Token.cs b/DSACore/Models/Network/Token.cs deleted file mode 100644 index 451cafc..0000000 --- a/DSACore/Models/Network/Token.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; - -namespace DSACore.Models.Network -{ - public class Token - { - private readonly DateTime creation = DateTime.Now; - - public Token(string group) - { - Group = group; - } - - public string Group { get; set; } - - public bool IsValid() - { - return DateTime.Now - creation < TimeSpan.FromMinutes(1); - } - } -} \ No newline at end of file diff --git a/DSACore/Models/Network/User.cs b/DSACore/Models/Network/User.cs deleted file mode 100644 index 8b8008c..0000000 --- a/DSACore/Models/Network/User.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace DSACore.Models.Network -{ - public class User - { - public string Name { get; set; } - public string ConnectionId { get; set; } - public int Char { get; set; } - } -} \ No newline at end of file diff --git a/DSACore/Program.cs b/DSACore/Program.cs deleted file mode 100644 index 8af0a74..0000000 --- a/DSACore/Program.cs +++ /dev/null @@ -1,24 +0,0 @@ -using DSALib.DSA_Game; -using DSALib.FireBase; -using Microsoft.AspNetCore; -using Microsoft.AspNetCore.Hosting; - -namespace DSACore -{ - public class Program - { - public static void Main(string[] args) - { - Database.GetGroup(0).Wait(); - Dsa.Startup(); - CreateWebHostBuilder(args).Build().Run(); - } - - public static IWebHostBuilder CreateWebHostBuilder(string[] args) - { - return WebHost.CreateDefaultBuilder(args) - .UseStartup() - .UseUrls("http://0.0.0.0:5000"); - } - } -} \ No newline at end of file diff --git a/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json b/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json deleted file mode 100644 index b9941f2..0000000 --- a/DSACore/Properties/DSALib-Auxiliary-CommandInfo.json +++ /dev/null @@ -1,101 +0,0 @@ -[ - { - "Name": "ich bin", - "Scope": "All", - "Brief": "Setzt den gespielten Charakter fest", - "Description": [ - "Mit \"!Ich bin\" kann der gespielte Charakter definiert, bzw. gewechselt werden.\n", - " Die Charaktere müssen als *.xml Dateien hinterlegt sein.\n\n", - " !ich Zeigt an welcher Charakter zur Zeit gespielt wird\n", - " !ich bin Zalibius Wechsel zum Helden Zalibius\n", - " !ich Rhoktar Orkische Variante von !ich bin.\n", - " Wechselt zu Rhoktar.\n\n", - " !list chars Zeigt die Liste verfügbarer Charaktere.\n", - " \n" - ] - }, - { - "Name": "List", - "Scope": "All", - "Brief": "Anzeige vonSpielrelevanten Listen", - "Description": [ - "Mit \"!list\" lassen sich spielrelevante Listen ausgeben. Die Angezeigte Liste wird nach einiger Zeit wieder gelöscht.\n", - "\n", - " !list chars Liste aller verfügbaren Helden (eingelesen per *.xml)\n", - " und NSCs.\n", - " (Mit \"!ich bin\" kann der Held ausgewählt werden.)\n", - " !list commands Liste aller verwendbaren Bot-Kommandos.\n", - " !list sounds Liste der Soundeffekte." - ] - }, - { - "Name": "Held", - "Scope": "All", - "Brief": "Anzeige von Heldenwerten", - "Description": [ - "Mit \"!Held\" lassen sich Heldenwerte ausgeben. Mehrere Werte können gleichzeitig angefordert werde. \"!Held LE Waffen\" liefert so z.B. Informationen zur Lebensenergie und den Kampfwerten.\n Bis auf wenige Ausnahmen wird die Angezeigte Liste nach einiger Zeit wieder gelöscht.\n", - "\n", - " !Held Zeigt den Heldenbrief an.\n", - " (Diese Liste wird nicht automatisch gelöscht)\n", - " !Held Eigenschaften Zeigt die Eigenschaften MU/KL/CH/IN/KK/GE/FF/KO.\n", - " !Held e Kurzform von \"!Held Eigenschaften\".\n", - " !Held LE Zeigt LE an.\n", - " !Held AE Zeigt AE an.\n", - " !Held stats Zeigt Eigenschaften und zusätzlich SO/LE/AE.\n", - " !Held Kampfwerte Zeigt AT/PA für aktivierte Waffentalente.\n", - " !Held Waffe/!list w Kurzformen von \"!Held Kampfwerte\".\n", - " !Held Vorteile Zeigt Vor- und Nachteile an.\n", - " !Held v Kurzform von \"!Held Vorteile\".\n", - " !Held Talente Zeigt die Liste aller aktivierten Talente, deren TaW,\n", - " sowie die Probe.\n", - " !Held t Kurzform von \"!Held Talente\".\n", - " !Held Zauber Zeigt die Liste aller aktivierten Zauber, deren ZaW,\n", - " sowie die Probe.\n", - " !Held z Kurzform von \"!Held Zauber\".\n" - ] - }, - { - "Name": "LE", - "Scope": "All", - "Brief": "Ändert dein Leben - im wahrsten Sinne des Wortes", - "Description": [ - "Mit !LE zeigt man die Lebensenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n", - " !LE Zeigt Lebensenergie an\n", - " !LE 30 Setzt LE auf 30\n", - " !LE +5 Erhöht LE um 5 (bis zum Maximum)\n", - " !LE ++5 Erhöht LE um 5 (ignoriert Maximum)\n", - " !LE -5 Verringert LE um 5\n \n" - ] - }, - { - "Name": "AE", - "Scope": "All", - "Brief": "Ändert Astralenergie", - "Description": [ - "Mit !AE (oder !Asp) zeigt man die Astralenergie an, ändert sie, oder setzt sie auf einen neuen Wert\n\n", - " !AE Zeigt Astralenergie an\n", - " !AE 30 Setzt Asp auf 30\n", - " !AE +5 Erhöht Asp um 5 (bis zum Maximum)\n", - " !AE ++5 Erhöht Asp um 5 (ignoriert Maximum)\n", - " !AE -5 Verringert Asp um 5 (Minimum 0)\n" - ] - }, - { - "Name": "Gm", - "Scope": "Meister", - "Brief": "Kontrolliere andere Charaktere", - "Description": [ - "Mit !GM fürhrt man commands als eine andere Person aus.", - " !GM [charaktername] [command] [commandattribut] [mofifier]", - " Unterstützte [commands]'s:", - " !GM [name] LE", - " !GM [name] AE", - " !GM [name] Talent", - " !GM [name] Fernkampf", - " !GM [name] Eigenschaft", - " !GM [name] Zauber", - " !GM [name] Angriff", - " !GM [name] Parade" - ] - } -] \ No newline at end of file diff --git a/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json b/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json deleted file mode 100644 index fd387f5..0000000 --- a/DSACore/Properties/DSALib-DSA_Game-Characters-Character.json +++ /dev/null @@ -1,290 +0,0 @@ -[ - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 30, - "Lebenspunkte_Aktuell": 30, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 20, - "Astralpunkte_Aktuell": 20, - "Name": "Felis Exodus Schattenwald" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 29, - "Lebenspunkte_Aktuell": 29, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 0, - "Astralpunkte_Aktuell": 0, - "Name": "Gardist" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 31, - "Lebenspunkte_Aktuell": 31, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 0, - "Astralpunkte_Aktuell": 0, - "Name": "Hartmut Reiher" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 21, - "Lebenspunkte_Aktuell": 21, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 35, - "Astralpunkte_Aktuell": 35, - "Name": "Helga vom Drachenei, Tausendsasserin" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 25, - "Lebenspunkte_Aktuell": 25, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 0, - "Astralpunkte_Aktuell": 0, - "Name": "Krenko" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 39, - "Lebenspunkte_Aktuell": 39, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 0, - "Astralpunkte_Aktuell": 0, - "Name": "Ledur Torfinson" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 26, - "Lebenspunkte_Aktuell": 26, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 13, - "Astralpunkte_Aktuell": 13, - "Name": "Morla" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 28, - "Lebenspunkte_Aktuell": 28, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 40, - "Astralpunkte_Aktuell": 40, - "Name": "Numeri Illuminus" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 39, - "Lebenspunkte_Aktuell": 39, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 16, - "Astralpunkte_Aktuell": 16, - "Name": "Potus" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 18, - "Lebenspunkte_Aktuell": 18, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 13, - "Astralpunkte_Aktuell": 13, - "Name": "Pump aus der Gosse" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 34, - "Lebenspunkte_Aktuell": 34, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 17, - "Astralpunkte_Aktuell": 17, - "Name": "Rhoktar4" - }, - { - "Eigenschaften": {}, - "Talente": [], - "Zauber": [], - "Kampftalente": [], - "Vorteile": [], - "PropTable": { - "MU": "Mut", - "KL": "Klugheit", - "IN": "Intuition", - "CH": "Charisma", - "FF": "Fingerfertigkeit", - "GE": "Gewandtheit", - "KO": "Konstitution", - "KK": "Körperkraft" - }, - "Lebenspunkte_Basis": 28, - "Lebenspunkte_Aktuell": 28, - "Ausdauer_Basis": 0, - "Ausdauer_Aktuell": 0, - "Astralpunkte_Basis": 43, - "Astralpunkte_Aktuell": 43, - "Name": "Volant" - } -] \ No newline at end of file diff --git a/DSACore/Properties/PublishProfiles/FolderProfile.pubxml b/DSACore/Properties/PublishProfiles/FolderProfile.pubxml deleted file mode 100644 index 2fd07c5..0000000 --- a/DSACore/Properties/PublishProfiles/FolderProfile.pubxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - FileSystem - FileSystem - Release - Any CPU - - True - False - netcoreapp2.1 - 35a5e2cc-0fd4-4bc0-acbf-38599caed1c4 - false - <_IsPortable>true - bin\Release\netcoreapp2.1\publish\ - False - win-x64 - - \ No newline at end of file diff --git a/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml b/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml deleted file mode 100644 index e03b55a..0000000 --- a/DSACore/Properties/PublishProfiles/FolderProfile1.pubxml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - FileSystem - FileSystem - Release - Any CPU - - True - False - netcoreapp2.1 - linux-x64 - 35a5e2cc-0fd4-4bc0-acbf-38599caed1c4 - false - <_IsPortable>true - bin\Release\netcoreapp2.1\publish\ - False - - \ No newline at end of file diff --git a/DSACore/Properties/launchSettings.json b/DSACore/Properties/launchSettings.json deleted file mode 100644 index 2da5fec..0000000 --- a/DSACore/Properties/launchSettings.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:2170", - "sslPort": 44365 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "launchUrl": "api/commands", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "DSACore": { - "commandName": "Project", - "launchBrowser": true, - "launchUrl": "api/commands", - "applicationUrl": "https://0.0.0.0:5001;http://0.0.0.0:5000", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs deleted file mode 100644 index ef22802..0000000 --- a/DSACore/Startup.cs +++ /dev/null @@ -1,47 +0,0 @@ -using DSACore.Hubs; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace DSACore -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { - - services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); - - services.AddSignalR(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IHostingEnvironment env) - { - if (env.IsDevelopment()) - app.UseDeveloperExceptionPage(); - else - app.UseHsts(); - - app.UseCors("CorsPolicy"); - - app.UseSignalR(routes => { routes.MapHub("/login"); }); - - app.UseWebSockets(); - - //app.UseCors("AllowSpecificOrigin"); - app.UseHttpsRedirection(); - app.UseMvc(); - } - } -} \ No newline at end of file diff --git a/DSACore/appsettings.Development.json b/DSACore/appsettings.Development.json deleted file mode 100644 index e203e94..0000000 --- a/DSACore/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - } -} diff --git a/DSACore/appsettings.json b/DSACore/appsettings.json deleted file mode 100644 index dee968c..0000000 --- a/DSACore/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Microsoft.AspNetCore.SignalR": "Debug", - "Microsoft.AspNetCore.Http.Connections": "Debug", - "Default": "Debug" - } - }, - "AllowedHosts": "*" -} diff --git a/DSALib/Auxiliary/Calculator/Argument.cs b/DSALib/Auxiliary/Calculator/Argument.cs deleted file mode 100644 index e681377..0000000 --- a/DSALib/Auxiliary/Calculator/Argument.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; - -namespace DSALib.Auxiliary.Calculator -{ - /// - /// Provides an ISolvable class to save numbers. The class handles Argument checking and conversion from string to int. - /// - public class Argument : ISolvable - { - private readonly int value; - - public Argument(string value) - { - // check whether the value given is an empty string - if (string.IsNullOrEmpty(value)) - throw new ArgumentException("Argument kann nicht mit einem leeren string instanziert werden. ", - nameof(value)); - - if (!int.TryParse(value, out var result)) - throw new ArgumentException($"Kann {value} nicht in Integer konvertieren"); - - this.value = result; - } - - public int Solve() - { - return value; - } - - public override string ToString() - { - return value.ToString(); - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Calculator/ISolvable.cs b/DSALib/Auxiliary/Calculator/ISolvable.cs deleted file mode 100644 index 844e9b3..0000000 --- a/DSALib/Auxiliary/Calculator/ISolvable.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace DSALib.Auxiliary.Calculator -{ - /// - /// Object has to be able to return an integer as it's value - /// - public interface ISolvable - { - int Solve(); - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Calculator/Operator.cs b/DSALib/Auxiliary/Calculator/Operator.cs deleted file mode 100644 index e6aeec6..0000000 --- a/DSALib/Auxiliary/Calculator/Operator.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using DSALibv.Auxiliary.Calculator; - -namespace DSALib.Auxiliary.Calculator -{ - /// - /// The Operator Class represents a binary operator with tow Arguments and an Operation type - /// - public class Operator : ISolvable - { - private readonly ISolvable arg1, arg2; - - public Operator(ISolvable arg1, ISolvable arg2, Ops operatorType) - { - this.arg1 = arg1; - this.arg2 = arg2; - OperatorType = operatorType; - } - - public Ops OperatorType { get; set; } - - public int Solve() - { - int result; - switch (OperatorType) - { - case Ops.Dice: - result = Dice.Roll(arg1.Solve(), arg2.Solve()); - break; - case Ops.Multiply: - result = arg1.Solve() * arg2.Solve(); - break; - case Ops.Add: - result = arg1.Solve() + arg2.Solve(); - break; - case Ops.Subtract: - result = arg1.Solve() - arg2.Solve(); - break; - default: - throw new ArgumentOutOfRangeException(); - } - - return result; - } - - public override string ToString() - { - return $"({arg1} {OperatorType} {arg2})"; - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Calculator/Ops.cs b/DSALib/Auxiliary/Calculator/Ops.cs deleted file mode 100644 index 93046d0..0000000 --- a/DSALib/Auxiliary/Calculator/Ops.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace DSALibv.Auxiliary.Calculator -{ - /// - /// The Different Operations, witch can be performed in execution-order - /// - public enum Ops - { - Dice, - Multiply, - Subtract, - Add - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Calculator/StringSolver.cs b/DSALib/Auxiliary/Calculator/StringSolver.cs deleted file mode 100644 index 45d6a54..0000000 --- a/DSALib/Auxiliary/Calculator/StringSolver.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using DSALibv.Auxiliary.Calculator; - -namespace DSALib.Auxiliary.Calculator -{ - /// - /// The StringSolver divides the calculation string into operations and SubStringSolvers if the string contains - /// parentheses - /// - public class StringSolver : ISolvable - { - private readonly List arguments = new List(); - private readonly string input; - - public StringSolver(string input) - { - this.input = input; - } - - public int Solve() - { - var workInput = "0+" + input.Replace(" ", string.Empty).ToLower(); - workInput = ExpandParentheses(workInput); - - // Create a List of the different parts of the calculation, e.g.:{"0", "+", "(5+6)", "d", "3"}. - AtomizeOperations(workInput); - - // traverse the List in order of Operation to Create the binary operation tree . - NestOperations(); - - // the List now contains only the top operation node, witch can be solved recursively, - return ((ISolvable) arguments.First()).Solve(); - } - - public override string ToString() - { - return "(0+" + input.Replace(" ", string.Empty).ToLower() + ")"; - } - - private static string - GetInner(ref string input) // extract the inner bracket an remove the section from the input string - { - var depth = 0; - for (var index = 1; index < input.Length; index++) - { - var c = input[index]; - switch (c) - { - case '(': - depth++; - break; - case ')': - if (depth == 0) - { - var split = input.Substring(1, index - 1); - input = input.Substring(index + 1); - return split.Equals(string.Empty) ? "0" : split; - } - else - { - depth--; - } - - break; - } - } - - throw new ArgumentException("Invalid brace sequence"); - } - - private static Ops GetOps(char c) - { - switch (c) - { - case 'd': - case 'w': - return Ops.Dice; - case '+': - return Ops.Add; - case '-': - return Ops.Subtract; - case '*': - return Ops.Multiply; - default: - return Ops.Multiply; - } - } - - private static string ExpandParentheses(string input) // insert * between Parentheses and digits - { - for (var i = 0; i < input.Length - 1; i++) - if (input[i + 1] == '(' && char.IsNumber(input[i])) - input = input.Insert(i + 1, "*"); - - for (var i = 1; i < input.Length; i++) - if (input[i - 1] == ')' && char.IsNumber(input[i])) - input = input.Insert(i, "*"); - - return input; - } - - private void AtomizeOperations(string workInput) - { - for (var index = 0; index < workInput.Length; index++) - { - var c = workInput[index]; - - if (char.IsNumber(c)) - { - // if char number, check if at end of string, else continue looping - if (index == workInput.Length - 1) - // if at end of string; add remaining number to arguments - arguments.Add(new Argument(workInput.Substring(0, index + 1))); - - continue; - } - - switch (c) - { - case ')': - throw new ArgumentException("Invalid brace sequence"); - case '(': - arguments.Add(new StringSolver(GetInner(ref workInput))); - index = -1; - break; - default: - if (index > 0) arguments.Add(new Argument(workInput.Substring(0, index))); - - arguments.Add(GetOps(c)); - workInput = workInput.Remove(0, index + 1); - index = -1; - break; - } - } - } - - private void NestOperations() - { - foreach (Ops currentOp in Enum.GetValues(typeof(Ops))) - // cycle through operators in operational order - for (var index = 0; index < arguments.Count; index++) - { - var arg = arguments[index]; - - if (arg.GetType() != typeof(Ops)) continue; - - // arg is of type Ops - var op = (Ops) arg; - - if (op != currentOp) continue; - - // arg describes the current operation - HandleSpecialFormatting(ref index, op); // Deal with special needs... - - // replace the previous current and next Element in the List with one Operation object - var temp = new Operator((ISolvable) arguments[index - 1], (ISolvable) arguments[index + 1], op); - arguments[index - 1] = temp; - arguments.RemoveRange(index, 2); - index--; - } - } - - private void HandleSpecialFormatting(ref int index, Ops op) - { - var arg1 = arguments[index - 1]; - if (arg1.GetType() == typeof(Ops)) - { - if (op == Ops.Dice) arguments.Insert(index++, new Argument("1")); // w6 -> 1w6 - - if (op == Ops.Subtract) arguments.Insert(index++, new Argument("0")); // +-3 -> +0-3 - } - - var arg2 = arguments[index + 1]; // 3+-5 -> 3+(0-5) - if (arg2.GetType() == typeof(Ops)) - { - arguments[index + 1] = new Operator(new Argument("0"), (ISolvable) arguments[index + 2], (Ops) arg2); - arguments.RemoveAt(index + 2); - } - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/CommandInfo.cs b/DSALib/Auxiliary/CommandInfo.cs deleted file mode 100644 index d8e2188..0000000 --- a/DSALib/Auxiliary/CommandInfo.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Linq; - -namespace DSALib.Auxiliary -{ - public struct CommandInfo - { - public CommandInfo(string name, string brief, string[] description, string scope) - { - Name = name; - Scope = scope; - Brief = brief; - Description = description; - } - - public string Name { get; } - - public string Scope { get; } - - public string Brief { get; } - - public string[] Description { get; } - - public string GetDescription() - { - return Description.Aggregate((s, c) => s + c); - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Dice.cs b/DSALib/Auxiliary/Dice.cs deleted file mode 100644 index 0bfabeb..0000000 --- a/DSALib/Auxiliary/Dice.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Linq; - -namespace DSALib.Auxiliary -{ - public static class Dice // roll it! - { - private static readonly Random Rnd = new Random(); - - public static int Roll(int d = 20) - { - return Rnd.Next(d) + 1; - } - - public static int Roll(string input) - { - var strings = input.ToLower().Split(new[] {'w', 'd'}, 2, StringSplitOptions.RemoveEmptyEntries).ToList(); - - - if (strings.Count != 2) - throw new ArgumentException($"{input}: does not satisfy the format requirements( dice count (d|w) die size)"); - - var count = Convert.ToInt32(strings[0]); - var d = Convert.ToInt32(strings[0]); - - return Roll(count, d); - } - - public static int Roll(int count, int d) - { - if (d <= 0 || count <= 0) return 0; - - var sum = 0; - for (var i = 0; i < Math.Abs(count); i++) - { - var roll = Roll(d); - sum += roll; - } - - sum *= Math.Abs(count) / count; - - return sum; - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/Extensions.cs b/DSALib/Auxiliary/Extensions.cs deleted file mode 100644 index 7d367a5..0000000 --- a/DSALib/Auxiliary/Extensions.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace DSALib.Auxiliary -{ - public static class StringExtension - { - //This mehod extends string. It adds spaces until a fixed length is reached. - //If the original string is already longer, it is returner unmodified. - public static string AddSpaces(this string str, int length) - { - var temp = str; - for (var i = str.Length; i < length; i++) temp += " "; - return temp; - } - - - //This mehod extends string. - //It adds spaces at the HEAD of a string until a fixed length is reached. - //If the original string is already longer, it is returner unmodified. - public static string AddSpacesAtHead(this string str, int length) - { - var temp = ""; - for (var i = str.Length; i < length; i++) temp += " "; - return temp + str; - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/IDataObjectEnumerableExtension.cs b/DSALib/Auxiliary/IDataObjectEnumerableExtension.cs deleted file mode 100644 index b8a6067..0000000 --- a/DSALib/Auxiliary/IDataObjectEnumerableExtension.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using DSALib.Auxiliary; -using DSALib.Models.Database; - -namespace DSACore.Auxiliary -{ - public static class DataObjectEnumerableExtension - { - public static IDataObject Match(this IEnumerable dataObjects, string name) - { - return (dataObjects as IOrderedEnumerable ?? throw new InvalidOperationException()).OrderBy(x => SpellCorrect.Compare(name,x.Name)).Last(); - } - - public static bool TryMatch(this IEnumerable dataObjects,out IDataObject data, string name) - { - data = (dataObjects as IOrderedEnumerable ?? throw new InvalidOperationException()).OrderBy(x => SpellCorrect.Compare(name,x.Name)).Last(); - - return SpellCorrect.IsMatch(name, data.Name); - } - } -} diff --git a/DSALib/Auxiliary/RandomMisc.cs b/DSALib/Auxiliary/RandomMisc.cs deleted file mode 100644 index 2723930..0000000 --- a/DSALib/Auxiliary/RandomMisc.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Linq; -using System.Text; - -namespace DSALib.Auxiliary -{ - public static class RandomMisc - { - private static readonly Random Rand = new Random(); - - // use: 4w6 +4 - public static string Roll(string input) - { - var output = new StringBuilder(); - var strings = input.Split('w', 'd').ToList(); - var count = Convert.ToInt32(strings[0]); - strings = strings[1].Split(' ').ToList(); - var d = Convert.ToInt32(strings[0]); - - if (strings.Count > 0) - { - } - - var sum = 0; - for (var i = 0; i < count; i++) - { - var roll = Dice.Roll(d); - sum += roll; - output.Append("[" + roll + "] "); - } - - if (strings.Count > 1) - { - sum += Convert.ToInt32(strings[1]); - output.Append("sum: " + sum); - } - - return output.ToString(); - } - - public static double Random(double stdDev = 1, double mean = 0) - { - var u1 = Rand.NextDouble(); // uniform(0,1) random doubles - var u2 = Rand.NextDouble(); - var randStdNormal = Math.Sqrt(-2.0 * Math.Log(u1)) * - Math.Sin(2.0 * Math.PI * u2); // random normal(0,1) - var randNormal = - mean + stdDev * randStdNormal; // random normal(mean,stdDev^2) - return randNormal; - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/SpellCorrect.cs b/DSALib/Auxiliary/SpellCorrect.cs deleted file mode 100644 index 79908c4..0000000 --- a/DSALib/Auxiliary/SpellCorrect.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; - -namespace DSALib.Auxiliary -{ - public class SpellCorrect - { - public const double ErrorThreshold = 1 / 3.0; - private const double Match = 3.0; - private const double Gap = -1.5; - private const double Mismatch = -2.0; - - public static double Compare(string s, string q) - { - s = s.ToLower(); - q = q.ToLower(); - - int i, j; - - var matrix = new double[s.Length + 1, q.Length + 1]; - var max = 0.0; - matrix[0, 0] = 0.0; - - for (i = 1; i < s.Length; i++) - matrix[i, 0] = i * Gap; - - for (i = 1; i < q.Length; i++) matrix[0, i] = 0.0; - - - for (i = 1; i <= s.Length; i++) - for (j = 1; j <= q.Length; j++) - { - double decay = j / (s.Length * 1000.0); - var add = s[i - 1] == q[j - 1] ? Match - decay : Mismatch; - var score = matrix[i - 1, j - 1] + add; - - if (score < matrix[i - 1, j] + Gap) score = matrix[i - 1, j] + Gap; - - if (score < matrix[i, j - 1] + Gap) score = matrix[i, j - 1] + Gap; - - if (i > 1 && j > 1) - if (s[i - 1] == q[j - 2] && s[i - 2] == q[j - 1]) - { - add = 3 / 2.0 * Match - decay; - if (score < matrix[i - 2, j - 2] + add) score = matrix[i - 2, j - 2] + add; - } - - if (max < score && i == s.Length) max = score; - - matrix[i, j] = score; - } - - return max; - } - - public static bool IsMatch(string s1, string s2) - { - var score = Compare(s1, s2); - return score > ErrorThreshold * s1.Length; - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/TalentEnumerableExtension.cs b/DSALib/Auxiliary/TalentEnumerableExtension.cs deleted file mode 100644 index 6ec7fcc..0000000 --- a/DSALib/Auxiliary/TalentEnumerableExtension.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text; -using DSACore.Auxiliary; -using DSALib.DSA_Game.Characters; -using DSALib.Models.Dsa; - -namespace DSALib.Auxiliary -{ - public static class TalentEnumerableExtension - { - public static string ProbenTest(this IEnumerable List, Character c, string talentName, int erschwernis = 0) - { - var output = new StringBuilder(); - var sc = new SpellCorrect(); - - if (!List.TryMatch(out var iTalent, talentName)) - return $"{c.Name} kann nicht {talentName}..."; - - var talent = (Talent) iTalent; - var props = talent.GetEigenschaften(); // get the required properties - var tap = talent.Value; // get taw - var werte = props.Select(p => c.Eigenschaften[c.PropTable[p]]).ToArray(); - - output.AppendFormat( - "{0} würfelt: {1} \n{2} - {3} taw:{4} {5} \n", - c.Name, - talent.Name, - talent.Probe, - string.Join("/", werte), - talent.Value, - erschwernis.Equals(0) ? string.Empty : "Erschwernis: " + erschwernis); - - output.Append(" "); - tap -= erschwernis; - var gesamtErschwernis = tap; - if (gesamtErschwernis < 0) - { - tap = 0; - for (var i = 0; i <= 2; i++) - { - // foreach property, dice and tap - var temp = Dice.Roll(); - var eigenschaft = c.Eigenschaften[c.PropTable[props[i]]]; - - if (eigenschaft + gesamtErschwernis < temp) tap -= temp - (eigenschaft + gesamtErschwernis); - - output.Append($"[{temp}]"); // add to string - } - - if (tap >= 0) tap = 1; - } - else - { - for (var i = 0; i <= 2; i++) - { - // foreach property, dice and tap - var temp = Dice.Roll(); - var eigenschaft = c.Eigenschaften[c.PropTable[props[i]]]; - - if (eigenschaft < temp) tap -= temp - eigenschaft; - - output.Append($"[{temp}]"); // add to string - } - } - - tap = tap == 0 ? 1 : tap; - - output.AppendFormat(" tap: {0,2}", tap); - - return output.ToString(); // return output - } - } -} \ No newline at end of file diff --git a/DSALib/Auxiliary/WeaponImporter.cs b/DSALib/Auxiliary/WeaponImporter.cs deleted file mode 100644 index 61eb33e..0000000 --- a/DSALib/Auxiliary/WeaponImporter.cs +++ /dev/null @@ -1,175 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.Http; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using DSALib.FireBase; -using DSALib.Models.Database.Dsa; - -namespace DSALib.Auxiliary -{ - public class WeaponImporter - { - private readonly List Range = new List(); - private readonly List Weapons = new List(); - - public async Task DownloadWeapons() - { - var client = new HttpClient(); - - - for (var i = 1; i <= 25; i++) - { - var responseString = - await client.GetStringAsync("http://diarium.eu/dsa4-forge/ajax/categoryChanged/" + i); - - var talentRegex = new Regex(@"(?<=