-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/net-8.0
- Loading branch information
Showing
17 changed files
with
381 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/common/Edelstein.Common.Gameplay.Game/Combat/Skills/Normal/Dual/Dual5SkillHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
using Edelstein.Common.Gameplay.Constants; | ||
using Edelstein.Protocol.Gameplay.Game.Combat; | ||
using Edelstein.Protocol.Gameplay.Game.Objects.User; | ||
using Edelstein.Protocol.Gameplay.Models.Characters.Stats; | ||
|
||
namespace Edelstein.Common.Gameplay.Game.Combat.Skills.Normal.Dual; | ||
|
||
public class Dual5SkillHandler : Dual4SkillHandler | ||
{ | ||
public override int ID => Job.Dual5; | ||
|
||
public override Task HandleSkillUse(ISkillContext context, IFieldUser user) | ||
{ | ||
|
||
switch (context.Skill?.ID) | ||
{ | ||
case Skill.Dual5ThornsEffect: | ||
var cr = context.SkillLevel!.X; | ||
var cd = context.SkillLevel!.CDMax; | ||
|
||
context.AddTemporaryStat(TemporaryStatType.ThornsEffect, (cr << 8) + cd); | ||
break; | ||
} | ||
|
||
return base.HandleSkillUse(context, user); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/common/Edelstein.Common.Gameplay.Game/Handlers/ClientDumpLogHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Edelstein.Common.Gameplay.Packets; | ||
using Edelstein.Protocol.Gameplay.Game; | ||
using Edelstein.Protocol.Utilities.Packets; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Edelstein.Common.Gameplay.Login.Handlers; | ||
|
||
public class ClientDumpLogHandler : IPacketHandler<IGameStageUser> | ||
{ | ||
private ILogger _logger; | ||
|
||
public ClientDumpLogHandler(ILogger<ClientDumpLogHandler> logger) => _logger = logger; | ||
|
||
public short Operation => (short)PacketRecvOperations.ClientDumpLog; | ||
|
||
public bool Check(IGameStageUser user) => true; | ||
public Task Handle(IGameStageUser user, IPacketReader reader) | ||
{ | ||
var callType = reader.ReadShort(); | ||
var errorCode = reader.ReadInt(); | ||
var backupBufferSize = reader.ReadShort(); | ||
var rawSeq = reader.ReadInt(); | ||
var type = reader.ReadShort(); | ||
var backupBuffer = reader.ReadBytes((short)(backupBufferSize - 6)); | ||
|
||
_logger.LogWarning( | ||
"Received client dump log of type {Type} with buffer {Buffer}", | ||
(PacketSendOperations)type, | ||
Convert.ToHexString(backupBuffer ) | ||
); | ||
|
||
return Task.CompletedTask; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/common/Edelstein.Common.Gameplay.Game/Handlers/UserPortableChairSitRequestHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Edelstein.Common.Gameplay.Packets; | ||
using Edelstein.Common.Utilities.Packets; | ||
using Edelstein.Protocol.Gameplay.Game.Contracts; | ||
using Edelstein.Protocol.Gameplay.Game.Objects.User; | ||
using Edelstein.Protocol.Utilities.Packets; | ||
using Edelstein.Protocol.Utilities.Pipelines; | ||
|
||
namespace Edelstein.Common.Gameplay.Game.Handlers; | ||
|
||
public class UserPortableChairSitRequestHandler : AbstractPipedFieldHandler<FieldOnPacketUserPortableChairSitRequest> | ||
{ | ||
public UserPortableChairSitRequestHandler(IPipeline<FieldOnPacketUserPortableChairSitRequest> pipeline) : base(pipeline) | ||
{ | ||
} | ||
|
||
public override short Operation => (short)PacketRecvOperations.UserPortableChairSitRequest; | ||
|
||
protected override FieldOnPacketUserPortableChairSitRequest? Serialize(IFieldUser user, IPacketReader reader) | ||
=> new(user, reader.ReadInt()); | ||
} |
19 changes: 19 additions & 0 deletions
19
src/common/Edelstein.Common.Gameplay.Game/Handlers/UserSitRequestHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Edelstein.Common.Gameplay.Packets; | ||
using Edelstein.Protocol.Gameplay.Game.Contracts; | ||
using Edelstein.Protocol.Gameplay.Game.Objects.User; | ||
using Edelstein.Protocol.Utilities.Packets; | ||
using Edelstein.Protocol.Utilities.Pipelines; | ||
|
||
namespace Edelstein.Common.Gameplay.Game.Handlers; | ||
|
||
public class UserSitRequestHandler : AbstractPipedFieldHandler<FieldOnPacketUserSitRequest> | ||
{ | ||
public UserSitRequestHandler(IPipeline<FieldOnPacketUserSitRequest> pipeline) : base(pipeline) | ||
{ | ||
} | ||
|
||
public override short Operation => (short)PacketRecvOperations.UserSitRequest; | ||
|
||
protected override FieldOnPacketUserSitRequest? Serialize(IFieldUser user, IPacketReader reader) | ||
=> new(user, reader.ReadShort()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.