├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ └── Build_Proxy.yml ├── .gitignore ├── Framework ├── Collections │ ├── Array.cs │ └── StringArray.cs ├── Constants │ ├── Authentication │ │ └── BattlenetConst.cs │ ├── ClientVersionBuild.cs │ ├── ConnectConst.cs │ ├── Locale.cs │ └── ServiceHash.cs ├── Cryptography │ ├── HashHelper.cs │ ├── PacketCrypt.cs │ ├── RsaCrypt.cs │ ├── SARC4.cs │ ├── SessionKeyGeneration.cs │ └── ShaHmac.cs ├── Debugging │ └── Errors.cs ├── Framework.csproj ├── GameMath │ ├── AxisAlignedBox.cs │ ├── CollisionDetection.cs │ ├── EulerAngles.cs │ ├── Matrix2.cs │ ├── Matrix3.cs │ ├── Matrix4.cs │ ├── Plane.cs │ ├── Position.cs │ ├── Quaternion.cs │ ├── Ray.cs │ ├── Vector2.cs │ ├── Vector3.cs │ └── Vector4.cs ├── IO │ ├── ByteBuffer.cs │ ├── SocketBuffer.cs │ ├── StringArguments.cs │ └── Zlib │ │ ├── Adler32.cs │ │ ├── Crc32.cs │ │ ├── Deflate.cs │ │ ├── Trees.cs │ │ ├── ZLib.cs │ │ ├── ZUtil.cs │ │ └── compress.cs ├── Logging │ └── Log.cs ├── Networking │ ├── AsyncAcceptor.cs │ ├── NetworkThread.cs │ ├── NetworkUtils.cs │ ├── SSLSocket.cs │ ├── SocketBase.cs │ └── SocketManager.cs ├── Proto │ ├── AccountService.cs │ ├── AccountTypes.cs │ ├── Api │ │ ├── V1 │ │ │ └── ChannelId.cs │ │ └── V2 │ │ │ ├── AttributeTypes.cs │ │ │ ├── ReportService.cs │ │ │ └── ReportTypes.cs │ ├── AttributeTypes.cs │ ├── AuthenticationService.cs │ ├── ChallengeService.cs │ ├── ChannelTypes.cs │ ├── ClubBan.cs │ ├── ClubCore.cs │ ├── ClubEnum.cs │ ├── ClubInvitation.cs │ ├── ClubMember.cs │ ├── ClubMemberId.cs │ ├── ClubMembershipListener.cs │ ├── ClubMembershipService.cs │ ├── ClubMembershipTypes.cs │ ├── ClubNotification.cs │ ├── ClubRangeSet.cs │ ├── ClubRequest.cs │ ├── ClubRole.cs │ ├── ClubStream.cs │ ├── ClubTypes.cs │ ├── ConnectionService.cs │ ├── ContentHandleTypes.cs │ ├── EmbedTypes.cs │ ├── EntityTypes.cs │ ├── EtsTypes.cs │ ├── EventViewTypes.cs │ ├── FriendsService.cs │ ├── FriendsTypes.cs │ ├── GameUtilitiesService.cs │ ├── GameUtilitiesTypes.cs │ ├── GlobalExtensions │ │ ├── FieldOptions.cs │ │ ├── MessageOptions.cs │ │ ├── MethodOptions.cs │ │ ├── Range.cs │ │ ├── Routing.cs │ │ └── ServiceOptions.cs │ ├── Google │ │ └── Protobuf │ │ │ └── Descriptor.cs │ ├── InvitationTypes.cs │ ├── MessageTypes.cs │ ├── NotificationTypes.cs │ ├── PresenceListener.cs │ ├── PresenceService.cs │ ├── PresenceTypes.cs │ ├── ProfanityFilterConfig.cs │ ├── ReportService.cs │ ├── ReportTypes.cs │ ├── ResourceService.cs │ ├── RoleTypes.cs │ ├── RpcConfig.cs │ ├── RpcTypes.cs │ ├── UserManagerService.cs │ ├── UserManagerTypes.cs │ └── VoiceTypes.cs ├── Serialization │ └── Json.cs ├── Singleton │ └── Singleton.cs ├── Util │ ├── CollectionExtensions.cs │ ├── Extensions.cs │ ├── MathFunctions.cs │ ├── Network.cs │ ├── ProtobufExtensions.cs │ ├── RandomHelper.cs │ ├── Time.cs │ └── Utility.cs └── Web │ ├── API │ └── ApiRequest.cs │ ├── Http.cs │ └── Rest │ ├── Authentication │ ├── LogonData.cs │ └── LogonResult.cs │ ├── Forms │ ├── FormInput.cs │ ├── FormInputValue.cs │ └── FormInputs.cs │ ├── Misc │ ├── Address.cs │ ├── AddressFamily.cs │ ├── ClientVersion.cs │ └── RealmCharacterCountEntry.cs │ └── Realmlist │ ├── RealmCharacterCountList.cs │ ├── RealmEntry.cs │ ├── RealmListServerIPAddresses.cs │ ├── RealmListTicketClientInformation.cs │ ├── RealmListTicketIdentity.cs │ ├── RealmListTicketInformation.cs │ ├── RealmListUpdate.cs │ └── RealmListUpdates.cs ├── HermesProxy.sln ├── HermesProxy ├── Auth │ ├── AuthClient.cs │ ├── AuthCommand.cs │ ├── AuthResult.cs │ └── RealmInfo.cs ├── BNetServer.pfx ├── BnetServer │ ├── Managers │ │ ├── BnetSessionTicketStorage.cs │ │ └── LoginServiceManager.cs │ ├── Networking │ │ ├── BnetRestApiSession.cs │ │ ├── BnetServerCertificate.cs │ │ └── BnetTcpSession.cs │ └── Services │ │ ├── BnetServices.ServiceManager.cs │ │ ├── BnetServices.cs │ │ └── Services │ │ ├── Account.cs │ │ ├── Authentication.cs │ │ ├── Connection.cs │ │ └── GameUtilities.cs ├── CSV │ ├── AreaNames.csv │ ├── AuraSpells1.csv │ ├── AuraSpells2.csv │ ├── AutoRepeatSpells1.csv │ ├── AutoRepeatSpells2.csv │ ├── Battlegrounds.csv │ ├── BroadcastTexts1.csv │ ├── BroadcastTexts2.csv │ ├── BuildAuthSeeds.csv │ ├── ChatChannels.csv │ ├── CreatureDisplayInfo.csv │ ├── CreatureModelCollisionHeightsModern1.csv │ ├── CreatureModelCollisionHeightsModern2.csv │ ├── DispellSpells.csv │ ├── Gems2.csv │ ├── Gems3.csv │ ├── Hotfix │ │ ├── AreaTrigger1.csv │ │ ├── AreaTrigger2.csv │ │ ├── CreatureDisplayInfo1.csv │ │ ├── CreatureDisplayInfo2.csv │ │ ├── CreatureDisplayInfoExtra1.csv │ │ ├── CreatureDisplayInfoExtra2.csv │ │ ├── CreatureDisplayInfoOption1.csv │ │ ├── CreatureDisplayInfoOption2.csv │ │ ├── Item1.csv │ │ ├── Item2.csv │ │ ├── ItemDisplayInfo1.csv │ │ ├── ItemDisplayInfo2.csv │ │ ├── ItemEffect1.csv │ │ ├── ItemEffect2.csv │ │ ├── ItemSparse1.csv │ │ ├── ItemSparse2.csv │ │ ├── SkillLine1.csv │ │ ├── SkillLine2.csv │ │ ├── SkillLineAbility1.csv │ │ ├── SkillLineAbility2.csv │ │ ├── SkillRaceClassInfo1.csv │ │ ├── SkillRaceClassInfo2.csv │ │ ├── Spell1.csv │ │ ├── Spell2.csv │ │ ├── SpellAuraOptions1.csv │ │ ├── SpellAuraOptions2.csv │ │ ├── SpellEffect1.csv │ │ ├── SpellEffect2.csv │ │ ├── SpellLevels1.csv │ │ ├── SpellLevels2.csv │ │ ├── SpellMisc1.csv │ │ ├── SpellMisc2.csv │ │ ├── SpellName1.csv │ │ ├── SpellName2.csv │ │ ├── SpellXSpellVisual1.csv │ │ └── SpellXSpellVisual2.csv │ ├── Item1.csv │ ├── Item2.csv │ ├── ItemAppearance1.csv │ ├── ItemAppearance2.csv │ ├── ItemDisplayIdToFileDataId1.csv │ ├── ItemDisplayIdToFileDataId2.csv │ ├── ItemEffect1.csv │ ├── ItemEffect2.csv │ ├── ItemEnchantVisuals1.csv │ ├── ItemEnchantVisuals2.csv │ ├── ItemIdToDisplayId1.csv │ ├── ItemIdToDisplayId2.csv │ ├── ItemIdToDisplayId3.csv │ ├── ItemModifiedAppearance1.csv │ ├── ItemModifiedAppearance2.csv │ ├── ItemSparse1.csv │ ├── ItemSparse2.csv │ ├── ItemSpellsData1.csv │ ├── ItemSpellsData2.csv │ ├── LearnSpells.csv │ ├── MeleeSpells1.csv │ ├── MeleeSpells2.csv │ ├── MountAuras.csv │ ├── QuestV2_1.csv │ ├── QuestV2_2.csv │ ├── RaceFaction.csv │ ├── SpellEffectPoints1.csv │ ├── SpellEffectPoints2.csv │ ├── SpellVisuals1.csv │ ├── SpellVisuals2.csv │ ├── StackableAuras1.csv │ ├── StackableAuras2.csv │ ├── TaxiNodes1.csv │ ├── TaxiNodes2.csv │ ├── TaxiPath1.csv │ ├── TaxiPath2.csv │ ├── TaxiPathNode1.csv │ ├── TaxiPathNode2.csv │ ├── TotemSpells.csv │ ├── Transports1.csv │ └── Transports2.csv ├── Configuration │ ├── ConfigurationParser.cs │ └── Settings.cs ├── GitVersion.yml ├── GlobalSessionData.cs ├── Hermes.ico ├── HermesProxy.config ├── HermesProxy.csproj ├── Program.cs ├── Realm │ ├── Realm.cs │ ├── RealmConst.cs │ ├── RealmId.cs │ └── RealmManager.cs ├── Server.cs ├── VersionChecker.cs └── World │ ├── Client │ ├── LegacyWorldCrypt.cs │ ├── PacketHandlers │ │ ├── ArenaHandler.cs │ │ ├── AuctionHandler.cs │ │ ├── BattleGroundHandler.cs │ │ ├── CharacterHandler.cs │ │ ├── ChatHandler.cs │ │ ├── CombatHandler.cs │ │ ├── DuelHandler.cs │ │ ├── GameObjectHandler.cs │ │ ├── GroupHandler.cs │ │ ├── GuildHandler.cs │ │ ├── InstanceHandler.cs │ │ ├── ItemHandler.cs │ │ ├── LootHandler.cs │ │ ├── MailHandler.cs │ │ ├── MiscHandler.cs │ │ ├── MovementHandler.cs │ │ ├── NPCHandler.cs │ │ ├── PetHandler.cs │ │ ├── PetitionHandler.cs │ │ ├── QueryHandler.cs │ │ ├── QuestHandler.cs │ │ ├── ReputationHandler.cs │ │ ├── SocialHandler.cs │ │ ├── SpellHandler.cs │ │ ├── SupportTicketHandler.cs │ │ ├── SystemHandler.cs │ │ ├── TaxiHandler.cs │ │ ├── TradeHandler.cs │ │ ├── UpdateHandler.cs │ │ └── WorldStateHandler.cs │ ├── UpdateField.cs │ └── WorldClient.cs │ ├── Enums │ ├── AccountDataType.cs │ ├── ArenaTeamCommand.cs │ ├── ArenaTeamEvent.cs │ ├── AuctionDefines.cs │ ├── AuthResult.cs │ ├── BattlegroundDefines.cs │ ├── ChannelDefines.cs │ ├── ChatMessageType.cs │ ├── CreatureDefines.cs │ ├── Currency.cs │ ├── DB2Hash.cs │ ├── EnchantmentSlot.cs │ ├── GameObjectDynamicFlags.cs │ ├── GossipDefines.cs │ ├── GroupDefines.cs │ ├── GuildDefines.cs │ ├── HitInfo.cs │ ├── HotfixStatus.cs │ ├── InstanceDefines.cs │ ├── ItemDefines.cs │ ├── Language.cs │ ├── LootDefines.cs │ ├── MailDefines.cs │ ├── MovementFlags.cs │ ├── MovementFlagsExtra.cs │ ├── NPCFlags.cs │ ├── ObjectType.cs │ ├── ObjectTypeMask.cs │ ├── Opcodes.cs │ ├── PetDefines.cs │ ├── PetFlags.cs │ ├── PlayerDefines.cs │ ├── PowerType.cs │ ├── PvPFlags.cs │ ├── QuestDefines.cs │ ├── QuestFlags.cs │ ├── SocialDefines.cs │ ├── SocketColor.cs │ ├── SpeedType.cs │ ├── SpellDefines.cs │ ├── SplineFlags.cs │ ├── SplineType.cs │ ├── SupportTicketDefines.cs │ ├── TrainerSpellState.cs │ ├── TutorialAction.cs │ ├── UnitDefines.cs │ ├── UnitDynamicFlags.cs │ ├── UnitFlags.cs │ ├── UpdateFieldAttributes.cs │ ├── UpdateFields.cs │ ├── UpdateFlag.cs │ ├── UpdateType.cs │ ├── V1_12_1_5875 │ │ ├── Opcode.cs │ │ ├── ResponseCodes.cs │ │ └── UpdateFields.cs │ ├── V1_14_0_40237 │ │ └── UpdateFields.cs │ ├── V1_14_1_40688 │ │ ├── Opcode.cs │ │ ├── ResponseCodes.cs │ │ └── UpdateFields.cs │ ├── V2_4_3_8606 │ │ ├── Opcode.cs │ │ ├── ResponseCodes.cs │ │ └── UpdateFields.cs │ ├── V2_5_2_39570 │ │ ├── Opcode.cs │ │ ├── ResponseCodes.cs │ │ └── UpdateFields.cs │ ├── V2_5_3_41750 │ │ ├── Opcode.cs │ │ └── UpdateFields.cs │ ├── V3_3_5_12340 │ │ ├── Opcode.cs │ │ └── UpdateFields.cs │ ├── Weather.cs │ └── WorldStates.cs │ ├── GameData.cs │ ├── HighGuid.cs │ ├── Objects │ ├── ActivePlayerData.cs │ ├── CharacterCustomizations.cs │ ├── ClassPowerTypes.cs │ ├── ContainerData.cs │ ├── CorpseData.cs │ ├── CreatureTemplate.cs │ ├── DynamicObjectData.cs │ ├── GameObjectData.cs │ ├── HotfixRecord.cs │ ├── ItemData.cs │ ├── ItemTemplate.cs │ ├── MovementInfo.cs │ ├── ObjectData.cs │ ├── ObjectTypeConverter.cs │ ├── PlayerData.cs │ ├── QuestTemplate.cs │ ├── ServerSideMovement.cs │ ├── UnitData.cs │ ├── UpdateFieldExtensions.cs │ ├── UpdateFieldsArray.cs │ ├── UpdateMask.cs │ └── Version │ │ ├── V1_14_0_40237 │ │ ├── CreateObjectBits.cs │ │ └── ObjectUpdateBuilder.cs │ │ ├── V1_14_1_40688 │ │ ├── CreateObjectBits.cs │ │ └── ObjectUpdateBuilder.cs │ │ ├── V2_5_2_39570 │ │ ├── CreateObjectBits.cs │ │ └── ObjectUpdateBuilder.cs │ │ └── V2_5_3_41750 │ │ ├── CreateObjectBits.cs │ │ └── ObjectUpdateBuilder.cs │ ├── Packet.cs │ ├── PacketHandlerAttribute.cs │ ├── Server │ ├── AccountDataManager.cs │ ├── CurrentPlayerStorage.cs │ ├── PacketHandlers │ │ ├── ArenaHandler.cs │ │ ├── AuctionHandler.cs │ │ ├── BattlegroundHandler.cs │ │ ├── CharacterHandler.cs │ │ ├── ChatHandler.cs │ │ ├── ClientConfigHandler.cs │ │ ├── CombatHandler.cs │ │ ├── DuelHandler.cs │ │ ├── GameObjectHandler.cs │ │ ├── GroupHandler.cs │ │ ├── GuildHandler.cs │ │ ├── HotfixHandler.cs │ │ ├── InstanceHandler.cs │ │ ├── ItemHandler.cs │ │ ├── LootHandler.cs │ │ ├── MailHandler.cs │ │ ├── MiscHandler.cs │ │ ├── MovementHandler.cs │ │ ├── NPCHandler.cs │ │ ├── PetHandler.cs │ │ ├── PetitionHandler.cs │ │ ├── QueryHandler.cs │ │ ├── QuestHandler.cs │ │ ├── ReputationHandler.cs │ │ ├── SessionHandler.cs │ │ ├── SocialHandler.cs │ │ ├── SpellHandler.cs │ │ ├── SupportTicketHandler.cs │ │ ├── TaxiHandler.cs │ │ └── TradeHandler.cs │ ├── Packets │ │ ├── ArenaPackets.cs │ │ ├── AuctionPackets.cs │ │ ├── AuthenticationPackets.cs │ │ ├── BattleGroundPackets.cs │ │ ├── CharacterPackets.cs │ │ ├── ChatPackets.cs │ │ ├── ClientConfigPackets.cs │ │ ├── CombatPackets.cs │ │ ├── DuelPackets.cs │ │ ├── GameObjectPackets.cs │ │ ├── GroupPackets.cs │ │ ├── GuildPackets.cs │ │ ├── HotfixPackets.cs │ │ ├── InstancePackets.cs │ │ ├── ItemPackets.cs │ │ ├── LootPackets.cs │ │ ├── MailPackets.cs │ │ ├── MiscPackets.cs │ │ ├── MovementPackets.cs │ │ ├── NPCPackets.cs │ │ ├── PetPackets.cs │ │ ├── PetitionPackets.cs │ │ ├── QueryPackets.cs │ │ ├── QuestPackets.cs │ │ ├── ReputationPackets.cs │ │ ├── SessionPackets.cs │ │ ├── SocialPackets.cs │ │ ├── SpellPackets.cs │ │ ├── SupportTicketPackets.cs │ │ ├── SystemPackets.cs │ │ ├── TaxiPackets.cs │ │ ├── TradePackets.cs │ │ ├── UpdatePackets.cs │ │ └── WorldStatePackets.cs │ ├── RealmSocket.cs │ ├── WorldSocket.cs │ └── WorldSocketManager.cs │ ├── SniffFile.cs │ └── WowGuid.cs ├── LICENSE ├── README.md └── scripts ├── Build_Linux.bat └── Build_Windows.bat /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | _Remove all placeholder texts including this message here._ 11 | 12 | **Describe the bug** 13 | A clear and concise description of what the bug is. 14 | If you know, please also tell us how to reproduce it. 15 | 16 | **Game Server** 17 | The server / emulator that you experienced this bug on. 18 | 19 | **Hermes Proxy Version** 20 | Tell us what version of Hermes Proxy you are using. 21 | You can find this information at the start of Hermes Proxy: 22 | ![Example Version](https://i.imgur.com/MRZnQsp.png) 23 | If you compiled it manually tell us the git hash. 24 | -------------------------------------------------------------------------------- /Framework/Collections/Array.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System.IO; 19 | 20 | namespace System.Collections.Generic 21 | { 22 | public class Array : List 23 | { 24 | int _limit; 25 | 26 | public Array(int size) : base(size) 27 | { 28 | _limit = size; 29 | } 30 | 31 | public Array(params T[] args) : base(args) 32 | { 33 | _limit = args.Length; 34 | } 35 | 36 | public Array(int size, T defaultFillValue) : base(size) 37 | { 38 | _limit = size; 39 | Fill(defaultFillValue); 40 | } 41 | 42 | public void Fill(T value) 43 | { 44 | for (var i = 0; i < _limit; ++i) 45 | Add(value); 46 | } 47 | 48 | public new T this[int index] 49 | { 50 | get 51 | { 52 | return base[index]; 53 | } 54 | set 55 | { 56 | if (index >= Count) 57 | { 58 | if (Count >= _limit) 59 | throw new InternalBufferOverflowException("Attempted to read more array elements from packet " + Count + 1 + " than allowed " + _limit); 60 | 61 | Insert(index, value); 62 | } 63 | else 64 | base[index] = value; 65 | } 66 | } 67 | 68 | public int GetLimit() { return _limit; } 69 | 70 | public static implicit operator T[] (Array array) 71 | { 72 | return array.ToArray(); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Framework/Collections/StringArray.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.Collections; 20 | 21 | namespace Framework.Collections 22 | { 23 | public class StringArray 24 | { 25 | public StringArray(int size) 26 | { 27 | _str = new string[size]; 28 | 29 | for (var i = 0; i < size; ++i) 30 | _str[i] = string.Empty; 31 | } 32 | 33 | public StringArray(string str, params string[] separator) 34 | { 35 | if (str.IsEmpty()) 36 | return; 37 | 38 | _str = str.Split(separator, StringSplitOptions.RemoveEmptyEntries); 39 | } 40 | 41 | public StringArray(string str, params char[] separator) 42 | { 43 | if (str.IsEmpty()) 44 | return; 45 | 46 | _str = str.Split(separator, StringSplitOptions.RemoveEmptyEntries); 47 | } 48 | 49 | public string this[int index] 50 | { 51 | get { return _str[index]; } 52 | set { _str[index] = value; } 53 | } 54 | 55 | public IEnumerator GetEnumerator() 56 | { 57 | return _str.GetEnumerator(); 58 | } 59 | 60 | public bool IsEmpty() 61 | { 62 | return _str == null || _str.Length == 0; 63 | } 64 | 65 | public int Length => _str != null ? _str.Length : 0; 66 | 67 | string[] _str; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Framework/Constants/ConnectConst.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | namespace Framework.Constants 19 | { 20 | public enum ConnectionType 21 | { 22 | Realm = 0, 23 | Instance = 1, 24 | Max 25 | } 26 | 27 | public enum ConnectToSerial 28 | { 29 | None = 0, 30 | Realm = 14, 31 | WorldAttempt1 = 17, 32 | WorldAttempt2 = 35, 33 | WorldAttempt3 = 53, 34 | WorldAttempt4 = 71, 35 | WorldAttempt5 = 89 36 | } 37 | 38 | public enum LoginFailureReason 39 | { 40 | Failed = 0, 41 | NoWorld = 1, 42 | DuplicateCharacter = 2, 43 | NoInstances = 3, 44 | Disabled = 4, 45 | NoCharacter = 5, 46 | LockedForTransfer = 6, 47 | LockedByBilling = 7, 48 | LockedByMobileAH = 8, 49 | TemporaryGMLock = 9, 50 | LockedByCharacterUpgrade = 10, 51 | LockedByRevokedCharacterUpgrade = 11, 52 | LockedByRevokedVASTransaction = 17, 53 | LockedByRestriction = 19, 54 | LockedForRealmPlaytype = 23 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Framework/Constants/Locale.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.Constants 8 | { 9 | public enum Locale 10 | { 11 | enUS = 0, 12 | koKR = 1, 13 | frFR = 2, 14 | deDE = 3, 15 | zhCN = 4, 16 | zhTW = 5, 17 | esES = 6, 18 | esMX = 7, 19 | ruRU = 8, 20 | None = 9, 21 | ptBR = 10, 22 | itIT = 11, 23 | Total = 12 24 | } 25 | 26 | public static class LocaleChecker 27 | { 28 | public static bool IsValidLocale(Locale locale) 29 | { 30 | return locale < Locale.Total && locale != Locale.None; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Framework/Constants/ServiceHash.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | namespace Framework.Constants 19 | { 20 | public enum OriginalHash : uint 21 | { 22 | AccountService = 0x62DA0891u, 23 | AccountListener = 0x54DFDA17u, 24 | AuthenticationListener = 0x71240E35u, 25 | AuthenticationService = 0xDECFC01u, 26 | ChallengeListener = 0xBBDA171Fu, 27 | ClubListener = 0x80909D73u, 28 | ClubMembershipListener = 0x2B34597Bu, 29 | ClubMembershipService = 0x94B94786u, 30 | ClubService = 0xE273DE0Eu, 31 | ConnectionService = 0x65446991u, 32 | FriendsService = 0xA3DDB1BDu, 33 | FriendsListener = 0x6F259A13u, 34 | GameUtilitiesService = 0x3FC1274Du, 35 | PresenceListener = 0x890AB85Fu, 36 | PresenceService = 0xFA0796FFu, 37 | ReportService = 0x7CAF61C9u, 38 | ReportServiceV2 = 0x3A4218FBu, 39 | ResourcesService = 0xECBE75BAu, 40 | UserManagerService = 0x3E19268Au, 41 | UserManagerListener = 0xBC872C22u 42 | } 43 | 44 | public enum NameHash : uint 45 | { 46 | AccountService = 0x1E4DC42Fu, 47 | AccountListener = 0x7807483Cu, 48 | AuthenticationListener = 0x4DA86228u, 49 | AuthenticationService = 0xFF5A6AC3u, 50 | ChallengeService = 0x71BB6833u, 51 | ChallengeListener = 0xC6D90AB8u, 52 | ChannelService = 0xA913A87Bu, 53 | ChannelListener = 0xDA660990u, 54 | ConnectionService = 0x2782094Bu, 55 | FriendsService = 0xABDFED63u, 56 | FriendsListener = 0xA6717548u, 57 | GameUtilitiesService = 0x51923A28u, 58 | PresenceService = 0xD8F94B3Bu, 59 | ReportService = 0x724F5F47u, 60 | ResourcesService = 0x4B104C53u, 61 | UserManagerService = 0x8EE5694Eu, 62 | UserManagerListener = 0xB3426BB3u 63 | } 64 | 65 | public enum GameUtilitiesServiceMethods : uint 66 | { 67 | GenericClientRequest = 1, 68 | GetAllValuesForAttribute = 10, 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Framework/Cryptography/HashHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Security.Cryptography; 4 | 5 | namespace Framework.Cryptography 6 | { 7 | public enum HashAlgorithm 8 | { 9 | SHA1, 10 | } 11 | 12 | public static class HashHelper 13 | { 14 | private delegate byte[] HashFunction(params byte[][] data); 15 | 16 | static Dictionary _hashFunctions; 17 | 18 | static HashHelper() 19 | { 20 | _hashFunctions = new Dictionary 21 | { 22 | [HashAlgorithm.SHA1] = SHA1Func 23 | }; 24 | } 25 | 26 | /// 27 | /// Hash based on and provided data. 28 | /// 29 | public static byte[] Hash(this HashAlgorithm algorithm, params byte[][] data) 30 | => _hashFunctions[algorithm](data); 31 | 32 | static byte[] SHA1Func(params byte[][] data) 33 | { 34 | using (SHA1 alg = SHA1.Create()) 35 | { 36 | return alg.ComputeHash(Combine(data)); 37 | } 38 | } 39 | 40 | static byte[] Combine(byte[][] buffers) 41 | { 42 | int length = 0; 43 | foreach (var buffer in buffers) 44 | length += buffer.Length; 45 | 46 | byte[] result = new byte[length]; 47 | 48 | int position = 0; 49 | 50 | foreach (var buffer in buffers) 51 | { 52 | Buffer.BlockCopy(buffer, 0, result, position, buffer.Length); 53 | position += buffer.Length; 54 | } 55 | 56 | return result; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Framework/Cryptography/PacketCrypt.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.Security.Cryptography; 20 | 21 | namespace Framework.Cryptography 22 | { 23 | public sealed class WorldCrypt : IDisposable 24 | { 25 | public void Initialize(byte[] key) 26 | { 27 | if (IsInitialized) 28 | throw new InvalidOperationException("PacketCrypt already initialized!"); 29 | 30 | _serverEncrypt = new AesGcm(key); 31 | _clientDecrypt = new AesGcm(key); 32 | 33 | IsInitialized = true; 34 | } 35 | 36 | public bool Encrypt(ref byte[] data, ref byte[] tag) 37 | { 38 | try 39 | { 40 | if (IsInitialized) 41 | _serverEncrypt.Encrypt(BitConverter.GetBytes(_serverCounter).Combine(BitConverter.GetBytes(0x52565253)), data, data, tag); 42 | 43 | ++_serverCounter; 44 | return true; 45 | } 46 | catch (CryptographicException) 47 | { 48 | return false; 49 | } 50 | } 51 | 52 | public bool Decrypt(byte[] data, byte[] tag) 53 | { 54 | try 55 | { 56 | if (IsInitialized) 57 | _clientDecrypt.Decrypt(BitConverter.GetBytes(_clientCounter).Combine(BitConverter.GetBytes(0x544E4C43)), data, tag, data); 58 | 59 | ++_clientCounter; 60 | return true; 61 | } 62 | catch (CryptographicException) 63 | { 64 | return false; 65 | } 66 | } 67 | 68 | public void Dispose() 69 | { 70 | IsInitialized = false; 71 | } 72 | 73 | public bool IsInitialized { get; set; } 74 | 75 | AesGcm _serverEncrypt; 76 | AesGcm _clientDecrypt; 77 | ulong _clientCounter; 78 | ulong _serverCounter; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Framework/Cryptography/SARC4.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Arctium Emulation 3 | * Copyright (C) 2012-2020 CypherCore 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | namespace Framework.Cryptography 20 | { 21 | //Thx Fabian over at Arctium. 22 | public sealed class SARC4 23 | { 24 | public SARC4() 25 | { 26 | _s = new byte[0x100]; 27 | _tmp = 0; 28 | _tmp2 = 0; 29 | } 30 | 31 | public void PrepareKey(byte[] key) 32 | { 33 | for (int i = 0; i < 0x100; i++) 34 | _s[i] = (byte)i; 35 | 36 | var j = 0; 37 | for (int i = 0; i < 0x100; i++) 38 | { 39 | j = (byte)((j + key[i % key.Length] + _s[i]) & 255); 40 | 41 | var tempS = _s[i]; 42 | 43 | _s[i] = _s[j]; 44 | _s[j] = tempS; 45 | } 46 | } 47 | 48 | public void ProcessBuffer(byte[] data, int length) 49 | { 50 | for (int i = 0; i < length; i++) 51 | { 52 | _tmp = (byte)((_tmp + 1) % 0x100); 53 | _tmp2 = (byte)((_tmp2 + _s[_tmp]) % 0x100); 54 | 55 | var sTemp = _s[_tmp]; 56 | 57 | _s[_tmp] = _s[_tmp2]; 58 | _s[_tmp2] = sTemp; 59 | 60 | data[i] = (byte)(_s[(_s[_tmp] + _s[_tmp2]) % 0x100] ^ data[i]); 61 | } 62 | } 63 | 64 | byte[] _s; 65 | byte _tmp; 66 | byte _tmp2; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Framework/Cryptography/SessionKeyGeneration.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System.Security.Cryptography; 19 | 20 | namespace Framework.Cryptography 21 | { 22 | public class SessionKeyGenerator 23 | { 24 | public SessionKeyGenerator(byte[] buff, int size) 25 | { 26 | int halfSize = size / 2; 27 | 28 | sh = SHA256.Create(); 29 | sh.TransformFinalBlock(buff, 0, halfSize); 30 | o1 = sh.Hash; 31 | 32 | sh.Initialize(); 33 | sh.TransformFinalBlock(buff, halfSize, size - halfSize); 34 | o2 = sh.Hash; 35 | 36 | FillUp(); 37 | } 38 | 39 | public void Generate(byte[] buf, uint sz) 40 | { 41 | for (uint i = 0; i < sz; ++i) 42 | { 43 | if (taken == 32) 44 | FillUp(); 45 | 46 | buf[i] = o0[taken]; 47 | taken++; 48 | } 49 | } 50 | 51 | void FillUp() 52 | { 53 | sh.Initialize(); 54 | sh.TransformBlock(o1, 0, 32, o1, 0); 55 | sh.TransformBlock(o0, 0, 32, o0, 0); 56 | sh.TransformFinalBlock(o2, 0, 32); 57 | o0 = sh.Hash; 58 | 59 | taken = 0; 60 | } 61 | 62 | SHA256 sh; 63 | uint taken; 64 | byte[] o0 = new byte[32]; 65 | byte[] o1 = new byte[32]; 66 | byte[] o2 = new byte[32]; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Framework/Debugging/Errors.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using Framework.Logging; 19 | using System; 20 | using System.Runtime.CompilerServices; 21 | 22 | public class Cypher 23 | { 24 | public static void Assert(bool value, string message = "", [CallerMemberName]string memberName = "") 25 | { 26 | if (!value) 27 | { 28 | if (!message.IsEmpty()) 29 | Log.Print(LogType.Error, message); 30 | 31 | throw new Exception(memberName); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Framework/Framework.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | true 6 | false 7 | embedded 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Framework/GameMath/EulerAngles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Framework.GameMath; 4 | 5 | public struct EulerAngles 6 | { 7 | // All values as radians 8 | public double Roll; // x 9 | public double Pitch; // y 10 | public double Yaw; // z 11 | 12 | public EulerAngles(double roll, double pitch, double yaw) 13 | { 14 | Roll = roll; 15 | Pitch = pitch; 16 | Yaw = yaw; 17 | } 18 | 19 | public Quaternion AsQuaternion() 20 | { 21 | double cy = Math.Cos(Yaw * 0.5); 22 | double sy = Math.Sin(Yaw * 0.5); 23 | double cp = Math.Cos(Pitch * 0.5); 24 | double sp = Math.Sin(Pitch * 0.5); 25 | double cr = Math.Cos(Roll * 0.5); 26 | double sr = Math.Sin(Roll * 0.5); 27 | 28 | Quaternion q = new Quaternion(); 29 | q.W = (float)(cr * cp * cy + sr * sp * sy); 30 | q.X = (float)(sr * cp * cy - cr * sp * sy); 31 | q.Y = (float)(cr * sp * cy + sr * cp * sy); 32 | q.Z = (float)(cr * cp * sy - sr * sp * cy); 33 | return q; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Framework/GameMath/Position.cs: -------------------------------------------------------------------------------- 1 | using System.Numerics; 2 | 3 | namespace Framework.GameMath 4 | { 5 | public struct Position 6 | { 7 | public Position(float x = 0.0f, float y = 0.0f, float z = 0.0f, float orientation = 0.0f) 8 | { 9 | X = x; 10 | Y = y; 11 | Z = z; 12 | Orientation = orientation; 13 | } 14 | 15 | public Position(Vector3 vector) 16 | { 17 | X = vector.X; 18 | Y = vector.Y; 19 | Z = vector.Z; 20 | Orientation = 0.0f; 21 | } 22 | 23 | public float X { get; set; } 24 | public float Y { get; set; } 25 | public float Z { get; set; } 26 | public float Orientation { get; set; } 27 | 28 | public Vector3 ToVector3() => new(X, Y, Z); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Framework/IO/SocketBuffer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Framework.IO 6 | { 7 | public class SocketBuffer 8 | { 9 | byte[] _storage; 10 | int _wpos; 11 | 12 | public SocketBuffer(int initialSize = 0) 13 | { 14 | _storage = new byte[initialSize]; 15 | } 16 | 17 | public void Resize(int bytes) 18 | { 19 | _storage = new byte[bytes]; 20 | } 21 | 22 | public byte[] GetData() 23 | { 24 | return _storage; 25 | } 26 | 27 | public void Write(byte[] data, int index, int size) 28 | { 29 | Buffer.BlockCopy(data, index, _storage, _wpos, size); 30 | _wpos += size; 31 | } 32 | 33 | public int GetRemainingSpace() { return _storage.Length - _wpos; } 34 | 35 | public void Reset() 36 | { 37 | _wpos = 0; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Framework/IO/Zlib/compress.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.IO; 20 | using System.IO.Compression; 21 | using System.Linq; 22 | 23 | namespace Framework.IO 24 | { 25 | public static partial class ZLib 26 | { 27 | public static byte[] Compress(byte[] data) 28 | { 29 | ByteBuffer buffer = new ByteBuffer(); 30 | buffer.WriteUInt8(0x78); 31 | buffer.WriteUInt8(0x9c); 32 | 33 | uint adler32 = ZLib.adler32(1, data, (uint)data.Length);// Adler32(1, data, (uint)data.Length); 34 | var ms = new MemoryStream(); 35 | using (var deflateStream = new DeflateStream(ms, CompressionMode.Compress)) 36 | { 37 | deflateStream.Write(data, 0, data.Length); 38 | deflateStream.Flush(); 39 | } 40 | buffer.WriteBytes(ms.ToArray()); 41 | buffer.WriteBytes(BitConverter.GetBytes(adler32).Reverse().ToArray()); 42 | 43 | return buffer.GetData(); 44 | } 45 | 46 | public static byte[] Decompress(byte[] data, uint unpackedSize) 47 | { 48 | byte[] decompressData = new byte[unpackedSize]; 49 | using (var deflateStream = new DeflateStream(new MemoryStream(data, 2, data.Length - 6), CompressionMode.Decompress)) 50 | { 51 | var decompressed = new MemoryStream(); 52 | deflateStream.CopyTo(decompressed); 53 | 54 | decompressed.Seek(0, SeekOrigin.Begin); 55 | for (int i = 0; i < unpackedSize; i++) 56 | decompressData[i] = (byte)decompressed.ReadByte(); 57 | } 58 | 59 | return decompressData; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Framework/Networking/NetworkUtils.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Net; 3 | using System.Net.Sockets; 4 | 5 | namespace Framework.Networking; 6 | 7 | public static class NetworkUtils 8 | { 9 | /// Forces IPv4 result or exception 10 | public static IPAddress ResolveOrDirectIPv4(string hostOrIpaddress) 11 | { 12 | IPAddress result; 13 | if (IPAddress.TryParse(hostOrIpaddress, out result) && result.AddressFamily == AddressFamily.InterNetwork) 14 | { 15 | if (IPAddress.IsLoopback(result)) 16 | return IPAddress.Loopback; 17 | 18 | return result; 19 | } 20 | 21 | return Dns.GetHostAddresses(hostOrIpaddress, AddressFamily.InterNetwork).First(); 22 | } 23 | 24 | /// Forces IPv4 or IPv6 result or exception 25 | public static IPAddress ResolveOrDirectIPv64(string hostOrIpaddress) 26 | { 27 | IPAddress result; 28 | if (IPAddress.TryParse(hostOrIpaddress, out result)) 29 | { 30 | if (IPAddress.IsLoopback(result)) 31 | return IPAddress.Loopback; 32 | 33 | return result; 34 | } 35 | 36 | return Dns.GetHostAddresses(hostOrIpaddress).First(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Framework/Proto/GlobalExtensions/Routing.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by the protocol buffer compiler. DO NOT EDIT! 3 | // source: bgs/low/pb/client/global_extensions/routing.proto 4 | // 5 | #pragma warning disable 1591, 0612, 3021 6 | #region Designer generated code 7 | 8 | using pb = global::Google.Protobuf; 9 | using pbc = global::Google.Protobuf.Collections; 10 | using pbr = global::Google.Protobuf.Reflection; 11 | using scg = global::System.Collections.Generic; 12 | namespace Bgs.Protocol { 13 | 14 | /// Holder for reflection information generated from bgs/low/pb/client/global_extensions/routing.proto 15 | public static partial class RoutingReflection { 16 | 17 | #region Descriptor 18 | /// File descriptor for bgs/low/pb/client/global_extensions/routing.proto 19 | public static pbr::FileDescriptor Descriptor { 20 | get { return descriptor; } 21 | } 22 | private static pbr::FileDescriptor descriptor; 23 | 24 | static RoutingReflection() { 25 | byte[] descriptorData = global::System.Convert.FromBase64String( 26 | string.Concat( 27 | "CjFiZ3MvbG93L3BiL2NsaWVudC9nbG9iYWxfZXh0ZW5zaW9ucy9yb3V0aW5n", 28 | "LnByb3RvEgxiZ3MucHJvdG9jb2wqxAEKGUNsaWVudElkZW50aXR5Um91dGlu", 29 | "Z1R5cGUSJAogQ0xJRU5UX0lERU5USVRZX1JPVVRJTkdfRElTQUJMRUQQABIu", 30 | "CipDTElFTlRfSURFTlRJVFlfUk9VVElOR19CQVRUTEVfTkVUX0FDQ09VTlQQ", 31 | "ARIoCiRDTElFTlRfSURFTlRJVFlfUk9VVElOR19HQU1FX0FDQ09VTlQQAhIn", 32 | "CiNDTElFTlRfSURFTlRJVFlfUk9VVElOR19JTlNUQU5DRV9JRBAD")); 33 | descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 34 | new pbr::FileDescriptor[] { }, 35 | new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Bgs.Protocol.ClientIdentityRoutingType), }, null, null)); 36 | } 37 | #endregion 38 | 39 | } 40 | #region Enums 41 | public enum ClientIdentityRoutingType { 42 | [pbr::OriginalName("CLIENT_IDENTITY_ROUTING_DISABLED")] ClientIdentityRoutingDisabled = 0, 43 | [pbr::OriginalName("CLIENT_IDENTITY_ROUTING_BATTLE_NET_ACCOUNT")] ClientIdentityRoutingBattleNetAccount = 1, 44 | [pbr::OriginalName("CLIENT_IDENTITY_ROUTING_GAME_ACCOUNT")] ClientIdentityRoutingGameAccount = 2, 45 | [pbr::OriginalName("CLIENT_IDENTITY_ROUTING_INSTANCE_ID")] ClientIdentityRoutingInstanceId = 3, 46 | } 47 | 48 | #endregion 49 | 50 | } 51 | 52 | #endregion Designer generated code 53 | -------------------------------------------------------------------------------- /Framework/Serialization/Json.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.IO; 20 | using System.Runtime.Serialization.Json; 21 | using System.Text; 22 | 23 | namespace Framework.Serialization 24 | { 25 | public class Json 26 | { 27 | public static string CreateString(T dataObject) 28 | { 29 | return Encoding.UTF8.GetString(CreateArray(dataObject)); 30 | } 31 | 32 | public static byte[] CreateArray(T dataObject) 33 | { 34 | var serializer = new DataContractJsonSerializer(typeof(T)); 35 | var stream = new MemoryStream(); 36 | 37 | serializer.WriteObject(stream, dataObject); 38 | 39 | return stream.ToArray(); 40 | } 41 | 42 | public static T CreateObject(Stream jsonData) 43 | { 44 | var serializer = new DataContractJsonSerializer(typeof(T)); 45 | 46 | return (T)serializer.ReadObject(jsonData); 47 | } 48 | 49 | public static T CreateObject(string jsonData, bool split = false) 50 | { 51 | return CreateObject(Encoding.UTF8.GetBytes(split ? jsonData.Split(new[] { ':' }, 2)[1] : jsonData)); 52 | } 53 | 54 | public static T CreateObject(byte[] jsonData) => CreateObject(new MemoryStream(jsonData)); 55 | 56 | public static object CreateObject(Stream jsonData, Type type) 57 | { 58 | var serializer = new DataContractJsonSerializer(type); 59 | 60 | return serializer.ReadObject(jsonData); 61 | } 62 | 63 | public static object CreateObject(string jsonData, Type type, bool split = false) 64 | { 65 | return CreateObject(Encoding.UTF8.GetBytes(split ? jsonData.Split(new[] { ':' }, 2)[1] : jsonData), type); 66 | } 67 | 68 | public static object CreateObject(byte[] jsonData, Type type) => CreateObject(new MemoryStream(jsonData), type); 69 | 70 | // Used for protobuf json strings. 71 | public static byte[] Deflate(string name, T data) 72 | { 73 | var jsonData = Encoding.UTF8.GetBytes(name + ":" + CreateString(data) + "\0"); 74 | var compressedData = IO.ZLib.Compress(jsonData); 75 | 76 | return BitConverter.GetBytes(jsonData.Length).Combine(compressedData); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /Framework/Singleton/Singleton.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using System; 19 | using System.Reflection; 20 | 21 | public class Singleton where T : class 22 | { 23 | private static volatile T instance; 24 | private static object syncRoot = new object(); 25 | 26 | public static T Instance 27 | { 28 | get 29 | { 30 | if (instance == null) 31 | { 32 | lock (syncRoot) 33 | { 34 | if (instance == null) 35 | { 36 | ConstructorInfo constructorInfo = typeof(T).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, Type.EmptyTypes, null); 37 | instance = (T)constructorInfo.Invoke(new object[0]); 38 | } 39 | } 40 | } 41 | 42 | return instance; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Framework/Util/Network.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Framework.Util 8 | { 9 | public static class NetworkUtility 10 | { 11 | public static uint EndianConvert(uint value) 12 | { 13 | byte[] sizeArr = BitConverter.GetBytes(value); 14 | Array.Reverse(sizeArr); 15 | return BitConverter.ToUInt32(sizeArr); 16 | } 17 | public static ushort EndianConvert(ushort value) 18 | { 19 | byte[] sizeArr = BitConverter.GetBytes(value); 20 | Array.Reverse(sizeArr); 21 | return BitConverter.ToUInt16(sizeArr); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Framework/Util/ProtobufExtensions.cs: -------------------------------------------------------------------------------- 1 | using Google.Protobuf; 2 | using Google.Protobuf.Collections; 3 | 4 | namespace Framework.Util 5 | { 6 | public static class ProtobufExtensions 7 | { 8 | private static Bgs.Protocol.Variant AddInternalGetRef(this RepeatedField attributes, string name) 9 | { 10 | var attribute = new Bgs.Protocol.Attribute(); 11 | attribute.Name = name; 12 | attribute.Value = new Bgs.Protocol.Variant(); 13 | attributes.Add(attribute); 14 | 15 | return attribute.Value; 16 | } 17 | 18 | public static void AddBlob(this RepeatedField attributes, string name, ByteString blob) 19 | { 20 | attributes.AddInternalGetRef(name).BlobValue = blob; 21 | } 22 | 23 | public static void AddString(this RepeatedField attributes, string name, string value) 24 | { 25 | attributes.AddInternalGetRef(name).StringValue = value; 26 | } 27 | 28 | public static void AddInt(this RepeatedField attributes, string name, long value) 29 | { 30 | attributes.AddInternalGetRef(name).IntValue = value; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Framework/Util/Utility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | public static class Utility 8 | { 9 | public static void Swap(ref T lhs, ref T rhs) 10 | { 11 | T temp; 12 | temp = lhs; 13 | lhs = rhs; 14 | rhs = temp; 15 | } 16 | } -------------------------------------------------------------------------------- /Framework/Web/API/ApiRequest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Framework.Web.API 6 | { 7 | public class ApiRequest 8 | { 9 | public uint? SearchId { get; set; } 10 | public Func SearchFunc { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Authentication/LogonData.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Runtime.Serialization; 7 | 8 | namespace Framework.Web 9 | { 10 | [DataContract] 11 | public class LogonData 12 | { 13 | public string this[string inputId] => Inputs.SingleOrDefault(i => i.Id == inputId)?.Value; 14 | 15 | [DataMember(Name = "version")] 16 | public string Version { get; set; } 17 | 18 | [DataMember(Name = "program_id")] 19 | public string Program { get; set; } 20 | 21 | [DataMember(Name = "platform_id")] 22 | public string Platform { get; set; } 23 | 24 | [DataMember(Name = "inputs")] 25 | public List Inputs { get; set; } = new List(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Authentication/LogonResult.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class LogonResult 10 | { 11 | [DataMember(Name = "authentication_state")] 12 | public string AuthenticationState { get; set; } 13 | 14 | [DataMember(Name = "login_ticket")] 15 | public string LoginTicket { get; set; } 16 | 17 | [DataMember(Name = "error_code")] 18 | public string ErrorCode { get; set; } 19 | 20 | [DataMember(Name = "error_message")] 21 | public string ErrorMessage { get; set; } 22 | 23 | [DataMember(Name = "support_error_code")] 24 | public string SupportErrorCode { get; set; } 25 | 26 | [DataMember(Name = "authenticator_form")] 27 | public FormInputs AuthenticatorForm { get; set; } = new FormInputs(); 28 | } 29 | 30 | public enum AuthenticationState 31 | { 32 | NONE = 0, 33 | LOGIN = 1, 34 | LEGAL = 2, 35 | AUTHENTICATOR = 3, 36 | DONE = 4, 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Forms/FormInput.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class FormInput 10 | { 11 | [DataMember(Name = "input_id")] 12 | public string Id { get; set; } 13 | 14 | [DataMember(Name = "type")] 15 | public string Type { get; set; } 16 | 17 | [DataMember(Name = "label")] 18 | public string Label { get; set; } 19 | 20 | [DataMember(Name = "max_length")] 21 | public int MaxLength { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Forms/FormInputValue.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class FormInputValue 10 | { 11 | [DataMember(Name = "input_id")] 12 | public string Id { get; set; } 13 | 14 | [DataMember(Name = "value")] 15 | public string Value { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Forms/FormInputs.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class FormInputs 11 | { 12 | [DataMember(Name = "type")] 13 | public string Type { get; set; } 14 | 15 | [DataMember(Name = "prompt")] 16 | public string Prompt { get; set; } 17 | 18 | [DataMember(Name = "inputs")] 19 | public List Inputs { get; set; } = new List(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Misc/Address.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class Address 10 | { 11 | [DataMember(Name = "ip")] 12 | public string Ip { get; set; } 13 | 14 | [DataMember(Name = "port")] 15 | public int Port { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Misc/AddressFamily.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class AddressFamily 11 | { 12 | [DataMember(Name = "family")] 13 | public int Id { get; set; } 14 | 15 | [DataMember(Name = "addresses")] 16 | public IList
Addresses { get; set; } = new List
(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Misc/ClientVersion.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class ClientVersion 10 | { 11 | [DataMember(Name = "versionMajor")] 12 | public int Major { get; set; } 13 | 14 | [DataMember(Name = "versionBuild")] 15 | public int Build { get; set; } 16 | 17 | [DataMember(Name = "versionMinor")] 18 | public int Minor { get; set; } 19 | 20 | [DataMember(Name = "versionRevision")] 21 | public int Revision { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Misc/RealmCharacterCountEntry.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class RealmCharacterCountEntry 10 | { 11 | [DataMember(Name = "wowRealmAddress")] 12 | public int WowRealmAddress { get; set; } 13 | 14 | [DataMember(Name = "count")] 15 | public int Count { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmCharacterCountList.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class RealmCharacterCountList 11 | { 12 | [DataMember(Name = "counts")] 13 | public IList Counts { get; set; } = new List(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmEntry.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class RealmEntry 10 | { 11 | 12 | [DataMember(Name = "wowRealmAddress")] 13 | public int WowRealmAddress { get; set; } 14 | 15 | [DataMember(Name = "cfgTimezonesID")] 16 | public int CfgTimezonesID { get; set; } 17 | 18 | [DataMember(Name = "populationState")] 19 | public int PopulationState { get; set; } 20 | 21 | [DataMember(Name = "cfgCategoriesID")] 22 | public int CfgCategoriesID { get; set; } 23 | 24 | [DataMember(Name = "version")] 25 | public ClientVersion Version { get; set; } = new ClientVersion(); 26 | 27 | [DataMember(Name = "cfgRealmsID")] 28 | public int CfgRealmsID { get; set; } 29 | 30 | [DataMember(Name = "flags")] 31 | public int Flags { get; set; } 32 | 33 | [DataMember(Name = "name")] 34 | public string Name { get; set; } 35 | 36 | [DataMember(Name = "cfgConfigsID")] 37 | public int CfgConfigsID { get; set; } 38 | 39 | [DataMember(Name = "cfgLanguagesID")] 40 | public int CfgLanguagesID { get; set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListServerIPAddresses.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class RealmListServerIPAddresses 11 | { 12 | [DataMember(Name = "families")] 13 | public IList Families { get; set; } = new List(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListTicketClientInformation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class RealmListTicketClientInformation 10 | { 11 | [DataMember(Name = "info")] 12 | public RealmListTicketInformation Info { get; set; } = new RealmListTicketInformation(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListTicketIdentity.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class RealmListTicketIdentity 10 | { 11 | [DataMember(Name = "gameAccountID")] 12 | public int GameAccountId { get; set; } 13 | 14 | [DataMember(Name = "gameAccountRegion")] 15 | public int GameAccountRegion { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListTicketInformation.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class RealmListTicketInformation 11 | { 12 | [DataMember(Name = "platform")] 13 | public int Platform { get; set; } 14 | 15 | [DataMember(Name = "buildVariant")] 16 | public string BuildVariant { get; set; } 17 | 18 | [DataMember(Name = "type")] 19 | public int Type { get; set; } 20 | 21 | [DataMember(Name = "timeZone")] 22 | public string Timezone { get; set; } 23 | 24 | [DataMember(Name = "currentTime")] 25 | public int CurrentTime { get; set; } 26 | 27 | [DataMember(Name = "textLocale")] 28 | public int TextLocale { get; set; } 29 | 30 | [DataMember(Name = "audioLocale")] 31 | public int AudioLocale { get; set; } 32 | 33 | [DataMember(Name = "versionDataBuild")] 34 | public int VersionDataBuild { get; set; } 35 | 36 | [DataMember(Name = "version")] 37 | public ClientVersion ClientVersion { get; set; } = new ClientVersion(); 38 | 39 | [DataMember(Name = "secret")] 40 | public List Secret { get; set; } 41 | 42 | [DataMember(Name = "clientArch")] 43 | public int ClientArch { get; set; } 44 | 45 | [DataMember(Name = "systemVersion")] 46 | public string SystemVersion { get; set; } 47 | 48 | [DataMember(Name = "platformType")] 49 | public int PlatformType { get; set; } 50 | 51 | [DataMember(Name = "systemArch")] 52 | public int SystemArch { get; set; } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListUpdate.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Runtime.Serialization; 5 | 6 | namespace Framework.Web 7 | { 8 | [DataContract] 9 | public class RealmListUpdate 10 | { 11 | [DataMember(Name = "update")] 12 | public RealmEntry Update { get; set; } = new RealmEntry(); 13 | 14 | [DataMember(Name = "deleting")] 15 | public bool Deleting { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Framework/Web/Rest/Realmlist/RealmListUpdates.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System.Collections.Generic; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Framework.Web 8 | { 9 | [DataContract] 10 | public class RealmListUpdates 11 | { 12 | [DataMember(Name = "updates")] 13 | public IList Updates { get; set; } = new List(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HermesProxy.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32106.194 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HermesProxy", "HermesProxy\HermesProxy.csproj", "{EEBFCEE3-CFAC-4D2E-927F-8E24E07A4218}" 7 | EndProject 8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Framework", "Framework\Framework.csproj", "{2F7515AD-18E3-4ACA-A14B-1929F76299E7}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {EEBFCEE3-CFAC-4D2E-927F-8E24E07A4218}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {EEBFCEE3-CFAC-4D2E-927F-8E24E07A4218}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {EEBFCEE3-CFAC-4D2E-927F-8E24E07A4218}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {EEBFCEE3-CFAC-4D2E-927F-8E24E07A4218}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {2F7515AD-18E3-4ACA-A14B-1929F76299E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {2F7515AD-18E3-4ACA-A14B-1929F76299E7}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {2F7515AD-18E3-4ACA-A14B-1929F76299E7}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {2F7515AD-18E3-4ACA-A14B-1929F76299E7}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {1C33C340-153D-4A56-8F6B-AD2072B5FC82} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /HermesProxy/Auth/AuthCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.Auth 8 | { 9 | // ReSharper disable InconsistentNaming 10 | public enum AuthCommand : byte 11 | { 12 | LOGON_CHALLENGE = 0x00, 13 | LOGON_PROOF = 0x01, 14 | RECONNECT_CHALLENGE = 0x02, 15 | RECONNECT_PROOF = 0x03, 16 | REALM_LIST = 0x10, 17 | TRANSFER_INITIATE = 0x30, 18 | TRANSFER_DATA = 0x31, 19 | TRANSFER_ACCEPT = 0x32, 20 | TRANSFER_RESUME = 0x33, 21 | TRANSFER_CANCEL = 0x34 22 | } 23 | // ReSharper restore InconsistentNaming 24 | } 25 | -------------------------------------------------------------------------------- /HermesProxy/Auth/RealmInfo.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.Auth 9 | { 10 | public class RealmInfo 11 | { 12 | public uint ID; 13 | public RealmType Type; 14 | public byte IsLocked; 15 | public RealmFlags Flags; 16 | public string Name; 17 | public string Address; 18 | public ushort Port; 19 | public float Population; 20 | public byte CharacterCount; 21 | public byte Timezone; 22 | public byte VersionMajor; 23 | public byte VersionMinor; 24 | public byte VersonBugfix; 25 | public ushort Build; 26 | 27 | public override string ToString() 28 | { 29 | return $"{ID,-5} {Type,-5} {IsLocked,-8} {Flags,-10} {Name,-15} {Address,-15} {Port,-10} {Build,-10}"; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /HermesProxy/BNetServer.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WowLegacyCore/HermesProxy/841a26f5c06679680fd5a396922c293d36e84b71/HermesProxy/BNetServer.pfx -------------------------------------------------------------------------------- /HermesProxy/BnetServer/Managers/BnetSessionTicketStorage.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using HermesProxy; 5 | using System.Collections.Generic; 6 | 7 | namespace BNetServer 8 | { 9 | public static class BnetSessionTicketStorage 10 | { 11 | public static Dictionary SessionsByName = new(); 12 | public static Dictionary SessionsByTicket = new(); 13 | public static Dictionary SessionsByKey = new(); 14 | 15 | public static void AddNewSessionByName(string name, GlobalSessionData session) 16 | { 17 | if (SessionsByName.ContainsKey(name)) 18 | { 19 | SessionsByName[name].OnDisconnect(); 20 | SessionsByName[name] = session; 21 | } 22 | else 23 | SessionsByName.Add(name, session); 24 | } 25 | 26 | public static void AddNewSessionByTicket(string loginTicket, GlobalSessionData session) 27 | { 28 | if (SessionsByTicket.ContainsKey(loginTicket)) 29 | { 30 | SessionsByTicket[loginTicket].OnDisconnect(); 31 | SessionsByTicket[loginTicket] = session; 32 | } 33 | else 34 | SessionsByTicket.Add(loginTicket, session); 35 | } 36 | 37 | public static void AddNewSessionByKey(ulong connectKey, GlobalSessionData session) 38 | { 39 | if (SessionsByKey.ContainsKey(connectKey)) 40 | { 41 | SessionsByKey[connectKey].OnDisconnect(); 42 | SessionsByKey[connectKey] = session; 43 | } 44 | else 45 | SessionsByKey.Add(connectKey, session); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /HermesProxy/BnetServer/Networking/BnetServerCertificate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | using System.Security.Cryptography.X509Certificates; 5 | 6 | namespace BNetServer 7 | { 8 | public static class BnetServerCertificate 9 | { 10 | private const string BNET_SERVER_CERT_RESOURCE = "HermesProxy.BNetServer.pfx"; 11 | 12 | public static X509Certificate2 Certificate { get; } 13 | 14 | static BnetServerCertificate() 15 | { 16 | Assembly currentAsm = Assembly.GetExecutingAssembly(); 17 | using (var stream = currentAsm.GetManifestResourceStream(BNET_SERVER_CERT_RESOURCE)) 18 | { 19 | if (stream == null) 20 | throw new Exception($"Resource not found: '{BNET_SERVER_CERT_RESOURCE}'"); 21 | var ms = new MemoryStream(); 22 | stream.CopyTo(ms); 23 | byte[] bytes = ms.ToArray(); 24 | Certificate = new X509Certificate2(bytes); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /HermesProxy/BnetServer/Services/Services/Connection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using Bgs.Protocol; 5 | using Bgs.Protocol.Connection.V1; 6 | using Framework.Constants; 7 | using System; 8 | 9 | namespace BNetServer.Services 10 | { 11 | public partial class BnetServices 12 | { 13 | [Service(ServiceRequirement.Unauthorized, OriginalHash.ConnectionService, 1)] 14 | BattlenetRpcErrorCode HandleConnect(ConnectRequest request, ConnectResponse response) 15 | { 16 | if (request.ClientId != null) 17 | response.ClientId.MergeFrom(request.ClientId); 18 | 19 | response.ServerId = new ProcessId(); 20 | response.ServerId.Label = (uint)Environment.ProcessId; 21 | response.ServerId.Epoch = (uint)Time.UnixTime; 22 | response.ServerTime = (ulong)Time.UnixTimeMilliseconds; 23 | 24 | response.UseBindlessRpc = request.UseBindlessRpc; 25 | 26 | return BattlenetRpcErrorCode.Ok; 27 | } 28 | 29 | [Service(ServiceRequirement.Always, OriginalHash.ConnectionService, 5)] 30 | BattlenetRpcErrorCode HandleKeepAlive(NoData request) 31 | { 32 | return BattlenetRpcErrorCode.Ok; 33 | } 34 | 35 | [Service(ServiceRequirement.Always, OriginalHash.ConnectionService, 7)] 36 | BattlenetRpcErrorCode HandleRequestDisconnect(DisconnectRequest request) 37 | { 38 | if (GetSession() != null && GetSession().AuthClient != null) 39 | GetSession().AuthClient.Disconnect(); 40 | 41 | var disconnectNotification = new DisconnectNotification(); 42 | disconnectNotification.ErrorCode = request.ErrorCode; 43 | SendRequest(OriginalHash.ConnectionService, 4, disconnectNotification); 44 | 45 | CloseSocket(); 46 | 47 | return BattlenetRpcErrorCode.Ok; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /HermesProxy/CSV/AreaNames.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WowLegacyCore/HermesProxy/841a26f5c06679680fd5a396922c293d36e84b71/HermesProxy/CSV/AreaNames.csv -------------------------------------------------------------------------------- /HermesProxy/CSV/AutoRepeatSpells1.csv: -------------------------------------------------------------------------------- 1 | SpellId 2 | 75 3 | 1485 4 | 5019 5 | 19881 -------------------------------------------------------------------------------- /HermesProxy/CSV/AutoRepeatSpells2.csv: -------------------------------------------------------------------------------- 1 | SpellId 2 | 75 3 | 1485 4 | 5019 5 | 19881 6 | 31317 7 | 38196 -------------------------------------------------------------------------------- /HermesProxy/CSV/Battlegrounds.csv: -------------------------------------------------------------------------------- 1 | BattlegroundId,IsArena,MapId1,MapId2,MapId3,MapId4,MapId5,MapId6 2 | 1,0,30,0,0,0,0,0 3 | 2,0,489,0,0,0,0,0 4 | 3,0,529,0,0,0,0,0 5 | 4,1,559,0,0,0,0,0 6 | 5,1,562,0,0,0,0,0 7 | 6,1,559,562,572,617,618,0 8 | 7,0,566,0,0,0,0,0 9 | 8,1,572,0,0,0,0,0 10 | 9,0,607,0,0,0,0,0 11 | 10,1,617,0,0,0,0,0 12 | 11,1,618,0,0,0,0,0 13 | 30,0,628,0,0,0,0,0 14 | 32,0,30,489,529,566,607,628 -------------------------------------------------------------------------------- /HermesProxy/CSV/BuildAuthSeeds.csv: -------------------------------------------------------------------------------- 1 | build,platform,seed,comment 2 | # Vanilla 3 | 31650,Wn64,82CC71696814948331AC5B996E02BE5D, 1.13.2 on windows x86_64 4 | 40618,Wn64,1278EB34F243ED7898D614C0E278EAC0, 1.14.0 on windows x86_64 5 | 40618,Mc64,7528AB80D693E149907757BC9540A6A6, 1.14.0 on MacOS ARM 6 | 41794,Wn64,91D3C1D62CD20FCCD4D0A71E051CE7CA, 1.14.1 on windows x86_64 7 | 42597,Wn64,2C76A6CDD32F651E940B5F682D8E15CE, 1.14.2 on windows x86_64 8 | 42597,MacA,3B31A4F4C25382131A8FB95A1317412B, 1.14.2 on MacOS ARM 9 | 10 | # TBC 11 | 40892,Wn64,5795B965E273C19ADD2164D098F0595A, 2.5.2 on windows x86_64 12 | 42328,Wn64,395EA5F21B05DC0D022141E5C71B1141, 2.5.3 on windows x86_64 13 | -------------------------------------------------------------------------------- /HermesProxy/CSV/ChatChannels.csv: -------------------------------------------------------------------------------- 1 | "Id","Flags,"Name" 2 | "1","3","General" 3 | "2","59","Trade" 4 | "22","65539","LocalDefense" 5 | "23","65540","WorldDefense" 6 | "24","0","LookingForGroup" 7 | "25","131122","GuildRecruitment" -------------------------------------------------------------------------------- /HermesProxy/CSV/DispellSpells.csv: -------------------------------------------------------------------------------- 1 | SpellId 2 | 118 3 | 128 4 | 370 5 | 475 6 | 526 7 | 527 8 | 528 9 | 552 10 | 988 11 | 1152 12 | 1604 13 | 2782 14 | 2783 15 | 2870 16 | 2893 17 | 3137 18 | 3591 19 | 3592 20 | 4526 21 | 4987 22 | 5238 23 | 5240 24 | 5333 25 | 6237 26 | 7108 27 | 7932 28 | 7933 29 | 7968 30 | 8012 31 | 8060 32 | 8146 33 | 8168 34 | 8171 35 | 8320 36 | 8913 37 | 8946 38 | 9999 39 | 10591 40 | 10592 41 | 10723 42 | 10807 43 | 10828 44 | 10832 45 | 10872 46 | 12824 47 | 12825 48 | 12826 49 | 14129 50 | 14134 51 | 14253 52 | 15090 53 | 15729 54 | 16171 55 | 16472 56 | 16537 57 | 16908 58 | 17012 59 | 17085 60 | 17201 61 | 17550 62 | 17729 63 | 17730 64 | 18805 65 | 19476 66 | 19492 67 | 19505 68 | 19731 69 | 19734 70 | 19736 71 | 19801 72 | 20410 73 | 20482 74 | 20589 75 | 20789 76 | 21076 77 | 21099 78 | 21954 79 | 22890 80 | 22891 81 | 23002 82 | 23064 83 | 23258 84 | 23396 85 | 23595 86 | 23603 87 | 23786 88 | 23859 89 | 23922 90 | 23923 91 | 23924 92 | 23925 93 | 24022 94 | 24406 95 | 25756 96 | 25808 97 | 26677 98 | 27609 99 | 27626 100 | 27677 101 | 28133 102 | 28270 103 | 28271 104 | 28272 105 | 29462 106 | 29463 107 | 30281 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfo1.csv: -------------------------------------------------------------------------------- 1 | Id,ModelId,SoundId,SizeClass,CreatureModelScale,CreatureModelAlpha,BloodId,ExtendedDisplayInfoId,NPCSoundId,ParticleColorId,PortraitCreatureDisplayInfoId,PortraitTextureFileDataId,ObjectEffectPackageId,AnimReplacementSetId,Flags,StateSpellVisualKitId,PlayerOverrideScale,PetInstanceScale,UnarmedWeaponType,MountPoofSpellVisualKitId,DissolveEffectId,Gender,DissolveOutEffectId,CreatureModelMinLod,TextureVariationFileDataId1,TextureVariationFileDataId2,TextureVariationFileDataId3 2 | 14733,49,0,1,1.1,255,0,10105,48,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfo2.csv: -------------------------------------------------------------------------------- 1 | Id,ModelId,SoundId,SizeClass,CreatureModelScale,CreatureModelAlpha,BloodId,ExtendedDisplayInfoId,NPCSoundId,ParticleColorId,PortraitCreatureDisplayInfoId,PortraitTextureFileDataId,ObjectEffectPackageId,AnimReplacementSetId,Flags,StateSpellVisualKitId,PlayerOverrideScale,PetInstanceScale,UnarmedWeaponType,MountPoofSpellVisualKitId,DissolveEffectId,Gender,DissolveOutEffectId,CreatureModelMinLod,TextureVariationFileDataId1,TextureVariationFileDataId2,TextureVariationFileDataId3 2 | 14733,49,0,1,1.1,255,0,10105,48,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0 3 | 20291,32,0,3,1.2,255,0,0,42,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,125283,0,0 4 | 100566,12673,1588,1,1,255,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,2,0,0,3940789,3940788,0 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfoExtra1.csv: -------------------------------------------------------------------------------- 1 | Id,DisplayRaceId,DisplaySexId,DisplayClassId,SkinId,FaceId,HairStyleId,HairColorId,FacialHairId,Flags,BakeMaterialResourcesId,HDBakeMaterialResourcesId,CustomDisplayOption1,CustomDisplayOption2,CustomDisplayOption3 2 | 5352,1,0,0,6,3,11,0,6,0,0,0,0,0,0 3 | 7463,5,0,0,1,5,7,9,10,0,0,0,0,0,0 4 | 10105,1,0,0,1,11,9,1,8,0,0,0,0,0,0 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfoExtra2.csv: -------------------------------------------------------------------------------- 1 | Id,DisplayRaceId,DisplaySexId,DisplayClassId,SkinId,FaceId,HairStyleId,HairColorId,FacialHairId,Flags,BakeMaterialResourcesId,HDBakeMaterialResourcesId,CustomDisplayOption1,CustomDisplayOption2,CustomDisplayOption3 2 | 5352,1,0,0,6,3,11,0,6,0,0,0,0,0,0 3 | 7463,5,0,0,1,5,7,9,10,0,0,0,0,0,0 4 | 10105,1,0,0,1,11,9,1,8,0,0,0,0,0,0 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfoOption1.csv: -------------------------------------------------------------------------------- 1 | Id,ChrCustomizationOptionId,ChrCustomizationChoiceId,CreatureDisplayInfoExtraId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/CreatureDisplayInfoOption2.csv: -------------------------------------------------------------------------------- 1 | Id,ChrCustomizationOptionId,ChrCustomizationChoiceId,CreatureDisplayInfoExtraId 2 | 607827,9,17166,5352 3 | 607828,10,17175,5352 4 | 607829,11,17195,5352 5 | 607830,12,17196,5352 6 | 607831,13,17212,5352 7 | 634999,60,17588,7463 8 | 635000,61,17600,7463 9 | 635001,62,17611,7463 10 | 647170,110,17907,11533 11 | 647171,111,17923,11533 12 | 647172,112,17932,11533 13 | 647173,113,17943,11533 14 | 660250,9,17161,10105 15 | 660251,10,17183,10105 16 | 660252,11,17193,10105 17 | 660253,12,17197,10105 18 | 660254,13,17214,10105 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/Item1.csv: -------------------------------------------------------------------------------- 1 | ID,ClassID,SubclassID,Material,InventoryType,RequiredLevel,SheatheType,RandomSelect,ItemRandomSuffixGroupID,Sound_override_subclassID,ScalingStatDistributionID,IconFileDataID,ItemGroupSoundsID,ContentTuningID,MaxDurability,AmmunitionType,DamageType1,DamageType2,DamageType3,DamageType4,DamageType5,Resistances1,Resistances2,Resistances3,Resistances4,Resistances5,Resistances6,Resistances7,MinDamage1,MinDamage2,MinDamage3,MinDamage4,MinDamage5,MaxDamage1,MaxDamage2,MaxDamage3,MaxDamage4,MaxDamage5 2 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/Item2.csv: -------------------------------------------------------------------------------- 1 | ID,ClassID,SubclassID,Material,InventoryType,RequiredLevel,SheatheType,RandomSelect,ItemRandomSuffixGroupID,Sound_override_subclassID,ScalingStatDistributionID,IconFileDataID,ItemGroupSoundsID,ContentTuningID,MaxDurability,AmmunitionType,DamageType1,DamageType2,DamageType3,DamageType4,DamageType5,Resistances1,Resistances2,Resistances3,Resistances4,Resistances5,Resistances6,Resistances7,MinDamage1,MinDamage2,MinDamage3,MinDamage4,MinDamage5,MaxDamage1,MaxDamage2,MaxDamage3,MaxDamage4,MaxDamage5 2 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/ItemDisplayInfo2.csv: -------------------------------------------------------------------------------- 1 | ID,ItemVisual,ParticleColorID,ItemRangedDisplayInfoID,OverrideSwooshSoundKitID,SheatheTransformMatrixID,StateSpellVisualKitID,SheathedSpellVisualKitID,UnsheathedSpellVisualKitID,Flags,ModelResourcesID_0,ModelResourcesID_1,ModelMaterialResourcesID_0,ModelMaterialResourcesID_1,ModelType_0,ModelType_1,GeosetGroup_0,GeosetGroup_1,GeosetGroup_2,GeosetGroup_3,GeosetGroup_4,GeosetGroup_5,AttachmentGeosetGroup_0,AttachmentGeosetGroup_1,AttachmentGeosetGroup_2,AttachmentGeosetGroup_3,AttachmentGeosetGroup_4,AttachmentGeosetGroup_5,HelmetGeosetVis_0,HelmetGeosetVis_1 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/ItemEffect1.csv: -------------------------------------------------------------------------------- 1 | Id,LegacySlotIndex,TriggerType,Charges,CoolDownMSec,CategoryCoolDownMSec,SpellCategoryID,SpellID,ChrSpecializationID,ParentItemID 2 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/ItemEffect2.csv: -------------------------------------------------------------------------------- 1 | Id,LegacySlotIndex,TriggerType,Charges,CoolDownMSec,CategoryCoolDownMSec,SpellCategoryID,SpellID,ChrSpecializationID,ParentItemID 2 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/ItemSparse2.csv: -------------------------------------------------------------------------------- 1 | Id,AllowableRace,Description,Name4,Name3,Name2,Name1,DmgVariance,DurationInInventory,QualityModifier,BagFamily,RangeMod,StatPercentageOfSocket1,StatPercentageOfSocket2,StatPercentageOfSocket3,StatPercentageOfSocket4,StatPercentageOfSocket5,StatPercentageOfSocket6,StatPercentageOfSocket7,StatPercentageOfSocket8,StatPercentageOfSocket9,StatPercentageOfSocket10,StatPercentEditor1,StatPercentEditor2,StatPercentEditor3,StatPercentEditor4,StatPercentEditor5,StatPercentEditor6,StatPercentEditor7,StatPercentEditor8,StatPercentEditor9,StatPercentEditor10,Stackable,MaxCount,RequiredAbility,SellPrice,BuyPrice,VendorStackCount,PriceVariance,PriceRandomValue,Flags1,Flags2,Flags3,Flags4,OppositeFactionItemId,MaxDurability,ItemNameDescriptionId,RequiredTransmogHoliday,RequiredHoliday,LimitCategory,GemProperties,SocketMatchEnchantmentId,TotemCategoryId,InstanceBound,ZoneBound1,ZoneBound2,ItemSet,LockId,StartQuestId,PageText,Delay,RequiredReputationId,RequiredSkillRank,RequiredSkill,ItemLevel,AllowableClass,ItemRandomSuffixGroupId,RandomProperty,DamageMin1,DamageMin2,DamageMin3,DamageMin4,DamageMin5,DamageMax1,DamageMax2,DamageMax3,DamageMax4,DamageMax5,Armor,HolyResistance,FireResistance,NatureResistance,FrostResistance,ShadowResistance,ArcaneResistance,ScalingStatDistributionId,ExpansionId,ArtifactId,SpellWeight,SpellWeightCategory,SocketType1,SocketType2,SocketType3,SheatheType,Material,PageMaterial,PageLanguage,Bonding,DamageType,StatType1,StatType2,StatType3,StatType4,StatType5,StatType6,StatType7,StatType8,StatType9,StatType10,ContainerSlots,RequiredReputationRank,RequiredCityRank,RequiredHonorRank,InventoryType,OverallQualityId,AmmoType,StatValue1,StatValue2,StatValue3,StatValue4,StatValue5,StatValue6,StatValue7,StatValue8,StatValue9,StatValue10,RequiredLevel -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillLine1.csv: -------------------------------------------------------------------------------- 1 | DisplayName,AlternateVerb,Description,HordeDisplayName,NeutralDisplayName,Id,CategoryId,SpellIconFileId,CanLink,ParentSkillLineId,ParentTierIndex,Flags,SpellBookSpellId 2 | "Riding","","","","","762","9","0","0","0","0","0","0" -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillLine2.csv: -------------------------------------------------------------------------------- 1 | DisplayName,AlternateVerb,Description,HordeDisplayName,NeutralDisplayName,Id,CategoryId,SpellIconFileId,CanLink,ParentSkillLineId,ParentTierIndex,Flags,SpellBookSpellId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillLineAbility1.csv: -------------------------------------------------------------------------------- 1 | RaceMask,Id,SkillLine,Spell,MinSkillLineRank,ClassMask,SupercedesSpell,AcquireMethod,TrivialSkillLineRankHigh,TrivialSkillLineRankLow,Flags,NumSkillUps,UniqueBit,TradeSkillCategoryID,SkillupSkillLineID,CharacterPoints1,CharacterPoints2 2 | 0,15029,762,33388,1,0,0,0,0,0,0,1,0,0,0,0,0 3 | 0,15030,762,33391,1,0,0,0,0,0,0,1,0,0,0,0,0 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillLineAbility2.csv: -------------------------------------------------------------------------------- 1 | RaceMask,Id,SkillLine,Spell,MinSkillLineRank,ClassMask,SupercedesSpell,AcquireMethod,TrivialSkillLineRankHigh,TrivialSkillLineRankLow,Flags,NumSkillUps,UniqueBit,TradeSkillCategoryID,SkillupSkillLineID,CharacterPoints1,CharacterPoints2 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillRaceClassInfo1.csv: -------------------------------------------------------------------------------- 1 | Id,RaceMask,SkillId,ClassMask,Flags,Availability,MinLevel,SkillTierId 2 | 5,511,183,1535,1170,0,0,0 3 | 24,511,272,1024,1168,0,10,0 4 | 25,511,134,1024,1040,0,10,0 5 | 26,511,247,1024,1168,0,20,0 6 | 31,511,50,4,1040,0,0,0 7 | 32,511,261,4,1170,0,0,0 8 | 33,511,163,4,1040,0,0,0 9 | 39,511,51,4,1040,0,0,0 10 | 54,511,130,128,1168,0,4,0 11 | 55,511,237,128,1040,0,0,0 12 | 57,511,6,128,1040,0,0,0 13 | 58,511,56,16,1040,0,0,0 14 | 59,511,96,1024,1168,0,0,0 15 | 60,511,78,16,1040,0,0,0 16 | 61,511,267,2,1040,0,0,0 17 | 62,511,268,2,1170,0,0,0 18 | 63,511,184,2,1040,0,0,0 19 | 64,511,269,2,1168,0,0,0 20 | 65,511,198,2,1168,0,0,0 21 | 66,511,246,2,1168,0,0,0 22 | 68,4,101,1503,1170,0,0,0 23 | 69,8,126,1503,1170,0,0,0 24 | 70,2,125,1503,1170,0,0,0 25 | 71,32,124,1503,1170,0,0,0 26 | 72,16,220,1503,1170,0,0,0 27 | 73,511,254,8,1168,0,10,0 28 | 74,511,253,8,1040,0,0,0 29 | 75,511,39,8,1040,0,0,0 30 | 79,511,238,8,1168,0,4,0 31 | 81,511,239,8,1168,0,0,0 32 | 82,511,38,8,1040,0,0,0 33 | 95,511,373,64,1040,0,0,0 34 | 96,511,375,64,1040,0,0,0 35 | 97,511,199,64,1168,0,0,0 36 | 98,511,374,64,1040,0,0,0 37 | 101,511,355,256,1040,0,0,0 38 | 102,511,354,256,1040,0,0,0 39 | 104,511,353,256,1170,0,0,0 40 | 105,511,120,256,1170,0,0,0 41 | 106,511,245,1,1168,0,0,0 42 | 107,511,26,1,1040,0,0,0 43 | 108,511,255,1,1168,0,0,0 44 | 109,511,256,1,1040,0,0,0 45 | 110,511,257,1,1040,0,0,0 46 | 111,511,244,1,1168,0,0,0 47 | 112,511,243,1,1170,0,0,0 48 | 113,511,258,1,1168,0,10,0 49 | 131,511,118,8,1170,0,10,0 50 | 132,511,118,5,1170,0,20,0 51 | 149,511,242,8,1168,0,16,0 52 | 301,511,8,128,1040,0,0,0 53 | 521,511,573,1024,1040,0,0,0 54 | 522,511,574,1024,1040,0,0,0 55 | 541,511,593,256,1040,0,0,0 56 | 544,511,594,2,1040,0,0,0 57 | 581,511,613,16,1040,0,0,0 58 | 841,128,733,1503,1170,0,0,0 59 | 861,64,753,1503,1170,0,0,0 60 | 862,1,754,1503,1170,0,0,0 61 | 890,511,762,1503,16,0,40,223 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SkillRaceClassInfo2.csv: -------------------------------------------------------------------------------- 1 | Id,RaceMask,SkillId,ClassMask,Flags,Availability,MinLevel,SkillTierId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/Spell1.csv: -------------------------------------------------------------------------------- 1 | SpellId,NameSubText,Description,AuraDescription 2 | "32950","","","" 3 | "33388","Apprentice","","" 4 | "33389","","Allows the player to ride basic ground mounts that require a riding skill of 75.","" 5 | "33391","Journeyman","","" 6 | "33392","","Allows the player to ride swift ground mounts that require a riding skill of 150.","" 7 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/Spell2.csv: -------------------------------------------------------------------------------- 1 | SpellId,NameSubText,Description,AuraDescription -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellAuraOptions1.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,CumulativeAura,ProcCategoryRecovery,ProcChance,ProcCharges,SpellProcsPerMinuteId,ProcTypeMask0,ProcTypeMask1,SpellId 2 | 171661,0,0,0,101,0,0,0,0,32950 3 | 173797,0,0,0,101,0,0,0,0,33388 4 | 172715,0,0,0,101,0,0,0,0,33389 5 | 172717,0,0,0,101,0,0,0,0,33391 6 | 172718,0,0,0,101,0,0,0,0,33392 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellAuraOptions2.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,CumulativeAura,ProcCategoryRecovery,ProcChance,ProcCharges,SpellProcsPerMinuteId,ProcTypeMask0,ProcTypeMask1,SpellId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellEffect1.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,EffectIndex,Effect,EffectAmplitude,EffectAttributes,EffectAura,EffectAuraPeriod,EffectBasePoints,EffectBonusCoefficient,EffectChainAmplitude,EffectChainTargets,EffectDieSides,EffectItemType,EffectMechanic,EffectPointsPerResource,EffectPosFacing,EffectRealPointsPerLevel,EffectTriggerSpell,BonusCoefficientFromAP,PvpMultiplier,Coefficient,Variance,ResourceCoefficient,GroupSizeBasePointsCoefficient,EffectMiscValue1,EffectMiscValue2,EffectRadiusIndex1,EffectRadiusIndex2,EffectSpellClassMask1,EffectSpellClassMask2,EffectSpellClassMask3,EffectSpellClassMask4,ImplicitTarget1,ImplicitTarget2,SpellId 2 | 850319,0,0,2,0,0,0,0,2624,0,1,60,751,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,6,0,32950 3 | 853132,0,0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33388 4 | 853133,0,1,118,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,762,0,0,0,0,0,0,0,0,0,33388 5 | 851699,0,0,36,0,0,0,0,0,0,1,0,0,0,0,0,0,0,33388,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33389 6 | 851700,0,1,44,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,762,0,0,0,0,0,0,0,0,0,33389 7 | 851702,0,0,3,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33391 8 | 851703,0,1,118,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,762,0,0,0,0,0,0,0,0,0,33391 9 | 851704,0,0,36,0,0,0,0,0,0,1,0,0,0,0,0,0,0,33391,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33392 10 | 851705,0,1,44,0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,762,0,0,0,0,0,0,0,0,0,33392 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellEffect2.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,EffectIndex,Effect,EffectAmplitude,EffectAttributes,EffectAura,EffectAuraPeriod,EffectBasePoints,EffectBonusCoefficient,EffectChainAmplitude,EffectChainTargets,EffectDieSides,EffectItemType,EffectMechanic,EffectPointsPerResource,EffectPosFacing,EffectRealPointsPerLevel,EffectTriggerSpell,BonusCoefficientFromAP,PvpMultiplier,Coefficient,Variance,ResourceCoefficient,GroupSizeBasePointsCoefficient,EffectMiscValue1,EffectMiscValue2,EffectRadiusIndex1,EffectRadiusIndex2,EffectSpellClassMask1,EffectSpellClassMask2,EffectSpellClassMask3,EffectSpellClassMask4,ImplicitTarget1,ImplicitTarget2,SpellId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellLevels1.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,BaseLevel,MaxLevel,SpellLevel,MaxPassiveAuraLevel,SpellId 2 | 120081,0,0,0,1,0,33388 3 | 119666,0,0,0,1,0,33391 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellLevels2.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,BaseLevel,MaxLevel,SpellLevel,MaxPassiveAuraLevel,SpellId -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellMisc1.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,CastingTimeIndex,DurationIndex,RangeIndex,SchoolMask,Speed,LaunchDelay,MinDuration,SpellIconFileDataId,ActiveIconFileDataId,Attributes1,Attributes2,Attributes3,Attributes4,Attributes5,Attributes6,Attributes7,Attributes8,Attributes9,Attributes10,Attributes11,Attributes12,Attributes13,Attributes14,SpellId 2 | 320003,0,7,0,1,1,0,0,0,136222,0,276824080,0,0,0,0,0,0,0,0,0,0,0,0,0,7355 3 | 450196,0,5,0,13,8,0,0,0,136014,0,0,136,4,256,0,0,0,0,0,0,0,0,0,0,32950 4 | 450979,0,1,0,1,1,0,0,0,136103,0,16777424,0,0,0,0,0,0,0,0,0,0,0,0,0,33388 5 | 450258,0,1,0,6,1,0,0,0,136103,0,262400,0,0,0,0,0,0,0,0,0,0,0,0,0,33389 6 | 450260,0,1,0,1,1,0,0,0,136103,0,16777424,0,0,0,0,0,0,0,0,0,0,0,0,0,33391 7 | 449137,0,1,0,6,1,0,0,0,136103,0,262400,0,0,0,0,0,0,0,0,0,0,0,0,0,33392 8 | -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellMisc2.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,CastingTimeIndex,DurationIndex,RangeIndex,SchoolMask,Speed,LaunchDelay,MinDuration,SpellIconFileDataId,ActiveIconFileDataId,Attributes1,Attributes2,Attributes3,Attributes4,Attributes5,Attributes6,Attributes7,Attributes8,Attributes9,Attributes10,Attributes11,Attributes12,Attributes13,Attributes14,SpellId 2 | 320003,0,7,0,1,1,0,0,0,136222,0,276824080,0,0,0,0,0,0,0,0,0,0,0,0,0,7355 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellName1.csv: -------------------------------------------------------------------------------- 1 | SpellId,Name 2 | "32950","Eye Beam" 3 | "33388","Riding" 4 | "33389","Apprentice Riding" 5 | "33391","Riding" 6 | "33392","Journeyman Riding" -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellName2.csv: -------------------------------------------------------------------------------- 1 | SpellId,Name -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellXSpellVisual1.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,SpellVisualId,Probability,Flags,Priority,SpellIconFileId,ActiveIconFileId,ViewerUnitConditionId,ViewerPlayerConditionId,CasterUnitConditionId,CasterPlayerConditionId,SpellId 2 | 316112,0,7434,1,0,1,0,0,0,0,0,0,32950 3 | 316810,0,107,1,0,1,0,0,0,0,0,0,33389 4 | 316812,0,107,1,0,1,0,0,0,0,0,0,33392 -------------------------------------------------------------------------------- /HermesProxy/CSV/Hotfix/SpellXSpellVisual2.csv: -------------------------------------------------------------------------------- 1 | Id,DifficultyId,SpellVisualId,Probability,Flags,Priority,SpellIconFileId,ActiveIconFileId,ViewerUnitConditionId,ViewerPlayerConditionId,CasterUnitConditionId,CasterPlayerConditionId,SpellId -------------------------------------------------------------------------------- /HermesProxy/CSV/ItemEnchantVisuals1.csv: -------------------------------------------------------------------------------- 1 | EnchantId,ItemVisual 2 | 1,61 3 | 2,33 4 | 3,32 5 | 4,32 6 | 5,32 7 | 6,61 8 | 7,26 9 | 8,26 10 | 9,26 11 | 10,26 12 | 11,26 13 | 12,33 14 | 13,28 15 | 14,28 16 | 22,26 17 | 23,26 18 | 25,1 19 | 26,27 20 | 29,61 21 | 35,26 22 | 40,28 23 | 42,26 24 | 124,32 25 | 249,31 26 | 283,81 27 | 284,81 28 | 285,32 29 | 303,32 30 | 323,26 31 | 324,26 32 | 325,26 33 | 503,61 34 | 504,61 35 | 523,32 36 | 524,33 37 | 525,81 38 | 543,32 39 | 563,81 40 | 564,81 41 | 603,26 42 | 623,26 43 | 624,26 44 | 625,26 45 | 626,26 46 | 627,26 47 | 643,26 48 | 683,61 49 | 703,26 50 | 704,26 51 | 705,26 52 | 706,26 53 | 803,25 54 | 805,2 55 | 853,31 56 | 854,31 57 | 864,2 58 | 912,25 59 | 943,42 60 | 963,2 61 | 1003,26 62 | 1023,107 63 | 1663,61 64 | 1664,61 65 | 1665,32 66 | 1666,32 67 | 1667,33 68 | 1668,33 69 | 1669,81 70 | 1683,32 71 | 1723,26 72 | 1743,105 73 | 1763,33 74 | 1783,81 75 | 1803,32 76 | 1823,32 77 | 1824,32 78 | 1825,32 79 | 1863,107 80 | 1864,107 81 | 1865,107 82 | 1866,107 83 | 1890,29 84 | 1894,126 85 | 1895,2 86 | 1896,24 87 | 1897,2 88 | 1898,107 89 | 1899,1 90 | 1900,103 91 | 1901,29 92 | 1903,29 93 | 1904,29 94 | 2504,107 95 | 2505,103 96 | 2506,28 97 | 2563,125 98 | 2564,125 99 | 2567,29 100 | 2568,29 101 | 2630,26 102 | 2646,125 103 | -------------------------------------------------------------------------------- /HermesProxy/CSV/ItemEnchantVisuals2.csv: -------------------------------------------------------------------------------- 1 | EnchantId,ItemVisual 2 | 1,61 3 | 2,33 4 | 3,32 5 | 4,32 6 | 5,32 7 | 6,61 8 | 7,26 9 | 8,26 10 | 9,26 11 | 10,26 12 | 11,26 13 | 12,33 14 | 13,28 15 | 14,28 16 | 22,26 17 | 23,26 18 | 25,1 19 | 26,27 20 | 29,61 21 | 35,26 22 | 40,28 23 | 42,26 24 | 124,32 25 | 249,31 26 | 283,81 27 | 284,81 28 | 285,32 29 | 303,32 30 | 323,26 31 | 324,26 32 | 325,26 33 | 503,61 34 | 504,61 35 | 523,32 36 | 524,33 37 | 525,81 38 | 543,32 39 | 563,81 40 | 564,81 41 | 603,26 42 | 623,26 43 | 624,26 44 | 625,26 45 | 626,26 46 | 627,26 47 | 643,26 48 | 683,61 49 | 703,26 50 | 704,26 51 | 705,26 52 | 706,26 53 | 803,25 54 | 805,2 55 | 853,31 56 | 854,31 57 | 864,2 58 | 912,25 59 | 943,42 60 | 963,2 61 | 1003,26 62 | 1023,107 63 | 1663,61 64 | 1664,61 65 | 1665,32 66 | 1666,32 67 | 1667,33 68 | 1668,33 69 | 1669,81 70 | 1683,32 71 | 1723,26 72 | 1743,105 73 | 1763,33 74 | 1783,81 75 | 1803,32 76 | 1823,32 77 | 1824,32 78 | 1825,32 79 | 1863,107 80 | 1864,107 81 | 1865,107 82 | 1866,107 83 | 1890,29 84 | 1894,126 85 | 1895,2 86 | 1896,24 87 | 1897,2 88 | 1898,107 89 | 1899,161 90 | 1900,103 91 | 1901,29 92 | 1903,29 93 | 1904,29 94 | 2343,151 95 | 2504,107 96 | 2505,103 97 | 2506,28 98 | 2563,125 99 | 2564,125 100 | 2567,29 101 | 2568,29 102 | 2630,26 103 | 2631,107 104 | 2632,61 105 | 2633,61 106 | 2634,32 107 | 2635,33 108 | 2636,81 109 | 2637,32 110 | 2638,81 111 | 2639,81 112 | 2640,26 113 | 2641,26 114 | 2642,26 115 | 2643,26 116 | 2644,26 117 | 2645,32 118 | 2646,125 119 | 2666,2 120 | 2667,156 121 | 2668,106 122 | 2669,159 123 | 2670,125 124 | 2671,158 125 | 2672,157 126 | 2673,155 127 | 2674,160 128 | 2675,159 129 | 3014,81 130 | 3018,61 131 | 3019,61 132 | 3020,61 133 | 3021,61 134 | 3022,61 135 | 3023,61 136 | 3024,61 137 | 3025,61 138 | 3026,61 139 | 3027,61 140 | 3028,61 141 | 3029,61 142 | 3030,61 143 | 3031,61 144 | 3032,61 145 | 3033,61 146 | 3034,61 147 | 3035,61 148 | 3036,61 149 | 3037,61 150 | 3038,61 151 | 3039,61 152 | 3040,61 153 | 3041,61 154 | 3042,61 155 | 3043,61 156 | 3044,61 157 | 3093,104 158 | 3102,26 159 | 3222,125 160 | 3225,165 161 | 3265,42 162 | 3266,31 163 | 3273,166 164 | -------------------------------------------------------------------------------- /HermesProxy/CSV/MeleeSpells1.csv: -------------------------------------------------------------------------------- 1 | SpellId 2 | 76 3 | 78 4 | 87 5 | 91 6 | 96 7 | 278 8 | 279 9 | 284 10 | 285 11 | 678 12 | 679 13 | 680 14 | 748 15 | 749 16 | 751 17 | 752 18 | 753 19 | 845 20 | 1608 21 | 1609 22 | 1628 23 | 1629 24 | 1635 25 | 1645 26 | 1648 27 | 1663 28 | 1664 29 | 1665 30 | 1708 31 | 1709 32 | 1731 33 | 1732 34 | 1770 35 | 1794 36 | 1795 37 | 1796 38 | 1797 39 | 1798 40 | 1812 41 | 1813 42 | 1814 43 | 1815 44 | 1866 45 | 1918 46 | 1920 47 | 1921 48 | 1922 49 | 2110 50 | 2427 51 | 2428 52 | 2429 53 | 2430 54 | 2431 55 | 2495 56 | 2497 57 | 2498 58 | 2499 59 | 2500 60 | 2501 61 | 2502 62 | 2503 63 | 2504 64 | 2505 65 | 2506 66 | 2627 67 | 2628 68 | 2629 69 | 2630 70 | 2677 71 | 2679 72 | 2680 73 | 2681 74 | 2682 75 | 2697 76 | 2699 77 | 2700 78 | 2701 79 | 2702 80 | 2707 81 | 2709 82 | 2710 83 | 2711 84 | 2712 85 | 2717 86 | 2719 87 | 2720 88 | 2721 89 | 2722 90 | 2727 91 | 2728 92 | 2729 93 | 2730 94 | 2731 95 | 2922 96 | 2924 97 | 2925 98 | 2973 99 | 3130 100 | 3145 101 | 3147 102 | 3148 103 | 3150 104 | 3151 105 | 3242 106 | 3247 107 | 3252 108 | 3261 109 | 3427 110 | 3446 111 | 3466 112 | 3542 113 | 3551 114 | 3597 115 | 3603 116 | 3604 117 | 3609 118 | 3743 119 | 4101 120 | 4102 121 | 4150 122 | 4159 123 | 4166 124 | 4240 125 | 4281 126 | 4282 127 | 5165 128 | 5271 129 | 5337 130 | 5422 131 | 5532 132 | 5569 133 | 5708 134 | 5918 135 | 6016 136 | 6154 137 | 6174 138 | 6175 139 | 6186 140 | 6409 141 | 6531 142 | 6561 143 | 6564 144 | 6566 145 | 6568 146 | 6570 147 | 6595 148 | 6713 149 | 6747 150 | 6748 151 | 6807 152 | 6808 153 | 6809 154 | 6927 155 | 6942 156 | 7140 157 | 7145 158 | 7159 159 | 7160 160 | 7342 161 | 7369 162 | 7394 163 | 7891 164 | 7938 165 | 8255 166 | 8355 167 | 8374 168 | 8379 169 | 8391 170 | 8646 171 | 8972 172 | 9080 173 | 9745 174 | 9791 175 | 9880 176 | 9881 177 | 10332 178 | 10333 179 | 10851 180 | 11427 181 | 11564 182 | 11565 183 | 11566 184 | 11567 185 | 11608 186 | 11609 187 | 11837 188 | 11976 189 | 11998 190 | 12057 191 | 12097 192 | 12161 193 | 12166 194 | 12461 195 | 12538 196 | 12734 197 | 13013 198 | 13446 199 | 13584 200 | 13953 201 | 14102 202 | 14112 203 | 14260 204 | 14261 205 | 14262 206 | 14263 207 | 14264 208 | 14265 209 | 14266 210 | 14516 211 | 15248 212 | 15284 213 | 15496 214 | 15579 215 | 15580 216 | 15582 217 | 15584 218 | 15608 219 | 15613 220 | 15617 221 | 15618 222 | 15621 223 | 15622 224 | 15623 225 | 15652 226 | 15657 227 | 15663 228 | 15754 229 | 15793 230 | 16044 231 | 16096 232 | 16169 233 | 16172 234 | 16495 235 | 16553 236 | 17143 237 | 17156 238 | 17170 239 | 17230 240 | 17284 241 | 17445 242 | 17470 243 | 17685 244 | 18144 245 | 18368 246 | 18819 247 | 19319 248 | 19632 249 | 19642 250 | 19644 251 | 19730 252 | 19777 253 | 19983 254 | 20539 255 | 20569 256 | 20605 257 | 20666 258 | 20677 259 | 20684 260 | 20691 261 | 20751 262 | 22416 263 | 22427 264 | 22540 265 | 22574 266 | 22591 267 | 23919 268 | 24016 269 | 24333 270 | 24337 271 | 24671 272 | 25174 273 | 25286 274 | 25710 275 | 25712 276 | 26350 277 | 28437 278 | 28913 279 | 29915 -------------------------------------------------------------------------------- /HermesProxy/CSV/MountAuras.csv: -------------------------------------------------------------------------------- 1 | SpellId 2 | 458 3 | 459 4 | 468 5 | 470 6 | 471 7 | 472 8 | 578 9 | 579 10 | 580 11 | 581 12 | 3363 13 | 5784 14 | 6648 15 | 6653 16 | 6654 17 | 6777 18 | 6896 19 | 6897 20 | 6898 21 | 6899 22 | 8394 23 | 8395 24 | 8396 25 | 8980 26 | 10787 27 | 10788 28 | 10789 29 | 10790 30 | 10792 31 | 10793 32 | 10795 33 | 10796 34 | 10798 35 | 10799 36 | 10800 37 | 10801 38 | 10802 39 | 10803 40 | 10804 41 | 10873 42 | 10969 43 | 13819 44 | 15779 45 | 15780 46 | 15781 47 | 16055 48 | 16056 49 | 16058 50 | 16059 51 | 16060 52 | 16080 53 | 16081 54 | 16082 55 | 16083 56 | 16084 57 | 17229 58 | 17450 59 | 17453 60 | 17454 61 | 17455 62 | 17456 63 | 17458 64 | 17459 65 | 17460 66 | 17461 67 | 17462 68 | 17463 69 | 17464 70 | 17465 71 | 17481 72 | 18363 73 | 18989 74 | 18990 75 | 18991 76 | 18992 77 | 22717 78 | 22718 79 | 22719 80 | 22720 81 | 22721 82 | 22722 83 | 22723 84 | 22724 85 | 23161 86 | 23214 87 | 23219 88 | 23220 89 | 23221 90 | 23222 91 | 23223 92 | 23225 93 | 23227 94 | 23228 95 | 23229 96 | 23238 97 | 23239 98 | 23240 99 | 23241 100 | 23242 101 | 23243 102 | 23246 103 | 23247 104 | 23248 105 | 23249 106 | 23250 107 | 23251 108 | 23252 109 | 23338 110 | 23509 111 | 23510 112 | 24242 113 | 24252 114 | 24576 115 | 25675 116 | 25858 117 | 25859 118 | 25863 119 | 25953 120 | 26054 121 | 26055 122 | 26056 123 | 26332 124 | 26655 125 | 29059 126 | 30174 127 | 31700 128 | -------------------------------------------------------------------------------- /HermesProxy/CSV/RaceFaction.csv: -------------------------------------------------------------------------------- 1 | Race,Faction 2 | 1,1 3 | 2,2 4 | 3,3 5 | 4,4 6 | 5,5 7 | 6,6 8 | 7,115 9 | 8,116 10 | 10,1610 11 | 11,1629 12 | -------------------------------------------------------------------------------- /HermesProxy/CSV/SpellEffectPoints1.csv: -------------------------------------------------------------------------------- 1 | SpellId,SpellName,EffectBasePoints1,EffectBasePoints2,EffectBasePoints3 2 | 1243,Power Word: Fortitude(Rank 1),2,0,0 3 | 1244,Power Word: Fortitude(Rank 2),7,0,0 4 | 1245,Power Word: Fortitude(Rank 3),19,0,0 5 | 2791,Power Word: Fortitude(Rank 4),31,0,0 6 | 10937,Power Word: Fortitude(Rank 5),42,0,0 7 | 10938,Power Word: Fortitude(Rank 6),53,0,0 8 | -------------------------------------------------------------------------------- /HermesProxy/CSV/SpellEffectPoints2.csv: -------------------------------------------------------------------------------- 1 | SpellId,SpellName,EffectBasePoints1,EffectBasePoints2,EffectBasePoints3 2 | 1243,Power Word: Fortitude(Rank 1),2,0,0 3 | 1244,Power Word: Fortitude(Rank 2),7,0,0 4 | 1245,Power Word: Fortitude(Rank 3),19,0,0 5 | 2791,Power Word: Fortitude(Rank 4),31,0,0 6 | 10937,Power Word: Fortitude(Rank 5),42,0,0 7 | 10938,Power Word: Fortitude(Rank 6),53,0,0 8 | -------------------------------------------------------------------------------- /HermesProxy/CSV/TaxiNodes1.csv: -------------------------------------------------------------------------------- 1 | ID,ContinentID,X,Y,Z 2 | 1,0,-8888,0,94 3 | 2,0,-8840,489,109 4 | 3,0,16391,16341,69 5 | 4,0,-10628,1036,34 6 | 5,0,-9429,-2231,68 7 | 6,0,-4821,-1155,502 8 | 7,0,-3792,-783,9 9 | 8,0,-5421,-2930,347 10 | 9,0,-14271,299,31 11 | 10,0,478,1536,131 12 | 11,0,1568,267,-43 13 | 12,0,-10515,-1261,41 14 | 13,0,0,-859,58 15 | 14,0,-711,-515,26 16 | 15,0,2253,-5344,83 17 | 16,0,-1240,-2515,22 18 | 17,0,-916,-3496,70 19 | 18,0,-14444,509,26 20 | 19,0,-14473,464,36 21 | 20,0,-12414,146,3 22 | 21,0,-6633,-2180,244 23 | 22,1,-1197,29,176 24 | 23,1,1677,-4315,61 25 | 24,0,-6666,-2222,278 26 | 25,1,-441,-2596,96 27 | 26,1,6341,557,16 28 | 27,1,8643,841,23 29 | 28,1,2827,-289,107 30 | 29,1,966,1040,104 31 | 30,1,-5407,-2414,90 32 | 31,1,-4491,-775,-39 33 | 32,1,-3825,-4516,10 34 | 33,1,2681,1461,232 35 | 34,1,-1965,-5824,-1 36 | 35,1,1320,-4649,21 37 | 36,0,-8644,433,59 38 | 37,1,139,1325,193 39 | 38,1,-1767,3263,4 40 | 39,1,-7223,-3734,8 41 | 40,1,-7048,-3780,10 42 | 41,1,-4373,3338,12 43 | 42,1,-4419,199,25 44 | 43,0,283,-2002,194 45 | 44,1,3661,-4390,113 46 | 45,0,-11112,-3435,79 47 | 46,0,-986,-547,-3 48 | 47,0,-12418,235,1 49 | 48,1,5068,-337,367 50 | 49,1,7458,-2487,462 51 | 50,0,0,0,0 52 | 51,0,0,0,0 53 | 52,1,6799,-4742,701 54 | 53,1,6813,-4611,710 55 | 54,1,-4203,3284,-12 56 | 55,1,-3147,-2842,34 57 | 56,0,-10456,-3279,21 58 | 57,1,8701,991,14 59 | 58,1,3374,996,5 60 | 59,30,574,-46,37 61 | 60,30,-1335,-319,90 62 | 61,1,2302,-2524,104 63 | 62,1,7793,-2403,489 64 | 63,1,7787,-2404,489 65 | 64,1,2721,-3880,100 66 | 65,1,6205,-1949,571 67 | 66,0,931,-1430,64 68 | 67,0,2271,-5340,87 69 | 68,0,2327,-5286,81 70 | 69,1,7470,-2123,492 71 | 70,0,-7504,-2187,165 72 | 71,0,-8364,-2738,185 73 | 72,1,-6811,836,49 74 | 73,1,-6761,772,88 75 | 74,0,-6552,-1168,309 76 | 75,0,-6554,-1100,309 77 | 76,0,-635,-4720,5 78 | 77,1,-2380,-1882,95 79 | 78,0,3133,-3399,139 80 | 79,1,-6113,-1142,-187 81 | 80,1,-894,-3773,11 82 | 81,131074,0,0,0 83 | 84,0,2998,-3050,117 84 | 85,0,3109,-4285,109 85 | 86,0,2499,-4742,93 86 | 87,0,1857,-3658,143 87 | -------------------------------------------------------------------------------- /HermesProxy/CSV/TotemSpells.csv: -------------------------------------------------------------------------------- 1 | SpellId,TotemSlot 2 | 1535,0 3 | 3599,0 4 | 4971,0 5 | 5605,0 6 | 6274,0 7 | 6363,0 8 | 6364,0 9 | 6365,0 10 | 8181,0 11 | 8190,0 12 | 8227,0 13 | 8249,0 14 | 8264,0 15 | 8498,0 16 | 8499,0 17 | 10437,0 18 | 10438,0 19 | 10478,0 20 | 10479,0 21 | 10526,0 22 | 10585,0 23 | 10586,0 24 | 10587,0 25 | 11314,0 26 | 11315,0 27 | 11899,0 28 | 15038,0 29 | 15867,0 30 | 16387,0 31 | 18975,0 32 | 22047,0 33 | 23419,0 34 | 24309,0 35 | 27623,0 36 | 2484,1 37 | 5730,1 38 | 6390,1 39 | 6391,1 40 | 6392,1 41 | 8071,1 42 | 8075,1 43 | 8143,1 44 | 8154,1 45 | 8155,1 46 | 8160,1 47 | 8161,1 48 | 10406,1 49 | 10407,1 50 | 10408,1 51 | 10427,1 52 | 10428,1 53 | 10442,1 54 | 15786,1 55 | 23420,1 56 | 23789,1 57 | 25000,1 58 | 25361,1 59 | 5394,2 60 | 5675,2 61 | 6375,2 62 | 6377,2 63 | 8166,2 64 | 8170,2 65 | 8184,2 66 | 8262,2 67 | 10462,2 68 | 10463,2 69 | 10495,2 70 | 10496,2 71 | 10497,2 72 | 10537,2 73 | 10538,2 74 | 16190,2 75 | 17354,2 76 | 17359,2 77 | 23422,2 78 | 24854,2 79 | 6495,3 80 | 8177,3 81 | 8512,3 82 | 8835,3 83 | 10595,3 84 | 10600,3 85 | 10601,3 86 | 10613,3 87 | 10614,3 88 | 10627,3 89 | 15107,3 90 | 15111,3 91 | 15112,3 92 | 15787,3 93 | 23423,3 94 | 25359,3 95 | 25908,3 96 | 27621,3 -------------------------------------------------------------------------------- /HermesProxy/CSV/Transports1.csv: -------------------------------------------------------------------------------- 1 | Entry,Period 2 | 20808,350822 3 | 164871,356287 4 | 175080,303466 5 | 176231,329315 6 | 176244,316253 7 | 176310,295580 8 | 176495,335297 9 | 177233,317044 10 | 181056,1208095 -------------------------------------------------------------------------------- /HermesProxy/CSV/Transports2.csv: -------------------------------------------------------------------------------- 1 | Entry,Period 2 | 20808,231237 3 | 164871,239337 4 | 175080,248994 5 | 176231,230164 6 | 176244,312321 7 | 176310,241780 8 | 176495,317278 9 | 177233,259753 10 | 181056,1208095 11 | 181646,238709 -------------------------------------------------------------------------------- /HermesProxy/GitVersion.yml: -------------------------------------------------------------------------------- 1 | commit-date-format: O 2 | -------------------------------------------------------------------------------- /HermesProxy/Hermes.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WowLegacyCore/HermesProxy/841a26f5c06679680fd5a396922c293d36e84b71/HermesProxy/Hermes.ico -------------------------------------------------------------------------------- /HermesProxy/HermesProxy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | HermesProxy.Program 7 | Hermes.ico 8 | Copyright © WowLegacyCore 2023 9 | WowLegacyCore 10 | false 11 | 12 | 13 | 14 | 15 | 16 | win-x64 17 | true 18 | true 19 | true 20 | true 21 | 22 | 23 | 24 | _WINDOWS 25 | 26 | 27 | 28 | 29 | 30 | 31 | All 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | PreserveNewest 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Always 56 | true 57 | 58 | 59 | 60 | 61 | 62 | Always 63 | true 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /HermesProxy/Realm/Realm.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using Framework.Constants; 19 | using Framework.Realm; 20 | using System; 21 | using System.Net; 22 | 23 | public class Realm : IEquatable 24 | { 25 | public void SetName(string name) 26 | { 27 | Name = name; 28 | NormalizedName = name; 29 | NormalizedName = NormalizedName.Replace(" ", ""); 30 | } 31 | 32 | public IPEndPoint GetAddressForClient(IPAddress clientAddr) 33 | { 34 | IPAddress realmIp; 35 | 36 | if (IPAddress.IsLoopback(clientAddr)) 37 | realmIp = IPAddress.Parse("127.0.0.1"); 38 | else 39 | realmIp = IPAddress.Parse(Framework.Settings.ExternalAddress); 40 | 41 | IPEndPoint endpoint = new IPEndPoint(realmIp, Framework.Settings.RealmPort); 42 | 43 | // Return external IP 44 | return endpoint; 45 | } 46 | 47 | public uint GetConfigId() 48 | { 49 | return ConfigIdByType[Type]; 50 | } 51 | 52 | uint[] ConfigIdByType = 53 | { 54 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 55 | }; 56 | 57 | public override bool Equals(object obj) 58 | { 59 | return obj != null && obj is Realm && Equals((Realm)obj); 60 | } 61 | 62 | public bool Equals(Realm other) 63 | { 64 | return other.ExternalAddress.Equals(ExternalAddress) 65 | && other.Port == Port 66 | && other.Name == Name 67 | && other.Type == Type 68 | && other.Flags == Flags 69 | && other.CharacterCount == CharacterCount 70 | && other.Timezone == Timezone 71 | && other.PopulationLevel == PopulationLevel; 72 | } 73 | 74 | public override int GetHashCode() 75 | { 76 | return new { ExternalAddress, Port, Name, Type, Flags, CharacterCount, Timezone, PopulationLevel }.GetHashCode(); 77 | } 78 | 79 | public RealmId Id; 80 | public uint Build; 81 | public string ExternalAddress; 82 | public ushort Port; 83 | public string Name; 84 | public string NormalizedName; 85 | public byte Type; 86 | public RealmFlags Flags; 87 | public byte CharacterCount; 88 | public byte Timezone; 89 | public float PopulationLevel; 90 | } 91 | -------------------------------------------------------------------------------- /HermesProxy/Realm/RealmId.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) CypherCore All rights reserved. 2 | // Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information. 3 | 4 | using System; 5 | 6 | namespace Framework.Realm 7 | { 8 | public struct RealmId : IEquatable 9 | { 10 | public uint Index { get; set; } 11 | public byte Region { get; set; } 12 | public byte Site { get; set; } 13 | 14 | public RealmId(byte region, byte battlegroup, uint index) 15 | { 16 | Region = region; 17 | Site = battlegroup; 18 | Index = index; 19 | } 20 | 21 | public RealmId(uint realmAddress) 22 | { 23 | Region = (byte)((realmAddress >> 24) & 0xFF); 24 | Site = (byte)((realmAddress >> 16) & 0xFF); 25 | Index = realmAddress & 0xFFFF; 26 | } 27 | 28 | public uint GetAddress() 29 | { 30 | return (uint)((Region << 24) | (Site << 16) | (ushort)Index); 31 | } 32 | 33 | public string GetAddressString() 34 | { 35 | return $"{Region}-{Site}-{Index}"; 36 | } 37 | 38 | public string GetSubRegionAddress() 39 | { 40 | return $"{Region}-{Site}-0"; 41 | } 42 | 43 | public override bool Equals(object obj) 44 | { 45 | return obj != null && obj is RealmId && Equals((RealmId)obj); 46 | } 47 | 48 | public bool Equals(RealmId other) 49 | { 50 | return other.Index == Index; 51 | } 52 | 53 | public override int GetHashCode() 54 | { 55 | return new { Site, Region, Index }.GetHashCode(); 56 | } 57 | 58 | public override string ToString() 59 | { 60 | return $"Realm{{Index={Index},Region={Region},Index={Index}}}"; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/PacketHandlers/DuelHandler.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.Enums; 2 | using HermesProxy.World.Enums; 3 | using HermesProxy.World.Objects; 4 | using HermesProxy.World.Server.Packets; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace HermesProxy.World.Client 9 | { 10 | public partial class WorldClient 11 | { 12 | // Handlers for SMSG opcodes coming the legacy world server 13 | [PacketHandler(Opcode.SMSG_DUEL_REQUESTED)] 14 | void HandleDuelRequested(WorldPacket packet) 15 | { 16 | DuelRequested duel = new DuelRequested(); 17 | duel.ArbiterGUID = packet.ReadGuid().To128(GetSession().GameState); 18 | duel.RequestedByGUID = packet.ReadGuid().To128(GetSession().GameState); 19 | duel.RequestedByWowAccount = GetSession().GetGameAccountGuidForPlayer(duel.RequestedByGUID); 20 | SendPacketToClient(duel); 21 | } 22 | 23 | [PacketHandler(Opcode.SMSG_DUEL_COUNTDOWN)] 24 | void HandleDuelCountdown(WorldPacket packet) 25 | { 26 | DuelCountdown duel = new DuelCountdown(); 27 | duel.Countdown = packet.ReadUInt32(); 28 | SendPacketToClient(duel); 29 | } 30 | 31 | [PacketHandler(Opcode.SMSG_DUEL_COMPLETE)] 32 | void HandleDuelComplete(WorldPacket packet) 33 | { 34 | DuelComplete duel = new DuelComplete(); 35 | duel.Started = packet.ReadBool(); 36 | SendPacketToClient(duel); 37 | } 38 | 39 | [PacketHandler(Opcode.SMSG_DUEL_WINNER)] 40 | void HandleDuelWinner(WorldPacket packet) 41 | { 42 | DuelWinner duel = new DuelWinner(); 43 | duel.Fled = packet.ReadBool(); 44 | duel.BeatenName = packet.ReadCString(); 45 | duel.WinnerName = packet.ReadCString(); 46 | duel.BeatenVirtualRealmAddress = GetSession().RealmId.GetAddress(); 47 | duel.WinnerVirtualRealmAddress = GetSession().RealmId.GetAddress(); 48 | SendPacketToClient(duel); 49 | } 50 | 51 | [PacketHandler(Opcode.SMSG_DUEL_IN_BOUNDS)] 52 | void HandleDuelInBounds(WorldPacket packet) 53 | { 54 | DuelInBounds duel = new DuelInBounds(); 55 | SendPacketToClient(duel); 56 | } 57 | 58 | [PacketHandler(Opcode.SMSG_DUEL_OUT_OF_BOUNDS)] 59 | void HandleDuelOutOfBounds(WorldPacket packet) 60 | { 61 | DuelOutOfBounds duel = new DuelOutOfBounds(); 62 | SendPacketToClient(duel); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/PacketHandlers/GameObjectHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World.Enums; 4 | using HermesProxy.World.Objects; 5 | using HermesProxy.World.Server.Packets; 6 | using System; 7 | 8 | namespace HermesProxy.World.Client 9 | { 10 | public partial class WorldClient 11 | { 12 | // Handlers for SMSG opcodes coming the legacy world server 13 | [PacketHandler(Opcode.SMSG_GAME_OBJECT_DESPAWN)] 14 | void HandleGameObjectDespawn(WorldPacket packet) 15 | { 16 | WowGuid64 guid = packet.ReadGuid(); 17 | GameObjectDespawn despawn = new GameObjectDespawn(); 18 | despawn.ObjectGUID = guid.To128(GetSession().GameState); 19 | SendPacketToClient(despawn); 20 | GetSession().GameState.DespawnedGameObjects.Add(guid); 21 | } 22 | 23 | [PacketHandler(Opcode.SMSG_GAME_OBJECT_RESET_STATE)] 24 | void HandleGameObjectResetState(WorldPacket packet) 25 | { 26 | GameObjectResetState reset = new GameObjectResetState(); 27 | reset.ObjectGUID = packet.ReadGuid().To128(GetSession().GameState); 28 | SendPacketToClient(reset); 29 | } 30 | 31 | [PacketHandler(Opcode.SMSG_GAME_OBJECT_CUSTOM_ANIM)] 32 | void HandleGameObjectCustomAnim(WorldPacket packet) 33 | { 34 | GameObjectCustomAnim anim = new GameObjectCustomAnim(); 35 | anim.ObjectGUID = packet.ReadGuid().To128(GetSession().GameState); 36 | anim.CustomAnim = packet.ReadUInt32(); 37 | SendPacketToClient(anim); 38 | } 39 | 40 | [PacketHandler(Opcode.SMSG_FISH_NOT_HOOKED)] 41 | void HandleFishNotHooked(WorldPacket packet) 42 | { 43 | FishNotHooked fish = new FishNotHooked(); 44 | SendPacketToClient(fish); 45 | } 46 | 47 | [PacketHandler(Opcode.SMSG_FISH_ESCAPED)] 48 | void HandleFishEscaped(WorldPacket packet) 49 | { 50 | FishEscaped fish = new FishEscaped(); 51 | SendPacketToClient(fish); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/PacketHandlers/SupportTicketHandler.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.World.Enums; 2 | 3 | namespace HermesProxy.World.Client 4 | { 5 | public partial class WorldClient 6 | { 7 | [PacketHandler(Opcode.SMSG_GM_TICKET_CREATE)] 8 | void HandleGmTicketCreate(WorldPacket packet) 9 | { 10 | var response = (LegacyGmTicketResponse) packet.ReadUInt32(); 11 | bool isError = !(response is LegacyGmTicketResponse.CreateSuccess or LegacyGmTicketResponse.UpdateSuccess); 12 | Session.SendHermesTextMessage($"GM Ticket Status: {response}", isError); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/PacketHandlers/SystemHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World.Enums; 4 | using HermesProxy.World.Objects; 5 | using HermesProxy.World.Server.Packets; 6 | using System; 7 | 8 | namespace HermesProxy.World.Client 9 | { 10 | public partial class WorldClient 11 | { 12 | // Handlers for SMSG opcodes coming the legacy world server 13 | [PacketHandler(Opcode.SMSG_FEATURE_SYSTEM_STATUS)] 14 | void HandleFeatureSystemStatus(WorldPacket packet) 15 | { 16 | GetSession().RealmSocket.SendFeatureSystemStatus(); 17 | } 18 | 19 | // Handlers for SMSG opcodes coming the legacy world server 20 | [PacketHandler(Opcode.SMSG_MOTD)] 21 | void HandleMotd(WorldPacket packet) 22 | { 23 | MOTD motd = new MOTD(); 24 | uint count = packet.ReadUInt32(); 25 | for (uint i = 0; i < count; i++) 26 | motd.Text.Add(packet.ReadCString()); 27 | SendPacketToClient(motd); 28 | 29 | // These packets don't exist in old clients (for vanilla servers we send them after account data times along with others). 30 | if (LegacyVersion.AddedInVersion(ClientVersionBuild.V2_0_1_6180)) 31 | { 32 | GetSession().RealmSocket.SendSetTimeZoneInformation(); 33 | GetSession().RealmSocket.SendSeasonInfo(); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/PacketHandlers/TaxiHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World.Enums; 4 | using HermesProxy.World.Objects; 5 | using HermesProxy.World.Server.Packets; 6 | using System; 7 | 8 | namespace HermesProxy.World.Client 9 | { 10 | public partial class WorldClient 11 | { 12 | // Handlers for SMSG opcodes coming the legacy world server 13 | [PacketHandler(Opcode.SMSG_TAXI_NODE_STATUS)] 14 | void HandleTaxiNodeStatus(WorldPacket packet) 15 | { 16 | TaxiNodeStatusPkt taxi = new(); 17 | taxi.FlightMaster = packet.ReadGuid().To128(GetSession().GameState); 18 | bool learned = packet.ReadBool(); 19 | taxi.Status = learned ? TaxiNodeStatus.Learned : TaxiNodeStatus.Unlearned; 20 | SendPacketToClient(taxi); 21 | } 22 | [PacketHandler(Opcode.SMSG_SHOW_TAXI_NODES)] 23 | void HandleShowTaxiNodes(WorldPacket packet) 24 | { 25 | uint playerFlags = GetSession().GameState.GetLegacyFieldValueUInt32(GetSession().GameState.CurrentPlayerGuid, PlayerField.PLAYER_FLAGS); 26 | if (playerFlags.HasAnyFlag(PlayerFlags.GM)) 27 | { 28 | ChatPkt chat = new ChatPkt(GetSession(), ChatMessageTypeModern.System, "Disable GM mode before talking to taxi master or your game will freeze."); 29 | SendPacketToClient(chat); 30 | return; 31 | } 32 | 33 | ShowTaxiNodes taxi = new(); 34 | bool hasWindowInfo = packet.ReadUInt32() != 0; 35 | if (hasWindowInfo) 36 | { 37 | taxi.WindowInfo = new(); 38 | taxi.WindowInfo.UnitGUID = packet.ReadGuid().To128(GetSession().GameState); 39 | taxi.WindowInfo.CurrentNode = GetSession().GameState.CurrentTaxiNode = packet.ReadUInt32(); 40 | } 41 | while (packet.CanRead()) 42 | { 43 | byte nodesMask = packet.ReadUInt8(); 44 | taxi.CanLandNodes.Add(nodesMask); 45 | taxi.CanUseNodes.Add(nodesMask); 46 | } 47 | GetSession().GameState.UsableTaxiNodes = taxi.CanUseNodes; // save for CMSG_ACTIVATE_TAXI_EXPRESS 48 | SendPacketToClient(taxi); 49 | } 50 | [PacketHandler(Opcode.SMSG_NEW_TAXI_PATH)] 51 | void HandleNewTaxiPath(WorldPacket packet) 52 | { 53 | NewTaxiPath taxi = new(); 54 | SendPacketToClient(taxi); 55 | } 56 | [PacketHandler(Opcode.SMSG_ACTIVATE_TAXI_REPLY)] 57 | void HandleActivateTaxiReply(WorldPacket packet) 58 | { 59 | ActivateTaxiReply reply = (ActivateTaxiReply)packet.ReadUInt32(); 60 | // Ok status needs to be sent after the monster move packet. 61 | if (reply != ActivateTaxiReply.Ok) 62 | { 63 | ActivateTaxiReplyPkt taxi = new(); 64 | taxi.Reply = reply; 65 | SendPacketToClient(taxi); 66 | GetSession().GameState.IsWaitingForTaxiStart = false; 67 | } 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /HermesProxy/World/Client/UpdateField.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World.Client 9 | { 10 | [StructLayout(LayoutKind.Explicit)] 11 | public struct UpdateField 12 | { 13 | public UpdateField(uint val) : this() 14 | { 15 | UInt32Value = val; 16 | } 17 | 18 | public UpdateField(int val) : this() 19 | { 20 | Int32Value = val; 21 | } 22 | 23 | public UpdateField(float val) : this() 24 | { 25 | FloatValue = val; 26 | } 27 | 28 | [FieldOffset(0)] public readonly uint UInt32Value; 29 | [FieldOffset(0)] public readonly int Int32Value; 30 | [FieldOffset(0)] public readonly float FloatValue; 31 | 32 | public override bool Equals(object obj) 33 | { 34 | if (obj is UpdateField) 35 | return Equals((UpdateField) obj); 36 | return false; 37 | } 38 | 39 | public bool Equals(UpdateField other) 40 | { 41 | if (UInt32Value == other.UInt32Value) 42 | return true; 43 | 44 | if (Math.Abs(FloatValue - other.FloatValue) < float.Epsilon) 45 | return true; 46 | 47 | return false; 48 | } 49 | 50 | public static bool operator ==(UpdateField first, UpdateField other) 51 | { 52 | return first.Equals(other); 53 | } 54 | 55 | public static bool operator !=(UpdateField first, UpdateField other) 56 | { 57 | return !(first == other); 58 | } 59 | 60 | public override int GetHashCode() 61 | { 62 | return UInt32Value.GetHashCode(); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/AccountDataType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum AccountDataType 10 | { 11 | GlobalConfigCache = 0, 12 | PerCharacterConfigCache = 1, 13 | GlobalBindingsCache = 2, 14 | PerCharacterBindingsCache = 3, 15 | GlobalMacrosCache = 4, 16 | PerCharacterMacrosCache = 5, 17 | PerCharacterLayoutCache = 6, 18 | PerCharacterChatCache = 7, 19 | GlobalTTSCache = 8, 20 | PerCharacterTTSCache = 9, 21 | GlobalFlaggedCache = 10, 22 | PerCharacterFlaggedCache = 11, 23 | PerCharacterClickBindingsCache = 12, 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/ArenaTeamCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum ArenaTeamCommandType : uint 10 | { 11 | Create = 0, 12 | Invite = 1, 13 | Quit = 3, 14 | Founder = 14, 15 | } 16 | 17 | public enum ArenaTeamCommandErrorLegacy : uint 18 | { 19 | None = 0x00, 20 | Internal = 0x01, 21 | AlreadyInArenaTeam = 0x02, 22 | AlreadyInArenaTeamS = 0x03, 23 | InvitedToArenaTeam = 0x04, 24 | AlreadyInvitedToArenaTeamS = 0x05, 25 | NameInvalid = 0x06, 26 | NameExistsS = 0x07, 27 | LeaderLeaveS = 0x08, 28 | Permissions = 0x08, 29 | PlayerNotInTeam = 0x09, 30 | PlayerNotInTeamSS = 0x0A, 31 | PlayerNotFoundS = 0x0B, 32 | NotALlied = 0x0C, 33 | IgnoringYouS = 0x13, 34 | TargetTooLowS = 0x15, 35 | TooManyMembersS = 0x16, 36 | } 37 | 38 | public enum ArenaTeamCommandErrorModern : uint 39 | { 40 | None = 0x00, 41 | Internal = 0x01, 42 | AlreadyInArenaTeam = 0x02, 43 | AlreadyInArenaTeamS = 0x03, 44 | InvitedToArenaTeam = 0x04, 45 | AlreadyInvitedToArenaTeamS = 0x05, 46 | NameInvalid = 0x06, 47 | NameExistsS = 0x07, 48 | LeaderLeaveS = 0x08, 49 | Permissions = 0x08, 50 | PlayerNotInTeam = 0x09, 51 | PlayerNotInTeamSS = 0x0A, 52 | PlayerNotFoundS = 0x0B, 53 | NotALlied = 0x0C, 54 | IgnoringYouS = 0x13, 55 | Internal2 = 0x14, 56 | TargetTooLowS = 0x15, 57 | TargetTooHighS = 0x16, 58 | TooManyMembersS = 0x17, 59 | NotFound = 0x1B, 60 | Locked = 0x1E, 61 | TooManyCreate = 0x21, 62 | Disqualified = 0x2A, 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/ArenaTeamEvent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum ArenaTeamEventLegacy 10 | { 11 | PlayerJoined = 3, 12 | PlayerLeft = 4, 13 | PlayerRemoved = 5, 14 | LeaderIs = 6, 15 | LeaderChanged = 7, 16 | TeamDisbanded = 8 17 | } 18 | 19 | public enum ArenaTeamEventModern 20 | { 21 | PlayerJoined = 4, 22 | PlayerLeft = 5, 23 | PlayerRemoved = 6, 24 | LeaderIs = 7, 25 | LeaderChanged = 8, 26 | TeamDisbanded = 9 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/AuctionDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum AuctionHouseAction 10 | { 11 | Sell = 0, // ERR_AUCTION_STARTED 12 | Cancel = 1, // ERR_AUCTION_REMOVED 13 | Bid = 2 // ERR_AUCTION_BID_PLACED 14 | } 15 | 16 | public enum AuctionHouseError 17 | { 18 | Ok = 0, 19 | Inventory = 1, 20 | InternalError = 2, // ERR_AUCTION_DATABASE_ERROR - default 21 | NotEnoughMoney = 3, // ERR_NOT_ENOUGH_MONEY 22 | ItemNotFound = 4, // ERR_ITEM_NOT_FOUND 23 | HigherBid = 5, // ERR_AUCTION_HIGHER_BID 24 | IncrementBind = 7, // ERR_AUCTION_BID_INCREMENT 25 | CantBidYouAuction = 10, // ERR_AUCTION_BID_OWN 26 | Restricted = 13 // ERR_RESTRICTED_ACCOUNT 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/AuthResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum AuthResult : byte 10 | { 11 | AUTH_OK = 12, 12 | AUTH_FAILED = 13, 13 | AUTH_REJECT = 14, 14 | AUTH_BAD_SERVER_PROOF = 15, 15 | AUTH_UNAVAILABLE = 16, 16 | AUTH_SYSTEM_ERROR = 17, 17 | AUTH_BILLING_ERROR = 18, 18 | AUTH_BILLING_EXPIRED = 19, 19 | AUTH_VERSION_MISMATCH = 20, 20 | AUTH_UNKNOWN_ACCOUNT = 21, 21 | AUTH_INCORRECT_PASSWORD = 22, 22 | AUTH_SESSION_EXPIRED = 23, 23 | AUTH_SERVER_SHUTTING_DOWN = 24, 24 | AUTH_ALREADY_LOGGING_IN = 25, 25 | AUTH_LOGIN_SERVER_NOT_FOUND = 26, 26 | AUTH_WAIT_QUEUE = 27, 27 | AUTH_BANNED = 28, 28 | AUTH_ALREADY_ONLINE = 29, 29 | AUTH_NO_TIME = 30, 30 | AUTH_DB_BUSY = 31, 31 | AUTH_SUSPENDED = 32, 32 | AUTH_PARENTAL_CONTROL = 33, 33 | AUTH_LOCKED_ENFORCED = 34, 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/BattlegroundDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum BattlegroundListID : uint 10 | { 11 | AlteracValley = 1, 12 | WarsongGulch = 2, 13 | ArathiBasin = 3, 14 | } 15 | 16 | public enum BattlegroundMapID : uint 17 | { 18 | AlteracValley = 30, 19 | WarsongGulch = 489, 20 | ArathiBasin = 529, 21 | } 22 | 23 | public enum BattleGroundStatus : uint 24 | { 25 | None = 0, // first status, should mean bg is not instance 26 | WaitQueue = 1, // means bg is empty and waiting for queue 27 | WaitJoin = 2, // this means, that BG has already started and it is waiting for more players 28 | InProgress = 3, // means bg is running 29 | WaitLeave = 4 // means some faction has won BG and it is ending 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/CreatureDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public class CreatureConst 10 | { 11 | public const int MaxGossipMenuItems = 64; // client supported items unknown, but provided number must be enough 12 | public const int DefaultGossipMessage = 0xFFFFFF; 13 | public const int MaxGossipTextEmotes = 3; 14 | public const int MaxNpcTextOptions = 8; 15 | public const int MaxCreatureBaseHp = 4; 16 | public const int MaxCreatureSpells = 8; 17 | public const byte MaxVendorItems = 150; 18 | public const int CreatureAttackRangeZ = 3; 19 | public const int MaxCreatureKillCredit = 2; 20 | public const int MaxCreatureDifficulties = 3; 21 | public const int MaxCreatureSpellDataSlots = 4; 22 | public const int MaxCreatureNames = 4; 23 | public const int MaxCreatureModelIds = 4; 24 | public const int MaxTrainerspellAbilityReqs = 3; 25 | public const int CreatureRegenInterval = 2 * Time.InMilliseconds; 26 | public const int PetFocusRegenInterval = 4 * Time.InMilliseconds; 27 | public const int CreatureNoPathEvadeTime = 5 * Time.InMilliseconds; 28 | public const int BoundaryVisualizeCreature = 15425; 29 | public const float BoundaryVisualizeCreatureScale = 0.25f; 30 | public const int BoundaryVisualizeStepSize = 1; 31 | public const int BoundaryVisualizeFailsafeLimit = 750; 32 | public const int BoundaryVisualizeSpawnHeight = 5; 33 | public const uint AIDefaultCooldown = 5000; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/Currency.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum Currency : uint 10 | { 11 | ArenaPoints = 1900, 12 | HonorPoints = 1901, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/GameObjectDynamicFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum GameObjectDynamicFlagsLegacy : uint 11 | { 12 | Activate = 0x001, // enables interaction with GO 13 | Animate = 0x002, // possibly more distinct animation of GO 14 | NoInteract = 0x004, // appears to disable interaction (not fully verified) 15 | Sparkle = 0x008, // makes GO sparkle 16 | Stopped = 0x010 // Transport is stopped 17 | }; 18 | 19 | [Flags] 20 | public enum GameObjectDynamicFlagsModern : uint 21 | { 22 | HideModel = 0x002, // Object model is not shown with this flag 23 | Activate = 0x004, // enables interaction with GO 24 | Animate = 0x008, // possibly more distinct animation of GO 25 | Depleted = 0x010, // can no longer be interacted with (and for gathering nodes it forces "open" visual state) 26 | Sparkle = 0x020, // makes GO sparkle 27 | Stopped = 0x040, // Transport is stopped 28 | NoInteract = 0x080, 29 | InvertedMovement = 0x100, // GAMEOBJECT_TYPE_TRANSPORT only 30 | LoHighlight = 0x200, // Allows object highlight when GO_DYNFLAG_LO_ACTIVATE or GO_DYNFLAG_LO_SPARKLE are set, not only when player is on quest determined by Data fields 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/HitInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum HitInfoVanilla : uint 11 | { 12 | None = 0x00000000, 13 | Unk0 = 0x00000001, 14 | AffectsVictim = 0x00000002, 15 | OffHand = 0x00000004, 16 | Unk3 = 0x00000008, 17 | Miss = 0x00000010, 18 | FullAbsorb = 0x00000020, // plays absorb sound 19 | FullResist = 0x00000040, // resisted atleast some damage 20 | CriticalHit = 0x00000080, 21 | Block = 0x00000800, 22 | Glancing = 0x00004000, 23 | Crushing = 0x00008000, 24 | NoAnimation = 0x00010000, 25 | NoHitSound = 0x00080000 26 | }; 27 | 28 | [Flags] 29 | public enum HitInfo : uint 30 | { 31 | None = 0x00000000, 32 | Unk0 = 0x00000001, // unused - debug flag, probably debugging visuals, no effect in non-ptr client 33 | AffectsVictim = 0x00000002, 34 | OffHand = 0x00000004, 35 | Unk3 = 0x00000008, // unused (3.3.5a) 36 | Miss = 0x00000010, 37 | FullAbsorb = 0x00000020, 38 | PartialAbsorb = 0x00000040, 39 | FullResist = 0x00000080, 40 | PartialResist = 0x00000100, 41 | CriticalHit = 0x00000200, 42 | Unk10 = 0x00000400, 43 | Unk11 = 0x00000800, 44 | Unk12 = 0x00001000, 45 | Block = 0x00002000, 46 | Unk14 = 0x00004000, // set only if meleespellid is present// no world text when victim is hit for 0 dmg(HideWorldTextForNoDamage?) 47 | Unk15 = 0x00008000, // player victim?// something related to blod sprut visual (BloodSpurtInBack?) 48 | Glancing = 0x00010000, 49 | Crushing = 0x00020000, 50 | NoAnimation = 0x00040000, // set always for melee spells and when no hit animation should be displayed 51 | Unk19 = 0x00080000, 52 | Unk20 = 0x00100000, 53 | NoHitSound = 0x00200000, // unused (3.3.5a) 54 | Unk22 = 0x00400000, 55 | RageGain = 0x00800000, 56 | FakeDamage = 0x01000000, // enables damage animation even if no damage done, set only if no damage 57 | Unk25 = 0x02000000, 58 | Unk26 = 0x04000000 59 | }; 60 | } 61 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/HotfixStatus.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum HotfixStatus : byte 10 | { 11 | Valid = 1, 12 | RecordRemoved = 2, 13 | Invalid = 3, 14 | NotPublic = 4, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/InstanceDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum RaidGroupReason 10 | { 11 | None = 0, 12 | Lowlevel = 1, // "You are too low level to enter this instance." 13 | Only = 2, // "You must be in a raid group to enter this instance." 14 | Full = 3, // "The instance is full." 15 | Requirements = 4 // "You do not meet the requirements to enter this instance." 16 | } 17 | 18 | public enum ResetFailedReason 19 | { 20 | Failed = 0, // "Cannot reset %s. There are players still inside the instance." 21 | Zoning = 1, // "Cannot reset %s. There are players in your party attempting to zone into an instance." 22 | Offline = 2 // "Cannot reset %s. There are players offline in your party." 23 | } 24 | 25 | public enum InstanceResetWarningType 26 | { 27 | WarningHours = 1, // WARNING! %s is scheduled to reset in %d hour(s). 28 | WarningMin = 2, // WARNING! %s is scheduled to reset in %d minute(s)! 29 | WarningMinSoon = 3, // WARNING! %s is scheduled to reset in %d minute(s). Please exit the zone or you will be returned to your bind location! 30 | Welcome = 4, // Welcome to %s. This raid instance is scheduled to reset in %s. 31 | Expired = 5 32 | } 33 | 34 | public enum DifficultyLegacy : byte 35 | { 36 | Normal = 0, 37 | Heroic = 1, 38 | } 39 | 40 | public enum DifficultyModern : byte 41 | { 42 | None = 0, 43 | Normal = 1, 44 | Heroic = 2, 45 | Raid10N = 3, 46 | Raid25N = 4, 47 | Raid10HC = 5, 48 | Raid25HC = 6, 49 | Raid40 = 9, 50 | Raid20 = 148, 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/Language.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum Language : uint 10 | { 11 | Universal = 0, 12 | Orcish = 1, 13 | Darnassian = 2, 14 | Taurahe = 3, 15 | Dwarvish = 6, 16 | Common = 7, 17 | Demonic = 8, 18 | Titan = 9, 19 | Thalassian = 10, 20 | Draconic = 11, 21 | Kalimag = 12, 22 | Gnomish = 13, 23 | Troll = 14, 24 | Gutterspeak = 33, 25 | Draenei = 35, 26 | Zombie = 36, 27 | GnomishBinary = 37, 28 | GoblinBinary = 38, 29 | Worgen = 39, 30 | Goblin = 40, 31 | Pandaren1 = 42, 32 | Pandaren2 = 43, 33 | Pandaren3 = 44, 34 | RikkitunSprite = 168, 35 | ShathYar = 178, 36 | Nerglish = 179, 37 | Moonkin = 180, 38 | Shalassian = 181, 39 | Thalassian2 = 182, 40 | AddonBfA = 183, 41 | AddonLogged = 184, 42 | Vulpera = 285, 43 | ComplexCipher = 287, 44 | BasicCypher = 288, 45 | Metrial = 290, 46 | Altonian = 291, 47 | Sopranian = 292, 48 | Aealic = 293, 49 | Dealic = 294, 50 | Trebelim = 295, 51 | Bassalim = 296, 52 | EmbeddedLanguages = 297, 53 | Unknowable = 298, 54 | Addon = uint.MaxValue 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/LootDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum LootMethod 10 | { 11 | FreeForAll = 0, 12 | MasterLoot = 2, 13 | GroupLoot = 3, 14 | PersonalLoot = 5 15 | } 16 | 17 | public enum LootType 18 | { 19 | None = 0, 20 | Corpse = 1, 21 | Pickpocketing = 2, 22 | Fishing = 3, 23 | Disenchanting = 4, 24 | // Ignored Always By Client 25 | Skinning = 6, 26 | Prospecting = 7, 27 | Milling = 8, 28 | } 29 | 30 | public enum LootError 31 | { 32 | DidntKill = 0, // You don't have permission to loot that corpse. 33 | TooFar = 4, // You are too far away to loot that corpse. 34 | BadFacing = 5, // You must be facing the corpse to loot it. 35 | Locked = 6, // Someone is already looting that corpse. 36 | NotStanding = 8, // You need to be standing up to loot something! 37 | Stunned = 9, // You can't loot anything while stunned! 38 | PlayerNotFound = 10, // Player not found 39 | PlayTimeExceeded = 11, // Maximum play time exceeded 40 | MasterInvFull = 12, // That player's inventory is full 41 | MasterUniqueItem = 13, // Player has too many of that item already 42 | MasterOther = 14, // Can't assign item to that player 43 | AlreadPickPocketed = 15, // Your target has already had its pockets picked 44 | NotWhileShapeShifted = 16, // You can't do that while shapeshifted. 45 | NoLoot = 17 // There is no loot. 46 | } 47 | 48 | // type of Loot Item in Loot View 49 | public enum LootSlotTypeLegacy : uint 50 | { 51 | AllowLoot = 0, 52 | RollOngoing = 1, 53 | Master = 2, 54 | Locked = 3, 55 | Owner = 4 56 | } 57 | public enum LootSlotTypeModern : uint 58 | { 59 | AllowLoot = 0, // Player Can Loot The Item. 60 | RollOngoing = 1, // Roll Is Ongoing. Player Cannot Loot. 61 | Locked = 2, // Item Is Shown In Red. Player Cannot Loot. 62 | Master = 3, // Item Can Only Be Distributed By Group Loot Master. 63 | Owner = 4 // Ignore Binding Confirmation And Etc, For Single Player Looting 64 | } 65 | public enum RollMask 66 | { 67 | Pass = 0x01, 68 | Need = 0x02, 69 | Greed = 0x04, 70 | Disenchant = 0x08, 71 | 72 | AllNoDisenchant = 0x07, 73 | AllMask = 0x0f 74 | } 75 | 76 | public enum RollType 77 | { 78 | Pass = 0, 79 | Need = 1, 80 | Greed = 2, 81 | Disenchant = 3, 82 | NotEmitedYet = 4, 83 | NotValid = 5, 84 | 85 | MaxTypes = 4, 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/MailDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum MailType 10 | { 11 | Normal = 0, 12 | Auction = 2, 13 | Creature = 3, 14 | GameObject = 4, 15 | Item = 5 16 | } 17 | 18 | public enum MailActionType 19 | { 20 | Send = 0, 21 | MoneyTaken = 1, 22 | AttachmentExpired = 2, 23 | ReturnedToSender = 3, 24 | Deleted = 4, 25 | MadePermanent = 5 26 | } 27 | 28 | public enum MailErrorType 29 | { 30 | Ok = 0, 31 | Equip = 1, 32 | CannotSendToSelf = 2, 33 | NotEnoughMoney = 3, 34 | RecipientNotFound = 4, 35 | NotYourTeam = 5, 36 | InternalError = 6, 37 | DisabledForTrial = 14, 38 | RecipientCapReached = 15, 39 | CantSendWrappedCOD = 16, 40 | MailAndChatSuspended = 17, 41 | TooManyAttachMents = 18, 42 | MailAttachmentInvalid = 19, 43 | ItemHasExpired = 21 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/MovementFlagsExtra.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum MovementFlagExtra : ushort 11 | { 12 | None = 0x0000, 13 | PreventStrafe = 0x0001, // 4.x 14 | PreventJumping = 0x0002, // 4.x 15 | DisableCollision = 0x0004, // 4.x 16 | FullSpeedTurning = 0x0008, 17 | FullSpeedPitching = 0x0010, 18 | AlwaysAllowPitching = 0x0020, 19 | IsVehicleExitVoluntary = 0x0040, // 4.x 20 | IsJumpSplineInAir = 0x0080, // 4.x 21 | IsAnimTierInTrans = 0x0100, // 4.x 22 | PreventChangePitch = 0x0200, // 4.x 23 | InterpolateMove = 0x0400, // 4.x (Interpolation is player only) 24 | InterpolateTurning = 0x0800, 25 | InterpolatePitching = 0x1000, 26 | VehiclePassengerIsTransitionAllowed = 0x2000, // 4.x 27 | CanTransitionBetweenSwimAndFly = 0x4000, // 4.x 28 | Unknown10 = 0x8000 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/ObjectTypeMask.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum ObjectTypeMask 11 | { 12 | Object = 0x01, 13 | Item = 0x02, 14 | Container = 0x04, 15 | Unit = 0x8, 16 | Player = 0x10, 17 | ActivePlayer = 0x20, 18 | GameObject = 0x40, 19 | DynamicObject = 0x80, 20 | Corpse = 0x100, 21 | AreaTrigger = 0x200, 22 | Sceneobject = 0x400, 23 | Conversation = 0x800, 24 | Seer = Player | Unit | DynamicObject 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/PetDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum PetTalk 10 | { 11 | SpecialSpell = 0, 12 | Attack = 1 13 | } 14 | 15 | public enum CommandStates 16 | { 17 | Stay = 0, 18 | Follow = 1, 19 | Attack = 2, 20 | Abandon = 3, 21 | MoveTo = 4 22 | } 23 | 24 | [Flags] 25 | public enum PetModeFlags 26 | { 27 | Unknown1 = 0x0010000, 28 | Unknown2 = 0x0020000, 29 | Unknown3 = 0x0040000, 30 | Unknown4 = 0x0080000, 31 | Unknown5 = 0x0100000, 32 | Unknown6 = 0x0200000, 33 | Unknown7 = 0x0400000, 34 | Unknown8 = 0x0800000, 35 | Unknown9 = 0x1000000, 36 | Unknown10 = 0x2000000, 37 | Unknown11 = 0x4000000, 38 | DisableActions = 0x8000000 39 | } 40 | 41 | public enum PetNameInvalidReason 42 | { 43 | // custom, not sent 44 | Success = 0, 45 | 46 | Invalid = 1, 47 | NoName = 2, 48 | TooShort = 3, 49 | TooLong = 4, 50 | MixedLanguages = 6, 51 | Profane = 7, 52 | Reserved = 8, 53 | ThreeConsecutive = 11, 54 | InvalidSpace = 12, 55 | ConsecutiveSpaces = 13, 56 | RussianConsecutiveSilentCharacters = 14, 57 | RussianSilentCharacterAtBeginningOrEnd = 15, 58 | DeclensionDoesntMatchBaseName = 16 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/PetFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum PetFlags : byte 11 | { 12 | None = 0x00, 13 | CanBeRenamed = 0x01, 14 | CanBeAbandoned = 0x02 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/PowerType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum PowerType : sbyte 10 | { 11 | Invalid = -1, 12 | Mana = 0, // UNIT_FIELD_POWER1 13 | Rage = 1, // UNIT_FIELD_POWER2 14 | Focus = 2, // UNIT_FIELD_POWER3 15 | Energy = 3, // UNIT_FIELD_POWER4 16 | Happiness = 4, // UNIT_FIELD_POWER5 17 | Rune = 5, // UNIT_FIELD_POWER6 18 | RunicPower = 6, // UNIT_FIELD_POWER7 19 | ComboPoints = 14, // not real, so we know to set PLAYER_FIELD_BYTES,1 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/PvPFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum PvPFlags 10 | { 11 | None = 0x00, 12 | PvP = 0x01, 13 | Unk1 = 0x02, 14 | FFAPvp = 0x04, 15 | Sanctuary = 0x08, 16 | Unk4 = 0x10, 17 | Unk5 = 0x20, 18 | Unk6 = 0x40, 19 | Unk7 = 0x80, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/QuestFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum QuestFlags : uint 11 | { 12 | None = 0x00000000, 13 | StayAlive = 0x00000001, 14 | PartyAccept = 0x00000002, 15 | Exploration = 0x00000004, 16 | Sharable = 0x00000008, 17 | HasCondition = 0x00000010, 18 | HideRewardPOI = 0x00000020, 19 | Raid = 0x00000040, 20 | ExpansionOnly = 0x00000080, // Deprecated flag 21 | NoMoneyFromExperience = 0x00000100, 22 | HiddenRewards = 0x00000200, 23 | Tracking = 0x00000400, 24 | DepricateReputation = 0x00000800, 25 | Daily = 0x00001000, 26 | FlagsForPvP = 0x00002000, 27 | Unavailable = 0x00004000, 28 | Weekly = 0x00008000, 29 | AutoComplete = 0x00010000, 30 | DisplayItemInTracker = 0x00020000, 31 | DisableCompletionText = 0x00040000, 32 | AutoAccept = 0x00080000, 33 | PlayerCastOnAccept = 0x00100000, 34 | PlayerCastOnComplete = 0x00200000, 35 | UpdatePhaseShift = 0x00400000, 36 | SoRWhitelist = 0x00800000, 37 | LaunchGossipComplete = 0x01000000, 38 | RemoveExtraGetItems = 0x02000000, 39 | HideUntilDiscovered = 0x04000000, 40 | PortraitInQuestLog = 0x08000000, 41 | ShowItemWhenCompleted = 0x10000000, 42 | LaunchGossipAccept = 0x20000000, 43 | ItemsGlowWhenDone = 0x40000000, 44 | FailOnLogout = 0x80000000 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/SocialDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum FriendStatus 10 | { 11 | Offline = 0x00, 12 | Online = 0x01, 13 | AFK = 0x02, 14 | DND = 0x04, 15 | RAF = 0x08 16 | } 17 | 18 | public enum SocialFlag 19 | { 20 | Friend = 0x01, 21 | Ignored = 0x02, 22 | Muted = 0x04, // guessed 23 | Unk = 0x08, // Unknown - does not appear to be RaF 24 | All = Friend | Ignored | Muted 25 | } 26 | 27 | public enum FriendsResult 28 | { 29 | DbError = 0x00, 30 | ListFull = 0x01, 31 | Online = 0x02, 32 | Offline = 0x03, 33 | NotFound = 0x04, 34 | Removed = 0x05, 35 | AddedOnline = 0x06, 36 | AddedOffline = 0x07, 37 | Already = 0x08, 38 | Self = 0x09, 39 | Enemy = 0x0a, 40 | IgnoreFull = 0x0b, 41 | IgnoreSelf = 0x0c, 42 | IgnoreNotFound = 0x0d, 43 | IgnoreAlready = 0x0e, 44 | IgnoreAdded = 0x0f, 45 | IgnoreRemoved = 0x10, 46 | IgnoreAmbiguous = 0x11, // That Name Is Ambiguous, Type More Of The Player'S Server Name 47 | MuteFull = 0x12, 48 | MuteSelf = 0x13, 49 | MuteNotFound = 0x14, 50 | MuteAlready = 0x15, 51 | MuteAdded = 0x16, 52 | MuteRemoved = 0x17, 53 | MuteAmbiguous = 0x18, // That Name Is Ambiguous, Type More Of The Player'S Server Name 54 | Unk1 = 0x19, // no message at client 55 | Unk2 = 0x1A, 56 | Unk3 = 0x1B, 57 | Unknown = 0x1C // Unknown friend response from server 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/SocketColor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum SocketColorLegacy : byte 10 | { 11 | None = 0, 12 | Meta = 1, 13 | Red = 2, 14 | Yellow = 4, 15 | Blue = 8 16 | } 17 | 18 | public enum SocketColorModern : byte 19 | { 20 | None = 0, 21 | Meta = 1, 22 | Red = 2, 23 | Yellow = 3, 24 | Blue = 4, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/SpeedType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum SpeedType 10 | { 11 | Walk = 0, 12 | Run = 1, 13 | RunBack = 2, 14 | Swim = 3, 15 | SwimBack = 4, 16 | Turn = 5, 17 | Fly = 6, 18 | FlyBack = 7, 19 | Pitch = 8 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/SplineType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum SplineTypeLegacy 10 | { 11 | Normal = 0, 12 | Stop = 1, 13 | FacingSpot = 2, 14 | FacingTarget = 3, 15 | FacingAngle = 4 16 | } 17 | 18 | public enum SplineTypeModern 19 | { 20 | None = 0, 21 | FacingSpot = 1, 22 | FacingTarget = 2, 23 | FacingAngle = 3 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/SupportTicketDefines.cs: -------------------------------------------------------------------------------- 1 | namespace HermesProxy.World.Enums 2 | { 3 | enum LegacyGmTicketResponse : uint 4 | { 5 | TicketDoesNotExist = 0, 6 | AlreadyExist = 1, 7 | CreateSuccess = 2, 8 | CreateError = 3, 9 | UpdateSuccess = 4, 10 | UpdateError = 5, 11 | TicketDeleted = 9, 12 | }; 13 | 14 | public enum GmTicketSystemStatus 15 | { 16 | TicketQueueDisables = 0, 17 | TicketQueueEnabled = 1, 18 | } 19 | 20 | public enum GmTicketComplaintType 21 | { 22 | Unknown = 0, 23 | Name = 3, 24 | Cheating = 4, 25 | ChatSpam = 9, 26 | BadLanguageUsed = 11, 27 | GuildName = 12, 28 | MailSpam = 15, 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/TrainerSpellState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum TrainerSpellStateLegacy 10 | { 11 | Available = 0, 12 | Unavailable = 1, 13 | Known = 2, 14 | } 15 | public enum TrainerSpellStateModern 16 | { 17 | Known = 0, 18 | Available = 1, 19 | Unavailable = 2, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/TutorialAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum TutorialAction 10 | { 11 | Update = 0, 12 | Clear = 1, 13 | Reset = 2 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/UnitDefines.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum Race : byte 10 | { 11 | None = 0, 12 | Human = 1, 13 | Orc = 2, 14 | Dwarf = 3, 15 | NightElf = 4, 16 | Undead = 5, // Scourge 17 | Tauren = 6, 18 | Gnome = 7, 19 | Troll = 8, 20 | Goblin = 9, 21 | BloodElf = 10, 22 | Draenei = 11, 23 | FelOrc = 12, 24 | Naga = 13, 25 | Broken = 14, 26 | Skeleton = 15, 27 | Vrykul = 16, 28 | Tuskarr = 17, 29 | ForestTroll = 18, 30 | Taunka = 19, 31 | NorthrendSkeleton = 20, 32 | IceTroll = 21, 33 | Worgen = 22, 34 | Gilnean = 23, // Human 35 | PandarenNeutral = 24, 36 | PandarenAlliance = 25, 37 | PandarenHorde = 26, 38 | Nightborne = 27, 39 | HighmountainTauren = 28, 40 | VoidElf = 29, 41 | LightforgedDraenei = 30, 42 | ZandalariTroll = 31, 43 | KulTiran = 32, 44 | ThinHuman = 33, 45 | DarkIronDwarf = 34, 46 | Vulpera = 35, 47 | MagharOrc = 36, 48 | Mechagnome = 37 49 | } 50 | 51 | public enum Class : byte 52 | { 53 | None = 0, 54 | Warrior = 1, 55 | Paladin = 2, 56 | Hunter = 3, 57 | Rogue = 4, 58 | Priest = 5, 59 | Deathknight = 6, 60 | Shaman = 7, 61 | Mage = 8, 62 | Warlock = 9, 63 | Monk = 10, 64 | Druid = 11, 65 | DemonHunter = 12, 66 | Max = 13, 67 | 68 | /* 69 | ClassMaskAllPlayable = ((1 << (Warrior - 1)) | (1 << (Paladin - 1)) | (1 << (Hunter - 1)) | 70 | (1 << (Rogue - 1)) | (1 << (Priest - 1)) | (1 << (Deathknight - 1)) | (1 << (Shaman - 1)) | 71 | (1 << (Mage - 1)) | (1 << (Warlock - 1)) | (1 << (Monk - 1)) | (1 << (Druid - 1)) | (1 << (DemonHunter - 1))), 72 | 73 | ClassMaskAllCreatures = ((1 << (Warrior - 1)) | (1 << (Paladin - 1)) | (1 << (Rogue - 1)) | (1 << (Mage - 1))), 74 | 75 | ClassMaskWandUsers = ((1 << (Priest - 1)) | (1 << (Mage - 1)) | (1 << (Warlock - 1))) 76 | */ 77 | } 78 | 79 | public enum Gender : byte 80 | { 81 | Male = 0, 82 | Female = 1, 83 | None = 2 84 | } 85 | 86 | public enum ReactStates 87 | { 88 | Passive = 0, 89 | Defensive = 1, 90 | Aggressive = 2, 91 | Assist = 3 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/UnitDynamicFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | public enum UnitDynamicFlagsLegacy : uint 11 | { 12 | None = 0x0000, 13 | Lootable = 0x0001, 14 | TrackUnit = 0x0002, 15 | Tapped = 0x0004, 16 | TappedByPlayer = 0x0008, 17 | EmpathyInfo = 0x0010, 18 | AppearDead = 0x0020, 19 | ReferAFriendLinked = 0x0040, 20 | } 21 | 22 | [Flags] 23 | public enum UnitDynamicFlagsModern : uint 24 | { 25 | None = 0x0000, 26 | HideModel = 0x0002, 27 | Lootable = 0x0004, 28 | TrackUnit = 0x0008, 29 | Tapped = 0x0010, 30 | EmpathyInfo = 0x0020, 31 | AppearDead = 0x0040, 32 | ReferAFriendLinked = 0x0080, 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/UpdateFieldAttributes.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.Enums; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World.Enums 9 | { 10 | public enum UpdateFieldType 11 | { 12 | Default, // Old formatting - Uint/Float - Supports variable length 13 | Guid, // Must be 64-bit or 128-bit 14 | Quaternion, // 4x float 15 | PackedQuaternion, // ulong 16 | Uint, // Supports variable length 17 | Int, // Supports variable length 18 | Float, // Supports variable length 19 | Bytes, // Supports variable length 20 | Short, 21 | Custom 22 | } 23 | 24 | [AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = false)] 25 | public sealed class UpdateFieldAttribute : Attribute 26 | { 27 | public UpdateFieldAttribute(UpdateFieldType attrib) 28 | { 29 | UFAttribute = attrib; 30 | Version = ClientVersionBuild.Zero; 31 | } 32 | 33 | public UpdateFieldAttribute(UpdateFieldType attrib, ClientVersionBuild fromVersion) 34 | { 35 | UFAttribute = attrib; 36 | Version = fromVersion; 37 | } 38 | 39 | public UpdateFieldType UFAttribute { get; private set; } 40 | public ClientVersionBuild Version { get; private set; } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/UpdateFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | [Flags] 10 | enum UpdateFlag 11 | { 12 | None = 0x000, 13 | Self = 0x001, 14 | Transport = 0x002, 15 | AttackingTarget = 0x004, 16 | LowGuid = 0x008, 17 | HighGuid = 0x010, 18 | Living = 0x020, 19 | StationaryObject = 0x040, 20 | Vehicle = 0x080, 21 | GOPosition = 0x100, 22 | GORotation = 0x200, 23 | Unknown2 = 0x400, 24 | AnimKits = 0x800, // 4.x 25 | TransportUnkArray = 0x1000, // 4.x 26 | EnablePortals = 0x2000, // 4.x 27 | Unknown = 0x4000 // 4.x 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/UpdateType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum UpdateTypeLegacy 10 | { 11 | Values = 0, 12 | Movement = 1, 13 | CreateObject1 = 2, 14 | CreateObject2 = 3, 15 | FarObjects = 4, 16 | NearObjects = 5 17 | } 18 | 19 | public enum UpdateTypeModern 20 | { 21 | Values = 0, 22 | CreateObject1 = 1, 23 | CreateObject2 = 2, 24 | } 25 | 26 | public enum ObjectCreateType 27 | { 28 | Create1 = 0, 29 | Create2 = 1 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/V1_12_1_5875/ResponseCodes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums.V1_12_1_5875 8 | { 9 | public enum ResponseCodes : byte 10 | { 11 | Success = 0, 12 | Failure = 1, 13 | Cancelled = 2, 14 | Disconnected = 3, 15 | FailedToConnect = 4, 16 | Connected = 5, 17 | VersionMismatch = 6, 18 | 19 | CstatusConnecting = 7, 20 | CstatusNegotiatingSecurity = 8, 21 | CstatusNegotiationComplete = 9, 22 | CstatusNegotiationFailed = 10, 23 | CstatusAuthenticating = 11, 24 | 25 | RealmListInProgress = 34, 26 | RealmListSuccess = 35, 27 | RealmListFailed = 36, 28 | RealmListInvalid = 37, 29 | RealmListRealmNotFound = 38, 30 | 31 | AccountCreateInProgress = 39, 32 | AccountCreateSuccess = 40, 33 | AccountCreateFailed = 41, 34 | 35 | CharListRetrieving = 42, 36 | CharListRetrieved = 43, 37 | CharListFailed = 44, 38 | 39 | CharCreateInProgress = 45, 40 | CharCreateSuccess = 46, 41 | CharCreateError = 47, 42 | CharCreateFailed = 48, 43 | CharCreateNameInUse = 49, 44 | CharCreateDisabled = 50, 45 | CharCreatePvpTeamsViolation = 51, 46 | CharCreateServerLimit = 52, 47 | CharCreateAccountLimit = 53, 48 | CharCreateServerQueue = 54, 49 | CharCreateOnlyExisting = 55, 50 | 51 | CharDeleteInProgress = 56, 52 | CharDeleteSuccess = 57, 53 | CharDeleteFailed = 58, 54 | CharDeleteFailedLockedForTransfer = 59, 55 | 56 | CharLoginInProgress = 60, 57 | CharLoginSuccess = 61, 58 | CharLoginNoWorld = 62, 59 | CharLoginDuplicateCharacter = 63, 60 | CharLoginNoInstances = 64, 61 | CharLoginFailed = 65, 62 | CharLoginDisabled = 66, 63 | CharLoginNoCharacter = 67, 64 | CharLoginLockedForTransfer = 68, 65 | 66 | CharNameNoName = 69, 67 | CharNameTooShort = 70, 68 | CharNameTooLong = 71, 69 | CharNameInvalidCharacter = 72, 70 | CharNameMixedLanguages = 73, 71 | CharNameProfane = 74, 72 | CharNameReserved = 75, 73 | CharNameInvalidApostrophe = 76, 74 | CharNameMultipleApostrophes = 77, 75 | CharNameThreeConsecutive = 78, 76 | CharNameInvalidSpace = 79, 77 | CharNameConsecutiveSpaces = 80, 78 | CharNameFailure = 81, 79 | CharNameSuccess = 82 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/V2_4_3_8606/ResponseCodes.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums.V2_4_3_8606 8 | { 9 | public enum ResponseCodes : byte 10 | { 11 | Success = 0, 12 | Failure = 1, 13 | Cancelled = 2, 14 | Disconnected = 3, 15 | FailedToConnect = 4, 16 | Connected = 5, 17 | VersionMismatch = 6, 18 | 19 | CstatusConnecting = 7, 20 | CstatusNegotiatingSecurity = 8, 21 | CstatusNegotiationComplete = 9, 22 | CstatusNegotiationFailed = 10, 23 | CstatusAuthenticating = 11, 24 | 25 | RealmListInProgress = 0x23, 26 | RealmListSuccess = 0x24, 27 | RealmListFailed = 0x25, 28 | RealmListInvalid = 0x26, 29 | RealmListRealmNotFound = 0x27, 30 | 31 | AccountCreateInProgress = 0x28, 32 | AccountCreateSuccess = 0x29, 33 | AccountCreateFailed = 0x2A, 34 | 35 | CharListRetrieving = 0x2B, 36 | CharListRetrieved = 0x2C, 37 | CharListFailed = 0x2D, 38 | 39 | CharCreateInProgress = 0x2E, 40 | CharCreateSuccess = 0x2F, 41 | CharCreateError = 0x30, 42 | CharCreateFailed = 0x31, 43 | CharCreateNameInUse = 0x32, 44 | CharCreateDisabled = 0x33, 45 | CharCreatePvpTeamsViolation = 0x34, 46 | CharCreateServerLimit = 0x35, 47 | CharCreateAccountLimit = 0x36, 48 | CharCreateServerQueue = 0x37, 49 | CharCreateOnlyExisting = 0x38, 50 | CharCreateExpansion = 0x39, 51 | 52 | CharDeleteInProgress = 0x3A, 53 | CharDeleteSuccess = 0x3B, 54 | CharDeleteFailed = 0x3C, 55 | CharDeleteFailedLockedForTransfer = 0x3D, 56 | CharDeleteFailedGuildLeader = 0x3E, 57 | CharDeleteFailedArenaCaptain = 0x3F, 58 | 59 | CharLoginInProgress = 0x40, 60 | CharLoginSuccess = 0x41, 61 | CharLoginNoWorld = 0x42, 62 | CharLoginDuplicateCharacter = 0x43, 63 | CharLoginNoInstances = 0x44, 64 | CharLoginFailed = 0x45, 65 | CharLoginDisabled = 0x46, 66 | CharLoginNoCharacter = 0x47, 67 | CharLoginLockedForTransfer = 0x48, 68 | CharLoginLockedByBilling = 0x49, 69 | 70 | CharNameSuccess = 0x4A, 71 | CharNameFailure = 0x4B, 72 | CharNameNoName = 0x4C, 73 | CharNameTooShort = 0x4D, 74 | CharNameTooLong = 0x4E, 75 | CharNameInvalidCharacter = 0x4F, 76 | CharNameMixedLanguages = 0x50, 77 | CharNameProfane = 0x51, 78 | CharNameReserved = 0x52, 79 | CharNameInvalidApostrophe = 0x53, 80 | CharNameMultipleApostrophes = 0x54, 81 | CharNameThreeConsecutive = 0x55, 82 | CharNameInvalidSpace = 0x56, 83 | CharNameConsecutiveSpaces = 0x57, 84 | CharNameRussianConsecutiveSilentCharacters = 0x58, 85 | CharNameRussianSilentCharacterAtBeginningOrEnd = 0x59, 86 | CharNameDeclensionDoesntMatchBaseName = 0x5A, 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/Weather.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | // Used only in Vanilla 10 | public enum WeatherType 11 | { 12 | Fine = 0, 13 | Rain = 1, 14 | Snow = 2, 15 | Storm = 3 16 | }; 17 | // Used in TBC and newer 18 | public enum WeatherState 19 | { 20 | Fine = 0, 21 | Fog = 1, 22 | Drizzle = 2, 23 | LightRain = 3, 24 | MediumRain = 4, 25 | HeavyRain = 5, 26 | LightSnow = 6, 27 | MediumSnow = 7, 28 | HeavySnow = 8, 29 | LightSandstorm = 22, 30 | MediumSandstorm = 41, 31 | HeavySandstorm = 42, 32 | Thunders = 86, 33 | BlackRain = 90, 34 | BlackSnow = 106 35 | } 36 | 37 | public static class Weather 38 | { 39 | public static WeatherState ConvertWeatherTypeToWeatherState(WeatherType type, float grade) 40 | { 41 | switch (type) 42 | { 43 | case WeatherType.Fine: 44 | return WeatherState.Fine; 45 | case WeatherType.Rain: 46 | if (grade <= 0.25f) 47 | return WeatherState.Drizzle; 48 | else if (grade <= 0.3f) 49 | return WeatherState.LightRain; 50 | else if (grade <= 0.6f) 51 | return WeatherState.MediumRain; 52 | else 53 | return WeatherState.HeavyRain; 54 | case WeatherType.Snow: 55 | if (grade <= 0.3f) 56 | return WeatherState.LightSnow; 57 | else if (grade <= 0.6f) 58 | return WeatherState.MediumSnow; 59 | else 60 | return WeatherState.HeavySnow; 61 | case WeatherType.Storm: 62 | if (grade <= 0.3f) 63 | return WeatherState.LightSandstorm; 64 | else if (grade <= 0.6f) 65 | return WeatherState.MediumSandstorm; 66 | else 67 | return WeatherState.HeavySandstorm; 68 | } 69 | return WeatherState.Fine; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /HermesProxy/World/Enums/WorldStates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Enums 8 | { 9 | public enum WorldStates : uint 10 | { 11 | WsgFlagStateHorde = 2338, 12 | WsgFlagStateAlliance = 2339, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/ContainerData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects 8 | { 9 | public class ContainerData 10 | { 11 | public WowGuid128[] Slots = new WowGuid128[36]; 12 | public uint? NumSlots; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/CorpseData.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.World.Server.Packets; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World.Objects 9 | { 10 | public class CorpseData 11 | { 12 | public WowGuid128 Owner; 13 | public WowGuid128 PartyGUID; 14 | public WowGuid128 GuildGUID; 15 | public uint? DisplayID; 16 | public uint?[] Items { get; } = new uint?[19]; // itemDisplayId | (itemInventoryType << 24) 17 | public byte? RaceId; 18 | public byte? SexId; 19 | public byte? ClassId; 20 | public uint? Flags; 21 | public uint? DynamicFlags; 22 | public int? FactionTemplate; 23 | public ChrCustomizationChoice[] Customizations = new ChrCustomizationChoice[36]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/CreatureTemplate.cs: -------------------------------------------------------------------------------- 1 | using Framework.Collections; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using HermesProxy.World.Enums; 8 | 9 | namespace HermesProxy.World.Objects 10 | { 11 | public class CreatureTemplate 12 | { 13 | public string Title; 14 | public string TitleAlt; 15 | public string CursorName; 16 | public int Type; 17 | public int Family; 18 | public int Classification; 19 | public uint PetSpellDataId; 20 | public CreatureDisplayStats Display = new(); 21 | public float HpMulti; 22 | public float EnergyMulti; 23 | public bool Civilian; 24 | public bool Leader; 25 | public List QuestItems = new(); 26 | public uint MovementInfoID; 27 | public int HealthScalingExpansion; 28 | public uint RequiredExpansion; 29 | public uint VignetteID; 30 | public int Class; 31 | public int DifficultyID; 32 | public int WidgetSetID; 33 | public int WidgetSetUnitConditionID; 34 | public uint[] Flags = new uint[2]; 35 | public uint[] ProxyCreatureID = new uint[CreatureConst.MaxCreatureKillCredit]; 36 | public StringArray Name = new(CreatureConst.MaxCreatureNames); 37 | public StringArray NameAlt = new(CreatureConst.MaxCreatureNames); 38 | } 39 | 40 | public class CreatureXDisplay 41 | { 42 | public CreatureXDisplay(uint creatureDisplayID, float displayScale, float probability) 43 | { 44 | CreatureDisplayID = creatureDisplayID; 45 | Scale = displayScale; 46 | Probability = probability; 47 | } 48 | 49 | public uint CreatureDisplayID; 50 | public float Scale = 1.0f; 51 | public float Probability = 1.0f; 52 | } 53 | 54 | public class CreatureDisplayStats 55 | { 56 | public float TotalProbability; 57 | public List CreatureDisplay = new(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/DynamicObjectData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects 8 | { 9 | public class DynamicObjectData 10 | { 11 | public WowGuid128 Caster; 12 | public uint? Type; 13 | public int? SpellXSpellVisualID; 14 | public int? SpellID; 15 | public float? Radius; 16 | public uint? CastTime; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/GameObjectData.cs: -------------------------------------------------------------------------------- 1 | using Framework.GameMath; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World.Objects 9 | { 10 | public class GameObjectData 11 | { 12 | public WowGuid128 CreatedBy; 13 | public WowGuid128 GuildGUID; 14 | public int? DisplayID; 15 | public uint? Flags; 16 | public float?[] ParentRotation = new float?[4]; 17 | public int? FactionTemplate; 18 | public int? Level; 19 | public sbyte? State; 20 | public sbyte? TypeID; 21 | public byte? ArtKit; 22 | public byte? PercentHealth; 23 | public uint? SpellVisualID; 24 | public uint? StateSpellVisualID; 25 | public uint? StateAnimID; 26 | public uint? StateAnimKitID; 27 | public uint?[] StateWorldEffectIDs = new uint?[4]; 28 | public uint? CustomParam; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/HotfixRecord.cs: -------------------------------------------------------------------------------- 1 | using Framework.IO; 2 | using HermesProxy.World.Enums; 3 | using HermesProxy.World.Server.Packets; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace HermesProxy.World.Objects 11 | { 12 | public class HotfixRecord 13 | { 14 | public uint HotfixId; 15 | public uint UniqueId; 16 | public DB2Hash TableHash; 17 | public uint RecordId; 18 | public HotfixStatus Status; 19 | public ByteBuffer HotfixContent = new(); 20 | 21 | public void WriteAvailable(WorldPacket data) 22 | { 23 | data.WriteUInt32(HotfixId); 24 | data.WriteUInt32((uint)TableHash); 25 | } 26 | public void WriteHotFixMessageContent(WorldPacket data) 27 | { 28 | data.WriteUInt32(HotfixId); 29 | data.WriteUInt32(UniqueId); 30 | data.WriteUInt32((uint)TableHash); 31 | data.WriteUInt32(RecordId); 32 | data.WriteUInt32(HotfixContent.GetSize()); 33 | data.WriteBits((byte)Status, 3); 34 | data.FlushBits(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/ItemData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects 8 | { 9 | public class ItemEnchantment 10 | { 11 | public int? ID; 12 | public uint? Duration; 13 | public ushort? Charges; 14 | public ushort? Inactive; 15 | } 16 | public class ItemData 17 | { 18 | public WowGuid128 Owner; 19 | public WowGuid128 ContainedIn; 20 | public WowGuid128 Creator; 21 | public WowGuid128 GiftCreator; 22 | public uint? StackCount; 23 | public uint? Duration; 24 | public int?[] SpellCharges = new int?[5]; 25 | public uint? Flags; 26 | public ItemEnchantment[] Enchantment = new ItemEnchantment[13]; 27 | public uint? PropertySeed; 28 | public uint? RandomProperty; 29 | public uint? Durability; 30 | public uint? MaxDurability; 31 | public uint? CreatePlayedTime; 32 | public uint? ModifiersMask; 33 | public int? Context; 34 | public ulong? ArtifactXP; 35 | public uint? ItemAppearanceModID; 36 | 37 | // Dynamic Fields 38 | public bool HasGemsUpdate; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/ObjectData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects 8 | { 9 | public class ObjectData 10 | { 11 | public WowGuid128 Guid; 12 | public int? EntryID; 13 | public uint? TypeID; 14 | public uint? DynamicFlags; 15 | public float? Scale; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/PlayerData.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.World.Server.Packets; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World.Objects 9 | { 10 | public class QuestLog 11 | { 12 | public int? QuestID; 13 | public uint? StateFlags; 14 | public short?[] ObjectiveProgress { get; } = new short?[24]; 15 | public uint? EndTime; 16 | public uint? AcceptTime; 17 | } 18 | public class PlayerData 19 | { 20 | public WowGuid128 DuelArbiter; 21 | public WowGuid128 WowAccount; 22 | public WowGuid128 LootTargetGUID; 23 | public uint? PlayerFlags; 24 | public uint? PlayerFlagsEx; 25 | public uint? GuildRankID; 26 | public uint? GuildDeleteDate; 27 | public int? GuildLevel; 28 | public byte? PartyType; 29 | public byte? NumBankSlots; 30 | public byte? NativeSex; 31 | public byte? Inebriation; 32 | public byte? PvpTitle; 33 | public byte? ArenaFaction; 34 | public byte? PvPRank; 35 | public uint? DuelTeam; 36 | public int? GuildTimeStamp; 37 | public QuestLog[] QuestLog = new QuestLog[25]; 38 | public VisibleItem[] VisibleItems = new VisibleItem[19]; 39 | public int? ChosenTitle; 40 | public int? FakeInebriation; 41 | public uint? VirtualPlayerRealm; 42 | public uint? CurrentSpecID; 43 | public int? TaxiMountAnimKitID; 44 | public float?[] AvgItemLevel { get; } = new float?[6]; 45 | public uint? CurrentBattlePetBreedQuality; 46 | public int? HonorLevel; 47 | public ChrCustomizationChoice[] Customizations = new ChrCustomizationChoice[36]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/ServerSideMovement.cs: -------------------------------------------------------------------------------- 1 | using Framework.GameMath; 2 | using HermesProxy.World.Enums; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace HermesProxy.World.Objects 10 | { 11 | public sealed class ServerSideMovement 12 | { 13 | public SplineTypeModern SplineType; 14 | public uint SplineTime; 15 | public uint SplineTimeFull; 16 | public uint SplineId; 17 | public byte SplineMode; 18 | public SplineFlagModern SplineFlags; 19 | public uint SplineCount; 20 | public Vector3 StartPosition; 21 | public Vector3 EndPosition; 22 | public float FinalOrientation; 23 | public Vector3 FinalFacingSpot; 24 | public WowGuid128 FinalFacingGuid; 25 | public WowGuid128 TransportGuid; 26 | public sbyte TransportSeat; 27 | public List SplinePoints = new(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/UpdateMask.cs: -------------------------------------------------------------------------------- 1 | using Framework.IO; 2 | using HermesProxy.World.Enums; 3 | using System; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace HermesProxy.World.Objects 11 | { 12 | public class UpdateMask 13 | { 14 | public UpdateMask(uint valuesCount = 0) 15 | { 16 | _fieldCount = valuesCount; 17 | _blockCount = (valuesCount + 32 - 1) / 32; 18 | 19 | _mask = new BitArray((int)valuesCount, false); 20 | } 21 | 22 | public void SetCount(int valuesCount) 23 | { 24 | _fieldCount = (uint)valuesCount; 25 | _blockCount = (uint)(valuesCount + 32 - 1) / 32; 26 | 27 | _mask = new BitArray(valuesCount, false); 28 | } 29 | 30 | public uint GetCount() { return _fieldCount; } 31 | 32 | public virtual void AppendToPacket(ByteBuffer data) 33 | { 34 | data.WriteUInt8((byte)_blockCount); 35 | var maskArray = new byte[_blockCount << 2]; 36 | 37 | _mask.CopyTo(maskArray, 0); 38 | data.WriteBytes(maskArray); 39 | } 40 | 41 | public bool GetBit(int index) 42 | { 43 | return _mask.Get(index); 44 | } 45 | 46 | public void SetBit(int index) 47 | { 48 | _mask.Set(index, true); 49 | } 50 | 51 | void UnsetBit(int index) 52 | { 53 | _mask.Set(index, false); 54 | } 55 | 56 | public void Clear() 57 | { 58 | _mask.SetAll(false); 59 | } 60 | 61 | uint _fieldCount; 62 | protected uint _blockCount; 63 | protected BitArray _mask; 64 | } 65 | 66 | public class DynamicUpdateMask : UpdateMask 67 | { 68 | public DynamicUpdateMask(uint valuesCount) : base(valuesCount) { } 69 | 70 | public void EncodeDynamicFieldChangeType(DynamicFieldChangeType changeType, UpdateTypeModern updateType) 71 | { 72 | DynamicFieldChangeType = (uint)(_blockCount | ((uint)(changeType & HermesProxy.World.Objects.DynamicFieldChangeType.ValueAndSizeChanged) * ((3 - (int)updateType /*this part evaluates to 0 if update type is not VALUES*/) / 3))); 73 | } 74 | 75 | public override void AppendToPacket(ByteBuffer data) 76 | { 77 | data.WriteUInt16((ushort)DynamicFieldChangeType); 78 | if (ValueCount != null) 79 | data.WriteInt32((int)ValueCount); 80 | 81 | var maskArray = new byte[_blockCount << 2]; 82 | 83 | _mask.CopyTo(maskArray, 0); 84 | data.WriteBytes(maskArray); 85 | } 86 | 87 | public uint DynamicFieldChangeType; 88 | public int? ValueCount; 89 | } 90 | 91 | public enum DynamicFieldChangeType 92 | { 93 | Unchanged = 0, 94 | ValueChanged = 0x7FFF, 95 | ValueAndSizeChanged = 0x8000 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/Version/V1_14_0_40237/CreateObjectBits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects.Version.V1_14_0_40237 8 | { 9 | public struct CreateObjectBits 10 | { 11 | public bool NoBirthAnim; 12 | public bool EnablePortals; 13 | public bool PlayHoverAnim; 14 | public bool MovementUpdate; 15 | public bool MovementTransport; 16 | public bool Stationary; 17 | public bool CombatVictim; 18 | public bool ServerTime; 19 | public bool Vehicle; 20 | public bool AnimKit; 21 | public bool Rotation; 22 | public bool AreaTrigger; 23 | public bool GameObject; 24 | public bool SmoothPhasing; 25 | public bool ThisIsYou; 26 | public bool SceneObject; 27 | public bool ActivePlayer; 28 | public bool Conversation; 29 | 30 | public void Clear() 31 | { 32 | NoBirthAnim = false; 33 | EnablePortals = false; 34 | PlayHoverAnim = false; 35 | MovementUpdate = false; 36 | MovementTransport = false; 37 | Stationary = false; 38 | CombatVictim = false; 39 | ServerTime = false; 40 | Vehicle = false; 41 | AnimKit = false; 42 | Rotation = false; 43 | AreaTrigger = false; 44 | GameObject = false; 45 | SmoothPhasing = false; 46 | ThisIsYou = false; 47 | SceneObject = false; 48 | ActivePlayer = false; 49 | Conversation = false; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/Version/V1_14_1_40688/CreateObjectBits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects.Version.V1_14_1_40688 8 | { 9 | public struct CreateObjectBits 10 | { 11 | public bool NoBirthAnim; 12 | public bool EnablePortals; 13 | public bool PlayHoverAnim; 14 | public bool MovementUpdate; 15 | public bool MovementTransport; 16 | public bool Stationary; 17 | public bool CombatVictim; 18 | public bool ServerTime; 19 | public bool Vehicle; 20 | public bool AnimKit; 21 | public bool Rotation; 22 | public bool AreaTrigger; 23 | public bool GameObject; 24 | public bool SmoothPhasing; 25 | public bool ThisIsYou; 26 | public bool SceneObject; 27 | public bool ActivePlayer; 28 | public bool Conversation; 29 | 30 | public void Clear() 31 | { 32 | NoBirthAnim = false; 33 | EnablePortals = false; 34 | PlayHoverAnim = false; 35 | MovementUpdate = false; 36 | MovementTransport = false; 37 | Stationary = false; 38 | CombatVictim = false; 39 | ServerTime = false; 40 | Vehicle = false; 41 | AnimKit = false; 42 | Rotation = false; 43 | AreaTrigger = false; 44 | GameObject = false; 45 | SmoothPhasing = false; 46 | ThisIsYou = false; 47 | SceneObject = false; 48 | ActivePlayer = false; 49 | Conversation = false; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/Version/V2_5_2_39570/CreateObjectBits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects.Version.V2_5_2_39570 8 | { 9 | public struct CreateObjectBits 10 | { 11 | public bool NoBirthAnim; 12 | public bool EnablePortals; 13 | public bool PlayHoverAnim; 14 | public bool MovementUpdate; 15 | public bool MovementTransport; 16 | public bool Stationary; 17 | public bool CombatVictim; 18 | public bool ServerTime; 19 | public bool Vehicle; 20 | public bool AnimKit; 21 | public bool Rotation; 22 | public bool AreaTrigger; 23 | public bool GameObject; 24 | public bool SmoothPhasing; 25 | public bool ThisIsYou; 26 | public bool SceneObject; 27 | public bool ActivePlayer; 28 | public bool Conversation; 29 | 30 | public void Clear() 31 | { 32 | NoBirthAnim = false; 33 | EnablePortals = false; 34 | PlayHoverAnim = false; 35 | MovementUpdate = false; 36 | MovementTransport = false; 37 | Stationary = false; 38 | CombatVictim = false; 39 | ServerTime = false; 40 | Vehicle = false; 41 | AnimKit = false; 42 | Rotation = false; 43 | AreaTrigger = false; 44 | GameObject = false; 45 | SmoothPhasing = false; 46 | ThisIsYou = false; 47 | SceneObject = false; 48 | ActivePlayer = false; 49 | Conversation = false; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HermesProxy/World/Objects/Version/V2_5_3_41750/CreateObjectBits.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace HermesProxy.World.Objects.Version.V2_5_3_41750 8 | { 9 | public struct CreateObjectBits 10 | { 11 | public bool NoBirthAnim; 12 | public bool EnablePortals; 13 | public bool PlayHoverAnim; 14 | public bool MovementUpdate; 15 | public bool MovementTransport; 16 | public bool Stationary; 17 | public bool CombatVictim; 18 | public bool ServerTime; 19 | public bool Vehicle; 20 | public bool AnimKit; 21 | public bool Rotation; 22 | public bool AreaTrigger; 23 | public bool GameObject; 24 | public bool SmoothPhasing; 25 | public bool ThisIsYou; 26 | public bool SceneObject; 27 | public bool ActivePlayer; 28 | public bool Conversation; 29 | 30 | public void Clear() 31 | { 32 | NoBirthAnim = false; 33 | EnablePortals = false; 34 | PlayHoverAnim = false; 35 | MovementUpdate = false; 36 | MovementTransport = false; 37 | Stationary = false; 38 | CombatVictim = false; 39 | ServerTime = false; 40 | Vehicle = false; 41 | AnimKit = false; 42 | Rotation = false; 43 | AreaTrigger = false; 44 | GameObject = false; 45 | SmoothPhasing = false; 46 | ThisIsYou = false; 47 | SceneObject = false; 48 | ActivePlayer = false; 49 | Conversation = false; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /HermesProxy/World/PacketHandlerAttribute.cs: -------------------------------------------------------------------------------- 1 | using HermesProxy.Enums; 2 | using HermesProxy.World.Enums; 3 | using System; 4 | 5 | namespace HermesProxy.World 6 | { 7 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true, Inherited = false)] 8 | public sealed class PacketHandlerAttribute : Attribute 9 | { 10 | public PacketHandlerAttribute(Opcode opcode) 11 | { 12 | Opcode = opcode; 13 | } 14 | 15 | public PacketHandlerAttribute(uint opcode) 16 | { 17 | Opcode = (Opcode) opcode; 18 | } 19 | 20 | /// 21 | /// [addedInVersion, +inf[ 22 | /// 23 | /// 24 | /// 25 | public PacketHandlerAttribute(Opcode opcode, ClientVersionBuild addedInVersion) 26 | { 27 | if (LegacyVersion.AddedInVersion(addedInVersion)) 28 | Opcode = opcode; 29 | } 30 | 31 | /// 32 | /// [addedInVersion, removedInVersion[ 33 | /// 34 | /// 35 | /// 36 | /// 37 | public PacketHandlerAttribute(Opcode opcode, ClientVersionBuild addedInVersion, ClientVersionBuild removedInVersion) 38 | { 39 | if (LegacyVersion.InVersion(addedInVersion, removedInVersion)) 40 | Opcode = opcode; 41 | } 42 | 43 | public Opcode Opcode { get; private set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/ClientConfigHandler.cs: -------------------------------------------------------------------------------- 1 | using BNetServer.Services; 2 | using Framework.Constants; 3 | using Framework.Logging; 4 | using HermesProxy.Enums; 5 | using HermesProxy.World; 6 | using HermesProxy.World.Enums; 7 | using HermesProxy.World.Objects; 8 | using HermesProxy.World.Server.Packets; 9 | 10 | namespace HermesProxy.World.Server 11 | { 12 | public partial class WorldSocket 13 | { 14 | // Handlers for CMSG opcodes coming from the modern client 15 | [PacketHandler(Opcode.CMSG_UPDATE_ACCOUNT_DATA)] 16 | void HandleUpdateAccountData(UserClientUpdateAccountData data) 17 | { 18 | GetSession().AccountDataMgr.SaveData(data.PlayerGuid, data.Time, data.DataType, data.Size, data.CompressedData); 19 | } 20 | 21 | [PacketHandler(Opcode.CMSG_REQUEST_ACCOUNT_DATA)] 22 | void HandleRequestAccountData(RequestAccountData data) 23 | { 24 | if (GetSession().AccountDataMgr.Data[data.DataType] == null) 25 | { 26 | Log.Print(LogType.Error, $"Client requested missing account data {data.DataType}."); 27 | GetSession().AccountDataMgr.Data[data.DataType] = new(); 28 | GetSession().AccountDataMgr.Data[data.DataType].Type = data.DataType; 29 | GetSession().AccountDataMgr.Data[data.DataType].Timestamp = Time.UnixTime; 30 | GetSession().AccountDataMgr.Data[data.DataType].UncompressedSize = 0; 31 | GetSession().AccountDataMgr.Data[data.DataType].CompressedData = new byte[0]; 32 | } 33 | 34 | GetSession().AccountDataMgr.Data[data.DataType].Guid = data.PlayerGuid; 35 | UpdateAccountData update = new(GetSession().AccountDataMgr.Data[data.DataType]); 36 | SendPacket(update); 37 | } 38 | 39 | [PacketHandler(Opcode.CMSG_SAVE_CUF_PROFILES)] 40 | void HandleUpdateAccountData(SaveCUFProfiles cuf) 41 | { 42 | GetSession().AccountDataMgr.SaveCUFProfiles(cuf.Data); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/CombatHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World; 4 | using HermesProxy.World.Enums; 5 | using HermesProxy.World.Objects; 6 | using HermesProxy.World.Server.Packets; 7 | 8 | namespace HermesProxy.World.Server 9 | { 10 | public partial class WorldSocket 11 | { 12 | // Handlers for CMSG opcodes coming from the modern client 13 | [PacketHandler(Opcode.CMSG_ATTACK_SWING)] 14 | void HandleAttackSwing(AttackSwing attack) 15 | { 16 | WorldPacket packet = new WorldPacket(Opcode.CMSG_ATTACK_SWING); 17 | packet.WriteGuid(attack.Victim.To64()); 18 | SendPacketToServer(packet); 19 | } 20 | [PacketHandler(Opcode.CMSG_ATTACK_STOP)] 21 | void HandleAttackSwing(AttackStop attack) 22 | { 23 | WorldPacket packet = new WorldPacket(Opcode.CMSG_ATTACK_STOP); 24 | SendPacketToServer(packet); 25 | } 26 | [PacketHandler(Opcode.CMSG_SET_SHEATHED)] 27 | void HandleSetSheathed(SetSheathed sheath) 28 | { 29 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_SHEATHED); 30 | packet.WriteInt32(sheath.SheathState); 31 | SendPacketToServer(packet); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/DuelHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World; 4 | using HermesProxy.World.Enums; 5 | using HermesProxy.World.Objects; 6 | using HermesProxy.World.Server.Packets; 7 | 8 | namespace HermesProxy.World.Server 9 | { 10 | public partial class WorldSocket 11 | { 12 | // Handlers for CMSG opcodes coming from the modern client 13 | [PacketHandler(Opcode.CMSG_CAN_DUEL)] 14 | void HandleCanDuel(CanDuel request) 15 | { 16 | CanDuelResult result = new CanDuelResult(); 17 | result.TargetGUID = request.TargetGUID; 18 | result.Result = true; 19 | SendPacket(result); 20 | } 21 | 22 | [PacketHandler(Opcode.CMSG_DUEL_RESPONSE)] 23 | void HandleDuelResponse(DuelResponse response) 24 | { 25 | if (response.Accepted) 26 | { 27 | WorldPacket packet = new WorldPacket(Opcode.CMSG_DUEL_ACCEPTED); 28 | packet.WriteGuid(response.ArbiterGUID.To64()); 29 | SendPacketToServer(packet); 30 | } 31 | else 32 | { 33 | WorldPacket packet = new WorldPacket(Opcode.CMSG_DUEL_CANCELLED); 34 | packet.WriteGuid(response.ArbiterGUID.To64()); 35 | SendPacketToServer(packet); 36 | } 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/GameObjectHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using Framework.Logging; 3 | using HermesProxy.Enums; 4 | using HermesProxy.World; 5 | using HermesProxy.World.Enums; 6 | using HermesProxy.World.Objects; 7 | using HermesProxy.World.Server.Packets; 8 | using System; 9 | 10 | namespace HermesProxy.World.Server 11 | { 12 | public partial class WorldSocket 13 | { 14 | // Handlers for CMSG opcodes coming from the modern client 15 | [PacketHandler(Opcode.CMSG_GAME_OBJ_USE)] 16 | void HandleGameObjUse(GameObjUse use) 17 | { 18 | WorldPacket packet = new WorldPacket(Opcode.CMSG_GAME_OBJ_USE); 19 | packet.WriteGuid(use.Guid.To64()); 20 | SendPacketToServer(packet); 21 | } 22 | 23 | [PacketHandler(Opcode.CMSG_GAME_OBJ_REPORT_USE)] 24 | void HandleGameObjUse(GameObjReportUse use) 25 | { 26 | GetSession().GameState.CurrentInteractedWithGO = use.Guid; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/InstanceHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using Framework.Logging; 3 | using HermesProxy.Enums; 4 | using HermesProxy.World; 5 | using HermesProxy.World.Enums; 6 | using HermesProxy.World.Objects; 7 | using HermesProxy.World.Server.Packets; 8 | using System; 9 | 10 | namespace HermesProxy.World.Server 11 | { 12 | public partial class WorldSocket 13 | { 14 | // Handlers for CMSG opcodes coming from the modern client 15 | [PacketHandler(Opcode.CMSG_RESET_INSTANCES)] 16 | void HandleResetInstances(EmptyClientPacket reset) 17 | { 18 | WorldPacket packet = new WorldPacket(Opcode.CMSG_RESET_INSTANCES); 19 | SendPacketToServer(packet); 20 | } 21 | 22 | [PacketHandler(Opcode.CMSG_REQUEST_RAID_INFO)] 23 | void HandleRequestRaidInfo(EmptyClientPacket reset) 24 | { 25 | WorldPacket packet = new WorldPacket(Opcode.CMSG_REQUEST_RAID_INFO); 26 | SendPacketToServer(packet); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/ReputationHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World; 4 | using HermesProxy.World.Enums; 5 | using HermesProxy.World.Objects; 6 | using HermesProxy.World.Server.Packets; 7 | 8 | namespace HermesProxy.World.Server 9 | { 10 | public partial class WorldSocket 11 | { 12 | // Handlers for CMSG opcodes coming from the modern client 13 | [PacketHandler(Opcode.CMSG_SET_FACTION_AT_WAR)] 14 | void HandleSetFactionAtWar(SetFactionAtWar faction) 15 | { 16 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_FACTION_AT_WAR); 17 | packet.WriteUInt32(faction.FactionIndex); 18 | packet.WriteBool(true); 19 | SendPacketToServer(packet); 20 | } 21 | [PacketHandler(Opcode.CMSG_SET_FACTION_NOT_AT_WAR)] 22 | void HandleSetFactionNotAtWar(SetFactionNotAtWar faction) 23 | { 24 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_FACTION_AT_WAR); 25 | packet.WriteUInt32(faction.FactionIndex); 26 | packet.WriteBool(false); 27 | SendPacketToServer(packet); 28 | } 29 | [PacketHandler(Opcode.CMSG_SET_FACTION_INACTIVE)] 30 | void HandleSetFactionInactive(SetFactionInactive faction) 31 | { 32 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_FACTION_INACTIVE); 33 | packet.WriteUInt32(faction.FactionIndex); 34 | packet.WriteBool(faction.State); 35 | SendPacketToServer(packet); 36 | } 37 | [PacketHandler(Opcode.CMSG_SET_WATCHED_FACTION)] 38 | void HandleSetFactionInactive(SetWatchedFaction faction) 39 | { 40 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_WATCHED_FACTION); 41 | packet.WriteUInt32(faction.FactionIndex); 42 | SendPacketToServer(packet); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/SessionHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Bgs.Protocol; 4 | using Bgs.Protocol.GameUtilities.V1; 5 | using BNetServer.Services; 6 | using Framework.Constants; 7 | using Framework.IO; 8 | using Framework.Logging; 9 | using Framework.Serialization; 10 | using Framework.Util; 11 | using Framework.Web; 12 | using Google.Protobuf; 13 | using HermesProxy.World.Enums; 14 | using HermesProxy.World.Server.Packets; 15 | using AuthResult = HermesProxy.Auth.AuthResult; 16 | 17 | namespace HermesProxy.World.Server 18 | { 19 | public partial class WorldSocket 20 | { 21 | [PacketHandler(Opcode.CMSG_CHANGE_REALM_TICKET)] 22 | void HandleChangeRealmTicket(ChangeRealmTicket request) 23 | { 24 | ChangeRealmTicketResponse response = new(); 25 | response.Token = request.Token; 26 | 27 | if (!GetSession().AuthClient.IsConnected() && GetSession().AuthClient.Reconnect() != AuthResult.SUCCESS) 28 | { 29 | Log.Print(LogType.Error, "Failed to reconnect to auth server."); 30 | response.Allow = false; 31 | SendPacket(response); 32 | return; 33 | } 34 | // GetSession().AuthClient.SendRealmListUpdateRequest(); 35 | 36 | _bnetRpc.SetClientSecret(request.Secret); 37 | 38 | response.Allow = true; 39 | response.Ticket = new ByteBuffer(new byte[1]); 40 | 41 | SendPacket(response); 42 | } 43 | 44 | [PacketHandler(Opcode.CMSG_BATTLENET_REQUEST)] 45 | void HandleBattlenetRequest(BattlenetRequest request) 46 | { 47 | if (_bnetRpc == null) 48 | { 49 | Log.Print(LogType.Error, $"Client tried {Opcode.CMSG_BATTLENET_REQUEST} without authentication"); 50 | return; 51 | } 52 | 53 | _bnetRpc.Invoke( 54 | serviceId: 0, 55 | (OriginalHash)request.Method.GetServiceHash(), 56 | request.Method.GetMethodId(), 57 | request.Method.Token, 58 | new CodedInputStream(request.Data) 59 | ); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/SocialHandler.cs: -------------------------------------------------------------------------------- 1 | using Framework.Constants; 2 | using Framework.Logging; 3 | using HermesProxy.Enums; 4 | using HermesProxy.World; 5 | using HermesProxy.World.Enums; 6 | using HermesProxy.World.Objects; 7 | using HermesProxy.World.Server.Packets; 8 | using System; 9 | 10 | namespace HermesProxy.World.Server 11 | { 12 | public partial class WorldSocket 13 | { 14 | // Handlers for CMSG opcodes coming from the modern client 15 | [PacketHandler(Opcode.CMSG_CONTACT_LIST)] 16 | void HandleContactList(ContactListRequest contacts) 17 | { 18 | if (LegacyVersion.RemovedInVersion(ClientVersionBuild.V2_0_1_6180)) 19 | { 20 | WorldPacket packet = new WorldPacket(Opcode.CMSG_FRIEND_LIST); 21 | SendPacketToServer(packet); 22 | } 23 | else 24 | { 25 | WorldPacket packet = new WorldPacket(Opcode.CMSG_CONTACT_LIST); 26 | packet.WriteUInt32((uint)contacts.Flags); 27 | SendPacketToServer(packet); 28 | } 29 | } 30 | 31 | [PacketHandler(Opcode.CMSG_ADD_FRIEND)] 32 | void HandleAddFriend(AddFriend friend) 33 | { 34 | WorldPacket packet = new WorldPacket(Opcode.CMSG_ADD_FRIEND); 35 | packet.WriteCString(friend.Name); 36 | if (LegacyVersion.AddedInVersion(ClientVersionBuild.V2_0_1_6180)) 37 | packet.WriteCString(friend.Note); 38 | SendPacketToServer(packet); 39 | } 40 | 41 | [PacketHandler(Opcode.CMSG_ADD_IGNORE)] 42 | void HandleAddIgnore(AddIgnore ignore) 43 | { 44 | WorldPacket packet = new WorldPacket(Opcode.CMSG_ADD_IGNORE); 45 | packet.WriteCString(ignore.Name); 46 | SendPacketToServer(packet); 47 | } 48 | 49 | [PacketHandler(Opcode.CMSG_DEL_FRIEND)] 50 | [PacketHandler(Opcode.CMSG_DEL_IGNORE)] 51 | void HandleDelFriend(DelFriend friend) 52 | { 53 | WorldPacket packet = new WorldPacket(friend.GetUniversalOpcode()); 54 | packet.WriteGuid(friend.Guid.To64()); 55 | SendPacketToServer(packet); 56 | } 57 | 58 | [PacketHandler(Opcode.CMSG_SET_CONTACT_NOTES)] 59 | void HandleSetContactNotes(SetContactNotes friend) 60 | { 61 | if (LegacyVersion.RemovedInVersion(ClientVersionBuild.V2_0_1_6180)) 62 | return; 63 | 64 | WorldPacket packet = new WorldPacket(Opcode.CMSG_SET_CONTACT_NOTES); 65 | packet.WriteGuid(friend.Guid.To64()); 66 | packet.WriteCString(friend.Notes); 67 | SendPacketToServer(packet); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/PacketHandlers/SupportTicketHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using HermesProxy.Enums; 3 | using HermesProxy.World.Enums; 4 | using HermesProxy.World.Server.Packets; 5 | 6 | namespace HermesProxy.World.Server 7 | { 8 | public partial class WorldSocket 9 | { 10 | [PacketHandler(Opcode.CMSG_SUPPORT_TICKET_SUBMIT_COMPLAINT)] 11 | void HandleSupportTicketSubmitComplaint(SupportTicketSubmitComplaint complaint) 12 | { 13 | var targetPlayerName = Session.GameState.GetPlayerName(complaint.TargetCharacterGuid); 14 | if (string.IsNullOrWhiteSpace(targetPlayerName)) 15 | { 16 | Session.SendHermesTextMessage("Unable to report player because CharacterName was not resolved (can be fixed by restarting the client)", isError: true); 17 | return; 18 | } 19 | 20 | var ticketText = $"[REPORTED VIA QUICKMENU]\r\nI would like to report player '{targetPlayerName}'"; 21 | 22 | if (!WowGuid128.IsUnknownPlayerGuid(complaint.TargetCharacterGuid)) 23 | ticketText += $" (id: {complaint.TargetCharacterGuid.GetCounter()})"; 24 | 25 | if (complaint.ComplaintType != GmTicketComplaintType.Unknown) 26 | ticketText += $" for {complaint.ComplaintType}"; 27 | 28 | if (complaint.SelectedMailInfo != null) 29 | ticketText += "\r\n" + $"Mail in question (id: {complaint.SelectedMailInfo.MailId}) with subject '{complaint.SelectedMailInfo.MailSubject}'"; 30 | 31 | if (!complaint.TextNote.IsEmpty()) 32 | { 33 | ticketText += "\r\n" + "-------------"; 34 | ticketText += "\r\n" + complaint.TextNote; 35 | } 36 | 37 | WorldPacket packet = new WorldPacket(Opcode.CMSG_GM_TICKET_CREATE); 38 | 39 | if (LegacyVersion.RemovedInVersion(ClientVersionBuild.V2_0_1_6180)) 40 | { 41 | packet.WriteUInt8(2); // GMTICKET_BEHAVIOR_HARASSMENT 42 | packet.WriteUInt32(complaint.Header.SelfPlayerMapId); 43 | packet.WriteVector3(complaint.Header.SelfPlayerPos); 44 | packet.WriteCString(ticketText); 45 | packet.WriteCString(""); // Not used 46 | } 47 | else 48 | { 49 | packet.WriteUInt32(complaint.Header.SelfPlayerMapId); 50 | packet.WriteVector3(complaint.Header.SelfPlayerPos); 51 | packet.WriteCString(ticketText); 52 | packet.WriteUInt32(0); // we dont need the gm to reach back 53 | 54 | packet.WriteUInt32(0); // chat lines count 55 | packet.WriteUInt32(0); // chat text inflated size 56 | packet.WriteBytes(Array.Empty()); // rest of the message are deflated chat lines 57 | } 58 | 59 | SendPacketToServer(packet); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/RealmSocket.cs: -------------------------------------------------------------------------------- 1 | using System.Net.Sockets; 2 | 3 | namespace HermesProxy.World.Server; 4 | 5 | public class RealmSocket : WorldSocket 6 | { 7 | public RealmSocket(Socket socket) : base(socket) 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /HermesProxy/World/Server/WorldSocketManager.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2020 CypherCore 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | using Framework.Networking; 19 | using System.Net.Sockets; 20 | using Framework.Logging; 21 | 22 | namespace HermesProxy.World.Server 23 | { 24 | public class WorldSocketManager : SocketManager 25 | { 26 | public override bool StartNetwork(string bindIp, int realmPort, int threadCount = 1) 27 | { 28 | _tcpNoDelay = true; 29 | 30 | // -1 means use default 31 | _socketSendBufferSize = -1; 32 | 33 | if (!base.StartNetwork(bindIp, realmPort, threadCount)) 34 | return false; 35 | 36 | _instanceAcceptor = new AsyncAcceptor(); 37 | if (!_instanceAcceptor.Start(bindIp, Framework.Settings.InstancePort)) 38 | { 39 | Log.Print(LogType.Error, "StartNetwork failed to start instance AsyncAcceptor"); 40 | return false; 41 | } 42 | 43 | _instanceAcceptor.AsyncAcceptSocket(OnSocketOpen); 44 | 45 | return true; 46 | } 47 | 48 | public override void StopNetwork() 49 | { 50 | _instanceAcceptor.Close(); 51 | base.StopNetwork(); 52 | 53 | _instanceAcceptor = null; 54 | } 55 | 56 | public override void OnSocketOpen(Socket sock) 57 | { 58 | Log.Print(LogType.Network, $"Instance socket open."); 59 | 60 | // set some options here 61 | try 62 | { 63 | if (_socketSendBufferSize >= 0) 64 | sock.SendBufferSize = _socketSendBufferSize; 65 | 66 | // Set TCP_NODELAY. 67 | sock.NoDelay = _tcpNoDelay; 68 | } 69 | catch (SocketException ex) 70 | { 71 | Log.Print(LogType.Error, ex.ToString()); 72 | return; 73 | } 74 | 75 | base.OnSocketOpen(sock); 76 | } 77 | 78 | AsyncAcceptor _instanceAcceptor; 79 | int _socketSendBufferSize; 80 | bool _tcpNoDelay; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /HermesProxy/World/SniffFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace HermesProxy.World 9 | { 10 | public class SniffFile 11 | { 12 | public SniffFile(string fileName, ushort build) 13 | { 14 | string dir = "PacketsLog"; 15 | if (!Directory.Exists(dir)) 16 | Directory.CreateDirectory(dir); 17 | 18 | string file = fileName + "_" + build + "_" + Time.UnixTime + ".pkt"; 19 | string path = Path.Combine(dir, file); 20 | 21 | _fileWriter = new BinaryWriter(File.Open(path, FileMode.Create)); 22 | _gameVersion = build; 23 | } 24 | BinaryWriter _fileWriter; 25 | ushort _gameVersion; 26 | System.Threading.Mutex _mutex = new System.Threading.Mutex(); 27 | 28 | public void WriteHeader() 29 | { 30 | _fileWriter.Write('P'); 31 | _fileWriter.Write('K'); 32 | _fileWriter.Write('T'); 33 | UInt16 sniffVersion = 0x201; 34 | _fileWriter.Write(sniffVersion); 35 | _fileWriter.Write(_gameVersion); 36 | 37 | for (int i = 0; i < 40; i++) 38 | { 39 | byte zero = 0; 40 | _fileWriter.Write(zero); 41 | } 42 | } 43 | 44 | public void WritePacket(uint opcode, bool isFromClient, byte[] data) 45 | { 46 | _mutex.WaitOne(); 47 | byte direction = !isFromClient ? (byte)0xff : (byte)0x0; 48 | _fileWriter.Write(direction); 49 | 50 | uint unixtime = (uint)Time.UnixTime; 51 | _fileWriter.Write(unixtime); 52 | _fileWriter.Write(Environment.TickCount); 53 | 54 | if (isFromClient) 55 | { 56 | uint packetSize = (uint)(data.Length - 2 + sizeof(uint)); 57 | _fileWriter.Write(packetSize); 58 | _fileWriter.Write(opcode); 59 | 60 | for (int i = 2; i < data.Length; i++) 61 | _fileWriter.Write(data[i]); 62 | } 63 | else 64 | { 65 | uint packetSize = (uint)data.Length + sizeof(ushort); 66 | _fileWriter.Write(packetSize); 67 | ushort opcode2 = (ushort)opcode; 68 | _fileWriter.Write(opcode2); 69 | _fileWriter.Write(data); 70 | } 71 | _mutex.ReleaseMutex(); 72 | } 73 | 74 | public void CloseFile() 75 | { 76 | _fileWriter.Close(); 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HermesProxy ![Build](https://github.com/WowLegacyCore/HermesProxy/actions/workflows/Build_Proxy.yml/badge.svg) 2 | 3 | This project enables play on existing legacy WoW emulation cores using the modern clients. It serves as a translation layer, converting all network traffic to the appropriate format each side can understand. 4 | 5 | There are 4 major components to the application: 6 | - The modern BNetServer to which the client initially logs into. 7 | - The legacy AuthClient which will in turn login to the remote authentication server (realmd). 8 | - The modern WorldServer to which the game client will connect once a realm has been selected. 9 | - The legacy WorldClient which communicates with the remote world server (mangosd). 10 | 11 | ## Supported Versions 12 | 13 | | Modern Versions | Legacy Versions | 14 | |-----------------|-----------------| 15 | | 1.14.0 | 1.12.1 | 16 | | 2.5.2 | 2.4.3 | 17 | 18 | ## Ingame Settings 19 | Note: Keep `Optimize Network for Speed` **enabled** (it's under `System` -> `Network`), otherwise you will get kicked every now and then. 20 | 21 | ## Usage Instructions 22 | 23 | - Edit the app's config to specify the exact versions of your game client and the remote server, along with the address. 24 | - Go into your game folder, in the Classic or Classic Era subdirectory, and edit WTF/Config.wtf to set the portal to 127.0.0.1. 25 | - Download [Arctium Launcher](https://github.com/Arctium/WoW-Launcher/releases/tag/latest) into the main game folder, and then run it 26 | with `--staticseed --version=ClassicEra` for vanilla 27 | or `--staticseed --version=Classic` for TBC. 28 | - Start the proxy app and login through the game with your usual credentials. 29 | 30 | ## Chat commands 31 | HermesProxy provides some internal chat commands: 32 | 33 | | Command | Description | 34 | |----------------------------|------------------------------------------------------------------------------| 35 | | `!qcomplete ` | Manually marks a quest as already completed (useful for quest helper addons) | 36 | | `!quncomplete ` | Unmarks a quest as completed | 37 | 38 | ## Start Arguments 39 | - `--config ` to specify a config (default `HermesProxy.config`) 40 | - `--set =` to overwrite a specific config value (example `--set ServerAddress=logon.example.com`) 41 | - `--no-version-check` to disable the check for newer versions 42 | 43 | ## Acknowledgements 44 | 45 | Parts of this poject's code are based on [CypherCore](https://github.com/CypherCore/CypherCore) and [BotFarm](https://github.com/jackpoz/BotFarm). I would like to extend my sincere thanks to these projects, as the creation of this app might have never happened without them. And I would also like to expressly thank [Modox](https://github.com/mdx7) for all his work on reverse engineering the classic clients and all the help he has personally given me. 46 | 47 | ## Download HermesProxy 48 | Stable Downloads: [Releases](https://github.com/WowLegacyCore/HermesProxy/releases) 49 | -------------------------------------------------------------------------------- /scripts/Build_Linux.bat: -------------------------------------------------------------------------------- 1 | dotnet publish ..\HermesProxy -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false -c release -r ubuntu.16.04-x64 --self-contained -------------------------------------------------------------------------------- /scripts/Build_Windows.bat: -------------------------------------------------------------------------------- 1 | dotnet publish ..\HermesProxy -p:PublishSingleFile=true -p:DebugType=None -p:DebugSymbols=false -r win-x64 /p:Configuration=Release /p:platform="x64" --self-contained 2 | --------------------------------------------------------------------------------