Skip to content

Commit 34e1c7b

Browse files
authored
Merge pull request #841 from pacampbell/fixes_05_23_2025
fix: Fix issues found on DDON
2 parents 08f40b1 + d64573f commit 34e1c7b

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Arrowgene.Ddon.GameServer/Characters/StageManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static uint ConvertIdToStageNo(StageLayoutId stageId)
3333
private static readonly HashSet<uint> SafeStageIds = new HashSet<StageInfo>()
3434
{
3535
//WDT
36-
Stage.TheWhiteDragonTemple0, // TODO: The other WDT stage?
36+
Stage.TheWhiteDragonTemple0,
3737
Stage.CraftRoom,
3838
Stage.CaveHarbor,
3939
Stage.ClanHall,
@@ -47,13 +47,14 @@ public static uint ConvertIdToStageNo(StageLayoutId stageId)
4747
Stage.RedCrystalInn,
4848
Stage.SleepingWolfInn,
4949
Stage.GoldenTankardInn,
50-
Stage.GrittenFort0, // TODO: The others are used for EXMs and other stuff?
50+
Stage.GrittenFort0,
5151
Stage.PawnCathedral,
5252
Stage.HobolicCave,
5353
Stage.MysreeGroveShrine,
5454
Stage.ZandoraWastelandsShrine,
5555
Stage.MergodaResidentialArea,
5656
Stage.SecretBowmakersHome,
57+
Stage.KinozaMineralSprings,
5758

5859
//BBI
5960
Stage.ExpeditionGarrison,

Arrowgene.Ddon.GameServer/Handler/PartnerPawnSetHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Arrowgene.Ddon.Shared.Entity.Structure;
44
using Arrowgene.Ddon.Shared.Model;
55
using Arrowgene.Logging;
6+
using System.Linq;
67

78
namespace Arrowgene.Ddon.GameServer.Handler
89
{
@@ -18,7 +19,8 @@ public override S2CPartnerPawnSetRes Handle(GameClient client, C2SPartnerPawnSet
1819
{
1920
S2CPartnerPawnSetRes res = new S2CPartnerPawnSetRes();
2021

21-
Pawn pawn = client.Character.Pawns.Find(p => p.PawnId == request.PawnId);
22+
Pawn pawn = client.Character.Pawns.Where(p => p.PawnId == request.PawnId).FirstOrDefault() ??
23+
throw new ResponseErrorException(ErrorCode.ERROR_CODE_PAWN_NOT_FOUNDED, $"A pawn with the ID {request.PawnId} doesn't exist");
2224

2325
client.Character.PartnerPawnId = pawn.PawnId;
2426
Server.Database.ExecuteInTransaction(connection =>

Arrowgene.Ddon.Shared/Entity/PacketStructure/S2CPartnerPawnSetRes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class S2CPartnerPawnSetRes : ServerResponse
1212

1313
public S2CPartnerPawnSetRes()
1414
{
15+
PartnerInfo = new();
1516
}
1617

1718
public class Serializer : PacketEntitySerializer<S2CPartnerPawnSetRes>

0 commit comments

Comments
 (0)