├── .gitignore ├── Novaria.Common ├── Core │ ├── HttpNetworkManager.cs │ ├── NetMsgId.cs │ └── Packet.cs ├── Crypto │ ├── AeadTool.cs │ ├── DiffieHellman.cs │ ├── GameDataExtraction.cs │ └── XOR.cs ├── Mono │ ├── Mono.Math.Prime.Generator │ │ ├── NextPrimeFinder.cs │ │ ├── PrimeGeneratorBase.cs │ │ └── SequentialSearchPrimeGeneratorBase.cs │ ├── Mono.Math.Prime │ │ ├── ConfidenceFactor.cs │ │ └── PrimalityTests.cs │ ├── Mono.Math │ │ └── BigInteger.cs │ └── Mono.Security.Cryptography │ │ ├── CryptoConvert.cs │ │ ├── CryptoTools.cs │ │ ├── DHKeyGeneration.cs │ │ ├── DHParameters.cs │ │ ├── DiffieHellman.cs │ │ └── DiffieHellmanManaged.cs ├── Novaria.Common.csproj ├── Protos │ ├── AchievementInfo.cs │ ├── AchievementRewardReceive.cs │ ├── ActivityDetail.cs │ ├── ActivityLoginRewardReceive.cs │ ├── ActivityPeriodicFinalRewardReceive.cs │ ├── ActivityPeriodicRewardReceive.cs │ ├── AgentApply.cs │ ├── AgentGiveUp.cs │ ├── AgentRewardReceive.cs │ ├── BattlePassInfo.cs │ ├── BattlePassLevelBuy.cs │ ├── BattlePassOrder.cs │ ├── BattlePassOrderCollect.cs │ ├── BattlePassQuestRewardReceive.cs │ ├── BattlePassRewardReceive.cs │ ├── CharAdvance.cs │ ├── CharAdvanceRewardReceive.cs │ ├── CharAffinityGiftSend.cs │ ├── CharAffinityQusetRewardReceive.cs │ ├── CharDatingEventRewardReceive.cs │ ├── CharDatingGiftSend.cs │ ├── CharDatingLandmarkSelect.cs │ ├── CharEquipmentChange.cs │ ├── CharRecruitment.cs │ ├── CharSkillUpgrade.cs │ ├── CharSkinSet.cs │ ├── CharUpgrade.cs │ ├── ClientEventReport.cs │ ├── DailyEquipmentApply.cs │ ├── DailyEquipmentSettle.cs │ ├── DailyEquipmentSweep.cs │ ├── DailyInstanceApply.cs │ ├── DailyInstanceRaid.cs │ ├── DailyInstanceSettle.cs │ ├── DailyShopRewardReceive.cs │ ├── DictionaryRewardReceive.cs │ ├── DiscLimitBreak.cs │ ├── DiscPromote.cs │ ├── DiscReadRewardReceive.cs │ ├── DiscStrengthen.cs │ ├── EnergyBuy.cs │ ├── EquipmentDismantle.cs │ ├── EquipmentLockUnlock.cs │ ├── EquipmentUpgrade.cs │ ├── FragmentsConvert.cs │ ├── FriendAdd.cs │ ├── FriendAddAgree.cs │ ├── FriendAllAgree.cs │ ├── FriendDelete.cs │ ├── FriendInvitesDelete.cs │ ├── FriendListGet.cs │ ├── FriendNameSearch.cs │ ├── FriendReceiveEnergy.cs │ ├── FriendRecommendationGet.cs │ ├── FriendSendEnergy.cs │ ├── FriendStarSet.cs │ ├── FriendUidSearch.cs │ ├── GachaHistories.cs │ ├── GachaInformation.cs │ ├── GachaSpin.cs │ ├── GemConvert.cs │ ├── GmSudo.cs │ ├── Ike.cs │ ├── InfinityTowerApply.cs │ ├── InfinityTowerDailyRewardReceive.cs │ ├── InfinityTowerInfo.cs │ ├── InfinityTowerPlotRewardReceive.cs │ ├── InfinityTowerSettle.cs │ ├── ItemProduct.cs │ ├── ItemUse.cs │ ├── MailList.cs │ ├── MailRead.cs │ ├── MailRecv.cs │ ├── MailRemove.cs │ ├── MallGemList.cs │ ├── MallGemOrder.cs │ ├── MallMonthlycardList.cs │ ├── MallMonthlycardOrder.cs │ ├── MallOrderCancel.cs │ ├── MallOrderCollect.cs │ ├── MallPackageList.cs │ ├── MallPackageOrder.cs │ ├── MallShopList.cs │ ├── MallShopOrder.cs │ ├── Notify.cs │ ├── NotifyGm.cs │ ├── PhoneContactsInfo.cs │ ├── PhoneContactsReport.cs │ ├── PlayerBoard.cs │ ├── PlayerCharsShow.cs │ ├── PlayerData.cs │ ├── PlayerDestroy.cs │ ├── PlayerExit.cs │ ├── PlayerFormation.cs │ ├── PlayerGenderEdit.cs │ ├── PlayerHeadiconSet.cs │ ├── PlayerHonorEdit.cs │ ├── PlayerLearn.cs │ ├── PlayerLogin.cs │ ├── PlayerNameEdit.cs │ ├── PlayerPing.cs │ ├── PlayerReg.cs │ ├── PlayerSignatureEdit.cs │ ├── PlayerSkinShow.cs │ ├── PlayerSurvey.cs │ ├── PlayerTitleEdit.cs │ ├── PlayerWorldClassRewardReceive.cs │ ├── PlotRewardReceive.cs │ ├── PubilcGm.cs │ ├── Public.cs │ ├── PublicStarTower.cs │ ├── QuestDailyActiveRewardRecevie.cs │ ├── QuestDailyRewardRecevie.cs │ ├── QuestTourGuideRewardReceive.cs │ ├── QuestTowerGuideGroupRewardReceive.cs │ ├── QuestTowerRewardRecevie.cs │ ├── RedeemCode.cs │ ├── RegionBossLevelApply.cs │ ├── RegionBossLevelSettle.cs │ ├── RegionBossLevelSweep.cs │ ├── ResidentShopGet.cs │ ├── ResidentShopPurchase.cs │ ├── StarTowerApply.cs │ ├── StarTowerBookCharPotentialGet.cs │ ├── StarTowerBookEventGet.cs │ ├── StarTowerBookEventRewardReceive.cs │ ├── StarTowerBookPotentialBriefListGet.cs │ ├── StarTowerBookPotentialRewardReceive.cs │ ├── StarTowerBuildBriefListGet.cs │ ├── StarTowerBuildDelete.cs │ ├── StarTowerBuildDetailGet.cs │ ├── StarTowerBuildLockUnlock.cs │ ├── StarTowerBuildNameSet.cs │ ├── StarTowerBuildPreferenceSet.cs │ ├── StarTowerBuildWhetherSave.cs │ ├── StarTowerGiveUp.cs │ ├── StarTowerInfo.cs │ ├── StarTowerInteract.cs │ ├── StarTowerRank.cs │ ├── StarTowerRankApply.cs │ ├── StoryApply.cs │ ├── StorySett.cs │ ├── TalentNodeReset.cs │ ├── TalentReset.cs │ ├── TalentUnlock.cs │ ├── TowerBookFateCardDetail.cs │ ├── TowerBookFateCardRewardReceive.cs │ ├── TowerGrowthDetail.cs │ ├── TowerGrowthNodeUnlock.cs │ ├── TravelerDuelInfo.cs │ ├── TravelerDuelLevelApply.cs │ ├── TravelerDuelLevelSettle.cs │ ├── TravelerDuelQuestRewardReceive.cs │ ├── TravelerDuelRank.cs │ ├── TravelerDuelRankUpload.cs │ ├── VampireSurvivorApply.cs │ ├── VampireSurvivorAreaChange.cs │ ├── VampireSurvivorQuestRewardReceive.cs │ ├── VampireSurvivorRank.cs │ ├── VampireSurvivorRewardChest.cs │ ├── VampireSurvivorRewardSelect.cs │ ├── VampireSurvivorSettle.cs │ ├── VampireTalentDetail.cs │ ├── VampireTalentReset.cs │ └── VampireTalentUnlock.cs ├── SDKProtos │ ├── ClientDiff.cs │ ├── FileDiff.cs │ ├── ServerAgent.cs │ └── ServerListMeta.cs ├── Tables │ └── ClientTable.cs ├── TempData │ └── RoguelikeTempData.cs └── Util │ ├── BigIntegerExtensions.cs │ ├── GameDataController.cs │ ├── PB.cs │ ├── Singleton.cs │ └── Utils.cs ├── Novaria.GameServer ├── Controllers │ ├── Api │ │ ├── GatewayController.cs │ │ └── ProtocolHandlers │ │ │ ├── ActivityDetail.cs │ │ │ ├── Login.cs │ │ │ ├── Mail.cs │ │ │ ├── Phone.cs │ │ │ ├── Player.cs │ │ │ ├── Plot.cs │ │ │ ├── ProtocolHandlerFactory.cs │ │ │ ├── RegionBossLevel.cs │ │ │ ├── ResidentShop.cs │ │ │ ├── Star.cs │ │ │ └── Tower.cs │ ├── MetaController.cs │ ├── SDKController.cs │ └── UserController.cs ├── GameServer.cs ├── Novaria.GameServer.csproj ├── Properties │ └── launchSettings.json ├── Services │ └── TableService.cs ├── and.json ├── appsettings.json └── packets.json ├── Novaria.PcapParser ├── Novaria.PcapParser.csproj ├── Novaria.PcapParser.sln ├── PcapParser.cs ├── Program.cs ├── accidently_too_many.json ├── all_mainmenu_packets.json ├── all_parsed_packets.json ├── create_acc_packets.json ├── first_instant_join.json ├── full_everything.json ├── lvl30_tutorials.json └── tutorial_packets.json ├── Novaria.sln ├── Novaria ├── Novaria.csproj └── Program.cs ├── README.md ├── README_CHS.md ├── android_update.bat ├── android_update.py ├── proxy.bat ├── proxy.py ├── proxy2.bat └── proxy2.py /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Novaria.Common/Core/Packet.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Novaria.Common.Core 9 | { 10 | public class Packet 11 | { 12 | public short msgId; 13 | 14 | public byte[] msgBody; 15 | 16 | public Action callback; 17 | 18 | public short receiveMsgId; 19 | 20 | public static Packet Create(NetMsgId msgId, IMessage protoPacket) 21 | { 22 | return new Packet() 23 | { 24 | msgId = (short)msgId, 25 | msgBody = protoPacket.ToByteArray(), 26 | }; 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Novaria.Common/Crypto/DiffieHellman.cs: -------------------------------------------------------------------------------- 1 | using Mono.Math; 2 | using Novaria.Common.Util; 3 | 4 | namespace Novaria.Common.Crypto 5 | { 6 | public class DiffieHellman : Singleton 7 | { 8 | private System.Numerics.BigInteger old_p = System.Numerics.BigInteger.Parse("1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919"); 9 | 10 | private BigInteger g = 2; 11 | 12 | private BigInteger spriv = new BigInteger(new byte[] { 1, 2, 3, 4 }); // hardcoded server priv key 13 | 14 | public BigInteger ServerPublicKey { get; set; } 15 | 16 | public DiffieHellman() 17 | { 18 | //Console.WriteLine(spriv); 19 | //g** Spriv mod p 20 | //ServerPublicKey = this.g.ModPow(spriv, p); 21 | } 22 | 23 | public byte[] CalculateKey(byte[] clientPubKey) // server calculates key like this 24 | { 25 | // old stuff 26 | //System.Numerics.BigInteger clientPubKeyInt = new System.Numerics.BigInteger(clientPubKey.Reverse().ToArray()); 27 | //var result = System.Numerics.BigInteger.ModPow(clientPubKeyInt, new System.Numerics.BigInteger(new byte[] { 1, 2, 3, 4 }), old_p); 28 | 29 | //Console.WriteLine(result); 30 | //if (result < 0) 31 | //{ 32 | // Console.WriteLine("THIS SHOULD CRASH"); 33 | //} 34 | 35 | 36 | //BigInteger bigInteger = new BigInteger(clientPubKey.Reverse().ToArray()).ModPow(this.spriv, this.p); 37 | 38 | //return bigInteger.GetBytes()[..32]; 39 | return null; 40 | //BigInteger clientPubKeyInt = new BigInteger(clientPubKey.Reverse().ToArray()); 41 | 42 | ////Cpub**Spriv mod p 43 | //Console.WriteLine(clientPubKeyInt.ToString()); 44 | 45 | //var result = BigInteger.ModPow(clientPubKeyInt, spriv, p); 46 | 47 | //Console.WriteLine("------------test-------------------"); 48 | 49 | ////Utils.PrintByteArray(BigInteger.Abs()); 50 | ////if (result < 0) 51 | ////{ 52 | //// return result.ToByteArray(false, true)[..32]; 53 | ////} 54 | 55 | //Utils.PrintByteArray(result.ToByteArray(true, true)); 56 | 57 | //Console.WriteLine("----------------------------------"); 58 | 59 | //return result.GetBytes()[..32]; 60 | //return result.ToByteArray(true, true)[..32]; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Novaria.Common/Crypto/GameDataExtraction.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using Serilog; 3 | 4 | namespace Novaria.Common.Crypto 5 | { 6 | public class GameDataExtraction 7 | { 8 | public enum GameDataType 9 | { 10 | PrimaryInt, 11 | PrimaryLong, 12 | PrimaryString, 13 | NoPrimary 14 | } 15 | 16 | public class GameDataExtractionResult 17 | { 18 | public GameDataType DataType { get; set; } 19 | public Dictionary PrimaryIntData { get; set; } 20 | public Dictionary PrimaryLongData { get; set; } 21 | public Dictionary PrimaryStringData { get; set; } 22 | public List NoPrimaryData { get; set; } 23 | } 24 | 25 | private int _magicKey; 26 | private string _binVersion; 27 | 28 | public GameDataExtractionResult LoadCommonBinData(string filepath) 29 | { 30 | byte[] array = File.ReadAllBytes(filepath); 31 | if (array == null || array.Length == 0) 32 | { 33 | return null; 34 | } 35 | 36 | GameDataExtractionResult result = new GameDataExtractionResult(); 37 | 38 | using (MemoryStream memoryStream = new MemoryStream(array)) 39 | { 40 | using (BinaryReader binaryReader = new BinaryReader(memoryStream)) 41 | { 42 | // Uncomment and use actual validation if needed. 43 | // if (binaryReader.ReadInt32() != _magicKey) 44 | if (true) 45 | { 46 | int num = binaryReader.ReadInt16(); 47 | byte[] array2 = binaryReader.ReadBytes(num); 48 | // Uncomment and use actual version check if needed. 49 | // if (Encoding.UTF8.GetString(array2) != _binVersion) 50 | if (true) 51 | { 52 | bool hasPrimary = binaryReader.ReadByte() == 1; 53 | byte b = binaryReader.ReadByte(); 54 | bool isPrimaryInt = b == 1; 55 | bool isPrimaryLong = b == 2; 56 | num = binaryReader.ReadInt32(); 57 | 58 | if (hasPrimary) 59 | { 60 | if (isPrimaryInt) 61 | { 62 | result.DataType = GameDataType.PrimaryInt; 63 | result.PrimaryIntData = LoadPrimaryKeyIntTable(binaryReader, num); 64 | } 65 | else if (isPrimaryLong) 66 | { 67 | result.DataType = GameDataType.PrimaryLong; 68 | result.PrimaryLongData = LoadPrimaryLongIntTable(binaryReader, num); 69 | } 70 | else 71 | { 72 | result.DataType = GameDataType.PrimaryString; 73 | result.PrimaryStringData = LoadPrimaryKeyStringTable(binaryReader, num); 74 | } 75 | } 76 | else 77 | { 78 | result.DataType = GameDataType.NoPrimary; 79 | result.NoPrimaryData = LoadNoPrimaryKeyTable(binaryReader, num); 80 | } 81 | } 82 | } 83 | } 84 | } 85 | 86 | return result; 87 | } 88 | 89 | private Dictionary LoadPrimaryKeyIntTable(BinaryReader br, int length) 90 | { 91 | Dictionary table = new Dictionary(); 92 | for (int i = 0; i < length; i++) 93 | { 94 | int key = br.ReadInt32(); 95 | int valueLength = br.ReadInt16(); 96 | byte[] value = br.ReadBytes(valueLength); 97 | table[key] = value; 98 | } 99 | return table; 100 | } 101 | 102 | private Dictionary LoadPrimaryLongIntTable(BinaryReader br, int length) 103 | { 104 | Dictionary table = new Dictionary(); 105 | for (int i = 0; i < length; i++) 106 | { 107 | long key = br.ReadInt64(); 108 | int valueLength = br.ReadInt16(); 109 | byte[] value = br.ReadBytes(valueLength); 110 | table[key] = value; 111 | } 112 | return table; 113 | } 114 | 115 | private Dictionary LoadPrimaryKeyStringTable(BinaryReader br, int length) 116 | { 117 | Dictionary table = new Dictionary(); 118 | for (int i = 0; i < length; i++) 119 | { 120 | int keyLength = br.ReadInt16(); 121 | byte[] keyBytes = br.ReadBytes(keyLength); 122 | string key = Encoding.UTF8.GetString(keyBytes); 123 | int valueLength = br.ReadInt16(); 124 | byte[] value = br.ReadBytes(valueLength); 125 | table[key] = value; 126 | } 127 | return table; 128 | } 129 | 130 | private List LoadNoPrimaryKeyTable(BinaryReader br, int length) 131 | { 132 | List list = new List(); 133 | for (int i = 0; i < length; i++) 134 | { 135 | int dataLength = br.ReadInt16(); 136 | byte[] data = br.ReadBytes(dataLength); 137 | list.Add(data); 138 | } 139 | return list; 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /Novaria.Common/Crypto/XOR.cs: -------------------------------------------------------------------------------- 1 | namespace Novaria.Common.Crypto 2 | { 3 | public static class XOR 4 | { 5 | public static void Crypt(byte[] bytes, byte[] key, uint offset = 0) 6 | { 7 | while (offset < bytes.Length) 8 | { 9 | bytes[offset] ^= key[offset % key.Length]; 10 | offset++; 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Math.Prime.Generator/NextPrimeFinder.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Math.Prime.Generator.NextPrimeFinder.cs - Prime Generator 3 | // 4 | // Authors: 5 | // Ben Maurer 6 | // 7 | // Copyright (c) 2003 Ben Maurer. All rights reserved 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Math.Prime.Generator { 34 | 35 | /// 36 | /// Finds the next prime after a given number. 37 | /// 38 | #if INSIDE_CORLIB 39 | internal 40 | #else 41 | public 42 | #endif 43 | class NextPrimeFinder : SequentialSearchPrimeGeneratorBase { 44 | 45 | protected override BigInteger GenerateSearchBase (int bits, object Context) 46 | { 47 | if (Context == null) 48 | throw new ArgumentNullException ("Context"); 49 | 50 | BigInteger ret = new BigInteger ((BigInteger)Context); 51 | ret.SetBit (0); 52 | return ret; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Math.Prime.Generator/PrimeGeneratorBase.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Math.Prime.Generator.PrimeGeneratorBase.cs - Abstract Prime Generator 3 | // 4 | // Authors: 5 | // Ben Maurer 6 | // 7 | // Copyright (c) 2003 Ben Maurer. All rights reserved 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Math.Prime.Generator { 34 | 35 | #if INSIDE_CORLIB 36 | internal 37 | #else 38 | public 39 | #endif 40 | abstract class PrimeGeneratorBase { 41 | 42 | public virtual ConfidenceFactor Confidence { 43 | get { 44 | #if DEBUG 45 | return ConfidenceFactor.ExtraLow; 46 | #else 47 | return ConfidenceFactor.Medium; 48 | #endif 49 | } 50 | } 51 | 52 | public virtual Prime.PrimalityTest PrimalityTest { 53 | get { 54 | return new Prime.PrimalityTest (PrimalityTests.RabinMillerTest); 55 | } 56 | } 57 | 58 | public virtual int TrialDivisionBounds { 59 | get { return 4000; } 60 | } 61 | 62 | /// 63 | /// Performs primality tests on bi, assumes trial division has been done. 64 | /// 65 | /// A BigInteger that has been subjected to and passed trial division 66 | /// False if bi is composite, true if it may be prime. 67 | /// The speed of this method is dependent on Confidence 68 | protected bool PostTrialDivisionTests (BigInteger bi) 69 | { 70 | return PrimalityTest (bi, this.Confidence); 71 | } 72 | 73 | public abstract BigInteger GenerateNewPrime (int bits); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase.cs - Prime Generator 3 | // 4 | // Authors: 5 | // Ben Maurer 6 | // 7 | // Copyright (c) 2003 Ben Maurer. All rights reserved 8 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining 11 | // a copy of this software and associated documentation files (the 12 | // "Software"), to deal in the Software without restriction, including 13 | // without limitation the rights to use, copy, modify, merge, publish, 14 | // distribute, sublicense, and/or sell copies of the Software, and to 15 | // permit persons to whom the Software is furnished to do so, subject to 16 | // the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | namespace Mono.Math.Prime.Generator { 31 | 32 | #if INSIDE_CORLIB 33 | internal 34 | #else 35 | public 36 | #endif 37 | class SequentialSearchPrimeGeneratorBase : PrimeGeneratorBase { 38 | 39 | protected virtual BigInteger GenerateSearchBase (int bits, object context) 40 | { 41 | BigInteger ret = BigInteger.GenerateRandom (bits); 42 | ret.SetBit (0); 43 | return ret; 44 | } 45 | 46 | 47 | public override BigInteger GenerateNewPrime (int bits) 48 | { 49 | return GenerateNewPrime (bits, null); 50 | } 51 | 52 | 53 | public virtual BigInteger GenerateNewPrime (int bits, object context) 54 | { 55 | // 56 | // STEP 1. Find a place to do a sequential search 57 | // 58 | BigInteger curVal = GenerateSearchBase (bits, context); 59 | 60 | const uint primeProd1 = 3u* 5u * 7u * 11u * 13u * 17u * 19u * 23u * 29u; 61 | 62 | uint pMod1 = curVal % primeProd1; 63 | 64 | int DivisionBound = TrialDivisionBounds; 65 | uint[] SmallPrimes = BigInteger.smallPrimes; 66 | // 67 | // STEP 2. Search for primes 68 | // 69 | while (true) { 70 | 71 | // 72 | // STEP 2.1 Sieve out numbers divisible by the first 9 primes 73 | // 74 | if (pMod1 % 3 == 0) goto biNotPrime; 75 | if (pMod1 % 5 == 0) goto biNotPrime; 76 | if (pMod1 % 7 == 0) goto biNotPrime; 77 | if (pMod1 % 11 == 0) goto biNotPrime; 78 | if (pMod1 % 13 == 0) goto biNotPrime; 79 | if (pMod1 % 17 == 0) goto biNotPrime; 80 | if (pMod1 % 19 == 0) goto biNotPrime; 81 | if (pMod1 % 23 == 0) goto biNotPrime; 82 | if (pMod1 % 29 == 0) goto biNotPrime; 83 | 84 | // 85 | // STEP 2.2 Sieve out all numbers divisible by the primes <= DivisionBound 86 | // 87 | for (int p = 10; p < SmallPrimes.Length && SmallPrimes [p] <= DivisionBound; p++) { 88 | if (curVal % SmallPrimes [p] == 0) 89 | goto biNotPrime; 90 | } 91 | 92 | // 93 | // STEP 2.3 Is the potential prime acceptable? 94 | // 95 | if (!IsPrimeAcceptable (curVal, context)) 96 | goto biNotPrime; 97 | 98 | // 99 | // STEP 2.4 Filter out all primes that pass this step with a primality test 100 | // 101 | if (PrimalityTest (curVal, Confidence)) 102 | return curVal; 103 | 104 | // 105 | // STEP 2.4 106 | // 107 | biNotPrime: 108 | pMod1 += 2; 109 | if (pMod1 >= primeProd1) 110 | pMod1 -= primeProd1; 111 | curVal.Incr2 (); 112 | } 113 | } 114 | 115 | protected virtual bool IsPrimeAcceptable (BigInteger bi, object context) 116 | { 117 | return true; 118 | } 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Math.Prime/ConfidenceFactor.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Math.Prime.ConfidenceFactor.cs - Confidence factor for prime generation 3 | // 4 | // Authors: 5 | // Ben Maurer 6 | // 7 | // Copyright (c) 2003 Ben Maurer. All rights reserved 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Math.Prime { 34 | /// 35 | /// A factor of confidence. 36 | /// 37 | #if INSIDE_CORLIB 38 | internal 39 | #else 40 | public 41 | #endif 42 | enum ConfidenceFactor { 43 | /// 44 | /// Only suitable for development use, probability of failure may be greater than 1/2^20. 45 | /// 46 | ExtraLow, 47 | /// 48 | /// Suitable only for transactions which do not require forward secrecy. Probability of failure about 1/2^40 49 | /// 50 | Low, 51 | /// 52 | /// Designed for production use. Probability of failure about 1/2^80. 53 | /// 54 | Medium, 55 | /// 56 | /// Suitable for sensitive data. Probability of failure about 1/2^160. 57 | /// 58 | High, 59 | /// 60 | /// Use only if you have lots of time! Probability of failure about 1/2^320. 61 | /// 62 | ExtraHigh, 63 | /// 64 | /// Only use methods which generate provable primes. Not yet implemented. 65 | /// 66 | Provable 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Math.Prime/PrimalityTests.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Math.Prime.PrimalityTests.cs - Test for primality 3 | // 4 | // Authors: 5 | // Ben Maurer 6 | // 7 | // Copyright (c) 2003 Ben Maurer. All rights reserved 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Math.Prime { 34 | 35 | #if INSIDE_CORLIB 36 | internal 37 | #else 38 | public 39 | #endif 40 | delegate bool PrimalityTest (BigInteger bi, ConfidenceFactor confidence); 41 | 42 | #if INSIDE_CORLIB 43 | internal 44 | #else 45 | public 46 | #endif 47 | sealed class PrimalityTests { 48 | 49 | private PrimalityTests () 50 | { 51 | } 52 | 53 | #region SPP Test 54 | 55 | private static int GetSPPRounds (BigInteger bi, ConfidenceFactor confidence) 56 | { 57 | int bc = bi.BitCount(); 58 | 59 | int Rounds; 60 | 61 | // Data from HAC, 4.49 62 | if (bc <= 100 ) Rounds = 27; 63 | else if (bc <= 150 ) Rounds = 18; 64 | else if (bc <= 200 ) Rounds = 15; 65 | else if (bc <= 250 ) Rounds = 12; 66 | else if (bc <= 300 ) Rounds = 9; 67 | else if (bc <= 350 ) Rounds = 8; 68 | else if (bc <= 400 ) Rounds = 7; 69 | else if (bc <= 500 ) Rounds = 6; 70 | else if (bc <= 600 ) Rounds = 5; 71 | else if (bc <= 800 ) Rounds = 4; 72 | else if (bc <= 1250) Rounds = 3; 73 | else Rounds = 2; 74 | 75 | switch (confidence) { 76 | case ConfidenceFactor.ExtraLow: 77 | Rounds >>= 2; 78 | return Rounds != 0 ? Rounds : 1; 79 | case ConfidenceFactor.Low: 80 | Rounds >>= 1; 81 | return Rounds != 0 ? Rounds : 1; 82 | case ConfidenceFactor.Medium: 83 | return Rounds; 84 | case ConfidenceFactor.High: 85 | return Rounds << 1; 86 | case ConfidenceFactor.ExtraHigh: 87 | return Rounds << 2; 88 | case ConfidenceFactor.Provable: 89 | throw new Exception ("The Rabin-Miller test can not be executed in a way such that its results are provable"); 90 | default: 91 | throw new ArgumentOutOfRangeException ("confidence"); 92 | } 93 | } 94 | 95 | public static bool Test (BigInteger n, ConfidenceFactor confidence) 96 | { 97 | // Rabin-Miller fails with smaller primes (at least with our BigInteger code) 98 | if (n.BitCount () < 33) 99 | return SmallPrimeSppTest (n, confidence); 100 | else 101 | return RabinMillerTest (n, confidence); 102 | } 103 | 104 | /// 105 | /// Probabilistic prime test based on Rabin-Miller's test 106 | /// 107 | /// 108 | /// 109 | /// The number to test. 110 | /// 111 | /// 112 | /// 113 | /// 114 | /// The number of chosen bases. The test has at least a 115 | /// 1/4^confidence chance of falsely returning True. 116 | /// 117 | /// 118 | /// 119 | /// 120 | /// True if "this" is a strong pseudoprime to randomly chosen bases. 121 | /// 122 | /// 123 | /// False if "this" is definitely NOT prime. 124 | /// 125 | /// 126 | public static bool RabinMillerTest (BigInteger n, ConfidenceFactor confidence) 127 | { 128 | int bits = n.BitCount (); 129 | int t = GetSPPRounds (bits, confidence); 130 | 131 | // n - 1 == 2^s * r, r is odd 132 | BigInteger n_minus_1 = n - 1; 133 | int s = n_minus_1.LowestSetBit (); 134 | BigInteger r = n_minus_1 >> s; 135 | 136 | BigInteger.ModulusRing mr = new BigInteger.ModulusRing (n); 137 | 138 | // Applying optimization from HAC section 4.50 (base == 2) 139 | // not a really random base but an interesting (and speedy) one 140 | BigInteger y = null; 141 | // FIXME - optimization disable for small primes due to bug #81857 142 | if (n.BitCount () > 100) 143 | y = mr.Pow (2, r); 144 | 145 | // still here ? start at round 1 (round 0 was a == 2) 146 | for (int round = 0; round < t; round++) { 147 | 148 | if ((round > 0) || (y == null)) { 149 | BigInteger a = null; 150 | 151 | // check for 2 <= a <= n - 2 152 | // ...but we already did a == 2 previously as an optimization 153 | do { 154 | a = BigInteger.GenerateRandom (bits); 155 | } while ((a <= 2) && (a >= n_minus_1)); 156 | 157 | y = mr.Pow (a, r); 158 | } 159 | 160 | if (y == 1) 161 | continue; 162 | 163 | for (int j = 0; ((j < s) && (y != n_minus_1)); j++) { 164 | 165 | y = mr.Pow (y, 2); 166 | if (y == 1) 167 | return false; 168 | } 169 | 170 | if (y != n_minus_1) 171 | return false; 172 | } 173 | return true; 174 | } 175 | 176 | public static bool SmallPrimeSppTest (BigInteger bi, ConfidenceFactor confidence) 177 | { 178 | int Rounds = GetSPPRounds (bi, confidence); 179 | 180 | // calculate values of s and t 181 | BigInteger p_sub1 = bi - 1; 182 | int s = p_sub1.LowestSetBit (); 183 | 184 | BigInteger t = p_sub1 >> s; 185 | 186 | 187 | BigInteger.ModulusRing mr = new BigInteger.ModulusRing (bi); 188 | 189 | for (int round = 0; round < Rounds; round++) { 190 | 191 | BigInteger b = mr.Pow (BigInteger.smallPrimes [round], t); 192 | 193 | if (b == 1) continue; // a^t mod p = 1 194 | 195 | bool result = false; 196 | for (int j = 0; j < s; j++) { 197 | 198 | if (b == p_sub1) { // a^((2^j)*t) mod p = p-1 for some 0 <= j <= s-1 199 | result = true; 200 | break; 201 | } 202 | 203 | b = (b * b) % bi; 204 | } 205 | 206 | if (result == false) 207 | return false; 208 | } 209 | return true; 210 | } 211 | 212 | #endregion 213 | 214 | // TODO: Implement the Lucus test 215 | // TODO: Implement other new primality tests 216 | // TODO: Implement primality proving 217 | } 218 | } 219 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Security.Cryptography/CryptoTools.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Mono.Security.Cryptography.CryptoTools 3 | // Shared class for common cryptographic functionalities 4 | // 5 | // Authors: 6 | // Sebastien Pouliot 7 | // 8 | // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) 9 | // Copyright (C) 2004, 2008 Novell, Inc (http://www.novell.com) 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | using System.Security.Cryptography; 33 | 34 | namespace Mono.Security.Cryptography { 35 | 36 | #if INSIDE_CORLIB 37 | internal 38 | #else 39 | public 40 | #endif 41 | sealed class KeyBuilder { 42 | 43 | static private RandomNumberGenerator rng; 44 | 45 | private KeyBuilder () 46 | { 47 | } 48 | 49 | static RandomNumberGenerator Rng { 50 | get { 51 | if (rng == null) 52 | rng = RandomNumberGenerator.Create (); 53 | return rng; 54 | } 55 | } 56 | 57 | static public byte[] Key (int size) 58 | { 59 | byte[] key = new byte [size]; 60 | Rng.GetBytes (key); 61 | return key; 62 | } 63 | 64 | static public byte[] IV (int size) 65 | { 66 | byte[] iv = new byte [size]; 67 | Rng.GetBytes (iv); 68 | return iv; 69 | } 70 | } 71 | 72 | // Process an array as a sequence of blocks 73 | #if INSIDE_CORLIB 74 | internal 75 | #else 76 | public 77 | #endif 78 | class BlockProcessor { 79 | private ICryptoTransform transform; 80 | private byte[] block; 81 | private int blockSize; // in bytes (not in bits) 82 | private int blockCount; 83 | 84 | public BlockProcessor (ICryptoTransform transform) 85 | : this (transform, transform.InputBlockSize) {} 86 | 87 | // some Transforms (like HashAlgorithm descendant) return 1 for 88 | // block size (which isn't their real internal block size) 89 | public BlockProcessor (ICryptoTransform transform, int blockSize) 90 | { 91 | if (transform == null) 92 | throw new ArgumentNullException ("transform"); 93 | if (blockSize <= 0) 94 | throw new ArgumentOutOfRangeException ("blockSize"); 95 | this.transform = transform; 96 | this.blockSize = blockSize; 97 | block = new byte [blockSize]; 98 | } 99 | 100 | ~BlockProcessor () 101 | { 102 | // zeroize our block (so we don't retain any information) 103 | Array.Clear (block, 0, blockSize); 104 | } 105 | 106 | public void Initialize () 107 | { 108 | Array.Clear (block, 0, blockSize); 109 | blockCount = 0; 110 | } 111 | 112 | public void Core (byte[] rgb) 113 | { 114 | Core (rgb, 0, rgb.Length); 115 | } 116 | 117 | public void Core (byte[] rgb, int ib, int cb) 118 | { 119 | // 1. fill the rest of the "block" 120 | int n = System.Math.Min (blockSize - blockCount, cb); 121 | Buffer.BlockCopy (rgb, ib, block, blockCount, n); 122 | blockCount += n; 123 | 124 | // 2. if block is full then transform it 125 | if (blockCount == blockSize) { 126 | transform.TransformBlock (block, 0, blockSize, block, 0); 127 | 128 | // 3. transform any other full block in specified buffer 129 | int b = (int) ((cb - n) / blockSize); 130 | for (int i=0; i < b; i++) { 131 | transform.TransformBlock (rgb, n + ib, blockSize, block, 0); 132 | n += blockSize; 133 | } 134 | 135 | // 4. if data is still present fill the "block" with the remainder 136 | blockCount = cb - n; 137 | if (blockCount > 0) 138 | Buffer.BlockCopy (rgb, n + ib, block, 0, blockCount); 139 | } 140 | } 141 | 142 | public byte[] Final () 143 | { 144 | return transform.TransformFinalBlock (block, 0, blockCount); 145 | } 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Security.Cryptography/DHKeyGeneration.cs: -------------------------------------------------------------------------------- 1 | // 2 | // DHKeyGeneration.cs: Defines the different key generation methods. 3 | // 4 | // Author: 5 | // Pieter Philippaerts (Pieter@mentalis.org) 6 | // 7 | // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/) 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Security.Cryptography { 34 | /// 35 | /// Defines the different Diffie-Hellman key generation methods. 36 | /// 37 | public enum DHKeyGeneration { 38 | /// 39 | /// [TODO] you first randomly select a prime Q of size 160 bits, then choose P randomly among numbers like 40 | /// Q*R+1 with R random. Then you go along with finding a generator G which has order exactly Q. The private 41 | /// key X is then a number modulo Q. 42 | /// [FIPS 186-2-Change1 -- http://csrc.nist.gov/publications/fips/] 43 | /// 44 | // see RFC2631 [http://www.faqs.org/rfcs/rfc2631.html] 45 | //DSA, 46 | /// 47 | /// Returns dynamically generated values for P and G. Unlike the Sophie Germain or DSA key generation methods, 48 | /// this method does not ensure that the selected prime offers an adequate security level. 49 | /// 50 | Random, 51 | /// 52 | /// Returns dynamically generated values for P and G. P is a Sophie Germain prime, which has some interesting 53 | /// security features when used with Diffie Hellman. 54 | /// 55 | //SophieGermain, 56 | /// 57 | /// Returns values for P and G that are hard coded in this library. Contrary to what your intuition may tell you, 58 | /// using these hard coded values is perfectly safe. 59 | /// The values of the P and G parameters are taken from 'The OAKLEY Key Determination Protocol' [RFC2412]. 60 | /// This is the prefered key generation method, because it is very fast and very safe. 61 | /// Because this method uses fixed values for the P and G parameters, not all bit sizes are supported. 62 | /// The current implementation supports bit sizes of 768, 1024 and 1536. 63 | /// 64 | Static 65 | } 66 | } -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Security.Cryptography/DHParameters.cs: -------------------------------------------------------------------------------- 1 | // 2 | // DHParameters.cs: Defines a structure that holds the parameters of the Diffie-Hellman algorithm 3 | // 4 | // Author: 5 | // Pieter Philippaerts (Pieter@mentalis.org) 6 | // 7 | // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/) 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | 33 | namespace Mono.Security.Cryptography { 34 | /// 35 | /// Represents the parameters of the Diffie-Hellman algorithm. 36 | /// 37 | [Serializable] 38 | public struct DHParameters { 39 | /// 40 | /// Represents the public P parameter of the Diffie-Hellman algorithm. 41 | /// 42 | public byte[] P; 43 | /// 44 | /// Represents the public G parameter of the Diffie-Hellman algorithm. 45 | /// 46 | public byte[] G; 47 | /// 48 | /// Represents the private X parameter of the Diffie-Hellman algorithm. 49 | /// 50 | [NonSerialized] 51 | public byte[] X; 52 | } 53 | } -------------------------------------------------------------------------------- /Novaria.Common/Mono/Mono.Security.Cryptography/DiffieHellman.cs: -------------------------------------------------------------------------------- 1 | // 2 | // DiffieHellman.cs: Defines a base class from which all Diffie-Hellman implementations inherit 3 | // 4 | // Author: 5 | // Pieter Philippaerts (Pieter@mentalis.org) 6 | // 7 | // (C) 2003 The Mentalis.org Team (http://www.mentalis.org/) 8 | // 9 | 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining 12 | // a copy of this software and associated documentation files (the 13 | // "Software"), to deal in the Software without restriction, including 14 | // without limitation the rights to use, copy, modify, merge, publish, 15 | // distribute, sublicense, and/or sell copies of the Software, and to 16 | // permit persons to whom the Software is furnished to do so, subject to 17 | // the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be 20 | // included in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 23 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 24 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 25 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 26 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 28 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | // 30 | 31 | using System; 32 | using System.Text; 33 | using System.Security; 34 | using System.Security.Cryptography; 35 | using Mono.Math; 36 | 37 | namespace Mono.Security.Cryptography { 38 | /// 39 | /// Defines a base class from which all Diffie-Hellman implementations inherit. 40 | /// 41 | public abstract class DiffieHellman : AsymmetricAlgorithm { 42 | /// 43 | /// Creates an instance of the default implementation of the algorithm. 44 | /// 45 | /// A new instance of the default implementation of DiffieHellman. 46 | public static new DiffieHellman Create () { 47 | return Create ("Mono.Security.Cryptography.DiffieHellman"); 48 | } 49 | /// 50 | /// Creates an instance of the specified implementation of . 51 | /// 52 | /// The name of the implementation of DiffieHellman to use. 53 | /// A new instance of the specified implementation of DiffieHellman. 54 | public static new DiffieHellman Create (string algName) { 55 | return (DiffieHellman) CryptoConfig.CreateFromName (algName); 56 | } 57 | 58 | /// 59 | /// When overridden in a derived class, creates the key exchange data. 60 | /// 61 | /// The key exchange data to be sent to the intended recipient. 62 | public abstract byte[] CreateKeyExchange(); 63 | /// 64 | /// When overridden in a derived class, extracts secret information from the key exchange data. 65 | /// 66 | /// The key exchange data within which the secret information is hidden. 67 | /// The secret information derived from the key exchange data. 68 | public abstract byte[] DecryptKeyExchange (byte[] keyex); 69 | 70 | /// 71 | /// When overridden in a derived class, exports the . 72 | /// 73 | /// true to include private parameters; otherwise, false. 74 | /// The parameters for Diffie-Hellman. 75 | public abstract DHParameters ExportParameters (bool includePrivate); 76 | /// 77 | /// When overridden in a derived class, imports the specified . 78 | /// 79 | /// The parameters for Diffie-Hellman. 80 | public abstract void ImportParameters (DHParameters parameters); 81 | 82 | private byte[] GetNamedParam(SecurityElement se, string param) { 83 | SecurityElement sep = se.SearchForChildByTag(param); 84 | if (sep == null) 85 | return null; 86 | return Convert.FromBase64String(sep.Text); 87 | } 88 | 89 | /// 90 | /// Creates and returns an XML string representation of the current object. 91 | /// 92 | /// true to include private parameters; otherwise, false. 93 | /// An XML string encoding of the current DiffieHellman object. 94 | public override string ToXmlString (bool includePrivateParameters) { 95 | StringBuilder sb = new StringBuilder (); 96 | DHParameters dhParams = ExportParameters(includePrivateParameters); 97 | try { 98 | sb.Append (""); 99 | 100 | sb.Append ("

"); 101 | sb.Append (Convert.ToBase64String (dhParams.P)); 102 | sb.Append ("

"); 103 | 104 | sb.Append (""); 105 | sb.Append (Convert.ToBase64String (dhParams.G)); 106 | sb.Append (""); 107 | 108 | if (includePrivateParameters) { 109 | sb.Append (""); 110 | sb.Append (Convert.ToBase64String (dhParams.X)); 111 | sb.Append (""); 112 | } 113 | 114 | sb.Append ("
"); 115 | } finally { 116 | Array.Clear(dhParams.P, 0, dhParams.P.Length); 117 | Array.Clear(dhParams.G, 0, dhParams.G.Length); 118 | if (dhParams.X != null) 119 | Array.Clear(dhParams.X, 0, dhParams.X.Length); 120 | } 121 | return sb.ToString (); 122 | } 123 | } 124 | } -------------------------------------------------------------------------------- /Novaria.Common/Novaria.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Library 5 | net8.0 6 | enable 7 | enable 8 | True 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/AchievementInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: achievement_info.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from achievement_info.proto 15 | public static partial class AchievementInfoReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for achievement_info.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static AchievementInfoReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChZhY2hpZXZlbWVudF9pbmZvLnByb3RvEgVwcm90bxoMcHVibGljLnByb3Rv", 28 | "UABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/ActivityLoginRewardReceive.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: activity_login_reward_receive.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from activity_login_reward_receive.proto 15 | public static partial class ActivityLoginRewardReceiveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for activity_login_reward_receive.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static ActivityLoginRewardReceiveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CiNhY3Rpdml0eV9sb2dpbl9yZXdhcmRfcmVjZWl2ZS5wcm90bxIFcHJvdG8a", 28 | "DHB1YmxpYy5wcm90b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/ActivityPeriodicFinalRewardReceive.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: activity_periodic_final_reward_receive.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from activity_periodic_final_reward_receive.proto 15 | public static partial class ActivityPeriodicFinalRewardReceiveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for activity_periodic_final_reward_receive.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static ActivityPeriodicFinalRewardReceiveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CixhY3Rpdml0eV9wZXJpb2RpY19maW5hbF9yZXdhcmRfcmVjZWl2ZS5wcm90", 28 | "bxIFcHJvdG8aDHB1YmxpYy5wcm90b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/CharAdvance.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: char_advance.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from char_advance.proto 15 | public static partial class CharAdvanceReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for char_advance.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static CharAdvanceReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChJjaGFyX2FkdmFuY2UucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG9QAGIG", 28 | "cHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/CharRecruitment.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: char_recruitment.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from char_recruitment.proto 15 | public static partial class CharRecruitmentReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for char_recruitment.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static CharRecruitmentReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChZjaGFyX3JlY3J1aXRtZW50LnByb3RvEgVwcm90bxoMcHVibGljLnByb3Rv", 28 | "UABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/ClientEventReport.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: client_event_report.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from client_event_report.proto 15 | public static partial class ClientEventReportReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for client_event_report.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static ClientEventReportReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChljbGllbnRfZXZlbnRfcmVwb3J0LnByb3RvEgVwcm90bxoMcHVibGljLnBy", 28 | "b3RvUABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/DailyShopRewardReceive.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: daily_shop_reward_receive.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from daily_shop_reward_receive.proto 15 | public static partial class DailyShopRewardReceiveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for daily_shop_reward_receive.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static DailyShopRewardReceiveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Ch9kYWlseV9zaG9wX3Jld2FyZF9yZWNlaXZlLnByb3RvEgVwcm90bxoMcHVi", 28 | "bGljLnByb3RvUABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/FragmentsConvert.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: fragments_convert.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from fragments_convert.proto 15 | public static partial class FragmentsConvertReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for fragments_convert.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static FragmentsConvertReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChdmcmFnbWVudHNfY29udmVydC5wcm90bxIFcHJvdG8aDHB1YmxpYy5wcm90", 28 | "b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/FriendAdd.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: friend_add.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from friend_add.proto 15 | public static partial class FriendAddReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for friend_add.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static FriendAddReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChBmcmllbmRfYWRkLnByb3RvEgVwcm90bxoMcHVibGljLnByb3RvIjEKDEZy", 28 | "aWVuZEFkZFJlcRILCgNVSWQYASABKAQSFAoLTmV4dFBhY2thZ2UY/w8gASgM", 29 | "UABiBnByb3RvMw==")); 30 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 31 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 32 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 33 | new pbr::GeneratedClrTypeInfo(typeof(global::Proto.FriendAddReq), global::Proto.FriendAddReq.Parser, new[]{ "UId", "NextPackage" }, null, null, null, null) 34 | })); 35 | } 36 | #endregion 37 | 38 | } 39 | #region Messages 40 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 41 | public sealed partial class FriendAddReq : pb::IMessage 42 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 43 | , pb::IBufferMessage 44 | #endif 45 | { 46 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FriendAddReq()); 47 | private pb::UnknownFieldSet _unknownFields; 48 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 49 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 50 | public static pb::MessageParser Parser { get { return _parser; } } 51 | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 54 | public static pbr::MessageDescriptor Descriptor { 55 | get { return global::Proto.FriendAddReflection.Descriptor.MessageTypes[0]; } 56 | } 57 | 58 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 59 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 60 | pbr::MessageDescriptor pb::IMessage.Descriptor { 61 | get { return Descriptor; } 62 | } 63 | 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 65 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 66 | public FriendAddReq() { 67 | OnConstruction(); 68 | } 69 | 70 | partial void OnConstruction(); 71 | 72 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 74 | public FriendAddReq(FriendAddReq other) : this() { 75 | uId_ = other.uId_; 76 | nextPackage_ = other.nextPackage_; 77 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 78 | } 79 | 80 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 | public FriendAddReq Clone() { 83 | return new FriendAddReq(this); 84 | } 85 | 86 | /// Field number for the "UId" field. 87 | public const int UIdFieldNumber = 1; 88 | private ulong uId_; 89 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 90 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 91 | public ulong UId { 92 | get { return uId_; } 93 | set { 94 | uId_ = value; 95 | } 96 | } 97 | 98 | /// Field number for the "NextPackage" field. 99 | public const int NextPackageFieldNumber = 2047; 100 | private pb::ByteString nextPackage_ = pb::ByteString.Empty; 101 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 102 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 103 | public pb::ByteString NextPackage { 104 | get { return nextPackage_; } 105 | set { 106 | nextPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 107 | } 108 | } 109 | 110 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 111 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 112 | public override bool Equals(object other) { 113 | return Equals(other as FriendAddReq); 114 | } 115 | 116 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 117 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 118 | public bool Equals(FriendAddReq other) { 119 | if (ReferenceEquals(other, null)) { 120 | return false; 121 | } 122 | if (ReferenceEquals(other, this)) { 123 | return true; 124 | } 125 | if (UId != other.UId) return false; 126 | if (NextPackage != other.NextPackage) return false; 127 | return Equals(_unknownFields, other._unknownFields); 128 | } 129 | 130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 131 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 132 | public override int GetHashCode() { 133 | int hash = 1; 134 | if (UId != 0UL) hash ^= UId.GetHashCode(); 135 | if (NextPackage.Length != 0) hash ^= NextPackage.GetHashCode(); 136 | if (_unknownFields != null) { 137 | hash ^= _unknownFields.GetHashCode(); 138 | } 139 | return hash; 140 | } 141 | 142 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 143 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 144 | public override string ToString() { 145 | return pb::JsonFormatter.ToDiagnosticString(this); 146 | } 147 | 148 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 149 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 150 | public void WriteTo(pb::CodedOutputStream output) { 151 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 152 | output.WriteRawMessage(this); 153 | #else 154 | if (UId != 0UL) { 155 | output.WriteRawTag(8); 156 | output.WriteUInt64(UId); 157 | } 158 | if (NextPackage.Length != 0) { 159 | output.WriteRawTag(250, 127); 160 | output.WriteBytes(NextPackage); 161 | } 162 | if (_unknownFields != null) { 163 | _unknownFields.WriteTo(output); 164 | } 165 | #endif 166 | } 167 | 168 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 169 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 170 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 171 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 172 | if (UId != 0UL) { 173 | output.WriteRawTag(8); 174 | output.WriteUInt64(UId); 175 | } 176 | if (NextPackage.Length != 0) { 177 | output.WriteRawTag(250, 127); 178 | output.WriteBytes(NextPackage); 179 | } 180 | if (_unknownFields != null) { 181 | _unknownFields.WriteTo(ref output); 182 | } 183 | } 184 | #endif 185 | 186 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 187 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 188 | public int CalculateSize() { 189 | int size = 0; 190 | if (UId != 0UL) { 191 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(UId); 192 | } 193 | if (NextPackage.Length != 0) { 194 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(NextPackage); 195 | } 196 | if (_unknownFields != null) { 197 | size += _unknownFields.CalculateSize(); 198 | } 199 | return size; 200 | } 201 | 202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 203 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 204 | public void MergeFrom(FriendAddReq other) { 205 | if (other == null) { 206 | return; 207 | } 208 | if (other.UId != 0UL) { 209 | UId = other.UId; 210 | } 211 | if (other.NextPackage.Length != 0) { 212 | NextPackage = other.NextPackage; 213 | } 214 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 215 | } 216 | 217 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 218 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 219 | public void MergeFrom(pb::CodedInputStream input) { 220 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 221 | input.ReadRawMessage(this); 222 | #else 223 | uint tag; 224 | while ((tag = input.ReadTag()) != 0) { 225 | if ((tag & 7) == 4) { 226 | // Abort on any end group tag. 227 | return; 228 | } 229 | switch(tag) { 230 | default: 231 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 232 | break; 233 | case 8: { 234 | UId = input.ReadUInt64(); 235 | break; 236 | } 237 | case 16378: { 238 | NextPackage = input.ReadBytes(); 239 | break; 240 | } 241 | } 242 | } 243 | #endif 244 | } 245 | 246 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 247 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 248 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 249 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 250 | uint tag; 251 | while ((tag = input.ReadTag()) != 0) { 252 | if ((tag & 7) == 4) { 253 | // Abort on any end group tag. 254 | return; 255 | } 256 | switch(tag) { 257 | default: 258 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 259 | break; 260 | case 8: { 261 | UId = input.ReadUInt64(); 262 | break; 263 | } 264 | case 16378: { 265 | NextPackage = input.ReadBytes(); 266 | break; 267 | } 268 | } 269 | } 270 | } 271 | #endif 272 | 273 | } 274 | 275 | #endregion 276 | 277 | } 278 | 279 | #endregion Designer generated code 280 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/FriendDelete.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: friend_delete.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from friend_delete.proto 15 | public static partial class FriendDeleteReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for friend_delete.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static FriendDeleteReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChNmcmllbmRfZGVsZXRlLnByb3RvEgVwcm90bxoMcHVibGljLnByb3RvIjQK", 28 | "D0ZyaWVuZERlbGV0ZVJlcRILCgNVSWQYASABKAQSFAoLTmV4dFBhY2thZ2UY", 29 | "/w8gASgMUABiBnByb3RvMw==")); 30 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 31 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 32 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 33 | new pbr::GeneratedClrTypeInfo(typeof(global::Proto.FriendDeleteReq), global::Proto.FriendDeleteReq.Parser, new[]{ "UId", "NextPackage" }, null, null, null, null) 34 | })); 35 | } 36 | #endregion 37 | 38 | } 39 | #region Messages 40 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 41 | public sealed partial class FriendDeleteReq : pb::IMessage 42 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 43 | , pb::IBufferMessage 44 | #endif 45 | { 46 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FriendDeleteReq()); 47 | private pb::UnknownFieldSet _unknownFields; 48 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 49 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 50 | public static pb::MessageParser Parser { get { return _parser; } } 51 | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 54 | public static pbr::MessageDescriptor Descriptor { 55 | get { return global::Proto.FriendDeleteReflection.Descriptor.MessageTypes[0]; } 56 | } 57 | 58 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 59 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 60 | pbr::MessageDescriptor pb::IMessage.Descriptor { 61 | get { return Descriptor; } 62 | } 63 | 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 65 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 66 | public FriendDeleteReq() { 67 | OnConstruction(); 68 | } 69 | 70 | partial void OnConstruction(); 71 | 72 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 74 | public FriendDeleteReq(FriendDeleteReq other) : this() { 75 | uId_ = other.uId_; 76 | nextPackage_ = other.nextPackage_; 77 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 78 | } 79 | 80 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 | public FriendDeleteReq Clone() { 83 | return new FriendDeleteReq(this); 84 | } 85 | 86 | /// Field number for the "UId" field. 87 | public const int UIdFieldNumber = 1; 88 | private ulong uId_; 89 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 90 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 91 | public ulong UId { 92 | get { return uId_; } 93 | set { 94 | uId_ = value; 95 | } 96 | } 97 | 98 | /// Field number for the "NextPackage" field. 99 | public const int NextPackageFieldNumber = 2047; 100 | private pb::ByteString nextPackage_ = pb::ByteString.Empty; 101 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 102 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 103 | public pb::ByteString NextPackage { 104 | get { return nextPackage_; } 105 | set { 106 | nextPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 107 | } 108 | } 109 | 110 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 111 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 112 | public override bool Equals(object other) { 113 | return Equals(other as FriendDeleteReq); 114 | } 115 | 116 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 117 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 118 | public bool Equals(FriendDeleteReq other) { 119 | if (ReferenceEquals(other, null)) { 120 | return false; 121 | } 122 | if (ReferenceEquals(other, this)) { 123 | return true; 124 | } 125 | if (UId != other.UId) return false; 126 | if (NextPackage != other.NextPackage) return false; 127 | return Equals(_unknownFields, other._unknownFields); 128 | } 129 | 130 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 131 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 132 | public override int GetHashCode() { 133 | int hash = 1; 134 | if (UId != 0UL) hash ^= UId.GetHashCode(); 135 | if (NextPackage.Length != 0) hash ^= NextPackage.GetHashCode(); 136 | if (_unknownFields != null) { 137 | hash ^= _unknownFields.GetHashCode(); 138 | } 139 | return hash; 140 | } 141 | 142 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 143 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 144 | public override string ToString() { 145 | return pb::JsonFormatter.ToDiagnosticString(this); 146 | } 147 | 148 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 149 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 150 | public void WriteTo(pb::CodedOutputStream output) { 151 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 152 | output.WriteRawMessage(this); 153 | #else 154 | if (UId != 0UL) { 155 | output.WriteRawTag(8); 156 | output.WriteUInt64(UId); 157 | } 158 | if (NextPackage.Length != 0) { 159 | output.WriteRawTag(250, 127); 160 | output.WriteBytes(NextPackage); 161 | } 162 | if (_unknownFields != null) { 163 | _unknownFields.WriteTo(output); 164 | } 165 | #endif 166 | } 167 | 168 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 169 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 170 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 171 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 172 | if (UId != 0UL) { 173 | output.WriteRawTag(8); 174 | output.WriteUInt64(UId); 175 | } 176 | if (NextPackage.Length != 0) { 177 | output.WriteRawTag(250, 127); 178 | output.WriteBytes(NextPackage); 179 | } 180 | if (_unknownFields != null) { 181 | _unknownFields.WriteTo(ref output); 182 | } 183 | } 184 | #endif 185 | 186 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 187 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 188 | public int CalculateSize() { 189 | int size = 0; 190 | if (UId != 0UL) { 191 | size += 1 + pb::CodedOutputStream.ComputeUInt64Size(UId); 192 | } 193 | if (NextPackage.Length != 0) { 194 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(NextPackage); 195 | } 196 | if (_unknownFields != null) { 197 | size += _unknownFields.CalculateSize(); 198 | } 199 | return size; 200 | } 201 | 202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 203 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 204 | public void MergeFrom(FriendDeleteReq other) { 205 | if (other == null) { 206 | return; 207 | } 208 | if (other.UId != 0UL) { 209 | UId = other.UId; 210 | } 211 | if (other.NextPackage.Length != 0) { 212 | NextPackage = other.NextPackage; 213 | } 214 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 215 | } 216 | 217 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 218 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 219 | public void MergeFrom(pb::CodedInputStream input) { 220 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 221 | input.ReadRawMessage(this); 222 | #else 223 | uint tag; 224 | while ((tag = input.ReadTag()) != 0) { 225 | if ((tag & 7) == 4) { 226 | // Abort on any end group tag. 227 | return; 228 | } 229 | switch(tag) { 230 | default: 231 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 232 | break; 233 | case 8: { 234 | UId = input.ReadUInt64(); 235 | break; 236 | } 237 | case 16378: { 238 | NextPackage = input.ReadBytes(); 239 | break; 240 | } 241 | } 242 | } 243 | #endif 244 | } 245 | 246 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 247 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 248 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 249 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 250 | uint tag; 251 | while ((tag = input.ReadTag()) != 0) { 252 | if ((tag & 7) == 4) { 253 | // Abort on any end group tag. 254 | return; 255 | } 256 | switch(tag) { 257 | default: 258 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 259 | break; 260 | case 8: { 261 | UId = input.ReadUInt64(); 262 | break; 263 | } 264 | case 16378: { 265 | NextPackage = input.ReadBytes(); 266 | break; 267 | } 268 | } 269 | } 270 | } 271 | #endif 272 | 273 | } 274 | 275 | #endregion 276 | 277 | } 278 | 279 | #endregion Designer generated code 280 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/GemConvert.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: gem_convert.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from gem_convert.proto 15 | public static partial class GemConvertReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for gem_convert.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static GemConvertReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChFnZW1fY29udmVydC5wcm90bxIFcHJvdG8aDHB1YmxpYy5wcm90b1AAYgZw", 28 | "cm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MailList.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mail_list.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mail_list.proto 15 | public static partial class MailListReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mail_list.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MailListReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Cg9tYWlsX2xpc3QucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG9QAGIGcHJv", 28 | "dG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MailRead.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mail_read.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mail_read.proto 15 | public static partial class MailReadReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mail_read.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MailReadReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Cg9tYWlsX3JlYWQucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG9QAGIGcHJv", 28 | "dG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MailRemove.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mail_remove.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mail_remove.proto 15 | public static partial class MailRemoveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mail_remove.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MailRemoveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChFtYWlsX3JlbW92ZS5wcm90bxIFcHJvdG8aDHB1YmxpYy5wcm90byIzCg5N", 28 | "YWlsUmVtb3ZlUmVzcBILCgNJZHMYASADKA0SFAoLTmV4dFBhY2thZ2UY/w8g", 29 | "ASgMUABiBnByb3RvMw==")); 30 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 31 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 32 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 33 | new pbr::GeneratedClrTypeInfo(typeof(global::Proto.MailRemoveResp), global::Proto.MailRemoveResp.Parser, new[]{ "Ids", "NextPackage" }, null, null, null, null) 34 | })); 35 | } 36 | #endregion 37 | 38 | } 39 | #region Messages 40 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 41 | public sealed partial class MailRemoveResp : pb::IMessage 42 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 43 | , pb::IBufferMessage 44 | #endif 45 | { 46 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MailRemoveResp()); 47 | private pb::UnknownFieldSet _unknownFields; 48 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 49 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 50 | public static pb::MessageParser Parser { get { return _parser; } } 51 | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 54 | public static pbr::MessageDescriptor Descriptor { 55 | get { return global::Proto.MailRemoveReflection.Descriptor.MessageTypes[0]; } 56 | } 57 | 58 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 59 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 60 | pbr::MessageDescriptor pb::IMessage.Descriptor { 61 | get { return Descriptor; } 62 | } 63 | 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 65 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 66 | public MailRemoveResp() { 67 | OnConstruction(); 68 | } 69 | 70 | partial void OnConstruction(); 71 | 72 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 74 | public MailRemoveResp(MailRemoveResp other) : this() { 75 | ids_ = other.ids_.Clone(); 76 | nextPackage_ = other.nextPackage_; 77 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 78 | } 79 | 80 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 | public MailRemoveResp Clone() { 83 | return new MailRemoveResp(this); 84 | } 85 | 86 | /// Field number for the "Ids" field. 87 | public const int IdsFieldNumber = 1; 88 | private static readonly pb::FieldCodec _repeated_ids_codec 89 | = pb::FieldCodec.ForUInt32(10); 90 | private readonly pbc::RepeatedField ids_ = new pbc::RepeatedField(); 91 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 92 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 93 | public pbc::RepeatedField Ids { 94 | get { return ids_; } 95 | } 96 | 97 | /// Field number for the "NextPackage" field. 98 | public const int NextPackageFieldNumber = 2047; 99 | private pb::ByteString nextPackage_ = pb::ByteString.Empty; 100 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 102 | public pb::ByteString NextPackage { 103 | get { return nextPackage_; } 104 | set { 105 | nextPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 106 | } 107 | } 108 | 109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 110 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 111 | public override bool Equals(object other) { 112 | return Equals(other as MailRemoveResp); 113 | } 114 | 115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 116 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 117 | public bool Equals(MailRemoveResp other) { 118 | if (ReferenceEquals(other, null)) { 119 | return false; 120 | } 121 | if (ReferenceEquals(other, this)) { 122 | return true; 123 | } 124 | if(!ids_.Equals(other.ids_)) return false; 125 | if (NextPackage != other.NextPackage) return false; 126 | return Equals(_unknownFields, other._unknownFields); 127 | } 128 | 129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 130 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 131 | public override int GetHashCode() { 132 | int hash = 1; 133 | hash ^= ids_.GetHashCode(); 134 | if (NextPackage.Length != 0) hash ^= NextPackage.GetHashCode(); 135 | if (_unknownFields != null) { 136 | hash ^= _unknownFields.GetHashCode(); 137 | } 138 | return hash; 139 | } 140 | 141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 142 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 143 | public override string ToString() { 144 | return pb::JsonFormatter.ToDiagnosticString(this); 145 | } 146 | 147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 148 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 149 | public void WriteTo(pb::CodedOutputStream output) { 150 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 151 | output.WriteRawMessage(this); 152 | #else 153 | ids_.WriteTo(output, _repeated_ids_codec); 154 | if (NextPackage.Length != 0) { 155 | output.WriteRawTag(250, 127); 156 | output.WriteBytes(NextPackage); 157 | } 158 | if (_unknownFields != null) { 159 | _unknownFields.WriteTo(output); 160 | } 161 | #endif 162 | } 163 | 164 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 165 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 166 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 167 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 168 | ids_.WriteTo(ref output, _repeated_ids_codec); 169 | if (NextPackage.Length != 0) { 170 | output.WriteRawTag(250, 127); 171 | output.WriteBytes(NextPackage); 172 | } 173 | if (_unknownFields != null) { 174 | _unknownFields.WriteTo(ref output); 175 | } 176 | } 177 | #endif 178 | 179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 180 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 181 | public int CalculateSize() { 182 | int size = 0; 183 | size += ids_.CalculateSize(_repeated_ids_codec); 184 | if (NextPackage.Length != 0) { 185 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(NextPackage); 186 | } 187 | if (_unknownFields != null) { 188 | size += _unknownFields.CalculateSize(); 189 | } 190 | return size; 191 | } 192 | 193 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 194 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 195 | public void MergeFrom(MailRemoveResp other) { 196 | if (other == null) { 197 | return; 198 | } 199 | ids_.Add(other.ids_); 200 | if (other.NextPackage.Length != 0) { 201 | NextPackage = other.NextPackage; 202 | } 203 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 204 | } 205 | 206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 207 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 208 | public void MergeFrom(pb::CodedInputStream input) { 209 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 210 | input.ReadRawMessage(this); 211 | #else 212 | uint tag; 213 | while ((tag = input.ReadTag()) != 0) { 214 | if ((tag & 7) == 4) { 215 | // Abort on any end group tag. 216 | return; 217 | } 218 | switch(tag) { 219 | default: 220 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 221 | break; 222 | case 10: 223 | case 8: { 224 | ids_.AddEntriesFrom(input, _repeated_ids_codec); 225 | break; 226 | } 227 | case 16378: { 228 | NextPackage = input.ReadBytes(); 229 | break; 230 | } 231 | } 232 | } 233 | #endif 234 | } 235 | 236 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 237 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 238 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 239 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 240 | uint tag; 241 | while ((tag = input.ReadTag()) != 0) { 242 | if ((tag & 7) == 4) { 243 | // Abort on any end group tag. 244 | return; 245 | } 246 | switch(tag) { 247 | default: 248 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 249 | break; 250 | case 10: 251 | case 8: { 252 | ids_.AddEntriesFrom(ref input, _repeated_ids_codec); 253 | break; 254 | } 255 | case 16378: { 256 | NextPackage = input.ReadBytes(); 257 | break; 258 | } 259 | } 260 | } 261 | } 262 | #endif 263 | 264 | } 265 | 266 | #endregion 267 | 268 | } 269 | 270 | #endregion Designer generated code 271 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MallMonthlycardOrder.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mall_monthlycard_order.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mall_monthlycard_order.proto 15 | public static partial class MallMonthlycardOrderReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mall_monthlycard_order.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MallMonthlycardOrderReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChxtYWxsX21vbnRobHljYXJkX29yZGVyLnByb3RvEgVwcm90bxoMcHVibGlj", 28 | "LnByb3RvUABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MallOrderCancel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mall_order_cancel.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mall_order_cancel.proto 15 | public static partial class MallOrderCancelReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mall_order_cancel.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MallOrderCancelReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChdtYWxsX29yZGVyX2NhbmNlbC5wcm90bxIFcHJvdG8aDHB1YmxpYy5wcm90", 28 | "b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/MallOrderCollect.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: mall_order_collect.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from mall_order_collect.proto 15 | public static partial class MallOrderCollectReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for mall_order_collect.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static MallOrderCollectReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChhtYWxsX29yZGVyX2NvbGxlY3QucHJvdG8SBXByb3RvGgxwdWJsaWMucHJv", 28 | "dG9QAGIGcHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlayerBoard.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: player_board.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from player_board.proto 15 | public static partial class PlayerBoardReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for player_board.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlayerBoardReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChJwbGF5ZXJfYm9hcmQucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG8iNgoR", 28 | "UGxheWVyQm9hcmRTZXRSZXESCwoDSWRzGAEgAygNEhQKC05leHRQYWNrYWdl", 29 | "GP8PIAEoDFAAYgZwcm90bzM=")); 30 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 31 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 32 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 33 | new pbr::GeneratedClrTypeInfo(typeof(global::Proto.PlayerBoardSetReq), global::Proto.PlayerBoardSetReq.Parser, new[]{ "Ids", "NextPackage" }, null, null, null, null) 34 | })); 35 | } 36 | #endregion 37 | 38 | } 39 | #region Messages 40 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 41 | public sealed partial class PlayerBoardSetReq : pb::IMessage 42 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 43 | , pb::IBufferMessage 44 | #endif 45 | { 46 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PlayerBoardSetReq()); 47 | private pb::UnknownFieldSet _unknownFields; 48 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 49 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 50 | public static pb::MessageParser Parser { get { return _parser; } } 51 | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 54 | public static pbr::MessageDescriptor Descriptor { 55 | get { return global::Proto.PlayerBoardReflection.Descriptor.MessageTypes[0]; } 56 | } 57 | 58 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 59 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 60 | pbr::MessageDescriptor pb::IMessage.Descriptor { 61 | get { return Descriptor; } 62 | } 63 | 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 65 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 66 | public PlayerBoardSetReq() { 67 | OnConstruction(); 68 | } 69 | 70 | partial void OnConstruction(); 71 | 72 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 74 | public PlayerBoardSetReq(PlayerBoardSetReq other) : this() { 75 | ids_ = other.ids_.Clone(); 76 | nextPackage_ = other.nextPackage_; 77 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 78 | } 79 | 80 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 | public PlayerBoardSetReq Clone() { 83 | return new PlayerBoardSetReq(this); 84 | } 85 | 86 | /// Field number for the "Ids" field. 87 | public const int IdsFieldNumber = 1; 88 | private static readonly pb::FieldCodec _repeated_ids_codec 89 | = pb::FieldCodec.ForUInt32(10); 90 | private readonly pbc::RepeatedField ids_ = new pbc::RepeatedField(); 91 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 92 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 93 | public pbc::RepeatedField Ids { 94 | get { return ids_; } 95 | } 96 | 97 | /// Field number for the "NextPackage" field. 98 | public const int NextPackageFieldNumber = 2047; 99 | private pb::ByteString nextPackage_ = pb::ByteString.Empty; 100 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 102 | public pb::ByteString NextPackage { 103 | get { return nextPackage_; } 104 | set { 105 | nextPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 106 | } 107 | } 108 | 109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 110 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 111 | public override bool Equals(object other) { 112 | return Equals(other as PlayerBoardSetReq); 113 | } 114 | 115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 116 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 117 | public bool Equals(PlayerBoardSetReq other) { 118 | if (ReferenceEquals(other, null)) { 119 | return false; 120 | } 121 | if (ReferenceEquals(other, this)) { 122 | return true; 123 | } 124 | if(!ids_.Equals(other.ids_)) return false; 125 | if (NextPackage != other.NextPackage) return false; 126 | return Equals(_unknownFields, other._unknownFields); 127 | } 128 | 129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 130 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 131 | public override int GetHashCode() { 132 | int hash = 1; 133 | hash ^= ids_.GetHashCode(); 134 | if (NextPackage.Length != 0) hash ^= NextPackage.GetHashCode(); 135 | if (_unknownFields != null) { 136 | hash ^= _unknownFields.GetHashCode(); 137 | } 138 | return hash; 139 | } 140 | 141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 142 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 143 | public override string ToString() { 144 | return pb::JsonFormatter.ToDiagnosticString(this); 145 | } 146 | 147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 148 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 149 | public void WriteTo(pb::CodedOutputStream output) { 150 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 151 | output.WriteRawMessage(this); 152 | #else 153 | ids_.WriteTo(output, _repeated_ids_codec); 154 | if (NextPackage.Length != 0) { 155 | output.WriteRawTag(250, 127); 156 | output.WriteBytes(NextPackage); 157 | } 158 | if (_unknownFields != null) { 159 | _unknownFields.WriteTo(output); 160 | } 161 | #endif 162 | } 163 | 164 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 165 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 166 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 167 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 168 | ids_.WriteTo(ref output, _repeated_ids_codec); 169 | if (NextPackage.Length != 0) { 170 | output.WriteRawTag(250, 127); 171 | output.WriteBytes(NextPackage); 172 | } 173 | if (_unknownFields != null) { 174 | _unknownFields.WriteTo(ref output); 175 | } 176 | } 177 | #endif 178 | 179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 180 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 181 | public int CalculateSize() { 182 | int size = 0; 183 | size += ids_.CalculateSize(_repeated_ids_codec); 184 | if (NextPackage.Length != 0) { 185 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(NextPackage); 186 | } 187 | if (_unknownFields != null) { 188 | size += _unknownFields.CalculateSize(); 189 | } 190 | return size; 191 | } 192 | 193 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 194 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 195 | public void MergeFrom(PlayerBoardSetReq other) { 196 | if (other == null) { 197 | return; 198 | } 199 | ids_.Add(other.ids_); 200 | if (other.NextPackage.Length != 0) { 201 | NextPackage = other.NextPackage; 202 | } 203 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 204 | } 205 | 206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 207 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 208 | public void MergeFrom(pb::CodedInputStream input) { 209 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 210 | input.ReadRawMessage(this); 211 | #else 212 | uint tag; 213 | while ((tag = input.ReadTag()) != 0) { 214 | if ((tag & 7) == 4) { 215 | // Abort on any end group tag. 216 | return; 217 | } 218 | switch(tag) { 219 | default: 220 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 221 | break; 222 | case 10: 223 | case 8: { 224 | ids_.AddEntriesFrom(input, _repeated_ids_codec); 225 | break; 226 | } 227 | case 16378: { 228 | NextPackage = input.ReadBytes(); 229 | break; 230 | } 231 | } 232 | } 233 | #endif 234 | } 235 | 236 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 237 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 238 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 239 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 240 | uint tag; 241 | while ((tag = input.ReadTag()) != 0) { 242 | if ((tag & 7) == 4) { 243 | // Abort on any end group tag. 244 | return; 245 | } 246 | switch(tag) { 247 | default: 248 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 249 | break; 250 | case 10: 251 | case 8: { 252 | ids_.AddEntriesFrom(ref input, _repeated_ids_codec); 253 | break; 254 | } 255 | case 16378: { 256 | NextPackage = input.ReadBytes(); 257 | break; 258 | } 259 | } 260 | } 261 | } 262 | #endif 263 | 264 | } 265 | 266 | #endregion 267 | 268 | } 269 | 270 | #endregion Designer generated code 271 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlayerExit.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: player_exit.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from player_exit.proto 15 | public static partial class PlayerExitReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for player_exit.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlayerExitReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChFwbGF5ZXJfZXhpdC5wcm90bxIFcHJvdG8aDHB1YmxpYy5wcm90b1AAYgZw", 28 | "cm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlayerGenderEdit.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: player_gender_edit.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from player_gender_edit.proto 15 | public static partial class PlayerGenderEditReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for player_gender_edit.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlayerGenderEditReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChhwbGF5ZXJfZ2VuZGVyX2VkaXQucHJvdG8SBXByb3RvGgxwdWJsaWMucHJv", 28 | "dG9QAGIGcHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlayerLearn.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: player_learn.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from player_learn.proto 15 | public static partial class PlayerLearnReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for player_learn.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlayerLearnReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChJwbGF5ZXJfbGVhcm4ucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG9QAGIG", 28 | "cHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlayerWorldClassRewardReceive.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: player_world_class_reward_receive.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from player_world_class_reward_receive.proto 15 | public static partial class PlayerWorldClassRewardReceiveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for player_world_class_reward_receive.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlayerWorldClassRewardReceiveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CidwbGF5ZXJfd29ybGRfY2xhc3NfcmV3YXJkX3JlY2VpdmUucHJvdG8SBXBy", 28 | "b3RvGgxwdWJsaWMucHJvdG9QAGIGcHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PlotRewardReceive.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: plot_reward_receive.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from plot_reward_receive.proto 15 | public static partial class PlotRewardReceiveReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for plot_reward_receive.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PlotRewardReceiveReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChlwbG90X3Jld2FyZF9yZWNlaXZlLnByb3RvEgVwcm90bxoMcHVibGljLnBy", 28 | "b3RvUABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/PubilcGm.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: pubilc_gm.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from pubilc_gm.proto 15 | public static partial class PubilcGmReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for pubilc_gm.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static PubilcGmReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Cg9wdWJpbGNfZ20ucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG8iOAoFQ2hh", 28 | "cnMSGQoETGlzdBgBIAMoCzILLnByb3RvLkNoYXISFAoLTmV4dFBhY2thZ2UY", 29 | "/w8gASgMUABiBnByb3RvMw==")); 30 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 31 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 32 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 33 | new pbr::GeneratedClrTypeInfo(typeof(global::Proto.Chars), global::Proto.Chars.Parser, new[]{ "List", "NextPackage" }, null, null, null, null) 34 | })); 35 | } 36 | #endregion 37 | 38 | } 39 | #region Messages 40 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 41 | public sealed partial class Chars : pb::IMessage 42 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 43 | , pb::IBufferMessage 44 | #endif 45 | { 46 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Chars()); 47 | private pb::UnknownFieldSet _unknownFields; 48 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 49 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 50 | public static pb::MessageParser Parser { get { return _parser; } } 51 | 52 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 53 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 54 | public static pbr::MessageDescriptor Descriptor { 55 | get { return global::Proto.PubilcGmReflection.Descriptor.MessageTypes[0]; } 56 | } 57 | 58 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 59 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 60 | pbr::MessageDescriptor pb::IMessage.Descriptor { 61 | get { return Descriptor; } 62 | } 63 | 64 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 65 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 66 | public Chars() { 67 | OnConstruction(); 68 | } 69 | 70 | partial void OnConstruction(); 71 | 72 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 74 | public Chars(Chars other) : this() { 75 | list_ = other.list_.Clone(); 76 | nextPackage_ = other.nextPackage_; 77 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 78 | } 79 | 80 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 | public Chars Clone() { 83 | return new Chars(this); 84 | } 85 | 86 | /// Field number for the "List" field. 87 | public const int ListFieldNumber = 1; 88 | private static readonly pb::FieldCodec _repeated_list_codec 89 | = pb::FieldCodec.ForMessage(10, global::Proto.Char.Parser); 90 | private readonly pbc::RepeatedField list_ = new pbc::RepeatedField(); 91 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 92 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 93 | public pbc::RepeatedField List { 94 | get { return list_; } 95 | } 96 | 97 | /// Field number for the "NextPackage" field. 98 | public const int NextPackageFieldNumber = 2047; 99 | private pb::ByteString nextPackage_ = pb::ByteString.Empty; 100 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 102 | public pb::ByteString NextPackage { 103 | get { return nextPackage_; } 104 | set { 105 | nextPackage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 106 | } 107 | } 108 | 109 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 110 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 111 | public override bool Equals(object other) { 112 | return Equals(other as Chars); 113 | } 114 | 115 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 116 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 117 | public bool Equals(Chars other) { 118 | if (ReferenceEquals(other, null)) { 119 | return false; 120 | } 121 | if (ReferenceEquals(other, this)) { 122 | return true; 123 | } 124 | if(!list_.Equals(other.list_)) return false; 125 | if (NextPackage != other.NextPackage) return false; 126 | return Equals(_unknownFields, other._unknownFields); 127 | } 128 | 129 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 130 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 131 | public override int GetHashCode() { 132 | int hash = 1; 133 | hash ^= list_.GetHashCode(); 134 | if (NextPackage.Length != 0) hash ^= NextPackage.GetHashCode(); 135 | if (_unknownFields != null) { 136 | hash ^= _unknownFields.GetHashCode(); 137 | } 138 | return hash; 139 | } 140 | 141 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 142 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 143 | public override string ToString() { 144 | return pb::JsonFormatter.ToDiagnosticString(this); 145 | } 146 | 147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 148 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 149 | public void WriteTo(pb::CodedOutputStream output) { 150 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 151 | output.WriteRawMessage(this); 152 | #else 153 | list_.WriteTo(output, _repeated_list_codec); 154 | if (NextPackage.Length != 0) { 155 | output.WriteRawTag(250, 127); 156 | output.WriteBytes(NextPackage); 157 | } 158 | if (_unknownFields != null) { 159 | _unknownFields.WriteTo(output); 160 | } 161 | #endif 162 | } 163 | 164 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 165 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 166 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 167 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 168 | list_.WriteTo(ref output, _repeated_list_codec); 169 | if (NextPackage.Length != 0) { 170 | output.WriteRawTag(250, 127); 171 | output.WriteBytes(NextPackage); 172 | } 173 | if (_unknownFields != null) { 174 | _unknownFields.WriteTo(ref output); 175 | } 176 | } 177 | #endif 178 | 179 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 180 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 181 | public int CalculateSize() { 182 | int size = 0; 183 | size += list_.CalculateSize(_repeated_list_codec); 184 | if (NextPackage.Length != 0) { 185 | size += 2 + pb::CodedOutputStream.ComputeBytesSize(NextPackage); 186 | } 187 | if (_unknownFields != null) { 188 | size += _unknownFields.CalculateSize(); 189 | } 190 | return size; 191 | } 192 | 193 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 194 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 195 | public void MergeFrom(Chars other) { 196 | if (other == null) { 197 | return; 198 | } 199 | list_.Add(other.list_); 200 | if (other.NextPackage.Length != 0) { 201 | NextPackage = other.NextPackage; 202 | } 203 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 204 | } 205 | 206 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 207 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 208 | public void MergeFrom(pb::CodedInputStream input) { 209 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 210 | input.ReadRawMessage(this); 211 | #else 212 | uint tag; 213 | while ((tag = input.ReadTag()) != 0) { 214 | if ((tag & 7) == 4) { 215 | // Abort on any end group tag. 216 | return; 217 | } 218 | switch(tag) { 219 | default: 220 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 221 | break; 222 | case 10: { 223 | list_.AddEntriesFrom(input, _repeated_list_codec); 224 | break; 225 | } 226 | case 16378: { 227 | NextPackage = input.ReadBytes(); 228 | break; 229 | } 230 | } 231 | } 232 | #endif 233 | } 234 | 235 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 236 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 237 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 238 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 239 | uint tag; 240 | while ((tag = input.ReadTag()) != 0) { 241 | if ((tag & 7) == 4) { 242 | // Abort on any end group tag. 243 | return; 244 | } 245 | switch(tag) { 246 | default: 247 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 248 | break; 249 | case 10: { 250 | list_.AddEntriesFrom(ref input, _repeated_list_codec); 251 | break; 252 | } 253 | case 16378: { 254 | NextPackage = input.ReadBytes(); 255 | break; 256 | } 257 | } 258 | } 259 | } 260 | #endif 261 | 262 | } 263 | 264 | #endregion 265 | 266 | } 267 | 268 | #endregion Designer generated code 269 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/QuestDailyRewardRecevie.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: quest_daily_reward_recevie.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from quest_daily_reward_recevie.proto 15 | public static partial class QuestDailyRewardRecevieReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for quest_daily_reward_recevie.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static QuestDailyRewardRecevieReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CiBxdWVzdF9kYWlseV9yZXdhcmRfcmVjZXZpZS5wcm90bxIFcHJvdG8aDHB1", 28 | "YmxpYy5wcm90b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/QuestTowerRewardRecevie.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: quest_tower_reward_recevie.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from quest_tower_reward_recevie.proto 15 | public static partial class QuestTowerRewardRecevieReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for quest_tower_reward_recevie.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static QuestTowerRewardRecevieReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CiBxdWVzdF90b3dlcl9yZXdhcmRfcmVjZXZpZS5wcm90bxIFcHJvdG8aDHB1", 28 | "YmxpYy5wcm90b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/StarTowerInfo.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: star_tower_info.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from star_tower_info.proto 15 | public static partial class StarTowerInfoReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for star_tower_info.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static StarTowerInfoReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChVzdGFyX3Rvd2VyX2luZm8ucHJvdG8SBXByb3RvGgxwdWJsaWMucHJvdG8a", 28 | "F3B1YmxpY19zdGFyX3Rvd2VyLnByb3RvUABiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, global::Proto.PublicStarTowerReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/TowerGrowthNodeUnlock.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: tower_growth_node_unlock.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from tower_growth_node_unlock.proto 15 | public static partial class TowerGrowthNodeUnlockReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for tower_growth_node_unlock.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static TowerGrowthNodeUnlockReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Ch50b3dlcl9ncm93dGhfbm9kZV91bmxvY2sucHJvdG8SBXByb3RvGgxwdWJs", 28 | "aWMucHJvdG9QAGIGcHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/VampireTalentReset.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: vampire_talent_reset.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from vampire_talent_reset.proto 15 | public static partial class VampireTalentResetReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for vampire_talent_reset.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static VampireTalentResetReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Chp2YW1waXJlX3RhbGVudF9yZXNldC5wcm90bxIFcHJvdG8aDHB1YmxpYy5w", 28 | "cm90b1AAYgZwcm90bzM=")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/Protos/VampireTalentUnlock.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: vampire_talent_unlock.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Proto { 13 | 14 | /// Holder for reflection information generated from vampire_talent_unlock.proto 15 | public static partial class VampireTalentUnlockReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for vampire_talent_unlock.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static VampireTalentUnlockReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "Cht2YW1waXJlX3RhbGVudF91bmxvY2sucHJvdG8SBXByb3RvGgxwdWJsaWMu", 28 | "cHJvdG9QAGIGcHJvdG8z")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Proto.PublicReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, null)); 32 | } 33 | #endregion 34 | 35 | } 36 | } 37 | 38 | #endregion Designer generated code 39 | -------------------------------------------------------------------------------- /Novaria.Common/SDKProtos/ClientDiff.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: ClientDiff.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021, 8981 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Pb { 13 | 14 | /// Holder for reflection information generated from ClientDiff.proto 15 | public static partial class ClientDiffReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for ClientDiff.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static ClientDiffReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "ChBDbGllbnREaWZmLnByb3RvGg5GaWxlRGlmZi5wcm90byIlCgpDbGllbnRE", 28 | "aWZmEhcKBGRpZmYYASADKAsyCS5GaWxlRGlmZkIFqgICUGJiBnByb3RvMw==")); 29 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 30 | new pbr::FileDescriptor[] { global::Pb.FileDiffReflection.Descriptor, }, 31 | new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 32 | new pbr::GeneratedClrTypeInfo(typeof(global::Pb.ClientDiff), global::Pb.ClientDiff.Parser, new[]{ "Diff" }, null, null, null, null) 33 | })); 34 | } 35 | #endregion 36 | 37 | } 38 | #region Messages 39 | [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 40 | public sealed partial class ClientDiff : pb::IMessage 41 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 42 | , pb::IBufferMessage 43 | #endif 44 | { 45 | private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClientDiff()); 46 | private pb::UnknownFieldSet _unknownFields; 47 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 48 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 49 | public static pb::MessageParser Parser { get { return _parser; } } 50 | 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 52 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 53 | public static pbr::MessageDescriptor Descriptor { 54 | get { return global::Pb.ClientDiffReflection.Descriptor.MessageTypes[0]; } 55 | } 56 | 57 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 58 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 59 | pbr::MessageDescriptor pb::IMessage.Descriptor { 60 | get { return Descriptor; } 61 | } 62 | 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 64 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 65 | public ClientDiff() { 66 | OnConstruction(); 67 | } 68 | 69 | partial void OnConstruction(); 70 | 71 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 72 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 73 | public ClientDiff(ClientDiff other) : this() { 74 | diff_ = other.diff_.Clone(); 75 | _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 76 | } 77 | 78 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 79 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 80 | public ClientDiff Clone() { 81 | return new ClientDiff(this); 82 | } 83 | 84 | /// Field number for the "diff" field. 85 | public const int DiffFieldNumber = 1; 86 | private static readonly pb::FieldCodec _repeated_diff_codec 87 | = pb::FieldCodec.ForMessage(10, global::Pb.FileDiff.Parser); 88 | private readonly pbc::RepeatedField diff_ = new pbc::RepeatedField(); 89 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 90 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 91 | public pbc::RepeatedField Diff { 92 | get { return diff_; } 93 | } 94 | 95 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 96 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 97 | public override bool Equals(object other) { 98 | return Equals(other as ClientDiff); 99 | } 100 | 101 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 102 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 103 | public bool Equals(ClientDiff other) { 104 | if (ReferenceEquals(other, null)) { 105 | return false; 106 | } 107 | if (ReferenceEquals(other, this)) { 108 | return true; 109 | } 110 | if(!diff_.Equals(other.diff_)) return false; 111 | return Equals(_unknownFields, other._unknownFields); 112 | } 113 | 114 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 115 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 116 | public override int GetHashCode() { 117 | int hash = 1; 118 | hash ^= diff_.GetHashCode(); 119 | if (_unknownFields != null) { 120 | hash ^= _unknownFields.GetHashCode(); 121 | } 122 | return hash; 123 | } 124 | 125 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 126 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 127 | public override string ToString() { 128 | return pb::JsonFormatter.ToDiagnosticString(this); 129 | } 130 | 131 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 132 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 133 | public void WriteTo(pb::CodedOutputStream output) { 134 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 135 | output.WriteRawMessage(this); 136 | #else 137 | diff_.WriteTo(output, _repeated_diff_codec); 138 | if (_unknownFields != null) { 139 | _unknownFields.WriteTo(output); 140 | } 141 | #endif 142 | } 143 | 144 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 145 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 146 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 147 | void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 148 | diff_.WriteTo(ref output, _repeated_diff_codec); 149 | if (_unknownFields != null) { 150 | _unknownFields.WriteTo(ref output); 151 | } 152 | } 153 | #endif 154 | 155 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 156 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 157 | public int CalculateSize() { 158 | int size = 0; 159 | size += diff_.CalculateSize(_repeated_diff_codec); 160 | if (_unknownFields != null) { 161 | size += _unknownFields.CalculateSize(); 162 | } 163 | return size; 164 | } 165 | 166 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 167 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 168 | public void MergeFrom(ClientDiff other) { 169 | if (other == null) { 170 | return; 171 | } 172 | diff_.Add(other.diff_); 173 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 174 | } 175 | 176 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 177 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 178 | public void MergeFrom(pb::CodedInputStream input) { 179 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 180 | input.ReadRawMessage(this); 181 | #else 182 | uint tag; 183 | while ((tag = input.ReadTag()) != 0) { 184 | if ((tag & 7) == 4) { 185 | // Abort on any end group tag. 186 | return; 187 | } 188 | switch(tag) { 189 | default: 190 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 191 | break; 192 | case 10: { 193 | diff_.AddEntriesFrom(input, _repeated_diff_codec); 194 | break; 195 | } 196 | } 197 | } 198 | #endif 199 | } 200 | 201 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 202 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 203 | [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 204 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 205 | uint tag; 206 | while ((tag = input.ReadTag()) != 0) { 207 | if ((tag & 7) == 4) { 208 | // Abort on any end group tag. 209 | return; 210 | } 211 | switch(tag) { 212 | default: 213 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 214 | break; 215 | case 10: { 216 | diff_.AddEntriesFrom(ref input, _repeated_diff_codec); 217 | break; 218 | } 219 | } 220 | } 221 | } 222 | #endif 223 | 224 | } 225 | 226 | #endregion 227 | 228 | } 229 | 230 | #endregion Designer generated code 231 | -------------------------------------------------------------------------------- /Novaria.Common/Util/BigIntegerExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Novaria.Common.Util 8 | { 9 | using System; 10 | using System.Numerics; 11 | 12 | public static class BigIntegerExtensions 13 | { 14 | public static byte[] GetBytes(this BigInteger value) 15 | { 16 | if (value == 0) 17 | { 18 | return new byte[1]; 19 | } 20 | 21 | int bitCount = value.GetBitCount(); 22 | int byteCount = bitCount >> 3; 23 | if ((bitCount & 7) != 0) 24 | { 25 | byteCount++; 26 | } 27 | 28 | byte[] result = new byte[byteCount]; 29 | int remainingBytes = byteCount & 3; 30 | if (remainingBytes == 0) 31 | { 32 | remainingBytes = 4; 33 | } 34 | 35 | int byteIndex = 0; 36 | 37 | // Convert BigInteger to unsigned equivalent (to match the behavior of the original code) 38 | BigInteger unsignedValue = BigInteger.Abs(value); 39 | 40 | // Iterate through each 32-bit chunk of the BigInteger 41 | while (unsignedValue != 0) 42 | { 43 | uint currentWord = (uint)(unsignedValue & 0xFFFFFFFF); 44 | unsignedValue >>= 32; 45 | 46 | for (int i = remainingBytes - 1; i >= 0; i--) 47 | { 48 | result[byteIndex + i] = (byte)(currentWord & 0xFF); 49 | currentWord >>= 8; 50 | } 51 | 52 | byteIndex += remainingBytes; 53 | remainingBytes = 4; 54 | } 55 | 56 | return result; 57 | } 58 | 59 | // Helper method to calculate the number of significant bits in a BigInteger 60 | private static int GetBitCount(this BigInteger value) 61 | { 62 | BigInteger unsignedValue = BigInteger.Abs(value); 63 | int bits = 0; 64 | 65 | while (unsignedValue != 0) 66 | { 67 | unsignedValue >>= 1; 68 | bits++; 69 | } 70 | 71 | return bits; 72 | } 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /Novaria.Common/Util/GameDataController.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | 3 | namespace Novaria.Common.Util 4 | { 5 | public class GameDataController : Singleton 6 | { 7 | private int _magicKey = 234324; 8 | private string _binVersion = "0.1.0.2"; 9 | 10 | public void LoadCommonBinData(string filepath, Action primaryIntAction, Action primaryStringAction, Action primaryLongAction, Action noPrimaryAction) 11 | { 12 | byte[] array = File.ReadAllBytes(filepath); 13 | 14 | if (array == null) 15 | { 16 | return; 17 | } 18 | using (MemoryStream memoryStream = new MemoryStream(array)) 19 | { 20 | using (BinaryReader binaryReader = new BinaryReader(memoryStream)) 21 | { 22 | var curr_magicKey = binaryReader.ReadInt32(); 23 | 24 | if (curr_magicKey == this._magicKey) 25 | { 26 | int num = (int)binaryReader.ReadInt16(); 27 | byte[] bytes = binaryReader.ReadBytes(num); 28 | if (!(Encoding.UTF8.GetString(bytes) != this._binVersion)) 29 | { 30 | bool flag = binaryReader.ReadByte() == 1; 31 | byte b = binaryReader.ReadByte(); 32 | bool flag2 = b == 1; 33 | bool flag3 = b == 2; 34 | num = binaryReader.ReadInt32(); 35 | if (flag) 36 | { 37 | if (flag2) 38 | { 39 | this.LoadPrimaryKeyIntTable(binaryReader, num, primaryIntAction); 40 | } else if (flag3) 41 | { 42 | this.LoadPrimaryLongIntTable(binaryReader, num, primaryLongAction); 43 | } else 44 | { 45 | this.LoadPrimaryKeyStringTable(binaryReader, num, primaryStringAction); 46 | } 47 | } else 48 | { 49 | this.LoadNoPrimaryKeyTable(binaryReader, num, noPrimaryAction); 50 | } 51 | } 52 | } 53 | } 54 | } 55 | } 56 | 57 | private void LoadPrimaryKeyIntTable(BinaryReader br, int length, Action primaryIntAction) 58 | { 59 | if (primaryIntAction == null) 60 | { 61 | return; 62 | } 63 | for (int i = 0; i < length; i++) 64 | { 65 | int arg = br.ReadInt32(); 66 | int count = (int)br.ReadInt16(); 67 | byte[] arg2 = br.ReadBytes(count); 68 | primaryIntAction(arg, arg2); 69 | } 70 | } 71 | 72 | private void LoadPrimaryLongIntTable(BinaryReader br, int length, Action primaryLongAction) 73 | { 74 | if (primaryLongAction == null) 75 | { 76 | return; 77 | } 78 | for (int i = 0; i < length; i++) 79 | { 80 | long arg = br.ReadInt64(); 81 | int count = (int)br.ReadInt16(); 82 | byte[] arg2 = br.ReadBytes(count); 83 | primaryLongAction(arg, arg2); 84 | } 85 | } 86 | private void LoadPrimaryKeyStringTable(BinaryReader br, int length, Action primaryStringAction) 87 | { 88 | if (primaryStringAction == null) 89 | { 90 | return; 91 | } 92 | for (int i = 0; i < length; i++) 93 | { 94 | int count = (int)br.ReadInt16(); 95 | byte[] array = br.ReadBytes(count); 96 | string @string = Encoding.UTF8.GetString(array); 97 | count = (int)br.ReadInt16(); 98 | array = br.ReadBytes(count); 99 | primaryStringAction(@string, array); 100 | } 101 | } 102 | 103 | private void LoadNoPrimaryKeyTable(BinaryReader br, int length, Action noPrimaryAction) 104 | { 105 | if (noPrimaryAction == null) 106 | { 107 | return; 108 | } 109 | for (int i = 0; i < length; i++) 110 | { 111 | int count = (int)br.ReadInt16(); 112 | byte[] obj = br.ReadBytes(count); 113 | noPrimaryAction(obj); 114 | } 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /Novaria.Common/Util/Singleton.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Novaria.Common.Util 8 | { 9 | public abstract class Singleton where T : new() 10 | { 11 | static T instance; 12 | public static T Instance 13 | { 14 | get 15 | { 16 | if (instance == null) 17 | instance = new T(); 18 | 19 | return instance; 20 | } 21 | set => instance = value; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Novaria.Common/Util/Utils.cs: -------------------------------------------------------------------------------- 1 | namespace Novaria.Common.Util 2 | { 3 | public static class Utils 4 | { 5 | public static void PrintByteArray(byte[] byteArray) 6 | { 7 | if (byteArray == null || byteArray.Length == 0) 8 | { 9 | Console.WriteLine("[]"); 10 | return; 11 | } 12 | 13 | Console.WriteLine(string.Join(",", byteArray)); 14 | } 15 | 16 | public static byte[] CombineByteArrays(byte[] array1, byte[] array2) 17 | { 18 | byte[] combined = new byte[array1.Length + array2.Length]; 19 | Buffer.BlockCopy(array1, 0, combined, 0, array1.Length); 20 | Buffer.BlockCopy(array2, 0, combined, array1.Length, array2.Length); 21 | 22 | return combined; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/GatewayController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Novaria.Common.Crypto; 3 | using System.Text.Json; 4 | using Serilog; 5 | using Novaria.Common.Core; 6 | using Proto; 7 | using Google.Protobuf; 8 | using Novaria.GameServer.Controllers.Api.ProtocolHandlers; 9 | using Novaria.Common.Util; 10 | 11 | namespace Novaria.GameServer.Controllers.Api 12 | { 13 | [Route("/agent-zone-1")] 14 | public class GatewayController : ControllerBase 15 | { 16 | private readonly IProtocolHandlerFactory protocolHandlerFactory; 17 | private readonly ILogger logger; 18 | 19 | public GatewayController(IProtocolHandlerFactory _protocolHandlerFactory, ILogger _logger) 20 | { 21 | protocolHandlerFactory = _protocolHandlerFactory; 22 | logger = _logger; 23 | } 24 | 25 | [HttpPost] 26 | public IActionResult PostRequest() 27 | { 28 | Log.Information("Received Gateway Post Request, Payload"); 29 | 30 | using var memoryStream = new MemoryStream(); 31 | Request.Body.CopyTo(memoryStream); // Copy request body to MemoryStream 32 | byte[] rawPayload = memoryStream.ToArray(); // Get raw bytes from MemoryStream 33 | 34 | Utils.PrintByteArray(rawPayload); 35 | 36 | Packet requestPacket = HttpNetworkManager.Instance.ParseRequest(rawPayload); 37 | 38 | Log.Information(""); 39 | 40 | Log.Information("msgs body: "); 41 | Utils.PrintByteArray(requestPacket.msgBody.ToArray()); 42 | Log.Information("Sucessfully parsed request packet, id: " + requestPacket.msgId); 43 | 44 | byte[] responsePackeBytes = null; 45 | 46 | NetMsgId msgid = (NetMsgId)requestPacket.msgId; 47 | Log.Information("Received protocol msgid: " + msgid); 48 | 49 | Type requestType = ProtocolHandlerFactory.GetRequestPacketTypeByProtocol(msgid); 50 | 51 | if (requestType is null) 52 | { 53 | Log.Error($"MsgId {msgid} doesn't have corresponding type registered"); 54 | throw new InvalidDataException("invalid protocol msgid"); 55 | } 56 | 57 | IMessage decodedPayload = HttpNetworkManager.Instance.DecodePacket(requestType, requestPacket); 58 | 59 | // originally i returned a IMessage from handlers, 60 | // but since in this game apprently one req can return diff resp msgids thus they can not be hardcoded in the packet or increments, 61 | // so we just return packet, bit tedius but inside handlers will determine the response msgid 62 | var responsePacketObj = protocolHandlerFactory.Invoke(msgid, decodedPayload); 63 | 64 | if (responsePacketObj is null) 65 | { 66 | Log.Error($"Protocol {msgid}: {ProtocolHandlerFactory.NetMsgIdToNameMappings[(short)msgid]} is unimplemented and left unhandled"); 67 | 68 | //throw new ArgumentNullException("handler does not exist"); 69 | return new EmptyResult(); 70 | } 71 | 72 | // -- changed to manually set in handler 73 | // succeed_ack = req_msg_id + 1, failed_ack = req_msg_id - 1, for special stuff like gm its -1/-2 74 | //NetMsgId respMsgId = msgid + 1; // this is probably good for most cases but idk if theres any that doesnt follow this 75 | Packet responsePacket = (Packet)responsePacketObj; 76 | // maybe just change invoke to return Packet 77 | 78 | Log.Information($"Response Packet msgid: {responsePacket.msgId}: {(short)responsePacket.msgId}"); 79 | 80 | responsePackeBytes = HttpNetworkManager.Instance.BuildResponse(responsePacket); 81 | 82 | if (responsePackeBytes == null) 83 | { 84 | Log.Error("Unable to build response for packet msgid: " + responsePacket.msgId); 85 | throw new InvalidOperationException("something went wrong during building the response packet!"); 86 | } 87 | 88 | Log.Information("Sucessfully responsed with a respone packet msgid: " + (short)responsePacket.msgId); 89 | 90 | Response.Body.Write(responsePackeBytes, 0, responsePackeBytes.Length); 91 | 92 | return new EmptyResult(); 93 | } 94 | 95 | [HttpOptions] // Ike 96 | public IActionResult OptionsRequest() 97 | { 98 | Log.Information("Received Gateway Ike Options Request, Payload: "); 99 | 100 | // store key which is used in AeadTool 101 | using var memoryStream = new MemoryStream(); 102 | Request.Body.CopyTo(memoryStream); // Copy request body to MemoryStream 103 | byte[] rawPayload = memoryStream.ToArray(); // Get raw bytes from MemoryStream 104 | 105 | Utils.PrintByteArray(rawPayload); 106 | 107 | IKEReq ikeRequest = HttpNetworkManager.Instance.ParseIkeRequest(rawPayload); 108 | 109 | Log.Information("Decoded Packet: " + JsonSerializer.Serialize(ikeRequest)); 110 | 111 | byte[] clientPublicKey = ikeRequest.PubKey.ToArray(); 112 | 113 | Log.Information("RECEIVED client public key: "); 114 | Utils.PrintByteArray(clientPublicKey); 115 | 116 | Console.WriteLine("OLD::"); 117 | 118 | Console.WriteLine(new System.Numerics.BigInteger(clientPublicKey.Reverse().ToArray())); 119 | 120 | Console.WriteLine("OLD::"); 121 | 122 | //AeadTool.key3 = DiffieHellman.Instance.CalculateKey(clientPublicKey); 123 | AeadTool.SetAeadKey(clientPublicKey); 124 | Log.Information("KEY3 (chacha20 key) calculated: "); 125 | Utils.PrintByteArray(AeadTool.key3); 126 | 127 | byte[] pubKey = AeadTool.GetPubKey(); 128 | 129 | IKEResp ikeResponse = new IKEResp() 130 | { 131 | //PubKey = ByteString.CopyFrom(AeadTool.PS_PUBLIC_KEY.Reverse().ToArray()), 132 | PubKey = ByteString.CopyFrom(pubKey), 133 | Token = AeadTool.TOKEN 134 | }; 135 | 136 | Log.Information("Sending ps server public key: "); 137 | Utils.PrintByteArray(pubKey); 138 | 139 | Packet ikePacket = new Packet() 140 | { 141 | msgId = 2, 142 | msgBody = ikeResponse.ToByteArray() 143 | }; 144 | 145 | var responsePayload = HttpNetworkManager.Instance. BuildIkeResponse(ikePacket); 146 | 147 | Log.Information("Sending ike response packet: " + JsonSerializer.Serialize(ikeResponse)); 148 | Log.Information("Built bytes: "); 149 | Utils.PrintByteArray(responsePayload); 150 | 151 | Response.Body.Write(responsePayload, 0, responsePayload.Length); 152 | 153 | return new EmptyResult(); 154 | } 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/ActivityDetail.cs: -------------------------------------------------------------------------------- 1 | using Novaria.Common.Core; 2 | using Proto; 3 | using Serilog; 4 | 5 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 6 | { 7 | public class ActivityDetail : ProtocolHandlerBase 8 | { 9 | public ActivityDetail(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 10 | { 11 | 12 | } 13 | 14 | [ProtocolHandler(NetMsgId.activity_detail_req)] // req id goes here 15 | public Packet PlayerLoginHandler(Nil req) 16 | { 17 | return Packet.Create(NetMsgId.activity_detail_succeed_ack, PcapParser.PcapParser.Instance.GetPcapPacket(NetMsgId.activity_detail_succeed_ack)); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Mail.cs: -------------------------------------------------------------------------------- 1 | using Novaria.Common.Core; 2 | using Proto; 3 | using Serilog; 4 | 5 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 6 | { 7 | public class Mail : ProtocolHandlerBase 8 | { 9 | public Mail(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 10 | { 11 | 12 | } 13 | 14 | [ProtocolHandler(NetMsgId.mail_list_req)] // req id goes here 15 | public Packet PlayerLoginHandler(Nil req) 16 | { 17 | Mails mailListResp = (Mails)PcapParser.PcapParser.Instance.GetPcapPacket(NetMsgId.mail_list_succeed_ack); 18 | 19 | mailListResp.List[0].Subject = "seggs"; 20 | mailListResp.List[1].Subject = "seggs"; 21 | mailListResp.List[2].Subject = "seggs"; 22 | 23 | return Packet.Create(NetMsgId.mail_list_succeed_ack, mailListResp); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Phone.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 5 | { 6 | public class Phone : ProtocolHandlerBase 7 | { 8 | public Phone(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 9 | { 10 | 11 | } 12 | 13 | [ProtocolHandler(NetMsgId.phone_contacts_info_req)] 14 | public Packet PhoneContactsInfoHandler(Nil req) 15 | { 16 | return Packet.Create(NetMsgId.phone_contacts_info_succeed_ack, PcapParser.PcapParser.Instance.GetPcapPacket(NetMsgId.phone_contacts_info_succeed_ack)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Player.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 5 | { 6 | public class Player : ProtocolHandlerBase 7 | { 8 | public Player(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 9 | { 10 | 11 | } 12 | 13 | [ProtocolHandler(NetMsgId.player_board_set_req)] 14 | public Packet PlayerBoardSetHandler(PlayerBoardSetReq req) 15 | { 16 | ChangeInfo changeInfo = new(); 17 | 18 | return Packet.Create(NetMsgId.player_board_set_succeed_ack, changeInfo); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Plot.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 5 | { 6 | public class Plot : ProtocolHandlerBase 7 | { 8 | public Plot(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 9 | { 10 | 11 | } 12 | 13 | [ProtocolHandler(NetMsgId.plot_reward_receive_req)] 14 | public Packet PlotRewardReceiveHandler(UI32 req) 15 | { 16 | ChangeInfo resp = new ChangeInfo(); 17 | 18 | return Packet.Create(NetMsgId.plot_reward_receive_succeed_ack, resp); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/RegionBossLevel.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | using Serilog; 5 | 6 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 7 | { 8 | public class RegionBossLevel : ProtocolHandlerBase 9 | { 10 | public RegionBossLevel(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 11 | { 12 | 13 | } 14 | 15 | [ProtocolHandler(NetMsgId.region_boss_level_apply_req)] 16 | public Packet RegionBossLevelApplyHandler(RegionBossLevelApplyReq req) 17 | { 18 | ChangeInfo regionBossChangeInfo = new ChangeInfo(); 19 | 20 | return Packet.Create(NetMsgId.region_boss_level_apply_succeed_ack, regionBossChangeInfo); 21 | } 22 | 23 | [ProtocolHandler(NetMsgId.region_boss_level_settle_req)] 24 | public Packet RegionBossLevelSettleHandler(RegionBossLevelSettleReq req) 25 | { 26 | RegionBossLevelSettleResp regionBossLevelSettleResp = new RegionBossLevelSettleResp() 27 | { 28 | First = true, 29 | ThreeStar = true, 30 | Change = new(), 31 | //AwardItems = [], 32 | //FirstItems = [], 33 | //ThreeStarItems = [], 34 | Exp = 0, 35 | //SurpriseItems = [], 36 | NextPackage = ByteString.Empty 37 | }; 38 | 39 | regionBossLevelSettleResp.AwardItems.Add([]); 40 | regionBossLevelSettleResp.FirstItems.Add([]); 41 | regionBossLevelSettleResp.ThreeStarItems.Add([]); 42 | regionBossLevelSettleResp.SurpriseItems.Add([]); 43 | 44 | return Packet.Create(NetMsgId.region_boss_level_settle_succeed_ack, regionBossLevelSettleResp); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/ResidentShop.cs: -------------------------------------------------------------------------------- 1 | using Novaria.Common.Core; 2 | using Proto; 3 | using Serilog; 4 | 5 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 6 | { 7 | public class ResidentShop : ProtocolHandlerBase 8 | { 9 | public ResidentShop(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 10 | { 11 | 12 | } 13 | 14 | [ProtocolHandler(NetMsgId.resident_shop_get_req)] // req id goes here 15 | public Packet ResidentShopGetHandler(ResidentShopGetReq req) 16 | { 17 | ResidentShopGetResp resp = new ResidentShopGetResp(); 18 | 19 | resp.Shops.Add(new Proto.ResidentShop() { Id = 1, RefreshTime = 1 }); 20 | resp.Shops.Add(new Proto.ResidentShop() { Id = 2, RefreshTime = 1 }); 21 | resp.Shops.Add(new Proto.ResidentShop() { Id = 3, RefreshTime = 1 }); 22 | 23 | return Packet.Create(NetMsgId.resident_shop_get_succeed_ack, resp); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Star.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 5 | { 6 | public class Star : ProtocolHandlerBase 7 | { 8 | public Star(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 9 | { 10 | 11 | } 12 | 13 | [ProtocolHandler(NetMsgId.star_tower_info_req)] // req id goes here 14 | public Packet StarTowerInfoHandler(Nil req) 15 | { 16 | StarTowerInfo towerResp = new(); 17 | 18 | return Packet.Create(NetMsgId.star_tower_info_succeed_ack, towerResp); 19 | } 20 | 21 | [ProtocolHandler(NetMsgId.star_tower_build_brief_list_get_req)] 22 | public Packet StarTowerBuildListGetHandler(Nil req) 23 | { 24 | return Packet.Create(NetMsgId.star_tower_build_brief_list_get_succeed_ack, PcapParser.PcapParser.Instance.GetPcapPacket(NetMsgId.star_tower_build_brief_list_get_succeed_ack)); 25 | } 26 | 27 | [ProtocolHandler(NetMsgId.star_tower_build_detail_get_req)] 28 | public Packet StarTowerBuildDetailGetHandler(StarTowerBuildDetailGetReq req) 29 | { 30 | return Packet.Create(NetMsgId.star_tower_build_detail_get_succeed_ack, PcapParser.PcapParser.Instance.GetPcapPacket(NetMsgId.star_tower_build_detail_get_succeed_ack)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/Api/ProtocolHandlers/Tower.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Novaria.Common.Core; 3 | using Proto; 4 | namespace Novaria.GameServer.Controllers.Api.ProtocolHandlers 5 | { 6 | public class Tower : ProtocolHandlerBase 7 | { 8 | public Tower(IProtocolHandlerFactory protocolHandlerFactory) : base(protocolHandlerFactory) 9 | { 10 | 11 | } 12 | 13 | [ProtocolHandler(NetMsgId.tower_growth_detail_req)] 14 | public Packet TowerGrowthDetailHandler(Nil req) 15 | { 16 | TowerGrowthDetailResp resp = new TowerGrowthDetailResp(); 17 | 18 | return Packet.Create(NetMsgId.tower_growth_detail_succeed_ack, resp); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/MetaController.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Newtonsoft.Json; 4 | using Novaria.Common.Crypto; 5 | using Novaria.Common.Util; 6 | using Pb; 7 | using Serilog; 8 | using System.Text.Json; 9 | 10 | namespace Novaria.GameServer.Controllers 11 | { 12 | [ApiController] 13 | [Route("/meta")] 14 | public class MetaController : ControllerBase 15 | { 16 | [Route("serverlist.html")] 17 | public IActionResult GetServerlist() 18 | { 19 | ServerListMeta serverListMeta = new ServerListMeta() 20 | { 21 | Version = 37, 22 | Status = 0, 23 | Message = "测试尚未开始,预计开服时间1月9日11:00", 24 | ReportEndpoint = "https://nova.yostar.cn/report/", 25 | }; 26 | 27 | serverListMeta.Agent.Add(new ServerAgent() 28 | { 29 | Name = "启明测试", 30 | Addr = "https://nova.yostar.cn/agent-zone-1/", 31 | Status = 0, 32 | Zone = 1, 33 | }); 34 | 35 | // seems like IV is sent as the first 16 bytes, and key is hardcoded in client 36 | // response = [IV, protobuf_serialized_data] 37 | byte[] encrypted_content = AeadTool.EncryptAesCBCInfo(AeadTool.DEFAULT_SERVERLIST_KEY, AeadTool.DEFAULT_SERVERLIST_IV, serverListMeta.ToByteArray()); 38 | 39 | byte[] response = Utils.CombineByteArrays(AeadTool.DEFAULT_SERVERLIST_IV, encrypted_content); 40 | 41 | Log.Information("Response bytes:"); 42 | return File(response, "text/html"); 43 | } 44 | 45 | [Route("and.html")] 46 | public IActionResult GetAndroid() 47 | { 48 | string diffJson = System.IO.File.ReadAllText($"../../../../Novaria.GameServer/and.json"); // disgusting pathing, but "not hardcoded" now ig 49 | 50 | ClientDiff clientDiff = JsonConvert.DeserializeObject(diffJson); 51 | 52 | Console.WriteLine(clientDiff.Diff.Count); 53 | Console.WriteLine(clientDiff.Diff[0].FileName); 54 | 55 | byte[] encrypted_content = AeadTool.EncryptAesCBCInfo(AeadTool.DEFAULT_SERVERLIST_KEY, AeadTool.DEFAULT_AND_IV, clientDiff.ToByteArray()); 56 | 57 | byte[] response = Utils.CombineByteArrays(AeadTool.DEFAULT_AND_IV, encrypted_content); 58 | 59 | return File(response, "text/html"); 60 | } 61 | } 62 | } 63 | 64 | -------------------------------------------------------------------------------- /Novaria.GameServer/Controllers/UserController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Serilog; 3 | 4 | namespace Novaria.GameServer.Controllers 5 | { 6 | [ApiController] 7 | [Route("/user")] 8 | public class UserController : ControllerBase 9 | { 10 | [Route("login")] 11 | public IResult PostLogin() 12 | { 13 | Log.Information("post login received!"); 14 | 15 | string jsonResponse = @" 16 | { 17 | ""Code"": 200, 18 | ""Data"": { 19 | ""IsNew"": true, 20 | ""IsTestAccount"": false, 21 | ""User"": { 22 | ""DestroyState"": 0, 23 | ""ID"": 1, 24 | ""PID"": ""CN-NOVA"", 25 | ""State"": 1, 26 | ""Token"": ""f94d936f7235f84493564ee0282e845cccd44828"" 27 | } 28 | }, 29 | ""Msg"": ""OK"" 30 | } 31 | "; 32 | return Results.Text(jsonResponse, "application/json"); 33 | } 34 | 35 | [Route("quick-login")] 36 | public IResult PostQuickLogin() 37 | { 38 | Log.Information("post login received!"); 39 | 40 | string jsonResponse = @" 41 | { 42 | ""Code"": 200, 43 | ""Data"": { 44 | ""Destroy"": { 45 | ""DestroyAt"": 0 46 | }, 47 | ""Identity"": { 48 | ""BirthDate"": """", 49 | ""IDCard"": ""123*********34567"", 50 | ""PI"": """", 51 | ""RealName"": ""**"", 52 | ""State"": 1, 53 | ""Type"": 0, 54 | ""Underage"": false 55 | }, 56 | ""IsTestAccount"": false, 57 | ""Keys"": [ 58 | { 59 | ""NickName"": ""123****4567"", 60 | ""Type"": ""mobile"" 61 | } 62 | ], 63 | ""User"": { 64 | ""DestroyState"": 0, 65 | ""ID"": 1, 66 | ""PID"": ""CN-NOVA"", 67 | ""State"": 1, 68 | ""Token"": ""f94d936f723asdasd5f84493564ee0282e845cccd44828"" 69 | }, 70 | ""Yostar"": { 71 | ""CreatedAt"": 1735902322, 72 | ""DefaultNickName"": """", 73 | ""ID"": 1, 74 | ""NickName"": ""seggs"", 75 | ""Picture"": """", 76 | ""State"": 1 77 | } 78 | }, 79 | ""Msg"": ""OK"" 80 | } 81 | "; 82 | return Results.Text(jsonResponse, "application/json"); 83 | 84 | } 85 | 86 | [Route("detail")] 87 | public IResult PostDetail() 88 | { 89 | string jsonResponse = @" 90 | { 91 | ""Code"": 200, 92 | ""Data"": { 93 | ""Destroy"": { 94 | ""DestroyAt"": 0 95 | }, 96 | ""Identity"": { 97 | ""BirthDate"": """", 98 | ""IDCard"": ""123*********34567*"", 99 | ""PI"": """", 100 | ""RealName"": ""**"", 101 | ""State"": 1, 102 | ""Type"": 0, 103 | ""Underage"": false 104 | }, 105 | ""IsTestAccount"": false, 106 | ""Keys"": [ 107 | { 108 | ""NickName"": ""123****4567"", 109 | ""Type"": ""mobile"" 110 | } 111 | ], 112 | ""User"": { 113 | ""DestroyState"": 0, 114 | ""ID"": 1, 115 | ""PID"": ""CN-NOVA"", 116 | ""State"": 1, 117 | ""Token"": ""f9s243e483e3e322138"" 118 | }, 119 | ""Yostar"": { 120 | ""CreatedAt"": 1, 121 | ""DefaultNickName"": """", 122 | ""ID"": 1, 123 | ""NickName"": ""seggs"", 124 | ""Picture"": """", 125 | ""State"": 1 126 | } 127 | }, 128 | ""Msg"": ""OK"" 129 | } 130 | "; 131 | 132 | return Results.Text(jsonResponse, "application/json"); 133 | } 134 | 135 | 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /Novaria.GameServer/GameServer.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.AspNetCore.Server.Kestrel.Core; 3 | using Serilog; 4 | 5 | using Novaria.GameServer.Controllers.Api.ProtocolHandlers; 6 | using Novaria.Common.Crypto; 7 | using Novaria.Common.Util; 8 | using Newtonsoft.Json; 9 | using Novaria.GameServer.Services; 10 | 11 | namespace Novaria.GameServer 12 | { 13 | public class GameServer 14 | { 15 | public static void Main(string[] args) 16 | { 17 | PcapParser.PcapParser.Instance.LoadAllPackets(); // turn this off after real handlers are finished 18 | 19 | Log.Information("Starting SDK Server..."); 20 | try 21 | { 22 | var builder = WebApplication.CreateBuilder(args); 23 | 24 | builder.Services.Configure(op => 25 | op.AllowSynchronousIO = true 26 | ); 27 | builder.Host.UseSerilog(); 28 | 29 | builder.Services.AddControllers(); 30 | builder.Services.AddProtocolHandlerFactory(); 31 | builder.Services.AddExcelTableService(); 32 | builder.Services.AddControllers().AddApplicationPart(Assembly.GetAssembly(typeof(GameServer))); 33 | 34 | // Add all Handler Groups 35 | var handlerGroups = Assembly.GetAssembly(typeof(ProtocolHandlerFactory)) 36 | .GetTypes() 37 | .Where(t => t.IsSubclassOf(typeof(ProtocolHandlerBase))); 38 | 39 | foreach (var handlerGroup in handlerGroups) 40 | { 41 | builder.Services.AddProtocolHandlerGroupByType(handlerGroup); 42 | } 43 | 44 | var app = builder.Build(); 45 | 46 | app.UseAuthorization(); 47 | app.UseSerilogRequestLogging(); 48 | 49 | app.MapControllers(); 50 | app.Run(); 51 | } 52 | catch (Exception ex) 53 | { 54 | Log.Fatal(ex, "An unhandled exception occurred during runtime"); 55 | } 56 | finally 57 | { 58 | Log.CloseAndFlush(); 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Novaria.GameServer/Novaria.GameServer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | runtime; build; native; contentfiles; analyzers; buildtransitive 17 | all 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Novaria.GameServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "profiles": { 4 | "https": { 5 | "commandName": "Project", 6 | "dotnetRunMessages": true, 7 | "launchBrowser": false, 8 | "externalUrlConfiguration": true, 9 | "environmentVariables": { 10 | "ASPNETCORE_ENVIRONMENT": "Development" 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Novaria.GameServer/Services/TableService.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Google.Protobuf.Collections; 3 | using Ionic.Zip; 4 | using Nova.Client; 5 | using Novaria.Common.Util; 6 | using Serilog; 7 | using System.IO; 8 | using System.Reflection; 9 | using System.Runtime.Serialization.Formatters; 10 | 11 | namespace Novaria.GameServer.Services 12 | { 13 | // note that all operations in this class MUST be thread-safe, idk if it is currently but if it's not, there will be race condition problems 14 | public class TableService(ILogger _logger) 15 | { 16 | private readonly ILogger logger = _logger; 17 | 18 | // example: maps Achievement (type) -> table_Achievement (instance), table_Achievement has a list that stores table 19 | private readonly Dictionary caches = []; 20 | public static string ResourceDir = Path.Join(Path.GetDirectoryName(AppContext.BaseDirectory), "Resources"); 21 | 22 | private Type currentTableTypeCache; // this is the type that we're currently loading, ex. Achievement (type), reason for caching it in a field member? Nova uses hardcoded params Action so im too lazy to change 23 | 24 | /// 25 | /// Please only use this to get table that have a respective file (i.e. CharacterExcelTable have characterexceltable.bytes) 26 | /// 27 | /// 28 | /// 29 | /// 30 | public IMessage GetTable(bool bypassCache = false) where T : IMessage 31 | { 32 | var type = typeof(T); 33 | currentTableTypeCache = type; 34 | 35 | if (!bypassCache && caches.TryGetValue(type, out var cache)) 36 | return (T)cache; 37 | 38 | var tableDir = Path.Combine(ResourceDir, "Tables"); 39 | var bytesFilePath = Path.Combine(tableDir, $"{typeof(T).Name}.bytes"); 40 | 41 | if (!File.Exists(bytesFilePath)) 42 | { 43 | throw new FileNotFoundException($"bytes files for {type.Name} not found"); 44 | } 45 | 46 | //TableEncryptionService.XOR(type.Name, bytes); 47 | 48 | this.LoadCommonBin(bytesFilePath); // after this, loaded table will be in the cache 49 | 50 | logger.LogDebug("{Excel} loaded and cached", type.Name); 51 | 52 | return caches[currentTableTypeCache]; 53 | } 54 | 55 | private void LoadCommonBin(string bytesFilePath) 56 | { 57 | currentTableTypeCache = typeof(T); // too lazy to change actions params, so do this 58 | 59 | // get the table_XXX type 60 | Type table_Type = Assembly.GetAssembly(typeof(table_Achievement)).GetTypes().Where(t => t.Name == $"table_{typeof(T).Name}").FirstOrDefault(); 61 | 62 | if (table_Type == null) 63 | { 64 | Log.Error($"table_{typeof(T).Name} type was not found."); 65 | return; 66 | } 67 | 68 | var inst = (IMessage)Activator.CreateInstance(table_Type); 69 | caches[currentTableTypeCache] = inst; 70 | 71 | GameDataController.Instance.LoadCommonBinData(bytesFilePath, new Action(this.AddCommonBin), 72 | new Action(this.AddCommonBin), 73 | new Action(this.AddCommonBin), 74 | new Action(this.AddCommonBin)); 75 | } 76 | 77 | private void AddCommonBin(int _, byte[] data) { AddCommonBin_internal(_, data); } 78 | private void AddCommonBin(string _, byte[] data) { AddCommonBin_internal(_, data); } 79 | private void AddCommonBin(long _, byte[] data) { AddCommonBin_internal(_, data); } 80 | private void AddCommonBin(byte[] data) { AddCommonBin_internal(null, data); } 81 | 82 | private void AddCommonBin_internal(object _, byte[] data) 83 | { 84 | var parserProperty = currentTableTypeCache.GetProperties().Where(p => p.Name == "Parser").SingleOrDefault(); 85 | var parserInstance = parserProperty.GetValue(null); 86 | 87 | var parsedData = typeof(MessageParser).GetMethods().Where(m => m.Name == "ParseFrom").FirstOrDefault().Invoke(parserInstance, new object[] { data }); ; 88 | // add to target table, very inefficient rn 89 | IMessage targetTable = caches[currentTableTypeCache]; 90 | var __ = currentTableTypeCache.GetProperties(); 91 | 92 | 93 | var listField = targetTable.GetType().GetProperties().Where(p => p.Name == "List").SingleOrDefault(); 94 | 95 | object repeatedFieldInstance = listField.GetValue(targetTable); 96 | 97 | var addMethod = repeatedFieldInstance.GetType().GetMethods().Where(m => m.Name == "Add").FirstOrDefault(); 98 | 99 | addMethod.Invoke(repeatedFieldInstance, new object[] { parsedData }); 100 | 101 | //Log.Information($"Added {_}"); 102 | } 103 | } 104 | 105 | internal static class ExcelTableServiceExtensions 106 | { 107 | public static void AddExcelTableService(this IServiceCollection services) 108 | { 109 | services.AddSingleton(); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Novaria.GameServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Kestrel": { 3 | "EndPoints": { 4 | "Http": { 5 | "Url": "https://0.0.0.0:443" 6 | }, 7 | 8 | "Https": { 9 | "Url": "https://0.0.0.0:80" 10 | } 11 | } 12 | }, 13 | "Serilog": { 14 | "MinimumLevel": { 15 | "Default": "Information", 16 | "Override": { 17 | "Microsoft": "Warning", 18 | "Microsoft.Hosting.Lifetime": "Information" 19 | } 20 | } 21 | }, 22 | "AllowedHosts": "*" 23 | } 24 | -------------------------------------------------------------------------------- /Novaria.PcapParser/Novaria.PcapParser.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | PreserveNewest 17 | true 18 | PreserveNewest 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Novaria.PcapParser/Novaria.PcapParser.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio Version 17 3 | VisualStudioVersion = 17.5.2.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novaria.PcapParser", "Novaria.PcapParser.csproj", "{E5605F32-2159-31B7-BB16-7C24F60235B5}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {E5605F32-2159-31B7-BB16-7C24F60235B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {E5605F32-2159-31B7-BB16-7C24F60235B5}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {E5605F32-2159-31B7-BB16-7C24F60235B5}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {E5605F32-2159-31B7-BB16-7C24F60235B5}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | GlobalSection(ExtensibilityGlobals) = postSolution 22 | SolutionGuid = {3F500C61-DDA4-474F-AE04-A3F97AEEF0B6} 23 | EndGlobalSection 24 | EndGlobal 25 | -------------------------------------------------------------------------------- /Novaria.PcapParser/Program.cs: -------------------------------------------------------------------------------- 1 | namespace Novaria.PcapParser 2 | { 3 | public class Program 4 | { 5 | public static void Main(string[] args) 6 | { 7 | PcapParser.Instance.LoadAllPackets(); 8 | 9 | PcapParser.Instance.SavePackets("all_parsed_packets.json"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Novaria.PcapParser/create_acc_packets.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "payload": "[48,68,51,114,105,114,79,86,81,51,111,116,1,212,47,77,138,229,231,247,219,34,94,54,13,212,135,123,183,67,116,201,57,224,220,219,85,107,211,209,230,140,186,243,152,124,68,61,214,201,223,137,140,52,15,128,249,221,188,130,210,25,24,37,22,70,161,82,118,186,87,50,223,120,106,255,8,121,49,250,72,221,14,182,77,64,207,139,244,49,77,3,77,32,89,110,151,158,192,224,4,230,213,152,81,195,153,126,221,146,212,113,72,20,152,94,22,159,189,38,187,60,16,234,162,58,234,100,104]", 4 | "type": "REQUEST" 5 | }, 6 | { 7 | "payload": "[234,105,6,108,133,147,14,252,55,174,255,147,254,38,68,50,97,160,50,26,107,23,134,5,230,68,52,59,56,21,61,117,33,172,200,49,41,38,83,22,184,3,194,42,1,203,4,206,86,111,143,83,35,255,112,8,255,8,30,108,118,49,89,27,103,151,125,102,19,46,202,203,6,97,38,132,46,172,144,251,87,94,80,8,27,59,13,60,200,154,69,142,52,171,198,47,134,227,73,76,139,112,176,236,81,117,145,140,57,222,161,20,132,253,71,98,43,185,201,181,200,31,67,94,45,106,147,66,16,5,88,218,62,191,88,120,206,38,52,248,113,200,122,156,169,68,161,56,111,8,209,252,90,48,128,35,134,172,141,180,207,217,216,78,242,34,1,127,108,179,247,107,3,191,156,35,64,67,43,21,129,89,228,214,67,168,163,130,221,44,169,231,216,132,134,41,73,16,181,39,37,56,99,80,21,235,31,244,166,120,212,25,45,68,82,188,37,209,123,190,3,95,196,93,200,249,146,163,15,38,48,12,73,141,237,225,46,216,144,228,105,28,246,234,130,174,141]", 8 | "type": "RESPONSE" 9 | }, 10 | { 11 | "payload": "[15,99,202,137,121,158,2,191,157,94,57,173,68,73,3,44,75,32,176,54,162,131,83,249,14,167,11,143,99,73,157,204]", 12 | "type": "KEY" 13 | }, 14 | { 15 | "payload": "[55,84,113,83,50,107,67,120,101,118,55,78,30,38,152,228,254,159,214,239,145,191,21,106,21,195,188,19,174,0,87,227,74,91,165,75,28,16,107,81,192,177,101,204,116,55,244,147,33,168,203,115,225,197,41,148,152,232,143,159,50,203,113,208,44,212,83,60,20,10,112,254,104,123,134,109,160,72,40,206,71,217,162,28,215,160,127,183,97,125,120,185,232,21,141,27,121,149,29,61,96,33,93,117,92,219,43,163,157,201,225,91,147,169,181,124,240,169,150,214,14,90,233,117,199,101,57,200,88]", 16 | "type": "REQUEST" 17 | }, 18 | { 19 | "payload": "[177,224,84,39,26,81,63,208,43,252,36,8,25,224,26,135,254,138,71,72,128,233,205,85,57,3,242,11,60,117,227,12,157,248,159,254,98,230,34,172,203,73,46,229,101,15,102,8,4,36,11,157,3,217,199,76,103,168,115,153,195,134,50,116,1,95,7,17,157,186,198,133,138,153,243,186,52,125,153,49,29,50,249,176,66,17,201,99,116,129,135,202,231,116,0,45,89,254,164,244,225,169,84,206,180,109,68,157,218,90,45,212,227,56,32,103,9,126,2,44,45,45,107,117,61,197,36,189,45,0,56,231,139,142,50,57,242,253,6,247,50,167,243,128,230,162,13,179,45,178,242,125,230,163,42,15,141,130,59,85,242,122,169,16,47,183,25]", 20 | "type": "RESPONSE" 21 | }, 22 | { 23 | "payload": "[48,119,117,68,111,49,68,66,106,75,116,114,91,225,125,73,184,207,122,96,27,197,111,163,164,73,17,37,147,157,140,228,25,249,255,151,190,8,7,86]", 24 | "type": "REQUEST" 25 | }, 26 | { 27 | "payload": "[26,117,88,205,112,210,116,201,188,169,103,181,180,64,174,24,237,2,111,128,87,122,191,252,66,76,196,198,86,225]", 28 | "type": "RESPONSE" 29 | }, 30 | { 31 | "payload": "[86,77,110,121,71,118,104,86,49,52,74,71,158,142,158,71,65,202,28,55,58,2,128,34,227,146,248,132,104,77,46,188,46,144,224,145,248,59,187,34,19,223,186,251,172,110,4,249,42]", 32 | "type": "REQUEST" 33 | }, 34 | { 35 | "payload": "[21,187,90,44,19,248,238,231,113,133,23,55,95,246,9,127,88,103,26,99,207,11,69,135,119,163,146,201,197,183,191,142,70,20,3,14,119,84,173,237,15,69,79,148,128,104,82,31,127,126,14,127,18,166,106,140,183,8,27,148,102,177,27,151,70,107,199,175,216,52,197,138,127,168,190,254,224,2,211,124,214,58,23,76,88,252,120,4,211,108,218,175,45,203,229,185,48,32,49,43,49,30,251,28,176,182,7,93,147,26,10,194,220,161,137,139,211,137,93,190,57,181,175,138,91,238,237,141,127,244,249,230,239,187,52,67,3,38,187,199,219,210,227,8,155,55,15,134,173,141,103,8,12,129,231,148,74,76,248,135,38,203,160,15,201,97,107,227,214,67,63,251,116,50,25,184,199,218,135,192,244,161,127,123,162,44,237,68,67,85,250,134,138,103,161,233,214,90,81,93,229,77,46,194,222,207,94,120,131,171,211,12,146,44,10,135,141,4,148,100,168,97,0,253,63,4,114,7,160,236,232,77,103,147,68,26,42,77,190,215,98,129,176,192,121,205,210,217,3,61,235,198,137,185,64,53,99,142,242,67,74,227,113,169,85,67,192,254,2,3,210,232,121,88,84,34,43,129,8,203,147,203,101,55,54,248,0,90,177,232,226,166,171,235,152,154,185,248,41,124,215,120,123,205,70,220,226,160,199,133,242,3,178,203,163,66,136,154,219,245,9,85,215,59,245,56,6,241,65,65,147,20,61,37,83,146,16,225,253,188,160,198,27,253,17,91,100,104,43,56,211,224,149,112,151,199,4,217,128,49,77,244,28,207,169,212,168,209,49,87,124,173,113,113,230,145,196,167,209,24,252,84,127,143,246,86,91,127,26,183,23,18,73,210,201,94,106,160,226,116,86,155,78,194,88,250,47,177,198,12,151,255,45,254,86,64,247,205,240,223,35,48,187,108,100,163,175,111,162,111,48,105,79,14,127,177,239,46,204,115,132,198,196,197,154,224,20,154,222,121,119,175,211,43,200,171,202,17,156,134,218,144,165,102,185,23,152,77,227,212,87,210,145,177,247,70,124,255,194,75,248,121,26,65,113,243,23,88,47,9,225,131,111,109,95,40,173,75,32,220,227,33,14,0,241,140,223,62,98,60,10,13,9,72,38,56,110,184,56,167,69,201,36,54,144,132,195,44,167,30,102,142,26,170,211,44,9,94,100,84,90,67,150,172,106,65,142,186,70,36,80,131,199,128,224,117,33,82,145,26,119,145,85,105,51,2,132,241,155,243,169,9,5,247,236,214,46,73,228,67,196,166,27,43,208,179,210,171,103,125,179,234,24,163,193,229,218,198,13,129,236,236,239,156,121,67,26,181,65,117,251,170,4,37,194,97,50,153,14,114,52,193,4,144,118,31,224,35,85,167,86,10,24,86,19,207,204,38,128,151,28,173,87,85,185,91,254,113,9,224,250,252,139,157,41,46,48,159,168,219,81,229,40,100,132,146,195,248,160,130,70,44,159,14,221,75,90,104,14,0,134,61,225,221,59,108,124,225,146,39,197,240,18,159,178,104,249,39,68,2,243,147,22,93,228,187,12,226,252,208,106,7,251,66,9,202,94,232,106,34,165,104,89,219,61,63,102,107,129,2,57,130,169,32,191,46,244,199,45,60,89,231,252,173,181,62,205,61,7,94,54,223,167,196,104,77,9,107,169,248,95,235,21,224,97,184,99,240,155,101,83,15,14,169,82,153,13,16,73,174,126,38,204,49,248,3,112,94,174,105,129,61,106,146,63,160,121,149,68,150,116,96,8,134,143,156,74,213,226,162,54,16,109,126,123,188,162,81,46,162,129,11,19,78,104,228,229,146,49,208,98,166,237,49,90,127,57,105,87,126,59,183,136,116,82,218,38,217,50,245,136,105,25,80,133,83,129,87,224,174,44,46,255,241,197,50,9,218,193,163,229,173,157,199,66,14,237,49,125,75,191,24,7,83,237,8,138,175,133,50,11,70,101,141,231,17,175,94,36,160,197,126,28,202,45,73,247,22,149,201,61,51,118,240,15,129,198,145,135,205,157,64,137,60,216,45,162,71,248,3,163,43,142,188,240,123,52,49,138,124,147,149,176,124,67,12,97,78,58,89,7,218,197,243,139,201,208,183,9,34,56,13,43,133,101,147,117,77,111,3,226,239,102,207,44,224,199,231,78,162,55,167,123,218,70,1,185,225,173,35,224,43,9,214,187,254,241,56,109,244,175,220,124,102,123,45,133,31,191,11,21,110,21,75,14,52,240,38,186,118,126,38,181,222,119,150,217,63,206,18,251,211,70,220,163,17,222,123,84,25,156,61,103,151,38,198,52,93,235,145,212,43,241,206,175,84,43,142,60,182,159,53,228,51,220,180,63,194,45,142,121,26,184,74,197,180,219,103,82,159,206,106,51,241,237,138,129,51,67,103,166,44,96,120,252,189,62,207,237,28,114,65,235,110,140,195,210,53,35,2,219,6,239,39,71,178,11,238,6,160,249,129,5,33,12,18,118,218,167,89,72,89,45,218,49,156,107,135,174,207,254,238,189,120,27,140,96,136,222,30,60,244,205,171,26,104,145,165,98,53,169,112,188,80,80,68,181,206,7,45,242,55,205,164,138,18,99,59,182,206,203,57,229,172,153,118,93,116,136,42,35,155,109,85,51,218,226,220,173,134,253,147,55,60,145,158,151,86,96,135,43,222,227,8,138,60,12,100,113,104,130,121,51,25,251,194,193,92,192,253,38,6,241,40,8,252,130,94,189,49,71,242,248,15,206,70,179,192,87,173,16,0,14,141,150,62,116,182,101,235,247,237,41,114,91,34,177,72,8,150,165,193,253,219,92,42,235,87,106,120,20,243,139,74,146,187,14,46,221,155,97,129,166,233,55,67,232,81,167,233,35,206,15,159,184,120,150,102,158,83,130,206,155,10,27,100,151,95,90,161,209,255,201,227,182,183,249,228,207,177,41,53,64,224,22,126,24,68,60,148,90,10,108,207,154,32,200,25,201,154,118,224,14,236,23,196,151,101,204,138,198,200,136,215,154,15,101,49,92,102,23,6,236,249,185,185,128,120,237]", 36 | "type": "RESPONSE" 37 | } 38 | ] -------------------------------------------------------------------------------- /Novaria.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.9.34607.119 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Novaria", "Novaria\Novaria.csproj", "{F2D592CF-52D5-4A8B-A9D0-283491831053}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Novaria.Common", "Novaria.Common\Novaria.Common.csproj", "{F65D281C-FAF5-45A2-919C-CE5E9E038D43}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novaria.PcapParser", "Novaria.PcapParser\Novaria.PcapParser.csproj", "{80CF22EB-B5AB-48B6-9706-23292461CCD3}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novaria.GameServer", "Novaria.GameServer\Novaria.GameServer.csproj", "{4A2CD3C5-9F10-493B-AEC9-B3DC74A292A1}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release|Any CPU = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {F2D592CF-52D5-4A8B-A9D0-283491831053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {F2D592CF-52D5-4A8B-A9D0-283491831053}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {F2D592CF-52D5-4A8B-A9D0-283491831053}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {F2D592CF-52D5-4A8B-A9D0-283491831053}.Release|Any CPU.Build.0 = Release|Any CPU 24 | {F65D281C-FAF5-45A2-919C-CE5E9E038D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 25 | {F65D281C-FAF5-45A2-919C-CE5E9E038D43}.Debug|Any CPU.Build.0 = Debug|Any CPU 26 | {F65D281C-FAF5-45A2-919C-CE5E9E038D43}.Release|Any CPU.ActiveCfg = Release|Any CPU 27 | {F65D281C-FAF5-45A2-919C-CE5E9E038D43}.Release|Any CPU.Build.0 = Release|Any CPU 28 | {80CF22EB-B5AB-48B6-9706-23292461CCD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {80CF22EB-B5AB-48B6-9706-23292461CCD3}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {80CF22EB-B5AB-48B6-9706-23292461CCD3}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {80CF22EB-B5AB-48B6-9706-23292461CCD3}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {4A2CD3C5-9F10-493B-AEC9-B3DC74A292A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {4A2CD3C5-9F10-493B-AEC9-B3DC74A292A1}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {4A2CD3C5-9F10-493B-AEC9-B3DC74A292A1}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {4A2CD3C5-9F10-493B-AEC9-B3DC74A292A1}.Release|Any CPU.Build.0 = Release|Any CPU 36 | EndGlobalSection 37 | GlobalSection(SolutionProperties) = preSolution 38 | HideSolutionNode = FALSE 39 | EndGlobalSection 40 | GlobalSection(ExtensibilityGlobals) = postSolution 41 | SolutionGuid = {05CA4D67-C259-43C1-BEF3-FF525EDCF452} 42 | EndGlobalSection 43 | EndGlobal 44 | -------------------------------------------------------------------------------- /Novaria/Novaria.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0 6 | enable 7 | enable 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Novaria/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Configuration; 2 | using Serilog.Events; 3 | using Serilog; 4 | 5 | namespace Novaria 6 | { 7 | internal class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | Console.WriteLine(@" 12 | 13 | 14 | 15 | _ _ ___ __ __ _ ____ ___ _ 16 | | \ | | / _ \\ \ / // \ | _ \ |_ _| / \ 17 | | \| || | | |\ \ / // _ \ | |_) | | | / _ \ 18 | | |\ || |_| | \ V // ___ \ | _ < | | / ___ \ 19 | |_| \_| \___/ \_//_/ \_\|_| \_\|___|/_/ \_\ 20 | 21 | 22 | 23 | 24 | "); 25 | var config = new ConfigurationBuilder() 26 | .SetBasePath(Path.GetDirectoryName(AppContext.BaseDirectory)!) 27 | .AddJsonFile("appsettings.json") 28 | .AddJsonFile( 29 | $"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", 30 | true 31 | ) 32 | .AddJsonFile("appsettings.Local.json", true) 33 | .Build(); 34 | 35 | { 36 | var logFilePath = Path.Combine( 37 | Path.GetDirectoryName(AppContext.BaseDirectory)!, 38 | "logs", 39 | "log.txt" 40 | ); 41 | 42 | if (File.Exists(logFilePath)) 43 | { 44 | var prevLogFilePath = Path.Combine( 45 | Path.GetDirectoryName(logFilePath)!, 46 | "log-prev.txt" 47 | ); 48 | if (File.Exists(prevLogFilePath)) 49 | File.Delete(prevLogFilePath); 50 | 51 | File.Move(logFilePath, prevLogFilePath); 52 | } 53 | 54 | Log.Logger = new LoggerConfiguration() 55 | .WriteTo.Console() 56 | .WriteTo.File( 57 | logFilePath, 58 | restrictedToMinimumLevel: LogEventLevel.Verbose, 59 | shared: true 60 | ) 61 | .ReadFrom.Configuration(config) 62 | .CreateBootstrapLogger(); 63 | } 64 | 65 | GameServer.GameServer.Main(args); 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Novaria 2 | ### [中文教程](README_CHS.md) (by KitanoSakura) 3 | 4 | # Client Installation Tutorial 5 | ## PC (highly recommended, one click install) 6 | 7 | Download and extract zip from [PC_NOVA_CN](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/PC_NOVA_CN.7z) 8 | 9 | 10 | ## Android (NOT recommended) 11 | 12 | Download and install the apk from [APK_NOVA](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/星塔旅人.apk) 13 | 14 | After installing the apk on your emulator, you have two ways of installing the resources needed 15 | 16 | 1. Manual install - download and extract [ANDROID_NOVA_CN](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/星塔旅人.apk) and move them into the game files on your emulator 17 | 18 | 2. Automatic install - run [android_update.bat](android_update.bat) (change the ip in [android_update.py](android_update.py) to your own ip first) and Novaria Server, after joining game the resources will download automatically. 19 | 20 | 21 | #### I really do not recommend the android version, many things can go wrong, you are better off installing the pc client in one click lol 22 | 23 |
24 | 25 | # Running 26 | 27 | 1. IMPORTANT: change the ip in [proxy.py](proxy.py) into your own ip 28 | 2. Run proxy.bat 29 | 3. Run Novaria 30 | 4. Join game 31 | 32 | ## Special Thanks 33 | 34 | - Tenshi - (for hosting all the resources that was needed and creating the custom cdn <3) 35 | -------------------------------------------------------------------------------- /README_CHS.md: -------------------------------------------------------------------------------- 1 | # Novaria 2 | # Chinese Translation (BY 北野桜奈) 3 | 4 | ## 客户端安装教程 5 | 6 | ### PC(强烈推荐,一键安装) 7 | 从以下链接下载并解压压缩包:[PC_NOVA_CN](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/PC_NOVA_CN.7z) 8 | 9 | --- 10 | 11 | ### Android(不推荐) 12 | 从以下链接下载并安装 APK:[APK_NOVA](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/星塔旅人.apk) 13 | 14 | 安装 APK 后,需要安装资源文件,有以下两种方法: 15 | 16 | 1. **手动安装** 17 | 下载并解压 [ANDROID_NOVA_CN](https://tenshis-archive.duckdns.org/d/Tenshi's%20Archive/Game%20Files/Yostar%20Games/Stellar%20Sora/0.1.0/CN/星塔旅人.apk),将资源文件移动到模拟器的游戏文件夹中。 18 | 19 | 2. **自动安装** 20 | 运行 [android_update.bat](android_update.bat)(先修改 [android_update.py](android_update.py) 文件中的 IP 为你的本机 IP),并启动 Novaria 服务器。进入游戏后,资源将自动下载。 21 | 22 | > **不推荐使用 Android 版本!** 问题可能会很多,建议直接使用 PC 客户端,一键安装,简单方便! 23 | 24 | --- 25 | 26 | ## 运行方法 27 | 28 | 1. **重要:** 将 [proxy.py](proxy.py) 文件中的 IP 替换为你的本机 IP。 29 | 2. 运行 `proxy.bat`。 30 | 3. 启动 Novaria。 31 | 4. 进入游戏。 32 | 33 | --- 34 | 35 | ## 特别感谢 36 | 37 | - **Tenshi** - (感谢提供所有所需资源,并创建了自定义 CDN <3) 38 | -------------------------------------------------------------------------------- /android_update.bat: -------------------------------------------------------------------------------- 1 | mitmweb -k -m wireguard --set block_global=false --mode local -s .\update.py -------------------------------------------------------------------------------- /android_update.py: -------------------------------------------------------------------------------- 1 | from mitmproxy import http 2 | from mitmproxy import ctx 3 | from mitmproxy.proxy import layer 4 | 5 | def load(loader): 6 | ctx.options.connection_strategy = "lazy" 7 | ctx.options.upstream_cert = False 8 | ctx.options.ssl_insecure = True 9 | ctx.options.allow_hosts = ['nova-static.yostar.cn', 'nova.yostar.cn', 'sdk-api.yostar.cn', 'static-stellasora.yostar.net', "udata-api.open.yostar.net"] 10 | 11 | def next_layer(nextlayer: layer.NextLayer): 12 | sni = nextlayer.context.client.sni 13 | if sni and (sni.endswith("nova.yostar.cn") or sni.endswith("sdk-api.yostar.cn") or sni.endswith("static-stellasora.yostar.net") or sni.endswith("udata-api.open.yostar.net")): 14 | ctx.log('sni:' + sni) 15 | nextlayer.context.server.address = ("192.168.86.32", 443) 16 | 17 | def request(flow: http.HTTPFlow) -> None: 18 | if (flow.request.host_header.endswith("nova-static.yostar.cn")) and ("serverlist.html" not in flow.request.path_components) and ("and.html" not in flow.request.path_components): 19 | flow.request.host = "nova-static.duckdns.org" 20 | flow.request.port = 443 21 | 22 | if ("serverlist.html" in flow.request.path_components or "and.html" in flow.request.path_components): 23 | flow.request.host = "192.168.86.32" 24 | flow.request.port = 443 -------------------------------------------------------------------------------- /proxy.bat: -------------------------------------------------------------------------------- 1 | mitmproxy -k -m wireguard --set stream_large_bodies=3m --set block_global=false --mode local:nova.exe -s .\proxy.py -------------------------------------------------------------------------------- /proxy.py: -------------------------------------------------------------------------------- 1 | from mitmproxy import ctx 2 | from mitmproxy.proxy import layer 3 | 4 | def load(loader): 5 | ctx.options.connection_strategy = "lazy" 6 | ctx.options.upstream_cert = False 7 | ctx.options.ssl_insecure = True 8 | ctx.options.allow_hosts = ['nova-static.yostar.cn', 'nova.yostar.cn', 'sdk-api.yostar.cn', 'static-stellasora.yostar.net', "udata-api.open.yostar.net"] 9 | 10 | def next_layer(nextlayer: layer.NextLayer): 11 | sni = nextlayer.context.client.sni 12 | if sni and (sni.endswith("nova-static.yostar.cn") or sni.endswith("nova.yostar.cn") or sni.endswith("sdk-api.yostar.cn") or sni.endswith("static-stellasora.yostar.net") or sni.endswith("udata-api.open.yostar.net")): 13 | ctx.log('sni:' + sni) 14 | nextlayer.context.server.address = ("192.168.86.32", 443) 15 | -------------------------------------------------------------------------------- /proxy2.bat: -------------------------------------------------------------------------------- 1 | mitmweb -k -m wireguard --set stream_large_bodies=3m --set block_global=false --mode local:nova.exe -s .\proxy2.py -------------------------------------------------------------------------------- /proxy2.py: -------------------------------------------------------------------------------- 1 | from mitmproxy import ctx, http 2 | from mitmproxy.proxy import layer 3 | 4 | def load(loader): 5 | ctx.options.connection_strategy = "lazy" 6 | ctx.options.upstream_cert = False 7 | ctx.options.ssl_insecure = True 8 | ctx.options.allow_hosts = ['nova-static.yostar.cn', 'nova.yostar.cn', 'sdk-api.yostar.cn', 'static-stellasora.yostar.net', "udata-api.open.yostar.net"] 9 | 10 | SERVER_HOST = "localhost" 11 | SERVER_PORT = 5000 12 | 13 | TARGET_HOSTS = [ 14 | "nova-static.yostar.cn", 15 | "nova.yostar.cn", 16 | "sdk-api.yostar.cn", 17 | "static-stellasora.yostar.net", 18 | "udata-api.open.yostar.net" 19 | ] 20 | 21 | KILL_HOST_LIST = [ 22 | 'log.aliyuncs.com', 23 | 'er.ns.aliyuncs.com', 24 | 'toy.log.nexon.io', 25 | 'm-api.nexon.com' 26 | ] 27 | 28 | def request(flow: http.HTTPFlow) -> None: 29 | if any(flow.request.pretty_host.endswith(host) for host in KILL_HOST_LIST): 30 | flow.kill() 31 | return 32 | if flow.request.pretty_host in TARGET_HOSTS: 33 | flow.request.scheme = 'http' 34 | flow.request.host = SERVER_HOST 35 | flow.request.port = SERVER_PORT 36 | return 37 | else: 38 | flow.kill() 39 | return 40 | --------------------------------------------------------------------------------