Skip to content

Commit f90837d

Browse files
committed
Move S1 Dragon Force calculations over to the S2/S3 model of tracking unlocked nodes and computing the cumulative status dynamically from the unlocks, rather than tracking the cumulant from the DB alone. Fix issue where the final node of the 4th page was the wrong type, preventing completion of an achievement.
1 parent 7acd4fa commit f90837d

3 files changed

Lines changed: 153 additions & 83 deletions

File tree

Arrowgene.Ddon.GameServer/Characters/CharacterManager.cs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,7 @@ public Character SelectCharacter(uint characterId, bool fetchPawns = true, DbCon
5757

5858
character.FavoritedPawnIds = Server.Database.GetPawnFavorites(character.CharacterId, connectionIn);
5959

60-
character.ExtendedParams = Server.Database.SelectOrbGainExtendParam(character.CommonId, connectionIn);
61-
if (character.ExtendedParams == null)
62-
{
63-
// Old DB is in use and new table not populated with required data for character
64-
Logger.Error($"Character: AccountId={character.AccountId}, CharacterId={character.CharacterId}, CommonId={character.CommonId} is missing table entry in 'ddon_orb_gain_extend_param'.");
65-
return null;
66-
}
67-
60+
character.ExtendedParams = Server.OrbUnlockManager.GetBaseExtendParam(character);
6861
character.ReleasedExtendedJobParams = Server.JobOrbUnlockManager.GetReleasedElements(character, connectionIn);
6962
Server.JobOrbUnlockManager.EvaluateJobOrbTreeUnlocks(character);
7063

@@ -324,13 +317,8 @@ private void SelectPawns(Character character, DbConnection? connectionIn = null)
324317
Pawn pawn = character.Pawns[i];
325318
pawn.Server = character.Server;
326319
pawn.Equipment = character.Storage.GetPawnEquipment(i);
327-
pawn.ExtendedParams = Server.Database.SelectOrbGainExtendParam(pawn.CommonId, connectionIn);
320+
pawn.ExtendedParams = Server.OrbUnlockManager.GetBaseExtendParam(pawn);
328321
pawn.EmblemStatList = Server.JobEmblemManager.GetEmblemStatsForCurrentJob(character, pawn.Job);
329-
if (pawn.ExtendedParams == null)
330-
{
331-
// Old DB is in use and new table not populated with required data for character
332-
Logger.Error($"Character: AccountId={character.AccountId}, CharacterId={character.ContentCharacterId}, CommonId={character.CommonId}, PawnCommonId={pawn.CommonId} is missing table entry in 'ddon_orb_gain_extend_param'.");
333-
}
334322
if (pawn.PawnType != PawnType.Main)
335323
{
336324
Logger.Error($"Character: AccountId={character.AccountId}, CharacterId={character.ContentCharacterId}, CommonId={character.CommonId}, PawnCommonId={pawn.CommonId} has invalid pawn type; locally setting pawn type back to Main.");

0 commit comments

Comments
 (0)