├── .gitattributes ├── .gitignore ├── LICENSE ├── Minerva.sln ├── README.md ├── doc ├── conf │ ├── Channel_1_1.ini │ ├── Chat.ini │ ├── Login.ini │ └── Master.ini ├── data │ ├── InitialData.xml │ ├── MapData.xml │ ├── MobData.xml │ ├── MobList.xml │ ├── SkillData.xml │ ├── cabal.xml │ ├── new_char.xml │ └── tmap │ │ ├── world1-tmap.bin │ │ ├── world2-tmap.bin │ │ └── world3-tmap.bin ├── scripts │ └── Events │ │ ├── _init_.rb │ │ └── failed_login.rb └── sql │ ├── login.sql │ └── world.sql ├── packages ├── IronRuby.1.1.3 │ └── Lib │ │ ├── IronRuby.Libraries.Yaml.dll │ │ ├── IronRuby.Libraries.dll │ │ ├── IronRuby.dll │ │ ├── Microsoft.Dynamic.dll │ │ ├── Microsoft.Scripting.Metadata.dll │ │ └── Microsoft.Scripting.dll └── MySql.Data.6.9.9 │ ├── CHANGES │ ├── Readme.txt │ ├── content │ ├── app.config.transform │ └── web.config.transform │ └── lib │ ├── net40 │ └── MySql.Data.dll │ └── net45 │ └── MySql.Data.dll └── src ├── Common ├── Program.cs └── Util │ ├── Info.cs │ └── IniReader.cs ├── Daemons ├── Channel │ ├── Channel.csproj │ ├── Game │ │ ├── CashItem.cs │ │ ├── Character.cs │ │ ├── Equipment.cs │ │ ├── Inventory.cs │ │ ├── QuickSlots.cs │ │ ├── Skills.cs │ │ └── Stats.cs │ ├── GlobalSuppressions.cs │ ├── IPC Calls │ │ ├── Authentication.cs │ │ ├── CharacterManagement.cs │ │ └── SubpassManagement.cs │ ├── ItemEntity.cs │ ├── Map.cs │ ├── MapCell.cs │ ├── MapLoader.cs │ ├── Packets │ │ ├── Enumerations.cs │ │ ├── Main.cs │ │ ├── Methods │ │ │ ├── Account │ │ │ │ ├── ChargeInfo.cs │ │ │ │ └── NFY_ChargeInfo.cs │ │ │ ├── CashItem │ │ │ │ ├── QueryCashItem.cs │ │ │ │ └── RecvCashItem.cs │ │ │ ├── Character │ │ │ │ ├── AddSkillPoints.cs │ │ │ │ ├── AddStatPoints.cs │ │ │ │ ├── ChangeStyle.cs │ │ │ │ ├── Lobby │ │ │ │ │ ├── CheckUserPrivacyData.cs │ │ │ │ │ ├── DelMyChartr.cs │ │ │ │ │ ├── GetMyChartr.cs │ │ │ │ │ └── NewMyChartr.cs │ │ │ │ ├── MeritSytem.cs │ │ │ │ ├── NFY_ChangeStyle.cs │ │ │ │ ├── NFY_ItemEquip.cs │ │ │ │ ├── NFY_ItemUnEquip.cs │ │ │ │ ├── NewUserList.cs │ │ │ │ ├── PC_UpdateStats.cs │ │ │ │ ├── SetCharacterSlotOrder.cs │ │ │ │ ├── SpecialInventoryList.cs │ │ │ │ └── StorageExchangeMove.cs │ │ │ ├── Chat │ │ │ │ └── MessageEvnt.cs │ │ │ ├── Monster │ │ │ │ ├── MobsMoveEnd.cs │ │ │ │ ├── NewMobsList - Cópia .cs │ │ │ │ ├── NewMobsList.cs │ │ │ │ ├── PC_MobSpawned.cs │ │ │ │ └── PC_MobsMoveBgn.cs │ │ │ ├── Movement │ │ │ │ ├── ChangeDirection.cs │ │ │ │ ├── KeyMoveBegined.cs │ │ │ │ ├── KeyMoveChanged.cs │ │ │ │ ├── MoveBegined.cs │ │ │ │ ├── MoveChanged.cs │ │ │ │ ├── MoveEnded.cs │ │ │ │ ├── MoveTilePos.cs │ │ │ │ ├── PC_WarpCommand.cs │ │ │ │ └── WarpCommand.cs │ │ │ ├── Quest │ │ │ │ ├── QuestEnd.cs │ │ │ │ ├── QuestNextStep.cs │ │ │ │ ├── QuestReward.cs │ │ │ │ └── QuestStart.cs │ │ │ ├── Skill │ │ │ │ ├── NormalAttack.cs │ │ │ │ ├── SaveQuickSlot.cs │ │ │ │ ├── SkillToActs.cs │ │ │ │ ├── SkillToMobs.cs │ │ │ │ └── SkillToUser.cs │ │ │ ├── SubPassword │ │ │ │ ├── CharacterDeleteCheckSubPassword.cs │ │ │ │ ├── SubPasswordChangeQA.cs │ │ │ │ ├── SubPasswordChangeQARequest.cs │ │ │ │ ├── SubPasswordCheck.cs │ │ │ │ ├── SubPasswordCheckRequest.cs │ │ │ │ ├── SubPasswordDel.cs │ │ │ │ ├── SubPasswordDelRequest.cs │ │ │ │ ├── SubPasswordFind.cs │ │ │ │ ├── SubPasswordFindRequest.cs │ │ │ │ └── SubPasswordSet.cs │ │ │ ├── Unnamed │ │ │ │ ├── CashNPC.cs │ │ │ │ ├── PetInfo.cs │ │ │ │ ├── ReqCraft .cs │ │ │ │ ├── Unknown191.cs │ │ │ │ ├── Unknown193.cs │ │ │ │ ├── Unknown194.cs │ │ │ │ ├── Unknown1E5.cs │ │ │ │ ├── Unknown843.cs │ │ │ │ ├── Unknown8C8.cs │ │ │ │ ├── Unknown9C8.cs │ │ │ │ ├── Unknown9D6.cs │ │ │ │ ├── Unknown9D8.cs │ │ │ │ ├── Unknown9DA.cs │ │ │ │ ├── Unknown9E0.cs │ │ │ │ ├── UnknownA0B.cs │ │ │ │ ├── UnknownCE9.cs │ │ │ │ └── Unknown_86C.cs │ │ │ └── World │ │ │ │ ├── ChangeChannel.cs │ │ │ │ ├── ChannelSelectList.cs │ │ │ │ ├── CharacterSelect.cs │ │ │ │ ├── Connect2Svr.cs │ │ │ │ ├── GetSvrTime.cs │ │ │ │ ├── Initialized.cs │ │ │ │ ├── Initialized_bkup.cs │ │ │ │ ├── PC_ErrorCode.cs │ │ │ │ ├── PC_ItemDropped.cs │ │ │ │ ├── Ping.cs │ │ │ │ ├── ServerEnv.cs │ │ │ │ ├── Uninitialize.cs │ │ │ │ ├── UpdateHelpInfo.cs │ │ │ │ └── VerifyLinks.cs │ │ └── Structures │ │ │ ├── Client │ │ │ ├── Equipment.cs │ │ │ ├── IClientStructure.cs │ │ │ └── Item.cs │ │ │ └── Database │ │ │ ├── IDatabaseStructure.cs │ │ │ └── Item.cs │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Server.cs │ ├── SkillData.cs │ ├── SkillLoader.cs │ ├── Structures.cs │ ├── Tile.cs │ ├── Util │ │ └── Configuration.cs │ ├── app.config │ └── ucm.ico ├── Login │ ├── IPC Calls │ │ ├── Authentication.cs │ │ └── ServerList.cs │ ├── Login.csproj │ ├── Packets │ │ ├── Enumerations.cs │ │ ├── Main.cs │ │ ├── Methods │ │ │ ├── AuthAccount.cs │ │ │ ├── CheckVersion.cs │ │ │ ├── Connect2Svr.cs │ │ │ ├── PreServerEnvRequest.cs │ │ │ ├── PublicKey.cs │ │ │ ├── SystemMessg.cs │ │ │ ├── URLToClient.cs │ │ │ ├── Unknown_7D5.cs │ │ │ ├── Unknown_7D6.cs │ │ │ └── VerifyLinks.cs │ │ └── SendChannels.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RSA.cs │ ├── Server.cs │ ├── Util │ │ └── Configuration.cs │ ├── app.config │ └── uch.ico └── Master │ ├── Handler │ ├── ChannelsHandler.cs │ ├── DBsHandler.cs │ ├── InitialDataHandler.cs │ └── UsersHandler.cs │ ├── IPC Calls │ ├── Authentication.cs │ └── Channel.cs │ ├── IPC DB Calls │ ├── Login │ │ └── Authentication.cs │ └── World │ │ ├── Character.cs │ │ ├── Inventory.cs │ │ └── SubPass.cs │ ├── IPCProtocol.cs │ ├── IPCReceiver.cs │ ├── Master.csproj │ ├── PipeServer.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Server.cs │ ├── Util │ └── Configuration.cs │ ├── app.config │ └── uchh.ico ├── Databases └── MySQL │ ├── Login │ └── Auth.cs │ ├── Main.cs │ ├── MySQL.csproj │ ├── Properties │ └── AssemblyInfo.cs │ ├── World │ ├── Character.cs │ ├── Inventory.cs │ └── SubPass.cs │ ├── app.config │ └── packages.config └── ObjectBuddy ├── ASockets ├── AweSock.cs ├── Buffer.cs └── Domain │ ├── Enumerations.cs │ ├── Exceptions │ └── BufferFinalizedException.cs │ ├── SocketModifiers │ ├── ISocketModifier.cs │ └── MulticastSocketModifier.cs │ └── Sockets │ ├── AwesomeSocket.cs │ └── ISocket.cs ├── ChannelData.cs ├── Configuration ├── GlobalSettings.cs └── IniReader.cs ├── Cryption.cs ├── EventArgs ├── Connect.cs ├── IPC.cs ├── Login.cs ├── Misc.cs └── VersionCheck.cs ├── ExtensionMethods.cs ├── Handlers ├── ClientHandler.cs ├── DatabaseHandler.cs ├── EventHandler.cs ├── PacketHandler.cs └── ScriptHandler.cs ├── IPC ├── IPC.cs ├── IPCReader.cs ├── IPCWriter.cs └── SyncReceiver.cs ├── Interfaces ├── IDatabaseProtocol.cs └── IMap.cs ├── Log.cs ├── MobEntity.cs ├── ObjectBuddy.csproj ├── PacketBuilder.cs ├── PacketReader.cs ├── Properties └── AssemblyInfo.cs ├── app.config └── packages.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Minerva Emulator Episode 18 # 2 | 3 | This is Minerva - CABAL Online Server Emulator, written in C# language. Initially started by The Divinity Project, now being managed CentrinoGames. 4 | 5 | **Before asking any questions, please refer to [FAQ] and [WIKI].** 6 | 7 | ### Quick Information ### 8 | 9 | * It's open-source, GPL v3 license. 10 | * It's not a beta. It's pre-alpha, buggy, small functionality. 11 | * Currently Login, Channel(World) and Master(Database/Sync) servers are working. 12 | * For storing game data, using MariaDB and XML. 13 | * Support for Episode 18. 14 | * Client is official [CABAL PT-BR] http://cabal.br.playthisgame.com/pt/ 15 | * Client is official [CABAL ENG-US] http://cabal.playthisgame.com/en/ 16 | 17 | 18 | ### Client Download Links ### 19 | 20 | **Cabal Brazil Client Portuguese:** 21 | * [Download CABAL BR EP18 Primary]http://cabal.br.playthisgame.com/pt/FullClient/BRASIL 22 | * [Download CABAL BR EP18 Secondary]http://cabal.br.playthisgame.com/pt/FullClient/GLOBAL 23 | 24 | **Cabal Global Client English:** 25 | * [Download CABAL ENG EP18 Primary]http://cabal.playthisgame.com/en/FullClient/WEST 26 | * [Download CABAL ENG EP18 Secondary]http://cabal.playthisgame.com/en/FullClient/GLOBAL 27 | 28 | ### Compiled Release Files ### 29 | 30 | * Compiled x64 bits 31 | [Minerva.x64.zip](https://github.com/centrinogames/minerva/files/1729011/Minerva.x64.zip) 32 | 33 | * Compiled x86 bits 34 | [Minerva.x86.zip](https://github.com/centrinogames/minerva/files/1729028/Minerva.x86.zip) 35 | 36 | ### MariaDB + HeidiSQL ### 37 | 38 | * [Download](https://mariadb.com/kb/en/library/heidisql/) 39 | 40 | ### Compatible with ### 41 | 42 | * CABAL BR EP18 client; 43 | * .NET Framework 4.5 / Mono 4.x.x(latest); 44 | * MariaDB (you can grab xammp with all required tools [here](https://www.apachefriends.org/download.html)); 45 | * MySQL 5.6 or newer (partially, there might be a plugin for this, later). 46 | 47 | ### ### 48 | 49 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team; 2018 CentrinoGames. 50 | -------------------------------------------------------------------------------- /doc/conf/Channel_1_1.ini: -------------------------------------------------------------------------------- 1 | [debug] 2 | use=0 3 | level=0 4 | 5 | [listen] 6 | ; The IP to listen on. Do NOT set this to 0.0.0.0! 7 | ip=127.0.0.1 8 | ; The port to listen on. 9 | port=38117 10 | 11 | [channel] 12 | # Channel Types 13 | # 0 = normal 14 | # 1 = PK 15 | # 4 = Premium 16 | # 5 = Premium PK 17 | # 8 = War 18 | # 12 = Premium War 19 | type=0 20 | ; max number of players 21 | max_players=100 22 | 23 | [master] 24 | ; The IP of the Master server. 25 | ip=127.0.0.1 26 | ; The port of the Master server. 27 | port=9001 -------------------------------------------------------------------------------- /doc/conf/Chat.ini: -------------------------------------------------------------------------------- 1 | [debug] 2 | use=0 3 | level=0 4 | 5 | [listen] 6 | ; The IP to listen on. Do NOT set this to 0.0.0.0! 7 | ip=127.0.0.1 8 | ; The port to listen on. 9 | port=38121 -------------------------------------------------------------------------------- /doc/conf/Login.ini: -------------------------------------------------------------------------------- 1 | [listen] 2 | ; the IP to listen on. Do NOT set this to 0.0.0.0! 3 | ; default ip is 127.0.0.1 4 | ip=127.0.0.1 5 | 6 | ; the port to listen on 7 | ; default port is 38101 8 | port=38101 9 | 10 | [server] 11 | ; set true to enable debugging mode, otherwise set false 12 | ; client version, magickey checks bypassed in debugging mode 13 | debug=false 14 | 15 | ; default log level is 0 16 | ; notice messages and fatal errors are shown in any log level 17 | ; 18 | ; 0 - silent mode: no errors, warnings, networking messages are shown 19 | ; 1 - normal mode: errors and warnings are shown 20 | ; 2 - debug mode: errors, warnings and networking messages are shown 21 | log_level=2 22 | 23 | ; default max users is 64 24 | ; max value is 65535 25 | ; leaving it under 100 should be fine 26 | max_users=100 27 | 28 | [client] 29 | ; client version to accept 30 | ; bypassed in debugging mode 31 | client_version=506 32 | 33 | ; client magic key to accept 34 | ; bypassed in debugging mode 35 | magic_key=493752295 36 | 37 | [whitelist] 38 | ; whitelist or just maintenance 39 | ; if set true, no one will be able to connect except defined ips in whitelist 40 | enabled=false 41 | 42 | ; ip list to be accepted 43 | ; add ';' after every ip 44 | whitelist=127.0.0.1;192.168.1.1; 45 | 46 | [url] 47 | ; cash shop url 48 | cash=http://127.0.0.1/cashshop/?v1= 49 | 50 | ; cash shop charge url 51 | cash_charge=http://127.0.0.1/cashshop/?v1= 52 | 53 | ; guild board url [DEPRECATED], but still required 54 | guild=http://127.0.0.1/guild/?EncVal= 55 | 56 | [master] 57 | ; the IP of the Master server 58 | ; default ip is 127.0.0.1 59 | ip=127.0.0.1 60 | 61 | ; the port of the Master server 62 | ; default port is 9001 63 | port=9001 -------------------------------------------------------------------------------- /doc/conf/Master.ini: -------------------------------------------------------------------------------- 1 | [debug] 2 | use=0 3 | level=0 4 | 5 | [listen] 6 | ; The IP to listen on. Leaving this as 127.0.0.1 should be fine. 7 | ip=127.0.0.1 8 | port=9001 9 | 10 | [logindb] 11 | type=MySQL 12 | ip=127.0.0.1 13 | name=login 14 | user=root 15 | password= 16 | 17 | ; This is the database information for server 1. To add information for another server, 18 | ; simply copy the entire [server1db] section, and change the 1 to the ID of your server. 19 | ; eg. [server3db] for server ID 3 (channel.exe 3 1) 20 | 21 | [server1db] 22 | type=MySQL 23 | ip=127.0.0.1 24 | name=world 25 | user=root 26 | password= 27 | 28 | [server2db] 29 | type=MySQL 30 | ip=127.0.0.1 31 | name=world 32 | user=root 33 | password= -------------------------------------------------------------------------------- /doc/data/tmap/world1-tmap.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/doc/data/tmap/world1-tmap.bin -------------------------------------------------------------------------------- /doc/data/tmap/world2-tmap.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/doc/data/tmap/world2-tmap.bin -------------------------------------------------------------------------------- /doc/data/tmap/world3-tmap.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/doc/data/tmap/world3-tmap.bin -------------------------------------------------------------------------------- /doc/scripts/Events/_init_.rb: -------------------------------------------------------------------------------- 1 | def _init_(events) 2 | events.OnFailedLogin { |sender, e| self.failed_login sender, e } 3 | end -------------------------------------------------------------------------------- /doc/scripts/Events/failed_login.rb: -------------------------------------------------------------------------------- 1 | def failed_login(sender, e) 2 | Log.Notice "Failed login: #{e.Username} - #{e.IP}" 3 | end -------------------------------------------------------------------------------- /doc/sql/login.sql: -------------------------------------------------------------------------------- 1 | -- -------------------------------------------------------- 2 | -- Servidor: 127.0.0.1 3 | -- Versão do servidor: 10.1.13-MariaDB - mariadb.org binary distribution 4 | -- OS do Servidor: Win64 5 | -- HeidiSQL Versão: 9.1.0.4867 6 | -- -------------------------------------------------------- 7 | 8 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 9 | /*!40101 SET NAMES utf8mb4 */; 10 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; 11 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; 12 | 13 | -- Copiando estrutura do banco de dados para login 14 | CREATE DATABASE IF NOT EXISTS `login` /*!40100 DEFAULT CHARACTER SET latin1 */; 15 | USE `login`; 16 | 17 | 18 | -- Copiando estrutura para tabela login.accounts 19 | CREATE TABLE IF NOT EXISTS `accounts` ( 20 | `id` int(11) NOT NULL AUTO_INCREMENT, 21 | `username` varchar(32) NOT NULL, 22 | `password` varchar(512) NOT NULL, 23 | `auth` tinyint(4) unsigned NOT NULL, 24 | `lastlogin` datetime DEFAULT NULL, 25 | `lastip` varchar(15) DEFAULT NULL, 26 | `online` int(1) DEFAULT '0', 27 | PRIMARY KEY (`id`) 28 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 29 | 30 | -- Exportação de dados foi desmarcado. 31 | 32 | 33 | -- Copiando estrutura para tabela login.subpass 34 | CREATE TABLE IF NOT EXISTS `subpass` ( 35 | `id` int(11) NOT NULL AUTO_INCREMENT, 36 | `account` int(11) NOT NULL, 37 | `passwd` varchar(64) NOT NULL, 38 | `answer` varchar(64) NOT NULL, 39 | `question` tinyint(3) unsigned NOT NULL, 40 | `expiration` datetime DEFAULT NULL, 41 | PRIMARY KEY (`id`) 42 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 43 | 44 | -- Exportação de dados foi desmarcado. 45 | /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; 46 | /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; 47 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 48 | -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/IronRuby.Libraries.Yaml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/IronRuby.Libraries.Yaml.dll -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/IronRuby.Libraries.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/IronRuby.Libraries.dll -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/IronRuby.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/IronRuby.dll -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/Microsoft.Dynamic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/Microsoft.Dynamic.dll -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/Microsoft.Scripting.Metadata.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/Microsoft.Scripting.Metadata.dll -------------------------------------------------------------------------------- /packages/IronRuby.1.1.3/Lib/Microsoft.Scripting.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/IronRuby.1.1.3/Lib/Microsoft.Scripting.dll -------------------------------------------------------------------------------- /packages/MySql.Data.6.9.9/Readme.txt: -------------------------------------------------------------------------------- 1 | Connector/Net 6.9 Release Notes 2 | ------------------------------------ 3 | 4 | Welcome to the release notes for Connector/Net 6.9 5 | 6 | What's new in 6.9 7 | -------------------- 8 | 9 | - Simple Membership Web Provider 10 | - Site Map Web Provider 11 | - Personalization Web Provider 12 | - MySql Fabric support 13 | 14 | 15 | Be sure and check the documentation for more information on these new features. -------------------------------------------------------------------------------- /packages/MySql.Data.6.9.9/content/app.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/MySql.Data.6.9.9/content/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/MySql.Data.6.9.9/lib/net40/MySql.Data.dll -------------------------------------------------------------------------------- /packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll -------------------------------------------------------------------------------- /src/Common/Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | class Program 27 | { 28 | static Server svr; 29 | 30 | static void Main(string[] args) 31 | { 32 | svr = new Server(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/CashItem.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class CashItem 33 | { 34 | public int ID { get; set; } 35 | public int itemid { get; set; } 36 | public byte[] itemopt { get; set; } 37 | public int itemopt2 { get; set; } 38 | public int duration { get; set; } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/Character.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class Character 33 | { 34 | public int id { get; set; } 35 | public int account { get; set; } 36 | public byte slot { get; set; } 37 | public string name { get; set; } 38 | public uint level { get; set; } 39 | public byte _class { get; set; } 40 | public byte face { get; set; } 41 | public byte hair { get; set; } 42 | public byte colour { get; set; } 43 | public bool gender { get; set; } 44 | public byte map { get; set; } 45 | public byte x { get; set; } 46 | public byte y { get; set; } 47 | public DateTime created { get; set; } 48 | public Equipment equipment { get; set; } 49 | public Stats stats { get; set; } 50 | public Inventory[] inv { get; set; } 51 | public Skills[] skills { get; set; } 52 | public QuickSlots[] qslots { get; set; } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/Inventory.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class Inventory 33 | { 34 | public byte[] item { get; set; } 35 | public ushort amount { get; set; } 36 | public byte slot { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/QuickSlots.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class QuickSlots 33 | { 34 | public byte skill { get; set; } 35 | public byte slot { get; set; } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/Skills.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class Skills 33 | { 34 | public ushort skill { get; set; } 35 | public byte level { get; set; } 36 | public byte slot { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Game/Stats.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class Stats 33 | { 34 | public ushort curhp { get; set; } 35 | public ushort maxhp { get; set; } 36 | public ushort curmp { get; set; } 37 | public ushort maxmp { get; set; } 38 | public ushort cursp { get; set; } 39 | public ushort maxsp { get; set; } 40 | 41 | public ulong exp { get; set; } 42 | 43 | 44 | public uint str_stat { get; set; } 45 | public uint int_stat { get; set; } 46 | public uint dex_stat { get; set; } 47 | public uint pnt_stat { get; set; } 48 | 49 | public uint honour { get; set; } 50 | public uint rank { get; set; } 51 | 52 | public byte swordrank { get; set; } 53 | public ushort swordxp { get; set; } 54 | public ushort swordpts { get; set; } 55 | 56 | public byte magicrank { get; set; } 57 | public ushort magicxp { get; set; } 58 | public ushort magicpts { get; set; } 59 | public ulong alz { get; set; } 60 | public ulong wexp { get; set; } 61 | public ulong honor { get; set; } 62 | 63 | public ushort patk { get; set; } 64 | public ushort matk { get; set; } 65 | public ushort def { get; set; } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Daemons/Channel/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 |  2 | // This file is used by Code Analysis to maintain SuppressMessage 3 | // attributes that are applied to this project. 4 | // Project-level suppressions either have no target or are given 5 | // a specific target and scoped to a namespace, type, member, etc. 6 | 7 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Arguments", "JustCode_LiteralArgumentIsNotNamedDiagnostic:The used literal argument is not named", Justification = "", Scope = "member", Target = "~M:Minerva.PacketProtocol.SelectChannel(Minerva.PacketReader,Minerva.PacketBuilder,Minerva.ClientHandler,Minerva.EventHandler)")] 8 | 9 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Enumerations.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | public enum EquipmentSlots : byte 27 | { 28 | Head, 29 | Body, 30 | Hands, 31 | Feet, 32 | RightHand, 33 | LeftHand, 34 | Back 35 | } 36 | 37 | public enum CreateCharacterStatus : byte 38 | { 39 | DBError = 0x00, 40 | SlotInUse = 0x01, 41 | NameInUse = 0x03, 42 | Success = 0xA1 43 | } 44 | 45 | public enum DeleteCharacterStatus : byte 46 | { 47 | DBError = 0x01, 48 | Success = 0xA1 49 | } 50 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Account/ChargeInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void ChargeInfo(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | builder.New(0x144); 37 | { 38 | builder += 5; 39 | builder += 1; 40 | builder += (uint)0; // Timestamp 41 | } 42 | 43 | client.Send(builder, "ChargeInfo"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Account/NFY_ChargeInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void NFY_ChargeInfo(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | builder.New(0x145); 37 | { 38 | builder += 0; 39 | builder += 0; 40 | builder += (uint)0; // Timestamp 41 | } 42 | 43 | client.Send(builder, "NFY_ChargeInfo"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/AddSkillPoints.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void AddSkillPoints(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var sync = client.Metadata["syncServer"] as SyncReceiver; 37 | var server = (int)client.Metadata["server"]; 38 | Character character = client.Metadata["fullchar"] as Character; 39 | 40 | var skill = packet.ReadUShort(); 41 | var slot = packet.ReadByte(); 42 | var oldlevel = packet.ReadUShort(); 43 | var newlevel = packet.ReadUShort(); 44 | 45 | if ((newlevel == oldlevel + 1) || (newlevel == oldlevel - 1)) 46 | { 47 | CharacterManagement.UpdateSkillPoints(sync, server, character.id, skill, newlevel, slot); 48 | builder.New(0x0A56); 49 | client.Send(builder, "AddSkillPoints"); 50 | } 51 | else //Punishment for hackers :D 52 | { 53 | var map = client.Metadata["map"] as IMap; 54 | CharacterManagement.UpdatePosition(sync, server, client.AccountID, character.slot, character.map, character.x, character.y); 55 | client.Disconnect(); 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/AddStatPoints.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void AddStatPoints(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var strength = packet.ReadInt(); 37 | var dexterity = packet.ReadInt(); 38 | var intellingence = packet.ReadInt(); 39 | var strtoadd = packet.ReadInt(); 40 | var dextoadd = packet.ReadInt(); 41 | var inttoadd = packet.ReadInt(); 42 | 43 | builder.New(0x0A58); 44 | { 45 | builder += 0; //add or remove? 46 | builder += strength + strtoadd; 47 | builder += dexterity + dextoadd; 48 | builder += intellingence + inttoadd; 49 | } 50 | 51 | Character character = client.Metadata["fullchar"] as Character; 52 | var id = character.id; 53 | var server = (int)client.Metadata["server"]; 54 | var sync = client.Metadata["syncServer"] as SyncReceiver; 55 | int pnt = -(strtoadd + dextoadd + inttoadd); 56 | 57 | CharacterManagement.UpdateStatPoints(sync, server, id, strength + strtoadd, intellingence + inttoadd, dexterity + dextoadd, pnt); 58 | 59 | client.Send(builder, "AddStatPoints"); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/ChangeStyle.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void ChangeStyle(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | builder.New(0x142); 37 | { 38 | builder += (byte)1; 39 | } 40 | 41 | client.Send(builder, "ChangeStyle"); 42 | 43 | NFY_ChangeStyle(packet, builder, client, events); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/Lobby/CheckUserPrivacyData.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void CheckUserPrivacyData(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(4); 37 | var pass = packet.ReadString(32).Trim('\0'); 38 | 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | bool auth = Authentication.VerifyPassword(syncServer, client.AccountID, pass); 41 | 42 | builder.New(0x320); 43 | { 44 | builder += (auth) ? (byte)1 : (byte)0; 45 | } 46 | 47 | client.Send(builder, "CheckUserPrivacyData"); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/Lobby/DelMyChartr.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void DeleteCharacter(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var charID = packet.ReadInt(); 37 | 38 | var server = (int)client.Metadata["server"]; 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | 41 | var status = CharacterManagement.DeleteCharacter(syncServer, server, client.AccountID, charID - client.AccountID * 8); 42 | 43 | builder.New(0x87); 44 | { 45 | builder += (byte)status; 46 | } 47 | 48 | client.Send(builder, "DelMyChartr"); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/MeritSytem.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | 39 | public static void MeritSystem(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 40 | { 41 | var unk1 = packet.ReadByte(); 42 | var unk2 = packet.ReadByte(); 43 | var unk3 = packet.ReadByte(); 44 | var unk4 = packet.ReadByte(); 45 | var unk5 = packet.ReadByte(); 46 | var unk6 = packet.ReadByte(); 47 | var unk7 = packet.ReadByte(); 48 | var unk8 = packet.ReadByte();/* 49 | var unk9 = packet.ReadByte(); 50 | var unk10 = packet.ReadByte(); 51 | var unk11 = packet.ReadByte(); 52 | var unk12 = packet.ReadByte();*/ 53 | 54 | #if DEBUG 55 | Log.Notice("" + unk1 + " " + unk2 + " " + unk3 + " " + unk3 + " " + unk4 + " " + unk5 + " " + unk6 + " " + unk7 + " " + unk8 + ""); 56 | #endif 57 | 58 | 59 | 60 | builder.New(0x9F3); 61 | { 62 | builder += 1; 63 | builder += (ushort)0; 64 | } 65 | 66 | client.Send(builder, "MeritSystem"); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/NFY_ChangeStyle.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void NFY_ChangeStyle(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var style = packet.ReadInt(); 37 | var unk2 = packet.ReadInt(); 38 | 39 | Character character = client.Metadata["fullchar"] as Character; 40 | var cid = character.id; 41 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 42 | client.Metadata["style"] = style; 43 | 44 | builder.New(0x143); 45 | { 46 | builder += cid; 47 | builder += style; 48 | builder += unk2; 49 | builder += 0; 50 | builder += (short)0; 51 | } 52 | 53 | foreach (var c in clients) 54 | { 55 | c.Send(builder, "NFY_ChangeStyle"); 56 | } 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/NFY_ItemEquip.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void NFY_ItemEquip(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events, params object[] args) 35 | { 36 | var unk3 = (int)args[0]; 37 | Character character = client.Metadata["fullchar"] as Character; 38 | var cid = character.id; 39 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 40 | 41 | builder.New(0xCE); 42 | { 43 | builder += cid; 44 | builder += 150; // item id? 45 | builder += unk3; // slot? 46 | builder += new byte[3]; 47 | } 48 | 49 | foreach (var c in clients) 50 | { 51 | c.Send(builder, "NFY_ItemEquipS0"); 52 | } 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/NFY_ItemUnEquip.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void NFY_ItemUnEquip(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events, params object[] args) 35 | { 36 | var oldslot = (ushort)args[0]; 37 | Character character = client.Metadata["fullchar"] as Character; 38 | var cid = character.id; 39 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 40 | 41 | builder.New(0xCF); 42 | { 43 | builder += cid; 44 | builder += oldslot; // slot? 45 | } 46 | 47 | foreach (var c in clients) 48 | { 49 | c.Send(builder, "NFY_ItemUnEquip"); 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/SetCharacterSlotOrder.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SetCharacterSlotOrder(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var slots = packet.ReadInt(); 37 | 38 | var server = (int)client.Metadata["server"]; 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | 41 | CharacterManagement.SetSlotOrder(syncServer, server, client.AccountID, slots); 42 | client.Metadata["slotorder"] = slots; 43 | 44 | builder.New(0x7D1); 45 | { 46 | builder += (byte)0; 47 | } 48 | 49 | client.Send(builder, "SetCharacterSlotOrder"); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/SpecialInventoryList.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | /* 39 | * SpecialInventoryList Packet 40 | * ------------------------- 41 | * Server2Client Structure: 42 | * 43 | * Unknown8BD -> E2 B7 16 00 BD 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 44 | * 45 | * ushort : magic code 46 | * ushort : size 47 | * ushort : opcode 48 | * 49 | * byte[16] : UnknItemData 50 | */ 51 | 52 | public static void SpecialInventoryList(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 53 | { 54 | 55 | builder.New(0x8BD); 56 | { 57 | builder += (byte)0; 58 | builder += (byte)0; 59 | builder += (byte)0; 60 | builder += (byte)0; 61 | builder += (byte)0; 62 | builder += (byte)0; 63 | builder += (byte)0; 64 | builder += (byte)0; 65 | builder += (byte)0; 66 | builder += (byte)0; 67 | builder += (byte)0; 68 | builder += (byte)0; 69 | builder += (byte)0; 70 | builder += (byte)0; 71 | builder += (byte)0; 72 | builder += (byte)0; 73 | } 74 | 75 | client.Send(builder, "SpecialInventoryList"); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Character/StorageExchangeMove.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void StorageExchangeMove(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var unk1 = packet.ReadInt(); 37 | var oldslot = packet.ReadInt(); 38 | var unk3 = packet.ReadInt(); 39 | var newslot = packet.ReadInt(); 40 | 41 | builder.New(0x875); 42 | { 43 | builder += 1; 44 | builder += (byte)0; 45 | } 46 | 47 | client.Send(builder, "StorageExchangeMove"); 48 | 49 | if (unk1 == 1 && unk3 == 0) // unequip code? 50 | { 51 | NFY_ItemUnEquip(packet, builder, client, events, oldslot); 52 | } 53 | else if (unk1 == 0 && unk3 == 1) // equip code? 54 | { 55 | NFY_ItemEquip(packet, builder, client, events, unk3); 56 | } 57 | 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Monster/MobsMoveEnd.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static PacketBuilder PC_MobsMoveEnd(object[] args) 35 | { 36 | var mob = (MobEntity)args[0]; 37 | var p = new PacketBuilder(); 38 | 39 | p.New(0xD6); 40 | { 41 | p += (ushort)mob.Id; 42 | p += (ushort)0x0201; 43 | p += mob.EndPosX; 44 | p += mob.EndPosY; 45 | 46 | return p; 47 | } 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Monster/PC_MobSpawned.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | public static PacketBuilder PC_MobSpawned(object[] args) 29 | { 30 | // mobs[i].Id, mobs[i].SId, mobs[i].CurrentPosX, mobs[i].CurrentPosY, mobs[i].EndPosX, mobs[i].EndPosY, mobs[i].CurrentHP, mobs[i].MaxHP, mobs[i].Level 31 | var id = System.Convert.ToUInt16(args[0]); 32 | var mid = (ushort)args[1]; 33 | var startx = (ushort)args[2]; 34 | var starty = (ushort)args[3]; 35 | var endx = (ushort)args[4]; 36 | var endy = (ushort)args[5]; 37 | var hp = (ushort)args[6]; 38 | var maxhp = (ushort)args[7]; 39 | var level = (byte)args[8]; 40 | 41 | 42 | var p = new PacketBuilder(); 43 | 44 | p.New(0xCA); 45 | { 46 | p += (byte)0x01; // count 47 | p += (ushort)0x0003; 48 | 49 | p += id; // uniq id? 50 | p += startx; // start x 51 | p += starty; // start y 52 | p += endx; // end x 53 | p += endy; // end y 54 | p += mid; // mob species id 55 | p += (ushort)0x4CA0; 56 | p += maxhp; // max hp 57 | p += (ushort)0x4CA0; 58 | p += hp; // current hp 59 | p += (byte)0; // moving speed multiplier? 60 | p += level; // level 61 | p += new byte[7]; 62 | 63 | return p; 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Monster/PC_MobsMoveBgn.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static PacketBuilder PC_MobsMoveBgn(object[] args) 35 | { 36 | 37 | var mob = (MobEntity)args[0]; 38 | var p = new PacketBuilder(); 39 | 40 | p.New(0xD5); 41 | { 42 | p += (ushort)mob.Id; 43 | p += (ushort)0x0201; 44 | p += (uint)Environment.TickCount; 45 | p += mob.CurrentPosX; 46 | p += mob.CurrentPosY; 47 | p += mob.EndPosX; 48 | p += mob.EndPosY; 49 | 50 | return p; 51 | } 52 | 53 | } 54 | 55 | } 56 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/ChangeDirection.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void ChangeDirection(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var x = packet.ReadUShort(); 37 | var y = packet.ReadUShort(); 38 | 39 | Character character = client.Metadata["fullchar"] as Character; 40 | var id = character.id; 41 | 42 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 43 | 44 | builder.New(0x188); 45 | { 46 | builder += id; 47 | builder += x; 48 | builder += y; 49 | } 50 | 51 | foreach (var c in clients) 52 | { 53 | c.Send(builder, "NFY_ChangeDirection"); 54 | } 55 | 56 | NewMobsList(packet, builder, client, events); 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/KeyMoveBegined.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void KeyMoveBegined(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var unk1 = packet.ReadShort(); 37 | var unk2 = packet.ReadShort(); 38 | var unk3 = packet.ReadShort(); 39 | var unk4 = packet.ReadLong(); 40 | packet.Skip(8); 41 | var unk5 = packet.ReadShort(); 42 | //var unk6 = packet.ReadByte(); 43 | 44 | //var id = (int)client.Metadata["id"]; 45 | var timestamp = (uint)client.Metadata["timestamp"]; 46 | 47 | //var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); For Now 48 | 49 | builder.New(0x193); 50 | { 51 | builder += 0; 52 | builder += Environment.TickCount - (int)timestamp; 53 | builder += unk1; 54 | builder += unk2; 55 | builder += unk3; 56 | builder += unk4; 57 | builder += unk5; 58 | //builder += unk6; 59 | } 60 | 61 | /*foreach (var c in clients) 62 | { 63 | c.Send(builder, "NFY_KeyMoveBegined"); 64 | }*/ 65 | client.Send(builder, "NFY_KeyMoveBegined"); 66 | 67 | //NewUserList(packet, builder, client, events); 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/KeyMoveChanged.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void KeyMoveChanged(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var unk1 = packet.ReadLong(); 37 | var unk2 = packet.ReadLong(); 38 | packet.Skip(8); 39 | var unk3 = packet.ReadByte(); 40 | 41 | Character character = client.Metadata["fullchar"] as Character; 42 | var id = character.id; 43 | var timestamp = (uint)client.Metadata["timestamp"]; 44 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 45 | 46 | builder.New(0x196); 47 | { 48 | builder += id; 49 | builder += Environment.TickCount - (int)timestamp; 50 | builder += unk1; 51 | builder += unk2; 52 | builder += unk3; 53 | } 54 | 55 | foreach (var c in clients) 56 | { 57 | c.Send(builder, "NFY_KeyMoveBegined"); 58 | } 59 | //NewUserList(packet, builder, client, events); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/MoveEnded.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void ArrivedAtLocation(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var x = packet.ReadUShort(); 37 | var y = packet.ReadUShort(); 38 | 39 | Character character = client.Metadata["fullchar"] as Character; 40 | var id = character.id; 41 | 42 | character.x = (byte)x; 43 | character.y = (byte)y; 44 | 45 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 46 | (client.Metadata["map"] as IMap).GetTile(client, x, y); 47 | 48 | builder.New(0xD3); 49 | { 50 | builder += id; 51 | builder += x; 52 | builder += y; 53 | } 54 | 55 | foreach (var c in clients) 56 | { 57 | c.Send(builder, "NFY_MoveEnded"); 58 | } 59 | 60 | NewMobsList(packet, builder, client, events); 61 | //NewUserList(packet, builder, client, events); 62 | 63 | CharacterManagement.UpdatePosition(client.Metadata["syncServer"] as SyncReceiver, (int)client.Metadata["server"], client.AccountID, character.slot, character.map, character.x, character.y); 64 | 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/MoveTilePos.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void ChangeMapCell(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(4); 37 | var x = packet.ReadShort(); 38 | var y = packet.ReadShort(); 39 | 40 | var map = client.Metadata["map"] as IMap; 41 | map.MoveClient(client, x / 16, y / 16); 42 | map.UpdateCells(client); 43 | 44 | //NewUserList(packet, builder, client, events); 45 | NewMobsList(packet, builder, client, events); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Movement/PC_WarpCommand.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | public static PacketBuilder PC_WarpCommand(object[] args) 29 | { 30 | var map = (int)args[0]; 31 | var x = (ushort)args[1]; 32 | var y = (ushort)args[2]; 33 | var client = (ClientHandler)args[3]; 34 | Character character = client.Metadata["fullchar"] as Character; 35 | 36 | var p = new PacketBuilder(); 37 | 38 | p.New(0x00F4); 39 | { 40 | p += x; 41 | p += y; 42 | p += (uint)character.stats.exp; 43 | p += 0; //axp 44 | p += character.stats.alz; //Alz (for death penalty and fee?) 45 | p += (byte)1; 46 | p += (byte)1; 47 | p += (byte)1; 48 | p += (byte)1; 49 | p += (byte)1; 50 | p += (ulong)0; 51 | p += map; 52 | p += (byte)1; 53 | p += (byte)1; 54 | p += (byte)1; 55 | p += (byte)1; 56 | p += (byte)1; 57 | p += (byte)1; 58 | p += (byte)1; 59 | p += (byte)1; 60 | p += (byte)1; 61 | p += (byte)1; 62 | return p; 63 | } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Quest/QuestEnd.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void QuestEnd(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | var map = client.Metadata["map"] as IMap; 41 | builder.New(0x011B); 42 | { 43 | builder += map.ID; 44 | } 45 | 46 | client.Send(builder, "QuestEnd"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Quest/QuestNextStep.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void QuestNextStep(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | var questid = packet.ReadUShort(); 41 | var questid1 = packet.ReadUShort(); 42 | packet.Skip(3); 43 | var previousstep = packet.ReadByte(); 44 | var nextstep = packet.ReadByte(); 45 | /* 46 | builder.New(0x0140); 47 | { 48 | builder += (byte)1; 49 | builder += (byte)1; 50 | builder += (byte)1; 51 | builder += (byte)1; 52 | builder += (byte)1; 53 | builder += (byte)1; 54 | builder += (byte)1; 55 | builder += (byte)1; 56 | }*/ 57 | 58 | builder.New(0x0140); 59 | { 60 | builder += questid; 61 | builder += (ushort)(previousstep+nextstep); 62 | builder += questid1; 63 | builder += (ushort)0; 64 | } 65 | 66 | client.Send(builder, "QuestNextStep"); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Quest/QuestReward.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void QuestReward(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | var map = client.Metadata["map"] as IMap; 41 | builder.New(0x02F8); 42 | { 43 | builder += map.ID; 44 | } 45 | 46 | client.Send(builder, "QuestReward"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Quest/QuestStart.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void QuestStart(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | builder.New(0x011A); 41 | { 42 | builder += 1; 43 | } 44 | 45 | client.Send(builder, "QuestStart"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Skill/SaveQuickSlot.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SaveQuickSlot(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var quickslot = packet.ReadShort(); 37 | var skill = packet.ReadShort(); 38 | Character character = client.Metadata["fullchar"] as Character; 39 | var id = character.id; 40 | 41 | builder.New(0x0092); 42 | { 43 | builder += id; 44 | builder += quickslot; 45 | builder += skill; 46 | } 47 | 48 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 49 | var server = (int)client.Metadata["server"]; 50 | 51 | CharacterManagement.SetQuickSlots(syncServer, server, id, quickslot, skill); 52 | 53 | client.Send(builder, "SaveQuickSlot"); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Skill/SkillToActs.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SkillToActs(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var unk = packet.ReadInt(); 37 | var act = packet.ReadInt(); 38 | 39 | var clients = (client.Metadata["map"] as IMap).GetSurroundingClients(client, 2); 40 | Character character = client.Metadata["fullchar"] as Character; 41 | var id = character.id; 42 | 43 | builder.New(0x137); 44 | { 45 | builder += id; 46 | builder += unk; 47 | builder += act; 48 | } 49 | 50 | foreach (var c in clients) 51 | { 52 | c.Send(builder, "NFY_SkillToAct"); 53 | } 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/CharacterDeleteCheckSubPassword.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void CharacterDeleteCheckSubPassword(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var subpw = packet.ReadString(10).Trim('\0'); 37 | 38 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 39 | var verify = SubpassManagement.CheckSubPw(syncServer, client.AccountID, subpw); 40 | var tries = 0; 41 | 42 | builder.New(0x870); 43 | { 44 | if (verify) 45 | { 46 | client.Metadata["subTries"] = 0; 47 | builder += 1; // success 48 | builder += (byte)0; // failed times 49 | } 50 | else 51 | { 52 | client.Metadata["subTries"] = (int)client.Metadata["subTries"] + 1; 53 | tries = (int)client.Metadata["subTries"]; 54 | builder += 0; // failed 55 | builder += (byte)tries; // failed times 56 | } 57 | } 58 | 59 | client.Send(builder, "CharacterDeleteCheckSubPassword"); 60 | 61 | if ((int)client.Metadata["subTries"] > 3) 62 | { 63 | client.Disconnect(); 64 | } 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordChangeQA.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordChangeQA(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(4); 37 | var question = packet.ReadInt(); 38 | var answer = packet.ReadString(16).Trim('\0'); 39 | 40 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 41 | SubpassManagement.SetSubPass(syncServer, client.AccountID, string.Empty, question, answer); 42 | 43 | builder.New(0x416); 44 | { 45 | builder += 1; 46 | builder += 1; 47 | } 48 | 49 | client.Send(builder, "SubPasswordChangeQA"); 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordChangeQARequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordChangeQARequest(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(4); 37 | var pass = packet.ReadString(10).Trim('\0'); 38 | 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | var checksub = SubpassManagement.CheckSubPw(syncServer, client.AccountID, pass); 41 | 42 | var tries = 0; 43 | 44 | builder.New(0x414); 45 | { 46 | if (checksub) 47 | { 48 | client.Metadata["subTries"] = 0; 49 | builder += 1; // success 50 | builder += (byte)0x00; // failed times 51 | } 52 | else 53 | { 54 | client.Metadata["subTries"] = (int)client.Metadata["subTries"] + 1; 55 | tries = (int)client.Metadata["subTries"]; 56 | builder += 0; // failed 57 | builder += (byte)tries; // failed times 58 | } 59 | 60 | builder += 1; 61 | } 62 | 63 | client.Send(builder, "SubPasswordChangeQARequest"); 64 | 65 | if ((int)client.Metadata["subTries"] > 3) 66 | { 67 | client.Disconnect(); 68 | } 69 | } 70 | } 71 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordCheck.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordCheck(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var pass = packet.ReadString(10).Trim('\0'); 37 | packet.Skip(5); 38 | var time = packet.ReadInt(); 39 | 40 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 41 | 42 | var checksub = SubpassManagement.CheckSubPw(syncServer, client.AccountID, pass); 43 | var tries = 0; 44 | 45 | builder.New(0x40A); 46 | { 47 | if (checksub) 48 | { 49 | builder += 1; // success 50 | builder += (byte)0x00; // failed times 51 | client.Metadata["subTries"] = 0; 52 | SubpassManagement.SetSubPassTime(syncServer, client.AccountID, time); 53 | } 54 | else 55 | { 56 | client.Metadata["subTries"] = (int)client.Metadata["subTries"] + 1; 57 | tries = (int)client.Metadata["subTries"]; 58 | builder += 0; // failed 59 | builder += (byte)tries; // failed times 60 | } 61 | 62 | builder += 0; 63 | builder += 1; 64 | } 65 | 66 | client.Send(builder, "SubPasswordCheck"); 67 | 68 | if ((int)client.Metadata["subTries"] > 3) 69 | { 70 | client.Disconnect(); 71 | } 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordCheckRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordCheckRequest(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 37 | 38 | var subpass = SubpassManagement.GetSubPassTime(syncServer, client.AccountID); 39 | 40 | builder.New(0x408); 41 | { 42 | if (subpass) 43 | builder += 0; // dont need verification 44 | else 45 | builder += 1; // need verification 46 | } 47 | 48 | client.Send(builder, "SubPasswordCheckRequest"); 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordDel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordDel(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 37 | 38 | SubpassManagement.RemoveSubPass(syncServer, client.AccountID); 39 | 40 | builder.New(0x412); 41 | { 42 | builder += 1; 43 | builder += 1; 44 | } 45 | 46 | client.Send(builder, "SubPasswordDel"); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordDelRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordDelRequest(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(4); 37 | var pass = packet.ReadString(10).Trim('\0'); 38 | 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | var checksub = SubpassManagement.CheckSubPw(syncServer, client.AccountID, pass); 41 | 42 | var tries = 0; 43 | 44 | builder.New(0x410); 45 | { 46 | if (checksub) 47 | { 48 | client.Metadata["subTries"] = 0; 49 | builder += 1; // success 50 | builder += (byte)0x00; // failed times 51 | } 52 | else 53 | { 54 | client.Metadata["subTries"] = (int)client.Metadata["subTries"] + 1; 55 | tries = (int)client.Metadata["subTries"]; 56 | builder += 0; // failed 57 | builder += (byte)tries; // failed times 58 | } 59 | builder += 1; 60 | } 61 | 62 | client.Send(builder, "SubPasswordDelRequest"); 63 | 64 | if ((int)client.Metadata["subTries"] > 3) 65 | { 66 | client.Disconnect(); 67 | } 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordFind.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordFind(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | packet.Skip(8); 37 | var answer = packet.ReadString(16).Trim('\0'); 38 | 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | var checkAnswer = SubpassManagement.CheckSubPwAnswer(syncServer, client.AccountID, answer); 41 | var tries = 0; 42 | 43 | builder.New(0x40E); 44 | { 45 | if (checkAnswer) 46 | { 47 | builder += 1; // success 48 | builder += (byte)0x00; // failed times 49 | client.Metadata["subTries"] = 0; 50 | } 51 | else 52 | { 53 | client.Metadata["subTries"] = (int)client.Metadata["subTries"] + 1; 54 | tries = (int)client.Metadata["subTries"]; 55 | builder += 0; // failed 56 | builder += (byte)tries; // failed times 57 | } 58 | builder += 1; 59 | } 60 | 61 | client.Send(builder, "SubPasswordFind"); 62 | 63 | if ((int)client.Metadata["subTries"] > 3) 64 | { 65 | client.Disconnect(); 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordFindRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordFindRequest(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 37 | 38 | var questionID = SubpassManagement.GetSubPassQuestion(syncServer, client.AccountID); 39 | 40 | builder.New(0x40C); 41 | { 42 | builder += questionID; 43 | builder += questionID; 44 | builder += 1; 45 | } 46 | 47 | client.Send(builder, "SubPasswordFindRequest"); 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/SubPassword/SubPasswordSet.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void SubPasswordSet(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var pass = packet.ReadString(10).Trim('\0'); 37 | packet.Skip(5); 38 | var question = packet.ReadInt(); 39 | var answer = packet.ReadString(16).Trim('\0'); 40 | packet.Skip(112); 41 | var changeSub = packet.ReadInt(); 42 | 43 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 44 | 45 | if (changeSub == 0) 46 | SubpassManagement.SetSubPass(syncServer, client.AccountID, pass, question, answer); 47 | else 48 | SubpassManagement.SetSubPass(syncServer, client.AccountID, pass, -1, string.Empty); 49 | 50 | builder.New(0x406); 51 | { 52 | builder += 1; 53 | builder += 0; 54 | builder += 1; 55 | builder += 0; 56 | } 57 | 58 | SubpassManagement.SetSubPassTime(syncServer, client.AccountID,0); 59 | client.Send(builder, "SubPasswordSet"); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/CashNPC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | 39 | public static void CashNPC(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 40 | { 41 | 42 | builder.New(0xA05); 43 | { 44 | builder += (ushort)0; 45 | builder += 1; 46 | 47 | builder += (ushort)0; //ID 48 | builder += (ulong)1; //itemidx 49 | builder += (uint)0; //tag 50 | builder += (uint)0; 51 | builder += (uint)0; //duration 52 | builder += (byte)0; 53 | builder += (byte)0; 54 | builder += (byte)0; 55 | builder += (uint)5357; 56 | builder += (uint)123; //price 57 | builder += (uint)0; 58 | builder += (ushort)0; 59 | builder += (ushort)2; 60 | builder += (ushort)0; 61 | 62 | } 63 | 64 | client.Send(builder, "CashNPC"); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/PetInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | 39 | public static void PetInfo(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 40 | { 41 | 42 | builder.New(0x0389); 43 | { 44 | builder += (int)1; 45 | builder += (int)1; //petserial 46 | builder += (int)0; 47 | builder += (byte)0; 48 | builder += (int)34; 49 | builder += (int)1; //petserial 50 | builder += (int)1; //PetID 51 | builder += (int)8; //PetOwner 52 | builder += (int)11241; //PetIdx 53 | builder += (byte)10; //PetLevel 54 | builder += (int)0; //PetExp 55 | builder += (byte)0; 56 | builder += (byte)11; 57 | builder += (int)0; 58 | builder += (int)0; 59 | builder += (int)0; 60 | builder += (int)0; 61 | builder += (byte)0; 62 | builder += new byte[40]; 63 | } 64 | 65 | client.Send(builder, "PetInfo"); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/ReqCraft .cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | 39 | public static void ReqCraft(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 40 | { 41 | 42 | builder.New(0x8CA); 43 | { 44 | builder += 1; 45 | builder += (ushort)0; 46 | } 47 | 48 | client.Send(builder, "ReqCraft"); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown191.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown191(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x0191); 42 | 43 | client.Send(builder, "Unknown191"); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown193.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown193(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x0193); 42 | { 43 | builder+=(byte)0; 44 | } 45 | client.Send(builder, "Unknown193"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown194.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown194(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | builder.New(0x0194); 41 | client.Send(builder, "Unknown194"); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown1E5.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | 39 | 40 | public static void Unknown1E5(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 41 | { 42 | var unk0 = packet.ReadByte(); 43 | var unk1 = packet.ReadByte(); 44 | var unk2 = packet.ReadByte(); 45 | var unk3 = packet.ReadByte(); 46 | 47 | Log.Message(string.Format("'{0}' '{1}' '{2}' '{3}'", unk0, unk1, unk2, unk3 ), ConsoleColor.White, "Received: "); 48 | 49 | 50 | builder.New(0x1E5); 51 | { 52 | 53 | 54 | 55 | } 56 | 57 | client.Send(builder, "Unknown1E5"); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown843.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown843(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x0843); 42 | { 43 | 44 | } 45 | client.Send(builder, "Unknown843"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown8C8.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown8C8(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x08C8); 42 | { 43 | builder+=0x03E8; 44 | } 45 | client.Send(builder, "Unknown8C8"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown9D6.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown9D6(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x09D6); 42 | { 43 | builder+=new byte[24]; 44 | } 45 | client.Send(builder, "Unknown9D6"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown9D8.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown9D8(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x09D8); 42 | { 43 | 44 | } 45 | client.Send(builder, "Unknown9D8"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown9DA.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown9DA(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x09DA); 42 | { 43 | 44 | } 45 | client.Send(builder, "Unknown9DA"); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/Unknown9E0.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Unknown9E0(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x09E0); 42 | { 43 | builder+=0; 44 | } 45 | 46 | client.Send(builder, "Unknown9E0"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/UnknownA0B.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void UnknownA0B(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | 41 | builder.New(0x0A0B); 42 | { 43 | builder+=new byte[422]; 44 | } 45 | 46 | client.Send(builder, "UnknownA0B"); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/Unnamed/UnknownCE9.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | /* 39 | * UnknownCE9 Packet 40 | * ------------------------- 41 | * Server2Client Structure: 42 | * 43 | * UnknownCE9 -> E2 B7 0C 00 E9 0C 01 00 00 00 00 00 44 | * 45 | * ushort : magic code 46 | * ushort : size 47 | * ushort : opcode 48 | * 49 | * uint : Unkn1 50 | * ushort : Unkn2 51 | */ 52 | 53 | public static void UnknownCE9(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 54 | { 55 | 56 | builder.New(0xCE9); 57 | { 58 | builder += 1; 59 | builder += (ushort)0; 60 | } 61 | 62 | client.Send(builder, "UnknownCE9"); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/ChangeChannel.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | partial class PacketProtocol 34 | { 35 | public static void ChangeChannel(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 36 | { 37 | if (client == null || client.RemoteEndPoint == null) return; 38 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 39 | Character character = client.Metadata["fullchar"] as Character; 40 | 41 | Authentication.UpdateOnline(syncServer, client.AccountID, false); 42 | var newServer = packet.ReadByte(); 43 | var newChannel = packet.ReadByte(); 44 | 45 | builder.New(0x085D); 46 | { 47 | builder += (int)1; 48 | } 49 | 50 | client.Send(builder,"ChangeChannel"); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/CharacterSelect.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | partial class PacketProtocol 34 | { 35 | public static void CharacterSelect(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 36 | { 37 | 38 | 39 | builder.New(0x03D9); 40 | { 41 | builder += (byte)1; 42 | } 43 | 44 | Character character = client.Metadata["fullchar"] as Character; 45 | CharacterManagement.UpdatePosition(client.Metadata["syncServer"] as SyncReceiver, (int)client.Metadata["server"], client.AccountID, character.slot, character.map, character.x, character.y); 46 | 47 | client.Send(builder, "CharacterSelect"); 48 | 49 | 50 | 51 | 52 | if (character.id!= -999999998) { 53 | character.id = -999999998; 54 | }else 55 | { 56 | Log.Error("Character ID Already -999999998!", "[Channel::CharacterSelect::CharacterSelect()]"); 57 | } 58 | 59 | 60 | 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/Connect2Svr.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void Connect(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | uint key = 0x49B4DDD1; 37 | ushort step = 0x1621; 38 | 39 | var timestamp = (uint)client.Metadata["timestamp"]; 40 | var count = (ushort)client.Metadata["count"]; 41 | 42 | client.Metadata["subTries"] = 0; 43 | 44 | builder.New(0x8C); 45 | { 46 | builder += key; // XOR Seed 47 | builder += timestamp; // AuthKey 48 | builder += count; // Index 49 | builder += step; // XOR Key Index 50 | } 51 | 52 | client.Send(builder, "Connect2Svr"); 53 | client.ChangeKey(key, step); 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/GetSvrTime.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void GetServerTime(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | builder.New(0x94); 37 | { 38 | builder += (long)(DateTime.Now - new DateTime(1970, 1, 1)).TotalSeconds; 39 | builder += (byte)76; 40 | builder += (byte)255; 41 | } 42 | 43 | client.Send(builder, "GetSvrTime"); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/PC_ErrorCode.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System.Collections.Generic; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static PacketBuilder PC_ErrorCode(object[] args) 35 | { 36 | 37 | var p = new PacketBuilder(); 38 | 39 | p.New(0x0007); 40 | { 41 | p += (ushort)args[1]; 42 | p += (ushort)args[1]; 43 | p += (ushort)args[2]; 44 | p += (ushort)args[3]; 45 | } 46 | 47 | return p; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/PC_ItemDropped.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System.Collections.Generic; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static PacketBuilder PC_ItemDropped(object[] args) 35 | { 36 | 37 | var x = (ushort)args[0]; 38 | var y = (ushort)args[1]; 39 | var id = (ushort)args[2]; 40 | var uid = (ushort)args[3]; 41 | var entity = (ushort)args[4]; 42 | 43 | var client = (ClientHandler)args[3]; 44 | Character character = client.Metadata["fullchar"] as Character; 45 | 46 | var p = new PacketBuilder(); 47 | 48 | p.New(0x00CC); 49 | { 50 | p += (ushort)args[1]; 51 | p += (ushort)args[1]; 52 | p += (ushort)args[2]; 53 | p += (ushort)args[3]; 54 | } 55 | 56 | return p; 57 | } 58 | } 59 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/Ping.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | http://board.thedivinityproject.com 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | using DItem = Minerva.Structures.Database.Item; 30 | using CItem = Minerva.Structures.Client.Item; 31 | 32 | #endregion 33 | 34 | namespace Minerva 35 | { 36 | partial class PacketProtocol 37 | { 38 | public static void Ping(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 39 | { 40 | builder.New(0x09FE); 41 | client.Send(builder, "Ping"); 42 | 43 | NewMobsList(packet, builder, client, events); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/UpdateHelpInfo.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | partial class PacketProtocol 34 | { 35 | public static void UpdateHelpInfo(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 36 | { 37 | Character character = client.Metadata["fullchar"] as Character; 38 | var clients = client.Metadata["clients"] as Dictionary; 39 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 40 | var server = (int)client.Metadata["server"]; 41 | var x = character.x; 42 | var y = character.y; 43 | var map = client.Metadata["map"] as IMap; 44 | 45 | builder.New(0x087D); 46 | { 47 | builder += (byte)1; 48 | } 49 | 50 | CharacterManagement.UpdatePosition(syncServer, server, client.AccountID, character.slot, character.map, x, y); 51 | 52 | client.Send(builder, "UpdateHelpInfo"); 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Methods/World/VerifyLinks.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class PacketProtocol 33 | { 34 | public static void VerifyLinks(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 35 | { 36 | var timestamp = (ulong)packet.ReadInt(); 37 | var count = (ulong)packet.ReadShort(); 38 | var newChannel = packet.ReadByte(); 39 | var oldChannel = packet.ReadByte(); 40 | var magickey = packet.ReadInt(); 41 | 42 | var key = (count << 32) + timestamp; 43 | 44 | var syncServer = client.Metadata["syncServer"] as SyncReceiver; 45 | Authentication.AddUser(syncServer, key, client.AccountID); 46 | Authentication.UpdateOnline(syncServer, client.AccountID, true); 47 | 48 | builder.New(0x8D); 49 | { 50 | builder += newChannel; // server 51 | builder += oldChannel; // channel 52 | builder += (byte)0; 53 | } 54 | 55 | client.Send(builder, "VerifyLinks"); 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Structures/Client/IClientStructure.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva.Structures.Client 25 | { 26 | public interface ClientHandlerStructure 27 | { 28 | /// Converts this Client structure to the equivalent Database structure. 29 | dynamic ToDatabase(); 30 | } 31 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Packets/Structures/Database/IDatabaseStructure.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva.Structures.Database 25 | { 26 | public interface IDatabaseStructure 27 | { 28 | /// 29 | /// Converts this Database structure to the equivalent Client structure. 30 | /// 31 | /// Value to pass to method. 32 | /// 33 | dynamic ToClient(dynamic d = null); 34 | } 35 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Program.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | class Program 27 | { 28 | static Server svr; 29 | 30 | static void Main(string[] args) 31 | { 32 | if (args.Length < 2) 33 | svr = new Server(1, 1); 34 | else 35 | svr = new Server(int.Parse(args[0]), int.Parse(args[1])); 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Minerva Channel Server")] 9 | [assembly: AssemblyDescription("CABAL Online Server Emulator - Channel Server")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("CentrinoGames")] 12 | [assembly: AssemblyProduct("Minerva")] 13 | [assembly: AssemblyCopyright("Copyright © The Divinity Project 2010; Dignity Team 2013-2016; CentrinoGames 2018.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ba8bd527-4a09-4209-8334-f19677c1291e")] 24 | [assembly: AssemblyVersionAttribute("1.0.0.1")] 25 | [assembly: AssemblyFileVersion("2.3.0.0")] 26 | -------------------------------------------------------------------------------- /src/Daemons/Channel/SkillData.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class SkillData 33 | { 34 | public int ID; 35 | public int Type; 36 | public int Amp; 37 | public int Attack; 38 | public int Critical; 39 | 40 | 41 | public SkillData(int id, int type, int samp, int atk, int critdmg) 42 | { 43 | ID = id; 44 | Type = type; 45 | Amp = samp; 46 | Attack = atk; 47 | Critical = critdmg; 48 | 49 | } 50 | } 51 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Structures.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | struct WarpIndex 27 | { 28 | public int X; 29 | public int Y; 30 | public int CapX; 31 | public int CapY; 32 | public int ProX; 33 | public int ProY; 34 | public int WCode; // no idea what this is, yet 35 | public int Fee; 36 | public int WorldID; 37 | public int Level; 38 | 39 | public WarpIndex(int x, int y, int capx, int capy, int prox, int proy, int wcode, int fee, int world, int level) : this() 40 | { 41 | X = x; 42 | Y = y; 43 | CapX = capx; 44 | CapY = capy; 45 | ProX = prox; 46 | ProY = proy; 47 | WCode = wcode; 48 | Fee = fee; 49 | WorldID = world; 50 | Level = level; 51 | } 52 | } 53 | 54 | struct WarpList 55 | { 56 | public int Order; 57 | public int Type; 58 | public int TargetID; 59 | public int Level; 60 | public int Fee; 61 | public int ItemID; 62 | public int ItemOpt; 63 | public int QuestID; 64 | public bool IsGPSVisible; 65 | 66 | public WarpList(int order, int type, int target, int level, int fee, int item, int opt, int quest, bool gps) : this() 67 | { 68 | Order = order; 69 | Type = type; 70 | TargetID = target; 71 | Level = level; 72 | Fee = fee; 73 | ItemID = item; 74 | ItemOpt = opt; 75 | QuestID = quest; 76 | IsGPSVisible = gps; 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/Util/Configuration.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Net; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | // Config-loading class 34 | public class Configuration 35 | { 36 | 37 | public static bool channelLog; 38 | public static int channelLogLvl; 39 | 40 | public static IPAddress channelIp; 41 | public static int channelPort; 42 | public static int channelType; 43 | public static int maxPlayers; 44 | 45 | public static string masterIP; 46 | public static int masterPort; 47 | 48 | public static void Load(string name) 49 | { 50 | var conf = new IniReader(string.Format("conf/{0}.ini", name)); 51 | 52 | channelLog = Convert.ToBoolean(conf.GetValue("debug", "use", 0)); 53 | channelLogLvl = conf.GetValue("debug", "level", 0); 54 | 55 | channelIp = IPAddress.Parse(conf.GetValue("listen", "ip", "127.0.0.1")); 56 | channelPort = conf.GetValue("listen", "port", 0); 57 | channelType = conf.GetValue("channel", "type", 0); 58 | maxPlayers = conf.GetValue("channel", "max_players", 0); 59 | 60 | masterIP = conf.GetValue("master", "ip", "localhost"); 61 | masterPort = conf.GetValue("master", "port", 0); 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /src/Daemons/Channel/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Daemons/Channel/ucm.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/src/Daemons/Channel/ucm.ico -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Main.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System.Collections.Generic; 27 | 28 | using PacketInfo = System.Tuple; 29 | 30 | #endregion 31 | 32 | namespace Minerva 33 | { 34 | partial class PacketProtocol 35 | { 36 | public static void Initialise(Dictionary methods, Dictionary constructors) 37 | { 38 | methods[0x065] = new PacketInfo("Connect2Svr", Connect); 39 | methods[0x066] = new PacketInfo("VerifyLinks", VerifyLinks); 40 | methods[0x067] = new PacketInfo("AuthAccount", AuthAccount); 41 | methods[0x07A] = new PacketInfo("CheckVersion", CheckVersion); 42 | methods[0x7D1] = new PacketInfo("PublicKey", PublicKey); 43 | methods[0x7D2] = new PacketInfo("PreServerEnvRequest", PreServerEnvRequest); 44 | methods[0x7D6] = new PacketInfo("Unknown_7D6", Unknown_7D6); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/AuthAccount.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * AuthAccount Packet 31 | * ------------------------- 32 | * Client2Server Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * int : padding 37 | * ushort : opcode 38 | * 39 | * int : unk1 40 | * ------------------------- 41 | * Server2Client Structure: 42 | * 43 | * ushort : magic code 44 | * ushort : size 45 | * ushort : opcode 46 | * 47 | * int : status # server status 48 | */ 49 | #endregion 50 | 51 | public static void AuthAccount(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 52 | { 53 | builder.New(0x67); 54 | { 55 | builder += (int)ServerStatus.Online; 56 | } 57 | 58 | client.Send(builder, "AuthAccount"); 59 | 60 | Unknown_7D5(packet, builder, client, events); 61 | } 62 | } 63 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/Connect2Svr.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * Connect2Svr Packet 31 | * ------------------------- 32 | * Client2Server Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * int : padding 37 | * ushort : opcode 38 | * 39 | * uint : auth key #timestamp 40 | * ------------------------- 41 | * Server2Client Structure: 42 | * 43 | * ushort : magic code 44 | * ushort : size 45 | * ushort : opcode 46 | * 47 | * uint : xor seed 48 | * uint : auth key #timestamp 49 | * ushort : index #user idx 50 | * ushort : xor key index 51 | */ 52 | #endregion 53 | 54 | public static void Connect(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 55 | { 56 | uint key = 0x49B4DDD1; 57 | ushort step = 0x1621; 58 | 59 | uint timestamp = (uint)client.Metadata["timestamp"]; 60 | ushort count = (ushort)client.Metadata["count"]; 61 | 62 | builder.New(0x65); 63 | { 64 | builder += key; // XOR Seed 65 | builder += timestamp; // AuthKey 66 | builder += count; // Index 67 | builder += step; // XOR Key Index 68 | } 69 | 70 | client.ChangeKey(key, step); 71 | 72 | client.Send(builder, "Connect2Svr"); 73 | } 74 | } 75 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/PreServerEnvRequest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * PreServerEnvRequest Packet 31 | * ------------------------- 32 | * Client2Server Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * int : padding 37 | * ushort : opcode 38 | * 39 | * char : login id #max length is 16 40 | * byte[] : unk1 #array length is 49 41 | * ------------------------- 42 | * Server2Client Structure: 43 | * 44 | * ushort : magic code 45 | * ushort : size 46 | * ushort : opcode 47 | * 48 | * byte[] : unk1 #array length is 4108 49 | */ 50 | #endregion 51 | 52 | public static void PreServerEnvRequest(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 53 | { 54 | builder.New(0x7D2); 55 | { 56 | builder += new byte[4108]; 57 | } 58 | 59 | client.Send(builder, "PreServerEnvRequest"); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/PublicKey.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * SystemMessg Packet 31 | * ------------------------- 32 | * Client2Server Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * int : padding 37 | * ushort : opcode 38 | * ------------------------- 39 | * Server2Client Structure: 40 | * 41 | * ushort : magic code 42 | * ushort : size 43 | * ushort : opcode 44 | * 45 | * byte : unk1 46 | * ushort : public key length 47 | * byte[] : public key 48 | * ------------------------- 49 | * Key Length determines the length of encrypted data in Unknown_7D6 packet 50 | */ 51 | #endregion 52 | 53 | public static void PublicKey(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 54 | { 55 | var rsa = new RSA(); 56 | 57 | client.Metadata["rsa"] = rsa; 58 | 59 | builder.New(0x7D1); 60 | { 61 | builder += (byte)1; 62 | builder += rsa.KeyLength; 63 | builder += rsa.PublicKey; 64 | } 65 | 66 | client.Send(builder, "PublicKey"); 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/SystemMessg.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | using System; 25 | using System.Text; 26 | 27 | namespace Minerva 28 | { 29 | partial class PacketProtocol 30 | { 31 | #region PacketInfo 32 | /* 33 | * SystemMessg Packet 34 | * ------------------------- 35 | * Server2Client Structure: 36 | * 37 | * ushort : magic code 38 | * ushort : size 39 | * ushort : opcode 40 | * 41 | * byte : status # system message status 42 | * short : unk1 43 | */ 44 | #endregion 45 | 46 | public static void SystemMessg(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 47 | { 48 | builder.New(0x78); 49 | { 50 | builder += (byte)SystemMsg.None; 51 | builder += (short)0; 52 | } 53 | 54 | client.Send(builder, "SystemMessg"); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/URLToClient.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * URLToClient Packet 31 | * ------------------------- 32 | * Server2Client Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * ushort : opcode 37 | * 38 | * short : data length # unconfirmed 39 | * short : unk1 40 | * 41 | * uint : url1 length 42 | * char : url1 43 | * uint : url2 length 44 | * char : url2 45 | * ... 46 | */ 47 | #endregion 48 | 49 | public static void URLToClient(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 50 | { 51 | var conf = client.Metadata["conf"] as Configuration; 52 | 53 | if (conf == null) 54 | return; 55 | 56 | string cash = conf.Cash; 57 | string cash_charge = conf.CashCharge; 58 | string guild = conf.GuildBoard; 59 | 60 | builder.New(0x80); 61 | { 62 | builder += (short)0x92; 63 | builder += (short)0x90; 64 | builder += cash.Length; 65 | builder += cash; 66 | builder += 0; 67 | builder += cash_charge.Length; 68 | builder += cash_charge; 69 | builder += guild.Length; 70 | builder += guild; 71 | builder += 0; 72 | } 73 | 74 | client.Send(builder, "URLToClient"); 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Packets/Methods/Unknown_7D5.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class PacketProtocol 27 | { 28 | #region PacketInfo 29 | /* 30 | * Unknown_7D5 Packet 31 | * ------------------------- 32 | * Server2Client Structure: 33 | * 34 | * ushort : magic code 35 | * ushort : size 36 | * ushort : opcode 37 | * 38 | * int : unk1 #might be ip address, unconfirmed 39 | * int : unk2 40 | * byte : unk3 41 | */ 42 | #endregion 43 | 44 | public static void Unknown_7D5(PacketReader packet, PacketBuilder builder, ClientHandler client, EventHandler events) 45 | { 46 | builder.New(0x7D5); 47 | { 48 | builder += (ushort)0xD4C0; 49 | builder += 1; 50 | builder += (short)0x00; 51 | builder += (byte)0xB7; 52 | } 53 | 54 | client.Send(builder, "Unknown_7D5"); 55 | } 56 | } 57 | } -------------------------------------------------------------------------------- /src/Daemons/Login/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Minerva Login Server")] 9 | [assembly: AssemblyDescription("CABAL Online Server Emulator - Login Server")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("CentrinoGames")] 12 | [assembly: AssemblyProduct("Minerva")] 13 | [assembly: AssemblyCopyright("Copyright © The Divinity Project 2010; Dignity Team 2013-2016; CentrinoGames 2018.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ba8bd527-4a09-4209-8334-f19677c1291e")] 24 | [assembly: AssemblyVersionAttribute("1.0.0.1")] 25 | [assembly: AssemblyFileVersion("2.3.0.0")] 26 | -------------------------------------------------------------------------------- /src/Daemons/Login/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Daemons/Login/uch.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/src/Daemons/Login/uch.ico -------------------------------------------------------------------------------- /src/Daemons/Master/Handler/DBsHandler.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System.Collections.Generic; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class SyncHandler 33 | { 34 | DatabaseHandler loginDB; 35 | Dictionary serverDBs; 36 | 37 | public void SetLoginDBHandler(DatabaseHandler loginDB) 38 | { 39 | this.loginDB = loginDB; 40 | } 41 | 42 | public void SetServerDBHandler(Dictionary serverDBs) 43 | { 44 | this.serverDBs = serverDBs; 45 | } 46 | 47 | public DatabaseHandler GetLoginDBHandler() 48 | { 49 | return loginDB; 50 | } 51 | 52 | public DatabaseHandler GetServerDBHandler(int server) 53 | { 54 | return serverDBs[server]; 55 | } 56 | 57 | public void AddServerDB(byte server, DatabaseHandler database) 58 | { 59 | serverDBs[server] = database; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Daemons/Master/Handler/UsersHandler.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System.Collections.Generic; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | partial class SyncHandler 33 | { 34 | Dictionary users; 35 | 36 | public void SetUsersData(Dictionary users) 37 | { 38 | this.users = users; 39 | } 40 | 41 | public bool UserExists(ulong magic) 42 | { 43 | lock (users) 44 | { 45 | return users.ContainsKey(magic); 46 | } 47 | } 48 | 49 | public void AddUser(ulong magic, int id) 50 | { 51 | lock (users) 52 | { 53 | users.Add(magic, id); 54 | Log.Notice("User added: " + magic.ToString("X2")); 55 | } 56 | } 57 | 58 | public int GetUser(ulong magic) 59 | { 60 | lock (users) 61 | { 62 | var id = users[magic]; 63 | users.Remove(magic); 64 | Log.Notice("User retrieved: " + magic.ToString("X2")); 65 | 66 | return id; 67 | } 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /src/Daemons/Master/IPC Calls/Authentication.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | namespace Minerva 25 | { 26 | partial class IPCProtocol 27 | { 28 | void HeartBeat(IPCReceiver receiver, IPCReader data, SyncHandler sync) 29 | { 30 | var packet = new IPCWriter(IPC.HeartBeat); 31 | receiver.Send(packet); 32 | } 33 | 34 | void AddUser(IPCReceiver receiver, IPCReader data, SyncHandler sync) 35 | { 36 | var magic = data.ReadUInt64(); 37 | var id = data.ReadInt32(); 38 | 39 | if (!sync.UserExists(magic)) 40 | sync.AddUser(magic, id); 41 | } 42 | 43 | void GetUser(IPCReceiver receiver, IPCReader data, SyncHandler sync) 44 | { 45 | var magic = data.ReadUInt64(); 46 | var packet = new IPCWriter(IPC.GetUser); 47 | 48 | if (!sync.UserExists(magic)) 49 | { 50 | packet.Write(-1); 51 | receiver.Send(packet); 52 | return; 53 | } 54 | 55 | var id = sync.GetUser(magic); 56 | packet.Write(id); 57 | receiver.Send(packet); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Daemons/Master/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Minerva Master Server")] 9 | [assembly: AssemblyDescription("CABAL Online Server Emulator - Master Server")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("CentrinoGames")] 12 | [assembly: AssemblyProduct("Minerva")] 13 | [assembly: AssemblyCopyright("Copyright © The Divinity Project 2010; Dignity Team 2013-2016; CentrinoGames 2018.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("47778525-ba7c-41d2-9ca7-0bb53d779f06")] 24 | [assembly: AssemblyVersionAttribute("1.0.0.1")] 25 | [assembly: AssemblyFileVersion("2.3.0.0")] 26 | -------------------------------------------------------------------------------- /src/Daemons/Master/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Daemons/Master/uchh.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/programmerzlp/Minerva/c17378f089a577ec7d0e59635c3852e89c7d0f26/src/Daemons/Master/uchh.ico -------------------------------------------------------------------------------- /src/Databases/MySQL/Main.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | using MySql.Data.MySqlClient; 29 | 30 | #endregion 31 | 32 | namespace Minerva 33 | { 34 | public partial class DatabaseProtocol : IDatabaseProtocol 35 | { 36 | MySqlConnection sql; 37 | MySqlDataReader reader; 38 | 39 | public DatabaseProtocol(string ip, string db, string user, string pass) 40 | { 41 | sql = new MySqlConnection(string.Format("Server={0};Database={1};User={2};Password={3};convert zero datetime=true", ip, db, user, pass)); 42 | } 43 | 44 | void Cleanup() 45 | { 46 | if (reader != null && !reader.IsClosed) 47 | reader.Close(); 48 | } 49 | 50 | public void Connect() 51 | { 52 | sql.Open(); 53 | } 54 | 55 | public void Disconnect() 56 | { 57 | reader.Close(); 58 | reader.Dispose(); 59 | reader = null; 60 | 61 | sql.Close(); 62 | sql.Dispose(); 63 | sql = null; 64 | } 65 | 66 | public object this[string key] 67 | { 68 | get 69 | { 70 | return reader[key]; 71 | } 72 | } 73 | 74 | public bool ReadRow() 75 | { 76 | return reader.Read(); 77 | } 78 | } 79 | } -------------------------------------------------------------------------------- /src/Databases/MySQL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Minerva MySQL Library")] 9 | [assembly: AssemblyDescription("Minerva Shared Library")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("CentrinoGames")] 12 | [assembly: AssemblyProduct("Minerva")] 13 | [assembly: AssemblyCopyright("Copyright © The Divinity Project 2010; Dignity Team 2013-2016; CentrinoGames 2018.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("17397e37-4646-40fe-93cc-68cf1d5e43a7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("2.0.0.0")] 37 | -------------------------------------------------------------------------------- /src/Databases/MySQL/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Databases/MySQL/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ASockets/Domain/Enumerations.cs: -------------------------------------------------------------------------------- 1 | namespace AwesomeSockets 2 | { 3 | public enum SockType 4 | { 5 | Tcp, 6 | Udp 7 | } 8 | 9 | public enum SocketCommunicationTypes 10 | { 11 | Blocking, 12 | NonBlocking 13 | } 14 | 15 | public enum KeySizes 16 | { 17 | OneTwenyEight = 128, 18 | OneNinetyTwo = 192, 19 | TwoFiftySix = 256 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ASockets/Domain/Exceptions/BufferFinalizedException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AwesomeSockets 4 | { 5 | public class BufferFinalizedException : Exception 6 | { 7 | public BufferFinalizedException(string message) : base(message) 8 | { 9 | //here just for chained constructor 10 | } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ASockets/Domain/SocketModifiers/ISocketModifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace AwesomeSockets 7 | { 8 | public interface ISocketModifier 9 | { 10 | ISocket Apply(ISocket socket); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ASockets/Domain/SocketModifiers/MulticastSocketModifier.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Sockets; 6 | using System.Text; 7 | 8 | namespace AwesomeSockets 9 | { 10 | public class MulticastSocketModifier : ISocketModifier 11 | { 12 | //These are RFC included values 13 | private readonly IPAddress multicastIPAddress = IPAddress.Parse("224.168.100.2"); 14 | 15 | public ISocket Apply(ISocket socket) 16 | { 17 | //TODO: Need to check if socket is UDP as Multicast only works with UDP... 18 | AweSock.SetSockOpt(socket, new Dictionary 19 | { 20 | { SocketOptionName.AddMembership, new MulticastOption(multicastIPAddress, IPAddress.Parse("127.0.0.1")) } 21 | }); 22 | return socket; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ASockets/Domain/Sockets/ISocket.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Net; 4 | using System.Net.Sockets; 5 | 6 | namespace AwesomeSockets 7 | { 8 | public interface ISocket 9 | { 10 | void SetGlobalConfiguration(Dictionary opts); 11 | Socket GetSocket(); 12 | 13 | ISocket Accept(); 14 | void Connect(EndPoint remoteEndPoint); 15 | 16 | int SendMessage(Buffer buffer); 17 | int SendMessage(string ip, int port, Buffer buffer); 18 | 19 | Tuple ReceiveMessage(Buffer buffer); 20 | Tuple ReceiveMessage(string ip, int port, Buffer buffer); 21 | 22 | EndPoint GetRemoteEndPoint(); 23 | ProtocolType GetProtocolType(); 24 | 25 | int GetBytesAvailable(); 26 | 27 | void Close(int timeout = 0); 28 | 29 | ISocket WithModifier() where T : ISocketModifier, new(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/ObjectBuddy/ChannelData.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class ServerData 33 | { 34 | public int id { get; set; } 35 | public ChannelData[] channels { get; set; } 36 | 37 | public ServerData(int id, int num) 38 | { 39 | this.id = id; 40 | channels = new ChannelData[num]; 41 | } 42 | } 43 | 44 | public class ChannelData 45 | { 46 | public int id { get; set; } 47 | public int type { get; set; } 48 | public uint ip { get; set; } 49 | public short port { get; set; } 50 | public short maxPlayers { get; set; } 51 | public short curPlayers { get; set; } 52 | 53 | public ChannelData(int id, int type, uint ip, short port, short maxPlayers, short curPlayers) 54 | { 55 | this.id = id; 56 | this.type = type; 57 | this.ip = ip; 58 | this.port = port; 59 | this.maxPlayers = maxPlayers; 60 | this.curPlayers = curPlayers; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/ObjectBuddy/EventArgs/Connect.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Net.Sockets; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | public class ConnectEventArgs : EventArgs 34 | { 35 | private TcpClient _client; 36 | private string _ip; 37 | private DateTime _time; 38 | 39 | public TcpClient Client { get { return _client; } } 40 | public string IP { get { return _ip; } } 41 | public DateTime Time { get { return _time; } } 42 | 43 | public ConnectEventArgs(ref TcpClient client, string ip) 44 | { 45 | _client = client; 46 | _ip = ip; 47 | _time = DateTime.Now; 48 | } 49 | } 50 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/EventArgs/IPC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class IPCPacketEventArgs : EventArgs 33 | { 34 | private IPC _opcode; 35 | private int _length; 36 | private DateTime _time; 37 | 38 | public IPC Opcode { get { return _opcode; } } 39 | public int Length { get { return _length; } } 40 | public DateTime Time { get { return _time; } } 41 | 42 | public IPCPacketEventArgs(IPC opcode, int length) 43 | { 44 | _opcode = opcode; 45 | _length = length; 46 | _time = DateTime.Now; 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/EventArgs/Login.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class LoginEventArgs : EventArgs 33 | { 34 | private string _username; 35 | private string _password; 36 | private int _account; 37 | private string _ip; 38 | private DateTime _time; 39 | private LoginResult _result; 40 | 41 | public string Username { get { return _username; } } 42 | public string Password { get { return _password; } } 43 | public int Account { get { return _account; } } 44 | public string IP { get { return _ip; } } 45 | public DateTime Time { get { return _time; } } 46 | public LoginResult Result { get { return _result; } } 47 | 48 | public LoginEventArgs(string user, string pass, string ip, LoginResult result = LoginResult.None, int account = 0) 49 | { 50 | _username = user; 51 | _password = pass; 52 | _account = account; 53 | _ip = ip; 54 | _time = DateTime.Now; 55 | _result = result; 56 | } 57 | } 58 | 59 | public enum LoginResult : byte 60 | { 61 | None, 62 | Success, 63 | UnknownUsername, 64 | WrongPassword, 65 | OutOfService 66 | } 67 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/EventArgs/Misc.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class PacketEventArgs : EventArgs 33 | { 34 | private string _ip; 35 | private string _name; 36 | private ushort _opcode; 37 | private int _length; 38 | private DateTime _time; 39 | 40 | public string IP { get { return _ip; } } 41 | public string Name { get { return _name; } } 42 | public ushort Opcode { get { return _opcode; } } 43 | public int Length { get { return _length; } } 44 | public DateTime Time { get { return _time; } } 45 | 46 | public PacketEventArgs(string ip, string name, ushort opcode, int length) 47 | { 48 | _ip = ip; 49 | _name = name; 50 | _opcode = opcode; 51 | _length = length; 52 | _time = DateTime.Now; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/EventArgs/VersionCheck.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class VersionCheckEventArgs : EventArgs 33 | { 34 | private int _version; 35 | private string _ip; 36 | private DateTime _time; 37 | private VersionCheckResult _result; 38 | 39 | public int Version { get { return _version; } } 40 | public string IP { get { return _ip; } } 41 | public DateTime Time { get { return _time; } } 42 | public VersionCheckResult Result { get { return _result; } } 43 | 44 | public VersionCheckEventArgs(int version, string ip, VersionCheckResult result) 45 | { 46 | _version = version; 47 | _ip = ip; 48 | _time = DateTime.Now; 49 | _result = result; 50 | } 51 | } 52 | 53 | public enum VersionCheckResult : byte 54 | { 55 | None, 56 | Match, 57 | OlderClient, 58 | NewerClient 59 | } 60 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/IPC/IPC.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public enum IPC : byte 33 | { 34 | None, 35 | /* SHARED_IPC */ 36 | HeartBeat, 37 | AddUser, 38 | GetUser, 39 | //---------------------------- 40 | /* LOGIN_IPC */ 41 | FetchAccount, 42 | UpdateIPDate, 43 | UpdateOnline, 44 | //---------------------------- 45 | /* CHANNEL_IPC */ 46 | ChannelList, 47 | RegisterChannel, 48 | //---------------------------- 49 | /* SUBPASS_IPC */ 50 | GetSubPass, 51 | SetSubPass, 52 | GetSubPassQuestion, 53 | CheckSubPassAnswer, 54 | CheckSubPass, 55 | RemoveSubPass, 56 | GetSubPassTime, 57 | SetSubPassTime, 58 | //---------------------------- 59 | /* CHARACTER_IPC */ 60 | CreateCharacter, 61 | DeleteCharacter, 62 | GetCharacterList, 63 | VerifyPassword, 64 | UpdatePosition, 65 | GetFullCharacter, 66 | SetQuickSlots, 67 | SetSlotOrder, 68 | GetSlotOrder, 69 | UpdateStatPoints, 70 | UpdateSkillPoints, 71 | RemoveUser, 72 | GetCashItemList, 73 | SetCashItem 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/ObjectBuddy/IPC/IPCReader.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Linq; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | public class IPCReader 34 | { 35 | AwesomeSockets.Buffer packet; 36 | public IPC Opcode 37 | { 38 | get 39 | { 40 | if (packet == null) 41 | return IPC.None; 42 | 43 | return (IPC)AwesomeSockets.Buffer.Get(packet); 44 | } 45 | } 46 | public int Size { get { return packet.GetSize(); } } 47 | 48 | public IPCReader(AwesomeSockets.Buffer packet) 49 | { 50 | this.packet = packet; 51 | } 52 | 53 | public bool ReadBoolean() { return AwesomeSockets.Buffer.Get(packet); } 54 | public byte ReadByte() { return AwesomeSockets.Buffer.Get(packet); } 55 | public sbyte ReadSByte() { return AwesomeSockets.Buffer.Get(packet); } 56 | public ushort ReadUInt16() { return AwesomeSockets.Buffer.Get(packet); } 57 | public short ReadInt16() { return AwesomeSockets.Buffer.Get(packet); } 58 | public uint ReadUInt32() { return AwesomeSockets.Buffer.Get(packet); } 59 | public int ReadInt32() { return AwesomeSockets.Buffer.Get(packet); } 60 | public ulong ReadUInt64() { return AwesomeSockets.Buffer.Get(packet); } 61 | public long ReadInt64() { return AwesomeSockets.Buffer.Get(packet); } 62 | public string ReadString() { return AwesomeSockets.Buffer.Get(packet); } 63 | public byte[] ReadBytes(int length) { return AwesomeSockets.Buffer.GetBytes(packet,length); } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/ObjectBuddy/IPC/IPCWriter.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | 28 | #endregion 29 | 30 | namespace Minerva 31 | { 32 | public class IPCWriter 33 | { 34 | AwesomeSockets.Buffer packet; 35 | public IPC Opcode { get; private set; } 36 | public int Size { get { return packet.GetSize(); } } 37 | 38 | public IPCWriter(IPC opcode) 39 | { 40 | Opcode = opcode; 41 | packet = AwesomeSockets.Buffer.New(); 42 | AwesomeSockets.Buffer.ClearBuffer(packet); 43 | AwesomeSockets.Buffer.Add(packet, (byte)opcode); 44 | } 45 | 46 | public AwesomeSockets.Buffer GetRawPacket() 47 | { 48 | return packet; 49 | } 50 | 51 | public void Write(bool value) { AwesomeSockets.Buffer.Add(packet, value); } 52 | public void Write(byte value) { AwesomeSockets.Buffer.Add(packet, value); } 53 | public void Write(sbyte value) { AwesomeSockets.Buffer.Add(packet, value); } 54 | public void Write(ushort value) { AwesomeSockets.Buffer.Add(packet, value); } 55 | public void Write(short value) { AwesomeSockets.Buffer.Add(packet, value); } 56 | public void Write(uint value) { AwesomeSockets.Buffer.Add(packet, value); } 57 | public void Write(int value) { AwesomeSockets.Buffer.Add(packet, value); } 58 | public void Write(ulong value) { AwesomeSockets.Buffer.Add(packet, value); } 59 | public void Write(long value) { AwesomeSockets.Buffer.Add(packet, value); } 60 | public void Write(string value) { AwesomeSockets.Buffer.Add(packet, value); } 61 | public void Write(byte[] value) { AwesomeSockets.Buffer.Add(packet, value); } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/ObjectBuddy/Interfaces/IMap.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team. 3 | All rights reserved. 4 | https://github.com/dignityteam/minerva 5 | http://www.ragezone.com 6 | 7 | 8 | This file is part of Minerva. 9 | 10 | Minerva is free software: you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation, either version 3 of the License, or 13 | any later version. 14 | 15 | Minerva is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License 21 | along with Minerva. If not, see . 22 | */ 23 | 24 | #region Includes 25 | 26 | using System; 27 | using System.Collections.Generic; 28 | 29 | #endregion 30 | 31 | namespace Minerva 32 | { 33 | public interface IMap 34 | { 35 | int ID { get; set; } 36 | void MoveClient(ClientHandler client, int gridRow, int gridColumn); 37 | void RemoveClient(ClientHandler client); 38 | List GetSurroundingClients(int gridRow, int gridColumn, int radius); 39 | List GetSurroundingClients(ClientHandler client, int radius); 40 | int[] GetDeathDestination(); 41 | int[] GetWarpDestination(int npc, int order); 42 | void DropItem(int x, int y, int id, uint entity, uint owner, uint party = 0, int bonus = 0, int amount = 0, uint expiration = 0, int craft = 0, int craftBonus = 0, int upgrades = 0, int upgrade1 = 0, int upgrade2 = 0, int upgrade3 = 0, int upgrade4 = 0); 43 | byte[] LootItem(ClientHandler client, uint uid); 44 | List GetSurroundingMobs(ClientHandler client, int radius); 45 | List GetSurroundingMobsData(ClientHandler client, int radius); 46 | List GetMobsData { get; } 47 | void GetTile(ClientHandler client, int x, int y); 48 | void UpdateCells(ClientHandler client); 49 | } 50 | } -------------------------------------------------------------------------------- /src/ObjectBuddy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Minerva ObjectBuddy")] 9 | [assembly: AssemblyDescription("Minerva Shared Library")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("CentrinoGames")] 12 | [assembly: AssemblyProduct("Minerva")] 13 | [assembly: AssemblyCopyright("Copyright © The Divinity Project 2010; Dignity Team 2013-2016; CentrinoGames 2018.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("90a2604b-6808-4e8b-9232-56af769d6e23")] 24 | [assembly: AssemblyVersionAttribute("1.0.0.1")] 25 | [assembly: AssemblyFileVersion("2.3.0.0")] 26 | -------------------------------------------------------------------------------- /src/ObjectBuddy/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/ObjectBuddy/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | --------------------------------------------------------------------------------