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BD=D1=82=D0=B0!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/AuthenticationService.cs | 4 +- .../Services/GameUtilitiesService.cs | 16 +++--- .../D3-GameServer/ClientSystem/GameClient.cs | 2 + .../GSSystem/PlayerSystem/Inventory.cs | 2 + .../GSSystem/PlayerSystem/Player.cs | 12 ++++- .../Definitions/Connection/PingMessage.cs | 49 +++++++++++++++++++ .../D3-GameServer/MessageSystem/Opcodes.cs | 2 +- 7 files changed, 75 insertions(+), 12 deletions(-) diff --git a/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/AuthenticationService.cs b/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/AuthenticationService.cs index 9b2d260..c8c1c7d 100644 --- a/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/AuthenticationService.cs +++ b/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/AuthenticationService.cs @@ -62,7 +62,7 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services //Error 52 - Данная учетная запись была заблокирована в связи с многочисленными нарушениями условий использования службы Battle.net //Error 53 - Действие данной учетной записи было приостановлено в связи с нарушениями условий использования службы Batle.net. - int VersionRetail = 82785; //74291 - 2.7.0, 76761 - 2.7.1, 79575 - 2.7.2; + int VersionRetail = 81850; //74291 - 2.7.0, 76761 - 2.7.1, 79575 - 2.7.2; int VersionPTR = 79151; string version = ""; int a = request.ApplicationVersion; @@ -94,7 +94,7 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services { Logger.Error("Подключение не правильной версии клиента!"); var ercomplete = LogonResult.CreateBuilder().SetErrorCode(28); - (controller as HandlerController).Client.MakeRPC((lid) => AuthenticationListener.CreateStub((controller as HandlerController).Client).OnLogonComplete(controller, ercomplete.Build(), callback => { })); + //(controller as HandlerController).Client.MakeRPC((lid) => AuthenticationListener.CreateStub((controller as HandlerController).Client).OnLogonComplete(controller, ercomplete.Build(), callback => { })); } switch (request.Locale) { diff --git a/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/GameUtilitiesService.cs b/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/GameUtilitiesService.cs index a1b6217..270c8c8 100644 --- a/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/GameUtilitiesService.cs +++ b/src/DiIiS-NA/BGS-Server/ServicesSystem/Services/GameUtilitiesService.cs @@ -60,14 +60,14 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services var GAS = D3.Client.GameAccountSettings.CreateBuilder() .SetShowDifficultySelector(false) .SetUseGameHandicapDeprecated(true) - //.SetSeasonJourneySeasonNumber(2) - //.SetViewedAnniversaryScreenYear(1) + .SetSeasonJourneySeasonNumber(10) + .SetViewedAnniversaryScreenYear(1) .SetAccountFlags(0) - //.SetAccountFlags((uint)D3.Account.Digest.Types.Flags.MASTER_DIFFICULTY_UNLOCKED) - //.SetAchievementsTimeLastViewed(DateTimeExtensions.ToUnixTime(DateTime.UtcNow)) + .SetAccountFlags((uint)D3.Account.Digest.Types.Flags.MASTER_DIFFICULTY_UNLOCKED) + .SetAchievementsTimeLastViewed(DateTimeExtensions.ToUnixTime(DateTime.UtcNow)) //.SetViewedAnniversaryScreenYear(1) - //.SetViewedWhatsNewVersion(Client.Account.GameAccount.DBGameAccount.ViewedNewVersion) - //.SetViewedWhatsNewSeason(Client.Account.GameAccount.DBGameAccount.ViewedNewSeason) + .SetViewedWhatsNewVersion(20) + .SetViewedWhatsNewSeason(20) .SetRmtLastUsedCurrency("PLATINUM") .SetRmtPreferredCurrency("PLATINUM") @@ -101,9 +101,9 @@ namespace DiIiS_NA.LoginServer.ServicesSystem.Services " OnlineService.Region.Id=5");*/ Init.SetSyncedVars( " OnlineService.Season.Num=1" + //Номер сезона - " OnlineService.Season.State=0" + //Статус сезона, 1 - Активирован, 0 - Деактивирован + " OnlineService.Season.State=1" + //Статус сезона, 1 - Активирован, 0 - Деактивирован " OnlineService.Leaderboard.Era=1" + - " OnlineService.AnniversaryEvent.Status=0" + //Событие юбилея, 1-Старый Тристам + " OnlineService.AnniversaryEvent.Status=1" + //Событие юбилея, 1-Старый Тристам " ChallengeRift.ChallengeNumber=1" + //Номер портала дерзаний. " OnlineService.FreeToPlay=true" + //Магазин за платину " OnlineService.Store.Status=0" + //Статус Магазина, 0 - Включен, 1 - Отключен diff --git a/src/DiIiS-NA/D3-GameServer/ClientSystem/GameClient.cs b/src/DiIiS-NA/D3-GameServer/ClientSystem/GameClient.cs index f657bdc..8137e25 100644 --- a/src/DiIiS-NA/D3-GameServer/ClientSystem/GameClient.cs +++ b/src/DiIiS-NA/D3-GameServer/ClientSystem/GameClient.cs @@ -95,6 +95,8 @@ namespace DiIiS_NA.GameServer.ClientSystem while ((end - _incomingBuffer.Position) >= 9 && this.Connection.IsOpen()) { var message = _incomingBuffer.ParseMessage(); + //217 + // if (message == null) continue; try { diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Inventory.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Inventory.cs index ca7b298..f94d03c 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Inventory.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Inventory.cs @@ -254,6 +254,8 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem _owner.GrantCriteria(74987243308421); if (item.ItemType.Name.Contains("ScoundrelSpecial")) _owner.GrantCriteria(74987243308422); + + _owner.PlayEffect(Effect.Sound, 196576); return success; } diff --git a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs index 4355baf..b5f44e6 100644 --- a/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs +++ b/src/DiIiS-NA/D3-GameServer/GSSystem/PlayerSystem/Player.cs @@ -470,6 +470,9 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem Attributes[GameAttribute.Currencies_Discovered] = 0x0011FFF8; Attributes[GameAttribute.Stash_Tabs_Purchased_With_Gold] = 5; + this.Attributes[GameAttribute.Skill, 30592] = 1; + this.Attributes[GameAttribute.Resource_Degeneration_Prevented] = false; + this.Attributes[GameAttribute.Resource_Degeneration_Stop_Point] = 0; //scripted //this.Attributes[GameAttribute.Skill_Total, 0x7545] = 1; //Axe Operate Gizmo //scripted //this.Attributes[GameAttribute.Skill_Total, 0x76B7] = 1; //Punch! //scripted //this.Attributes[GameAttribute.Skill_Total, 0x6DF] = 1; //Use Item @@ -5299,7 +5302,13 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem Amount = item.Attributes[GameAttribute.Gold], Type = FloatingAmountMessage.FloatType.Gold, }); - + this.InGameClient.SendMessage(new PlayEffectMessage() + { + ActorId = this.DynamicID(this), + Effect = Effect.GoldPickup, + PlayerId = 0 + }); + PlayEffect(Effect.Sound, 36726); this.Inventory.PickUpGold(item); this.GroundItems.Remove(item.GlobalID); item.Destroy(); @@ -5340,6 +5349,7 @@ namespace DiIiS_NA.GameServer.GSSystem.PlayerSystem Amount = item.Attributes[GameAttribute.ItemStackQuantityLo], Type = FloatingAmountMessage.FloatType.Platinum, }); + PlayEffect(Effect.Sound, 433266); this.Inventory.PickUpPlatinum(item); this.GroundItems.Remove(item.GlobalID); diff --git a/src/DiIiS-NA/D3-GameServer/MessageSystem/Message/Definitions/Connection/PingMessage.cs b/src/DiIiS-NA/D3-GameServer/MessageSystem/Message/Definitions/Connection/PingMessage.cs index 4131cb2..0bdde5a 100644 --- a/src/DiIiS-NA/D3-GameServer/MessageSystem/Message/Definitions/Connection/PingMessage.cs +++ b/src/DiIiS-NA/D3-GameServer/MessageSystem/Message/Definitions/Connection/PingMessage.cs @@ -64,4 +64,53 @@ namespace DiIiS_NA.GameServer.MessageSystem.Message.Definitions.Connection } } + + [Message(Opcodes.SpingMessage)] + public class SPingMessage : GameMessage, ISelfHandler + { + public void Handle(GameClient client) + { + client.SendMessage(new SpongMessage() + { + + }); + } + + public override void Parse(GameBitBuffer buffer) + { + + } + + public override void Encode(GameBitBuffer buffer) + { + + } + + public override void AsText(StringBuilder b, int pad) + { + + } + } + + [Message(Opcodes.SpongMessage)] + public class SpongMessage : GameMessage + { + + public SpongMessage() : base(Opcodes.PongMessage) { } + + public override void Parse(GameBitBuffer buffer) + { + + } + + public override void Encode(GameBitBuffer buffer) + { + + } + + public override void AsText(StringBuilder b, int pad) + { + + } + } } diff --git a/src/DiIiS-NA/D3-GameServer/MessageSystem/Opcodes.cs b/src/DiIiS-NA/D3-GameServer/MessageSystem/Opcodes.cs index 38c805d..4708c27 100644 --- a/src/DiIiS-NA/D3-GameServer/MessageSystem/Opcodes.cs +++ b/src/DiIiS-NA/D3-GameServer/MessageSystem/Opcodes.cs @@ -967,7 +967,7 @@ namespace DiIiS_NA.GameServer.MessageSystem PingMessage = 390, // //SIZE12 PongMessage = 391, // //SIZE12 SpingMessage = 392, // //SIZE8SimpleMessage62 - SpongMessagge = 393, // //SIZE8SimpleMessage63 + SpongMessage = 393, // //SIZE8SimpleMessage63 ServerNotificationDataMessage = 394, // //SIZE16 BroadcastTextMessage = 395, // //SIZE1032 LoadCompleteMessage = 396, // //SIZE8SimpleMessage63