Core/Battlegrounds: Move to scripts And a lot of misc commits i couldn't recover.
Port From (https://github.com/TrinityCore/TrinityCore/commit/d0d5d309bb5877dc2fcb27f6cb123707a31ec1e8)
This commit is contained in:
@@ -13,44 +13,28 @@ namespace Framework.Constants
|
||||
NotStarted = 0x00000005,
|
||||
InProgress = 0x00000006,
|
||||
InvalidArgs = 0x00000007,
|
||||
InvalidSubscriber = 0x00000008,
|
||||
WaitingForDependency = 0x00000009,
|
||||
NoAuth = 0x0000000a,
|
||||
ParentalControlRestriction = 0x0000000b,
|
||||
NoGameAccount = 0x0000000c,
|
||||
NotImplemented = 0x0000000d,
|
||||
ObjectRemoved = 0x0000000e,
|
||||
InvalidEntityId = 0x0000000f,
|
||||
InvalidEntityAccountId = 0x00000010,
|
||||
InvalidEntityGameAccountId = 0x00000011,
|
||||
InvalidAgentId = 0x00000013,
|
||||
InvalidTargetId = 0x00000014,
|
||||
ModuleNotLoaded = 0x00000015,
|
||||
ModuleNoEntryPoint = 0x00000016,
|
||||
ModuleSignatureIncorrect = 0x00000017,
|
||||
ModuleCreateFailed = 0x00000018,
|
||||
NoProgram = 0x00000019,
|
||||
ApiNotReady = 0x0000001b,
|
||||
BadVersion = 0x0000001c,
|
||||
AttributeTooManyAttributesSet = 0x0000001d,
|
||||
AttributeMaxSizeExceeded = 0x0000001e,
|
||||
AttributeQuotaExceeded = 0x0000001f,
|
||||
ServerPoolServerDisappeared = 0x00000020,
|
||||
ServerIsPrivate = 0x00000021,
|
||||
Disabled = 0x00000022,
|
||||
ModuleNotFound = 0x00000024,
|
||||
ServerBusy = 0x00000025,
|
||||
NoBattletag = 0x00000026,
|
||||
IncompleteProfanityFilters = 0x00000027,
|
||||
InvalidRegion = 0x00000028,
|
||||
ExistsAlready = 0x00000029,
|
||||
InvalidServerThumbprint = 0x0000002a,
|
||||
PhoneLock = 0x0000002b,
|
||||
Squelched = 0x0000002c,
|
||||
TargetOffline = 0x0000002d,
|
||||
BadServer = 0x0000002e,
|
||||
NoCookie = 0x0000002f,
|
||||
ExpiredCookie = 0x00000030,
|
||||
TokenNotFound = 0x00000031,
|
||||
GameAccountNoTime = 0x00000032,
|
||||
GameAccountNoPlan = 0x00000033,
|
||||
@@ -60,13 +44,17 @@ namespace Framework.Constants
|
||||
GameAccountCancelled = 0x00000037,
|
||||
GameAccountCreationDisabled = 0x00000038,
|
||||
GameAccountLocked = 0x00000039,
|
||||
|
||||
GameAccountPhoneLock = 0x0000003a,
|
||||
GameAccountBillingLock = 0x0000003b,
|
||||
SessionDuplicate = 0x0000003c,
|
||||
SessionDisconnected = 0x0000003d,
|
||||
SessionDataChanged = 0x0000003e,
|
||||
SessionUpdateFailed = 0x0000003f,
|
||||
SessionNotFound = 0x00000040,
|
||||
|
||||
SessionFreePlayNotSupported = 0x00000041,
|
||||
SessionSubscriptionAdded = 0x00000042,
|
||||
SessionConsumptionTimeAdded = 0x00000043,
|
||||
SessionTokenNotFound = 0x00000044,
|
||||
AdminKick = 0x00000046,
|
||||
UnplannedMaintenance = 0x00000047,
|
||||
PlannedMaintenance = 0x00000048,
|
||||
@@ -82,42 +70,29 @@ namespace Framework.Constants
|
||||
LocaleRestrictedKo = 0x00000053,
|
||||
LocaleRestrictedTw = 0x00000054,
|
||||
LocaleRestricted = 0x00000055,
|
||||
AccountNeedsMaintenance = 0x00000056,
|
||||
ModuleApiError = 0x00000057,
|
||||
ModuleBadCacheHandle = 0x00000058,
|
||||
ModuleAlreadyLoaded = 0x00000059,
|
||||
NetworkBlacklisted = 0x0000005a,
|
||||
NetworkBlocklisted = 0x0000005a,
|
||||
EventProcessorSlow = 0x0000005b,
|
||||
ServerShuttingDown = 0x0000005c,
|
||||
NetworkNotPrivileged = 0x0000005d,
|
||||
TooManyOutstandingRequests = 0x0000005e,
|
||||
NoAccountRegistered = 0x0000005f,
|
||||
BattlenetAccountBanned = 0x00000060,
|
||||
|
||||
OkDeprecated = 0x00000064,
|
||||
ServerInModeZombie = 0x00000065,
|
||||
AgentIsBlockingTarget = 0x00000066,
|
||||
TargetIsBlockingAgent = 0x00000067,
|
||||
FeatureUnavailable = 0x00000068,
|
||||
BrokenPromise = 0x00000069,
|
||||
UninitializedExpected = 0x0000006a,
|
||||
NoSslConnection = 0x0000006b,
|
||||
ServiceNotReady = 0x0000006e,
|
||||
|
||||
LogonModuleRequired = 0x000001f4,
|
||||
LogonModuleNotConfigured = 0x000001f5,
|
||||
LogonModuleTimeout = 0x000001f6,
|
||||
LogonAgreementRequired = 0x000001fe,
|
||||
LogonAgreementNotConfigured = 0x000001ff,
|
||||
|
||||
LogonInvalidServerProof = 0x00000208,
|
||||
LogonWebVerifyTimeout = 0x00000209,
|
||||
LogonInvalidAuthToken = 0x0000020a,
|
||||
|
||||
ChallengeSmsTooSoon = 0x00000258,
|
||||
ChallengeSmsThrottled = 0x00000259,
|
||||
ChallengeSmsTempOutage = 0x0000025a,
|
||||
ChallengeNoChallenge = 0x0000025b,
|
||||
ChallengeNotPicked = 0x0000025c,
|
||||
ChallengeAlreadyPicked = 0x0000025d,
|
||||
ChallengeInProgress = 0x0000025e,
|
||||
LogonTassadarRequestFailed = 0x0000020b,
|
||||
|
||||
ConfigFormatInvalid = 0x000002bc,
|
||||
ConfigNotFound = 0x000002bd,
|
||||
ConfigRetrieveFailed = 0x000002be,
|
||||
ConfigDumpFailed = 0x000002bf,
|
||||
|
||||
NetworkModuleBusy = 0x000003e8,
|
||||
NetworkModuleCantResolveAddress = 0x000003e9,
|
||||
@@ -136,12 +111,10 @@ namespace Framework.Constants
|
||||
NetworkModuleNoSslCommonNameForCertificate = 0x000003f6,
|
||||
NetworkModuleSslCommonNameDoesNotMatchRemoteEndpoint = 0x000003f7,
|
||||
NetworkModuleSocketClosed = 0x000003f8,
|
||||
NetworkModuleSslPeerIsNotRegisteredInCertbundle = 0x000003f9,
|
||||
NetworkModuleSslInitializeLowFirst = 0x000003fa,
|
||||
NetworkModuleSslCertBundleReadError = 0x000003fb,
|
||||
NetworkModuleNoCertBundle = 0x000003fc,
|
||||
NetworkModuleFailedToDownloadCertBundle = 0x000003fd,
|
||||
NetworkModuleNotReadyToRead = 0x000003fe,
|
||||
NetworkModuleSslCertChainValidationFailed = 0x000003ff,
|
||||
NetworkModuleNetworkDown = 0x00000401,
|
||||
NetworkModuleSslInitializationFailed = 0x00000402,
|
||||
|
||||
NetworkModuleOpensslX509Ok = 0x000004b0,
|
||||
NetworkModuleOpensslX509UnableToGetIssuerCert = 0x000004b1,
|
||||
@@ -183,6 +156,7 @@ namespace Framework.Constants
|
||||
NetworkModuleSchannelCannotFindInterface = 0x00000517,
|
||||
NetworkModuleSchannelInitFail = 0x00000518,
|
||||
NetworkModuleSchannelFunctionCallFail = 0x00000519,
|
||||
NetworkModuleSchannelHandshakeFailure = 0x0000051a,
|
||||
NetworkModuleSchannelX509UnableToGetIssuerCert = 0x00000546,
|
||||
NetworkModuleSchannelX509TimeInvalid = 0x00000547,
|
||||
NetworkModuleSchannelX509SignatureInvalid = 0x00000548,
|
||||
@@ -190,24 +164,31 @@ namespace Framework.Constants
|
||||
NetworkModuleSchannelX509SelfSignedLeafCertificate = 0x0000054a,
|
||||
NetworkModuleSchannelX509UnhandledError = 0x0000054b,
|
||||
NetworkModuleSchannelX509SelfSignedCertInChain = 0x0000054c,
|
||||
|
||||
WebsocketHandshake = 0x00000578,
|
||||
|
||||
NetworkModuleDurangoUnknown = 0x000005dc,
|
||||
NetworkModuleDurangoMalformedHostName = 0x000005dd,
|
||||
NetworkModuleDurangoInvalidConnectionResponse = 0x000005de,
|
||||
NetworkModuleDurangoInvalidCaCert = 0x000005df,
|
||||
NetworkModuleDarwinsslFunctionCallFail = 0x00000640,
|
||||
NetworkModuleDarwinsslX509NeverTrust = 0x00000672,
|
||||
NetworkModuleDarwinsslX509UnknownError = 0x00000676,
|
||||
NetworkModuleSceSslContextAllocateFailed = 0x000006a4,
|
||||
NetworkModuleSceSslConnectionAllocateFailed = 0x000006a5,
|
||||
NetworkModuleSceSslSetVerifyOptionFailed = 0x000006a6,
|
||||
NetworkModuleSceSslHandshakeFailed = 0x000006a7,
|
||||
|
||||
SdkMessageHandlerNotFound = 0x0000076c,
|
||||
SdkTassadarClientInvalidInput = 0x00000776,
|
||||
SdkTassadarServerError = 0x00000777,
|
||||
SdkTassadarServerMaintenance = 0x00000778,
|
||||
|
||||
RpcWriteFailed = 0x00000bb8,
|
||||
RpcServiceNotBound = 0x00000bb9,
|
||||
RpcTooManyRequests = 0x00000bba,
|
||||
RpcPeerUnknown = 0x00000bbb,
|
||||
RpcPeerUnavailable = 0x00000bbc,
|
||||
RpcPeerDisconnected = 0x00000bbd,
|
||||
RpcRequestTimedOut = 0x00000bbe,
|
||||
RpcConnectionTimedOut = 0x00000bbf,
|
||||
RpcMalformedResponse = 0x00000bc0,
|
||||
RpcAccessDenied = 0x00000bc1,
|
||||
RpcInvalidService = 0x00000bc2,
|
||||
RpcInvalidMethod = 0x00000bc3,
|
||||
RpcInvalidObject = 0x00000bc4,
|
||||
@@ -217,30 +198,25 @@ namespace Framework.Constants
|
||||
RpcServerError = 0x00000bc8,
|
||||
RpcShutdown = 0x00000bc9,
|
||||
RpcDisconnect = 0x00000bca,
|
||||
RpcDisconnectIdle = 0x00000bcb,
|
||||
RpcProtocolError = 0x00000bcc,
|
||||
RpcNotReady = 0x00000bcd,
|
||||
RpcForwardFailed = 0x00000bce,
|
||||
RpcEncryptionFailed = 0x00000bcf,
|
||||
RpcInvalidAddress = 0x00000bd0,
|
||||
RpcMethodDisabled = 0x00000bd1,
|
||||
RpcShardNotFound = 0x00000bd2,
|
||||
RpcInvalidConnectionId = 0x00000bd3,
|
||||
RpcNotConnected = 0x00000bd4,
|
||||
RpcInvalidConnectionState = 0x00000bd5,
|
||||
RpcServiceAlreadyRegistered = 0x00000bd6,
|
||||
RpcConnectionUnreachable = 0x00000bd7,
|
||||
RpcNoBufferSpace = 0x00000bd8,
|
||||
RpcHttpProbe = 0x00000bd9,
|
||||
RpcClientIdRequired = 0x00000bda,
|
||||
RpcConnectionReplaced = 0x00000bdb,
|
||||
RpcInvalidRoute = 0x00000bdc,
|
||||
|
||||
PresenceInvalidFieldId = 0x00000fa0,
|
||||
PresenceNoValidSubscribers = 0x00000fa1,
|
||||
PresenceAlreadySubscribed = 0x00000fa2,
|
||||
PresenceConsumerNotFound = 0x00000fa3,
|
||||
PresenceConsumerIsNull = 0x00000fa4,
|
||||
PresenceTemporaryOutage = 0x00000fa5,
|
||||
PresenceTooManySubscriptions = 0x00000fa6,
|
||||
PresenceSubscriptionCancelled = 0x00000fa7,
|
||||
PresenceRichPresenceParseError = 0x00000fa8,
|
||||
PresenceRichPresenceXmlError = 0x00000fa9,
|
||||
PresenceRichPresenceLoadError = 0x00000faa,
|
||||
PresenceNoRecord = 0x00000fab,
|
||||
PresenceNoChange = 0x00000fac,
|
||||
|
||||
FriendsTooManySentInvitations = 0x00001389,
|
||||
FriendsTooManyReceivedInvitations = 0x0000138a,
|
||||
@@ -248,7 +224,6 @@ namespace Framework.Constants
|
||||
FriendsFriendshipDoesNotExist = 0x0000138c,
|
||||
FriendsInvitationAlreadyExists = 0x0000138d,
|
||||
FriendsInvalidInvitation = 0x0000138e,
|
||||
FriendsAlreadySubscribed = 0x0000138f,
|
||||
FriendsAccountBlocked = 0x00001391,
|
||||
FriendsNotSubscribed = 0x00001392,
|
||||
FriendsInvalidRoleId = 0x00001393,
|
||||
@@ -257,11 +232,20 @@ namespace Framework.Constants
|
||||
FriendsUpdateFriendStateFailed = 0x00001396,
|
||||
FriendsInviteeAtMaxFriends = 0x00001397,
|
||||
FriendsInviterAtMaxFriends = 0x00001398,
|
||||
FriendsInviterIsBlockedByInvitee = 0x00001399,
|
||||
FriendsReceivedInvitationUndeliverable = 0x0000139a,
|
||||
FriendsMuted = 0x0000139b,
|
||||
FriendsReceivedInvitationIgnored = 0x0000139c,
|
||||
FriendsTransactionAlreadyExists = 0x0000139d,
|
||||
FriendsMergedFriendsAboveLimit = 0x0000139e,
|
||||
|
||||
PlatformStorageFileWriteDenied = 0x00001770,
|
||||
|
||||
WhisperUndeliverable = 0x00001b58,
|
||||
WhisperMaxSizeExceeded = 0x00001b59,
|
||||
WhisperAlreadyRegistered = 0x00001b5a,
|
||||
WhisperDropped = 0x00001b5b,
|
||||
WhisperQuotaExceeded = 0x00001b5c,
|
||||
|
||||
UserManagerAlreadyBlocked = 0x00001f40,
|
||||
UserManagerNotBlocked = 0x00001f41,
|
||||
@@ -275,73 +259,88 @@ namespace Framework.Constants
|
||||
UserManagerUnblockEntityFailed = 0x00001f51,
|
||||
UserManagerCannotBlockFriend = 0x00001f53,
|
||||
|
||||
SocialNetworkDbException = 0x00002328,
|
||||
SocialNetworkDenialFromProvider = 0x00002329,
|
||||
SocialNetworkInvalidSnsId = 0x0000232a,
|
||||
SocialNetworkCantSendToProvider = 0x0000232b,
|
||||
SocialNetworkExCommFailed = 0x0000232c,
|
||||
SocialNetworkDisabled = 0x0000232d,
|
||||
SocialNetworkMissingRequestParam = 0x0000232e,
|
||||
SocialNetworkUnsupportedOauthVersion = 0x0000232f,
|
||||
SocialNetworkOauthException = 0x00002328,
|
||||
SocialNetworkInvalidSnsId = 0x00002329,
|
||||
SocialNetworkCantSendToProvider = 0x0000232a,
|
||||
SocialNetworkDisabled = 0x0000232b,
|
||||
SocialNetworkMissingRequestParam = 0x0000232c,
|
||||
SocialNetworkNoAccountData = 0x0000232d,
|
||||
SocialNetworkNoToken = 0x0000232e,
|
||||
SocialNetworkMissingDataFromProvider = 0x0000232f,
|
||||
SocialNetworkResponseNotParsable = 0x00002330,
|
||||
SocialNetworkTokenPermissionDenied = 0x00002331,
|
||||
SocialNetworkDenialFromProvider = 0x00002332,
|
||||
|
||||
ChannelFull = 0x00002710,
|
||||
ChannelNoChannel = 0x00002711,
|
||||
ChannelNotMember = 0x00002712,
|
||||
ChannelAlreadyMember = 0x00002713,
|
||||
ChannelNoSuchMember = 0x00002714,
|
||||
ChannelInvalidChannelId = 0x00002716,
|
||||
ChannelNoSuchInvitation = 0x00002718,
|
||||
ChannelTooManyInvitations = 0x00002719,
|
||||
ChannelInvitationAlreadyExists = 0x0000271a,
|
||||
ChannelInvalidChannelSize = 0x0000271b,
|
||||
ChannelInvalidRoleId = 0x0000271c,
|
||||
ChannelRoleNotAssignable = 0x0000271d,
|
||||
ChannelInsufficientPrivileges = 0x0000271e,
|
||||
ChannelInsufficientPrivacyLevel = 0x0000271f,
|
||||
ChannelInvalidPrivacyLevel = 0x00002720,
|
||||
ChannelTooManyChannelsJoined = 0x00002721,
|
||||
ChannelInvitationAlreadySubscribed = 0x00002722,
|
||||
ChannelInvalidChannelDelegate = 0x00002723,
|
||||
ChannelSlotAlreadyReserved = 0x00002724,
|
||||
ChannelSlotNotReserved = 0x00002725,
|
||||
ChannelNoReservedSlotsAvailable = 0x00002726,
|
||||
ChannelInvalidRoleSet = 0x00002727,
|
||||
ChannelRequireFriendValidation = 0x00002728,
|
||||
ChannelMemberOffline = 0x00002729,
|
||||
ChannelReceivedTooManyInvitations = 0x0000272a,
|
||||
ChannelInvitationInvalidGameAccountSelected = 0x0000272b,
|
||||
ChannelUnreachable = 0x0000272c,
|
||||
ChannelInvitationNotSubscribed = 0x0000272d,
|
||||
ChannelInvalidMessageSize = 0x0000272e,
|
||||
ChannelMaxMessageSizeExceeded = 0x0000272f,
|
||||
ChannelConfigNotFound = 0x00002730,
|
||||
ChannelInvalidChannelType = 0x00002731,
|
||||
ChannelInvalidIndex = 0x00002732,
|
||||
ChannelMembershipNotSubscribed = 0x00002733,
|
||||
ChannelAlreadySubscribed = 0x00002734,
|
||||
|
||||
LocalStorageFileOpenError = 0x00002af8,
|
||||
LocalStorageFileCreateError = 0x00002af9,
|
||||
LocalStorageFileReadError = 0x00002afa,
|
||||
LocalStorageFileWriteError = 0x00002afb,
|
||||
LocalStorageFileDeleteError = 0x00002afc,
|
||||
LocalStorageFileCopyError = 0x00002afd,
|
||||
LocalStorageFileDecompressError = 0x00002afe,
|
||||
LocalStorageFileHashMismatch = 0x00002aff,
|
||||
LocalStorageFileUsageMismatch = 0x00002b00,
|
||||
LocalStorageDatabaseInitError = 0x00002b01,
|
||||
LocalStorageDatabaseNeedsRebuild = 0x00002b02,
|
||||
LocalStorageDatabaseInsertError = 0x00002b03,
|
||||
LocalStorageDatabaseLookupError = 0x00002b04,
|
||||
LocalStorageDatabaseUpdateError = 0x00002b05,
|
||||
LocalStorageDatabaseDeleteError = 0x00002b06,
|
||||
LocalStorageDatabaseShrinkError = 0x00002b07,
|
||||
LocalStorageCacheCrawlError = 0x00002b08,
|
||||
LocalStorageDatabaseIndexTriggerError = 0x00002b09,
|
||||
LocalStorageDatabaseRebuildInProgress = 0x00002b0a,
|
||||
LocalStorageOkButNotInCache = 0x00002b0b,
|
||||
LocalStorageDatabaseRebuildInterrupted = 0x00002b0d,
|
||||
LocalStorageDatabaseNotInitialized = 0x00002b0e,
|
||||
LocalStorageDirectoryCreateError = 0x00002b0f,
|
||||
LocalStorageFilekeyNotFound = 0x00002b10,
|
||||
LocalStorageNotAvailableOnServer = 0x00002b11,
|
||||
ClubFull = 0x00002af8,
|
||||
ClubNoClub = 0x00002af9,
|
||||
ClubNotMember = 0x00002afa,
|
||||
ClubAlreadyMember = 0x00002afb,
|
||||
ClubNoSuchMember = 0x00002afc,
|
||||
ClubNoSuchInvitation = 0x00002b00,
|
||||
ClubInvitationAlreadyExists = 0x00002b02,
|
||||
ClubInvalidRoleId = 0x00002b04,
|
||||
ClubInsufficientPrivileges = 0x00002b06,
|
||||
ClubInsufficientPrivacyLevel = 0x00002b07,
|
||||
ClubInvalidPrivacyLevel = 0x00002b08,
|
||||
ClubTooManyClubsJoined = 0x00002b09,
|
||||
ClubInvalidRoleSet = 0x00002b0f,
|
||||
ClubNotSubscribed = 0x00002b15,
|
||||
ClubInvalidClubType = 0x00002b19,
|
||||
ClubVoiceFull = 0x00002b1a,
|
||||
ClubMemberSubscriptionsAtMax = 0x00002b1b,
|
||||
ClubSuggestionAlreadyExists = 0x00002b20,
|
||||
ClubSuggestionCountAtMax = 0x00002b21,
|
||||
ClubNoSuchSuggestion = 0x00002b22,
|
||||
ClubStreamNoStream = 0x00002b5c,
|
||||
ClubStreamInvalidName = 0x00002b5d,
|
||||
ClubStreamCountAtMin = 0x00002b5e,
|
||||
ClubStreamCountAtMax = 0x00002b5f,
|
||||
ClubStreamInvalidVoiceLevel = 0x00002b60,
|
||||
ClubStreamNoSuchMessage = 0x00002b61,
|
||||
ClubInvalidAvatar = 0x00002b75,
|
||||
ClubMemberHasRequiredRole = 0x00002b76,
|
||||
ClubInvalidRoleChangeRequest = 0x00002b77,
|
||||
ClubSentInvitationCountAtMax = 0x00002b8e,
|
||||
ClubReceivedInvitationCountAtMax = 0x00002b8f,
|
||||
ClubTargetIsBanned = 0x00002b90,
|
||||
ClubNoSuchBannedTarget = 0x00002b91,
|
||||
ClubBanAlreadyExists = 0x00002b92,
|
||||
ClubBanCountAtMax = 0x00002b93,
|
||||
ClubTicketCountAtMax = 0x00002ba2,
|
||||
ClubTicketNoSuchTicket = 0x00002ba3,
|
||||
ClubTicketHasConsumedAllowedRedeemCount = 0x00002ba4,
|
||||
|
||||
ClubMembershipSubscriptionsAtMax = 0x00002e19,
|
||||
ClubMembershipPushNotificationRegistrationsAtMax = 0x00002e1a,
|
||||
ClubTagAlreadyExists = 0x00002e1b,
|
||||
ClubTagNoSuchTag = 0x00002e1c,
|
||||
ClubTagTooManyTags = 0x00002e1d,
|
||||
|
||||
RegistryCreateKeyError = 0x00002ee0,
|
||||
RegistryOpenKeyError = 0x00002ee1,
|
||||
@@ -351,18 +350,10 @@ namespace Framework.Constants
|
||||
RegistryDeleteError = 0x00002ee5,
|
||||
RegistryEncryptError = 0x00002ee6,
|
||||
RegistryDecryptError = 0x00002ee7,
|
||||
RegistryKeySizeError = 0x00002ee8,
|
||||
RegistryValueSizeError = 0x00002ee9,
|
||||
RegistryNotFound = 0x00002eeb,
|
||||
RegistryMalformedString = 0x00002eec,
|
||||
|
||||
InterfaceAlreadyConnected = 0x000032c8,
|
||||
InterfaceNotReady = 0x000032c9,
|
||||
InterfaceOptionKeyTooLarge = 0x000032ca,
|
||||
InterfaceOptionValueTooLarge = 0x000032cb,
|
||||
InterfaceOptionKeyInvalidUtf8String = 0x000032cc,
|
||||
InterfaceOptionValueInvalidUtf8String = 0x000032cd,
|
||||
|
||||
HttpCouldntResolve = 0x000036b0,
|
||||
HttpCouldntConnect = 0x000036b1,
|
||||
HttpTimeout = 0x000036b2,
|
||||
@@ -373,21 +364,55 @@ namespace Framework.Constants
|
||||
HttpTooManyRedirects = 0x000036b7,
|
||||
HttpCouldntOpenFile = 0x000036b8,
|
||||
HttpCouldntCreateFile = 0x000036b9,
|
||||
HttpCouldntReadFile = 0x000036ba,
|
||||
HttpCouldntRenameFile = 0x000036bb,
|
||||
HttpCouldntCreateDirectory = 0x000036bc,
|
||||
HttpCurlIsNotReady = 0x000036bd,
|
||||
HttpCancelled = 0x000036be,
|
||||
HttpCanceled = 0x000036be,
|
||||
HttpSendFailed = 0x000036bf,
|
||||
HttpRecvFailed = 0x000036c0,
|
||||
HttpMalformedReply = 0x000036c1,
|
||||
HttpAccessDenied = 0x000036c2,
|
||||
HttpMalformedPost = 0x000036c3,
|
||||
HttpInvalidCert = 0x000036c4,
|
||||
HttpInvalidCaCert = 0x000036c5,
|
||||
HttpSslConnectFailed = 0x000036c6,
|
||||
HttpProtocolFailed = 0x000036c7,
|
||||
|
||||
HttpFileNotFound = 0x00003844,
|
||||
|
||||
HttpOauth2DiscoveryFailed = 0x000038a5,
|
||||
HttpOauth2TokenRefreshFailed = 0x000038a6,
|
||||
HttpOauth2TokenStorageFailed = 0x000038a7,
|
||||
HttpOauth2TokenExchangeFailed = 0x000038a8,
|
||||
HttpOauth2InvalidContext = 0x000038a9,
|
||||
|
||||
AsterionGeneralRuntime = 0x00003a98,
|
||||
AsterionThrottled = 0x00003a99,
|
||||
AsterionShardNotFound = 0x00003a9a,
|
||||
AsterionInvalidParameter = 0x00003a9b,
|
||||
AsterionRemoteRegionUnavailable = 0x00003a9d,
|
||||
AsterionDeductRecordDuplicated = 0x00003a9f,
|
||||
AsterionDeductRecordMinimumGametime = 0x00003aa0,
|
||||
AsterionDeductRecordInvalidStopTime = 0x00003aa1,
|
||||
AsterionTimedOut = 0x00003aa2,
|
||||
AsterionTooManyOutstandingRequests = 0x00003aa3,
|
||||
AsterionDeductRecordAnotherInProgress = 0x00003aa4,
|
||||
|
||||
AsterionUnavailable = 0x00003e7f,
|
||||
|
||||
EventViewIsFull = 0x00003e80,
|
||||
|
||||
VoiceAccountNotFound = 0x00004268,
|
||||
VoiceTokenAlreadyUsed = 0x00004269,
|
||||
VoiceVersionNotSupported = 0x0000426a,
|
||||
VoiceInvalidVersion = 0x0000426b,
|
||||
VoiceSecretKeyStorageFailure = 0x0000426c,
|
||||
|
||||
AccountMissingConfig = 0x00004650,
|
||||
AccountDataNotFound = 0x00004651,
|
||||
AccountAlreadySubscribed = 0x00004652,
|
||||
AccountNotSubscribed = 0x00004653,
|
||||
AccountFailedToParseTimezoneData = 0x00004654,
|
||||
AccountLoadFailed = 0x00004655,
|
||||
AccountLoadCancelled = 0x00004656,
|
||||
AccountDatabaseInvalidateFailed = 0x00004657,
|
||||
AccountCacheInvalidateFailed = 0x00004658,
|
||||
AccountSubscriptionPending = 0x00004659,
|
||||
@@ -396,40 +421,20 @@ namespace Framework.Constants
|
||||
AccountUnderage = 0x0000465c,
|
||||
AccountIdentityCheckPending = 0x0000465d,
|
||||
AccountIdentityUnverified = 0x0000465e,
|
||||
|
||||
DatabaseBindingCountMismatch = 0x00004a38,
|
||||
DatabaseBindingParseFail = 0x00004a39,
|
||||
DatabaseResultsetColumnsMismatch = 0x00004a3a,
|
||||
DatabaseDeadlock = 0x00004a3b,
|
||||
DatabaseDuplicateKey = 0x00004a3c,
|
||||
DatabaseCannotConnect = 0x00004a3d,
|
||||
DatabaseStatementFailed = 0x00004a3e,
|
||||
DatabaseTransactionNotStarted = 0x00004a3f,
|
||||
DatabaseTransactionNotEnded = 0x00004a40,
|
||||
DatabaseTransactionLeak = 0x00004a41,
|
||||
DatabaseTransactionStateBad = 0x00004a42,
|
||||
DatabaseServerGone = 0x00004a43,
|
||||
DatabaseQueryTimeout = 0x00004a44,
|
||||
DatabaseBindingNotNullable = 0x00004a9c,
|
||||
DatabaseBindingInvalidInteger = 0x00004a9d,
|
||||
DatabaseBindingInvalidFloat = 0x00004a9e,
|
||||
DatabaseBindingInvalidTemporal = 0x00004a9f,
|
||||
DatabaseBindingInvalidProtobuf = 0x00004aa0,
|
||||
|
||||
PartyInvalidPartyId = 0x00004e20,
|
||||
PartyAlreadyInParty = 0x00004e21,
|
||||
PartyNotInParty = 0x00004e22,
|
||||
PartyInvitationUndeliverable = 0x00004e23,
|
||||
PartyInvitationAlreadyExists = 0x00004e24,
|
||||
PartyTooManyPartyInvitations = 0x00004e25,
|
||||
PartyTooManyReceivedInvitations = 0x00004e26,
|
||||
PartyNoSuchType = 0x00004e27,
|
||||
AccountIgr = 0x0000465f,
|
||||
GameAccountCreateNeedNationalId = 0x00004660,
|
||||
GameAccountCreateBlocked = 0x00004661,
|
||||
GameAccountDetached = 0x00004662,
|
||||
GameAccountCreateTooManyGameAccount = 0x00004663,
|
||||
SubscriberNoNeedToUpdate = 0x00004664,
|
||||
AccountMobileNumberRequired = 0x00004665,
|
||||
AccountMobileNumberAlreadyUsed = 0x00004666,
|
||||
AccountDataNotExistsInCache = 0x00004667,
|
||||
AccountInvalidIdentityData = 0x00004668,
|
||||
|
||||
GamesNoSuchFactory = 0x000055f0,
|
||||
GamesNoSuchGame = 0x000055f1,
|
||||
GamesNoSuchRequest = 0x000055f2,
|
||||
GamesNoSuchPartyMember = 0x000055f3,
|
||||
|
||||
ResourcesOffline = 0x000059d8,
|
||||
|
||||
GameServerCreateGameRefused = 0x00005dc0,
|
||||
@@ -453,11 +458,8 @@ namespace Framework.Constants
|
||||
GameMasterRegisterFailed = 0x000061ab,
|
||||
GameMasterNoGameServer = 0x000061ac,
|
||||
GameMasterNoUtilityServer = 0x000061ad,
|
||||
GameMasterNoGameVersion = 0x000061ae,
|
||||
GameMasterGameJoinFailed = 0x000061af,
|
||||
GameMasterAlreadyRegistered = 0x000061b0,
|
||||
GameMasterNoFactory = 0x000061b1,
|
||||
GameMasterMultipleGameVersions = 0x000061b2,
|
||||
GameMasterInvalidPlayer = 0x000061b3,
|
||||
GameMasterInvalidGameRequest = 0x000061b4,
|
||||
GameMasterInsufficientPrivileges = 0x000061b5,
|
||||
@@ -471,43 +473,50 @@ namespace Framework.Constants
|
||||
GameMasterInvalidTeamId = 0x000061bd,
|
||||
GameMasterCreationInProgress = 0x000061be,
|
||||
|
||||
NotificationInvalidClientId = 0x00006590,
|
||||
NotificationDuplicateName = 0x00006591,
|
||||
NotificationNameNotFound = 0x00006592,
|
||||
NotificationInvalidServer = 0x00006593,
|
||||
NotificationQuotaExceeded = 0x00006594,
|
||||
NotificationInvalidNotificationType = 0x00006595,
|
||||
NotificationUndeliverable = 0x00006596,
|
||||
NotificationUndeliverableTemporary = 0x00006597,
|
||||
|
||||
AchievementsNothingToUpdate = 0x00006d60,
|
||||
AchievementsInvalidParams = 0x00006d61,
|
||||
AchievementsNotRegistered = 0x00006d62,
|
||||
AchievementsNotReady = 0x00006d63,
|
||||
AchievementsFailedToParseStaticData = 0x00006d64,
|
||||
AchievementsUnknownId = 0x00006d65,
|
||||
AchievementsMissingSnapshot = 0x00006d66,
|
||||
AchievementsAlreadyRegistered = 0x00006d67,
|
||||
AchievementsTooManyRegistrations = 0x00006d68,
|
||||
AchievementsAlreadyInProgress = 0x00006d69,
|
||||
AchievementsTemporaryOutage = 0x00006d6a,
|
||||
AchievementsInvalidProgramid = 0x00006d6b,
|
||||
AchievementsMissingRecord = 0x00006d6c,
|
||||
AchievementsRegistrationPending = 0x00006d6d,
|
||||
AchievementsEntityIdNotFound = 0x00006d6e,
|
||||
AchievementsAchievementIdNotFound = 0x00006d6f,
|
||||
AchievementsCriteriaIdNotFound = 0x00006d70,
|
||||
AchievementsStaticDataMismatch = 0x00006d71,
|
||||
AchievementsWrongThread = 0x00006d72,
|
||||
AchievementsCallbackIsNull = 0x00006d73,
|
||||
AchievementsAutoRegisterPending = 0x00006d74,
|
||||
AchievementsNotInitialized = 0x00006d75,
|
||||
AchievementsAchievementIdAlreadyExists = 0x00006d76,
|
||||
AchievementsFailedToDownloadStaticData = 0x00006d77,
|
||||
AchievementsStaticDataNotFound = 0x00006d78,
|
||||
LeaderboardRuleNotFound = 0x00006d61,
|
||||
LeaderboardNotFound = 0x00006d62,
|
||||
LeaderboardInvalidEntityId = 0x00006d64,
|
||||
LeaderboardInvalidGameAccount = 0x00006d65,
|
||||
LeaderboardInvalidTimestamp = 0x00006d66,
|
||||
LeaderboardInvalidTags = 0x00006d67,
|
||||
LeaderboardInvalidPayload = 0x00006d69,
|
||||
LeaderboardInvalidTitleId = 0x00006d6a,
|
||||
LeaderboardInvalidRuleName = 0x00006d6b,
|
||||
LeaderboardInvalidRequest = 0x00006d6c,
|
||||
LeaderboardInvalidScores = 0x00006d6d,
|
||||
LeaderboardInvalidFieldFormat = 0x00006d6e,
|
||||
LeaderboardAccountNotFound = 0x00006d6f,
|
||||
LeaderboardRanksNotFound = 0x00006d70,
|
||||
LeaderboardInvalidBatchSubmitRanksRequest = 0x00006d71,
|
||||
|
||||
MatchmakingMatchmakerNotFound = 0x00007530,
|
||||
MatchmakingMatchmakerDecommissioned = 0x00007531,
|
||||
MatchmakingGameserverNotFound = 0x00007532,
|
||||
Matchmaking30003 = 0x00007533,
|
||||
MatchmakingMatchmakerAlreadyRegistered = 0x00007534,
|
||||
MatchmakingGameserverAlreadyRegistered = 0x00007535,
|
||||
MatchmakingRequestIdNotFound = 0x00007536,
|
||||
MatchmakingInsufficientPartyPrivileges = 0x00007537,
|
||||
MatchmakingEventQueueFull = 0x00007538,
|
||||
MatchmakingCancelNotAllowed = 0x00007539,
|
||||
MatchmakingPlayerNotConnected = 0x0000753a,
|
||||
MatchmakingEventCanceled = 0x0000753b,
|
||||
MatchmakingGameserverFull = 0x0000753c,
|
||||
MatchmakingInvalidResponse = 0x0000753d,
|
||||
MatchmakingMatchmakerInvalidConnection = 0x0000753e,
|
||||
|
||||
MatchmakingServerAlreadyInGame = 0x00007918,
|
||||
MatchmakingServerInvalidGame = 0x00007919,
|
||||
MatchmakingServerInvalidPlayer = 0x0000791a,
|
||||
MatchmakingServerGameFull = 0x0000791b,
|
||||
MatchmakingServerUnknownRequestId = 0x0000791c,
|
||||
|
||||
GameUtilityServerVariableRequestRefused = 0x000084d1,
|
||||
GameUtilityServerWrongNumberOfVariablesReturned = 0x000084d2,
|
||||
GameUtilityServerClientRequestRefused = 0x000084d3,
|
||||
GameUtilityServerPresenceChannelCreatedRefused = 0x000084d4,
|
||||
GameUtilityServerVariableRequestRefusedTransient = 0x00008502,
|
||||
@@ -518,31 +527,34 @@ namespace Framework.Constants
|
||||
GameUtilityServerClientRequestRefusedBusy = 0x00008535,
|
||||
GameUtilityServerPresenceChannelCreatedRefusedBusy = 0x00008536,
|
||||
GameUtilityServerServerRequestRefusedBusy = 0x00008537,
|
||||
|
||||
GameUtilityServerRequestRefused = 0x00008567,
|
||||
GameUtilityServerRequestRefusedBusy = 0x00008568,
|
||||
GameUtilityServerRequestRefusedTransient = 0x00008569,
|
||||
GameUtilityServerNoServer = 0x00008598,
|
||||
GameUtilityServerVersionMismatch = 0x0000859a,
|
||||
GameUtilityServerTimedOut = 0x0000859b,
|
||||
|
||||
IdentityInsufficientData = 0x0000a028,
|
||||
IdentityTooManyResults = 0x0000a029,
|
||||
IdentityBadId = 0x0000a02a,
|
||||
IdentityNoAccountBlob = 0x0000a02b,
|
||||
SessionAdminKick = 0x00009c44,
|
||||
SessionAbandoned = 0x00009c48,
|
||||
SessionCaisPlaytimeExceeded = 0x00009c4b,
|
||||
SessionCaisCurfew = 0x00009c4c,
|
||||
SessionInvalidNid = 0x00009c4e,
|
||||
SessionQueueDuplicated = 0x00009c4f,
|
||||
SessionQueueAdminKick = 0x00009c51,
|
||||
SessionKeyExpired = 0x00009c52,
|
||||
SessionTokenExpired = 0x00009c53,
|
||||
|
||||
RiskChallengeAction = 0x0000a410,
|
||||
RiskDelayAction = 0x0000a411,
|
||||
RiskThrottleAction = 0x0000a412,
|
||||
RiskAccountLocked = 0x0000a413,
|
||||
RiskCsDenied = 0x0000a414,
|
||||
RiskDisconnectAccount = 0x0000a415,
|
||||
RiskCheckSkipped = 0x0000a416,
|
||||
|
||||
ReportUnavailable = 0x0000afc8,
|
||||
ReportTooLarge = 0x0000afc9,
|
||||
ReportUnknownProgram = 0x0000afc9,
|
||||
ReportUnknownType = 0x0000afca,
|
||||
ReportAttributeInvalid = 0x0000afcb,
|
||||
ReportAttributeQuotaExceeded = 0x0000afcc,
|
||||
ReportUnconfirmed = 0x0000afcd,
|
||||
ReportNotConnected = 0x0000afce,
|
||||
ReportRejected = 0x0000afcf,
|
||||
ReportTooManyRequests = 0x0000afd0,
|
||||
|
||||
AccountAlreadyRegisterd = 0x0000bb80,
|
||||
AccountNotRegistered = 0x0000bb81,
|
||||
AccountRegistrationPending = 0x0000bb82,
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace Framework.Constants
|
||||
TrainerSpell = 31,
|
||||
ObjectIdVisibility = 32,
|
||||
SpawnGroup = 33,
|
||||
PlayerCondition = 34,
|
||||
|
||||
MaxDbAllowed,
|
||||
ReferenceCondition = MaxDbAllowed,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -369,16 +369,19 @@ namespace Framework.Constants
|
||||
RaceToRecipient = 29, // "%s's attempt to share quest "%s" failed. You are the wrong race for that quest."
|
||||
LowFaction = 30, // "%s's reputation is too low for that quest."
|
||||
LowFactionToRecipient = 31, // "%s's attempt to share quest "%s" failed. Your reputation is too low for that quest."
|
||||
Expansion = 32, // "%s doesn't own the required expansion for that quest."
|
||||
ExpansionToRecipient = 33, // "%s's attempt to share quest "%s" failed. You do not own the required expansion for that quest."
|
||||
NotGarrisonOwner = 34, // "%s must own a garrison to accept that quest."
|
||||
NotGarrisonOwnerToRecipient = 35, // "%s's attempt to share quest "%s" failed. You must own a garrison to accept that quest."
|
||||
WrongCovenant = 36, // "%s is in the wrong covenant for that quest."
|
||||
WrongCovenantToRecipient = 37, // "%s's attempt to share quest "%s" failed. You are in the wrong covenant for that quest."
|
||||
NewPlayerExperience = 38, // "%s must complete Exile's Reach to accept that quest."
|
||||
NewPlayerExperienceToRecipient = 39, // "%s's attempt to share quest "%s" failed. You must complete Exile's Reach to accept that quest."
|
||||
WrongFaction = 40, // "%s is the wrong faction for that quest."
|
||||
WrongFactionToRecipient = 41 // "%s's attempt to share quest "%s" failed. You are the wrong faction for that quest."
|
||||
HighFaction = 32, // "%s's reputation is too high for that quest."
|
||||
HighFactionToRecipient = 33, // "%s's attempt to share quest "%s" failed. Your reputation is too high for that quest."
|
||||
Expansion = 34, // "%s doesn't own the required expansion for that quest."
|
||||
ExpansionToRecipient = 35, // "%s's attempt to share quest "%s" failed. You do not own the required expansion for that quest."
|
||||
NotGarrisonOwner = 36, // "%s must own a garrison to accept that quest."
|
||||
NotGarrisonOwnerToRecipient = 37, // "%s's attempt to share quest "%s" failed. You must own a garrison to accept that quest."
|
||||
WrongCovenant = 38, // "%s is in the wrong covenant for that quest."
|
||||
WrongCovenantToRecipient = 39, // "%s's attempt to share quest "%s" failed. You are in the wrong covenant for that quest."
|
||||
NewPlayerExperience = 40, // "%s must complete Exile's Reach to accept that quest."
|
||||
NewPlayerExperienceToRecipient = 41, // "%s's attempt to share quest "%s" failed. You must complete Exile's Reach to accept that quest."
|
||||
WrongFaction = 42, // "%s is the wrong faction for that quest."
|
||||
WrongFactionToRecipient = 43, // "%s's attempt to share quest "%s" failed. You are the wrong faction for that quest."
|
||||
CrossFactionRestricted = 44, // "Quests can't be shared in cross-faction groups."
|
||||
}
|
||||
|
||||
public enum QuestTradeSkill
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,8 @@ namespace Framework.Database
|
||||
{
|
||||
// Achievement.db2
|
||||
PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT, "SELECT Description, Title, Reward, ID, InstanceID, Faction, Supercedes, Category, MinimumCriteria, " +
|
||||
"Points, Flags, UiOrder, IconFileID, RewardItemID, CriteriaTree, SharesCriteria, CovenantID FROM achievement WHERE (`VerifiedBuild` > 0) = ?");
|
||||
"Points, Flags, UiOrder, IconFileID, RewardItemID, CriteriaTree, SharesCriteria, CovenantID, HiddenBeforeDisplaySeason, LegacyAfterTimeEvent" +
|
||||
" FROM achievement WHERE (`VerifiedBuild` > 0) = ?");
|
||||
PrepareStatement(HotfixStatements.SEL_ACHIEVEMENT_LOCALE, "SELECT ID, Description_lang, Title_lang, Reward_lang FROM achievement_locale" +
|
||||
" WHERE (`VerifiedBuild` > 0) = ? AND locale = ?");
|
||||
|
||||
@@ -20,9 +21,9 @@ namespace Framework.Database
|
||||
|
||||
// AdventureJournal.db2
|
||||
PrepareStatement(HotfixStatements.SEL_ADVENTURE_JOURNAL, "SELECT ID, Name, Description, ButtonText, RewardDescription, ContinueDescription, Type, " +
|
||||
"PlayerConditionID, Flags, ButtonActionType, TextureFileDataID, LfgDungeonID, QuestID, BattleMasterListID, PriorityMin, PriorityMax, ItemID, " +
|
||||
"ItemQuantity, CurrencyType, CurrencyQuantity, UiMapID, BonusPlayerConditionID1, BonusPlayerConditionID2, BonusValue1, BonusValue2" +
|
||||
" FROM adventure_journal WHERE (`VerifiedBuild` > 0) = ?");
|
||||
"PlayerConditionID, Flags, ButtonActionType, TextureFileDataID, LfgDungeonID, QuestID, BattleMasterListID, PriorityMin, PriorityMax, " +
|
||||
"CurrencyType, CurrencyQuantity, UiMapID, BonusPlayerConditionID1, BonusPlayerConditionID2, BonusValue1, BonusValue2 FROM adventure_journal" +
|
||||
" WHERE (`VerifiedBuild` > 0) = ?");
|
||||
PrepareStatement(HotfixStatements.SEL_ADVENTURE_JOURNAL_LOCALE, "SELECT ID, Name_lang, Description_lang, ButtonText_lang, RewardDescription_lang, " +
|
||||
"ContinueDescription_lang FROM adventure_journal_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?");
|
||||
|
||||
|
||||
@@ -296,6 +296,14 @@ namespace Framework.GameMath
|
||||
return v;
|
||||
}
|
||||
|
||||
public Vector3 extent()
|
||||
{
|
||||
if (Lo.IsEmpty())
|
||||
return Vector3.Zero;
|
||||
|
||||
return Hi - Lo;
|
||||
}
|
||||
|
||||
public static AxisAlignedBox operator +(AxisAlignedBox box, Vector3 v)
|
||||
{
|
||||
AxisAlignedBox outt = new();
|
||||
|
||||
@@ -210,6 +210,11 @@ namespace Framework.GameMath
|
||||
{
|
||||
return Vector3.Divide(Vector3.One, Direction);
|
||||
}
|
||||
|
||||
public Ray bumpedRay(float distance)
|
||||
{
|
||||
return new Ray(Origin + Direction * distance, Direction);
|
||||
}
|
||||
}
|
||||
|
||||
#region RayConverter class
|
||||
|
||||
@@ -618,11 +618,10 @@ namespace Framework.IO
|
||||
|
||||
if(strm==null||strm.state==null||dictionary==null) return Z_STREAM_ERROR;
|
||||
|
||||
deflate_state s=strm.state as deflate_state;
|
||||
if(s==null||s.wrap==2||(s.wrap==1&&s.status!=INIT_STATE))
|
||||
return Z_STREAM_ERROR;
|
||||
if (strm.state is not deflate_state s || s.wrap == 2 || (s.wrap == 1 && s.status != INIT_STATE))
|
||||
return Z_STREAM_ERROR;
|
||||
|
||||
if(s.wrap!=0) strm.adler=adler32(strm.adler, dictionary, dictLength);
|
||||
if (s.wrap!=0) strm.adler=adler32(strm.adler, dictionary, dictLength);
|
||||
|
||||
if(length<MIN_MATCH) return Z_OK;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using Framework.Database;
|
||||
using Framework.Web;
|
||||
using System;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Framework.Networking.Http
|
||||
{
|
||||
@@ -20,9 +21,21 @@ namespace Framework.Networking.Http
|
||||
public Guid? GetSessionId();
|
||||
}
|
||||
|
||||
public abstract class BaseSocket<Derived> : SSLSocket, IAbstractSocket
|
||||
public abstract class BaseHttpSocket : SocketBase, IAbstractSocket
|
||||
{
|
||||
public BaseSocket(Socket socket) : base(socket) { }
|
||||
public BaseHttpSocket(Socket socket, bool useSSL = false) : base(socket, useSSL) { }
|
||||
|
||||
public async override Task HandshakeHandler(Exception exception = null)
|
||||
{
|
||||
if (exception != null)
|
||||
{
|
||||
Log.outError(LogFilter.Http, $"{GetClientInfo()} SSL Handshake failed {exception.Message}");
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
await AsyncRead();
|
||||
}
|
||||
|
||||
public async override void ReadHandler(byte[] data, int receivedLength)
|
||||
{
|
||||
@@ -114,5 +127,6 @@ namespace Framework.Networking.Http
|
||||
|
||||
protected AsyncCallbackProcessor<QueryCallback> _queryProcessor = new();
|
||||
protected SessionState _state;
|
||||
protected ISocket socket;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Framework.Configuration;
|
||||
|
||||
namespace Framework.Networking.Http
|
||||
{
|
||||
public class SslSocket<Derived> : BaseSocket<Derived>
|
||||
{
|
||||
X509Certificate2 _certificate;
|
||||
|
||||
public SslSocket(Socket socket) : base(socket)
|
||||
{
|
||||
_certificate = new X509Certificate2(ConfigMgr.GetDefaultValue("CertificatesFile", "./BNetServer.pfx"));
|
||||
}
|
||||
|
||||
public async override void Start()
|
||||
{
|
||||
await AsyncHandshake(_certificate);
|
||||
}
|
||||
|
||||
public async override Task HandshakeHandler(Exception exception = null)
|
||||
{
|
||||
if (exception != null)
|
||||
{
|
||||
Log.outError(LogFilter.Http, $"{GetClientInfo()} SSL Handshake failed {exception.Message}");
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
await AsyncRead();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Framework.Networking
|
||||
{
|
||||
public abstract class SSLSocket : ISocket, IDisposable
|
||||
{
|
||||
Socket _socket;
|
||||
internal SslStream _stream;
|
||||
IPEndPoint _remoteEndPoint;
|
||||
byte[] _receiveBuffer;
|
||||
|
||||
protected SSLSocket(Socket socket)
|
||||
{
|
||||
_socket = socket;
|
||||
_remoteEndPoint = (IPEndPoint)_socket.RemoteEndPoint;
|
||||
_receiveBuffer = new byte[ushort.MaxValue];
|
||||
|
||||
_stream = new SslStream(new NetworkStream(socket), false);
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
_receiveBuffer = null;
|
||||
_stream.Dispose();
|
||||
}
|
||||
|
||||
public abstract void Start();
|
||||
|
||||
public virtual bool Update()
|
||||
{
|
||||
return _socket.Connected;
|
||||
}
|
||||
|
||||
public IPAddress GetRemoteIpAddress()
|
||||
{
|
||||
return _remoteEndPoint.Address;
|
||||
}
|
||||
|
||||
public async Task AsyncRead()
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length);
|
||||
if (result == 0)
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
ReadHandler(_receiveBuffer, result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AsyncHandshake(X509Certificate2 certificate)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _stream.AuthenticateAsServerAsync(certificate, false, SslProtocols.Tls12, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await HandshakeHandler(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
await HandshakeHandler();
|
||||
}
|
||||
|
||||
public abstract Task HandshakeHandler(Exception ex = null);
|
||||
|
||||
public abstract void ReadHandler(byte[] data, int receivedLength);
|
||||
|
||||
public async Task AsyncWrite(byte[] data)
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
await _stream.WriteAsync(data, 0, data.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseSocket()
|
||||
{
|
||||
try
|
||||
{
|
||||
_socket.Shutdown(SocketShutdown.Both);
|
||||
_socket.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, $"WorldSocket.CloseSocket: {GetRemoteIpAddress()} errored when shutting down socket: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnClose() { Dispose(); }
|
||||
|
||||
public bool IsOpen() { return _socket.Connected; }
|
||||
|
||||
public void SetNoDelay(bool enable)
|
||||
{
|
||||
_socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, enable);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,13 @@
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Framework.Networking
|
||||
{
|
||||
@@ -15,92 +20,126 @@ namespace Framework.Networking
|
||||
void CloseSocket();
|
||||
}
|
||||
|
||||
public delegate Task SocketReadCallback(byte[] data, int receivedLength);
|
||||
|
||||
public abstract class SocketBase : ISocket, IDisposable
|
||||
{
|
||||
Socket _socket;
|
||||
IPEndPoint _remoteIPEndPoint;
|
||||
Stream _stream;
|
||||
IPEndPoint _remoteEndPoint;
|
||||
byte[] _receiveBuffer;
|
||||
|
||||
SocketAsyncEventArgs receiveSocketAsyncEventArgsWithCallback;
|
||||
SocketAsyncEventArgs receiveSocketAsyncEventArgs;
|
||||
|
||||
public delegate void SocketReadCallback(SocketAsyncEventArgs args);
|
||||
|
||||
protected SocketBase(Socket socket)
|
||||
protected SocketBase(Socket socket, bool useSSL = false)
|
||||
{
|
||||
_socket = socket;
|
||||
_remoteIPEndPoint = (IPEndPoint)_socket.RemoteEndPoint;
|
||||
_remoteEndPoint = (IPEndPoint)_socket.RemoteEndPoint;
|
||||
_receiveBuffer = new byte[ushort.MaxValue];
|
||||
|
||||
receiveSocketAsyncEventArgsWithCallback = new SocketAsyncEventArgs();
|
||||
receiveSocketAsyncEventArgsWithCallback.SetBuffer(new byte[0x4000], 0, 0x4000);
|
||||
|
||||
receiveSocketAsyncEventArgs = new SocketAsyncEventArgs();
|
||||
receiveSocketAsyncEventArgs.SetBuffer(new byte[0x4000], 0, 0x4000);
|
||||
receiveSocketAsyncEventArgs.Completed += (sender, args) => ProcessReadAsync(args);
|
||||
if (useSSL)
|
||||
_stream = new SslStream(new NetworkStream(socket), false);
|
||||
else
|
||||
_stream = new NetworkStream(socket);
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
_socket.Dispose();
|
||||
_receiveBuffer = null;
|
||||
_stream.Dispose();
|
||||
}
|
||||
|
||||
public virtual void Start() { }
|
||||
public abstract void Start();
|
||||
|
||||
public virtual bool Update()
|
||||
{
|
||||
return IsOpen();
|
||||
}
|
||||
|
||||
public IPEndPoint GetRemoteIpAddress()
|
||||
public IPAddress GetRemoteIpAddress()
|
||||
{
|
||||
return _remoteIPEndPoint;
|
||||
return _remoteEndPoint.Address;
|
||||
}
|
||||
|
||||
public void AsyncReadWithCallback(SocketReadCallback callback)
|
||||
public IPEndPoint GetRemoteIpEndPoint()
|
||||
{
|
||||
return _remoteEndPoint;
|
||||
}
|
||||
|
||||
public async void AsyncReadWithCallback(SocketReadCallback callback)
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
receiveSocketAsyncEventArgsWithCallback.Completed += (sender, args) => callback(args);
|
||||
receiveSocketAsyncEventArgsWithCallback.SetBuffer(0, 0x4000);
|
||||
if (!_socket.ReceiveAsync(receiveSocketAsyncEventArgsWithCallback))
|
||||
callback(receiveSocketAsyncEventArgsWithCallback);
|
||||
}
|
||||
|
||||
public void AsyncRead()
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
receiveSocketAsyncEventArgs.SetBuffer(0, 0x4000);
|
||||
if (!_socket.ReceiveAsync(receiveSocketAsyncEventArgs))
|
||||
ProcessReadAsync(receiveSocketAsyncEventArgs);
|
||||
}
|
||||
|
||||
void ProcessReadAsync(SocketAsyncEventArgs args)
|
||||
{
|
||||
if (args.SocketError != SocketError.Success)
|
||||
try
|
||||
{
|
||||
CloseSocket();
|
||||
var result = await _stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length);
|
||||
if (result == 0)
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
await callback(_receiveBuffer, result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AsyncRead()
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _stream.ReadAsync(_receiveBuffer, 0, _receiveBuffer.Length);
|
||||
if (result == 0)
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
ReadHandler(_receiveBuffer, result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outDebug(LogFilter.Network, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AsyncHandshake(X509Certificate2 certificate)
|
||||
{
|
||||
try
|
||||
{
|
||||
await (_stream as SslStream).AuthenticateAsServerAsync(certificate, false, SslProtocols.Tls12, false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await HandshakeHandler(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
if (args.BytesTransferred == 0)
|
||||
{
|
||||
CloseSocket();
|
||||
return;
|
||||
}
|
||||
|
||||
ReadHandler(args);
|
||||
await HandshakeHandler();
|
||||
}
|
||||
|
||||
public abstract void ReadHandler(SocketAsyncEventArgs args);
|
||||
public virtual Task HandshakeHandler(Exception exception = null) { return null; }
|
||||
|
||||
public void AsyncWrite(byte[] data)
|
||||
public abstract void ReadHandler(byte[] data, int receivedLength);
|
||||
|
||||
public async Task AsyncWrite(byte[] data)
|
||||
{
|
||||
if (!IsOpen())
|
||||
return;
|
||||
|
||||
_socket.Send(data);
|
||||
try
|
||||
{
|
||||
await _stream.WriteAsync(data, 0, data.Length);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.outException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void CloseSocket()
|
||||
|
||||
@@ -300,6 +300,11 @@ namespace System
|
||||
return kZMat * (kYMat * kXMat);
|
||||
}
|
||||
|
||||
public static bool IsEmpty(this Vector3 vector3)
|
||||
{
|
||||
return float.IsNaN(vector3.X) || float.IsNaN(vector3.Y) || float.IsNaN(vector3.Z);
|
||||
}
|
||||
|
||||
#region Strings
|
||||
public static bool IsEmpty(this string str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user