ddon-server/Arrowgene.Ddon.GameServer/Handler/InstanceSetOmInstantKeyValueHandler.cs
Paul Campbell 305a4d503b feat: Add support for contents release
- Added support for the adventure guide.
- Add support for quests to unlock different content and menus.
- Implemented a world manage quest to track job tutorials.
- Implemented the following personal quests which unlock systems:
    - The Arisen's Abilities
    - Reliable Source of Information
    - Crafted Token of the Heart
    - Gathering in the Clan Tavern
    - Lestania's Best Dressed
    - Road to Mastery
    - The Temple's Tradespeople
    - Living with the Partner Pawn
    - Shining Within a Loyal Heart
    - Extend Garden
    - Custom-Made Workshop 1: Searcher's Return
    - Custom-Made Workshop 2: Limit Break
    - Custom-Made Workshop 3: Ultimate Arms Synthesis
    - Arms With the Power of the Dragon 1
    - Arms With the Power of the Dragon 2
- Implemented the following job quests:
    - Fighter Tactics Trial: A Stubborn Shield
    - Fighter Tactics Trial: Break Attack
    - Seeking the Master Fighter
    - Priest Tactics Trial: Purification
    - Priest Tactics Trial: Break Attack
    - Seeking the Master Priest
    - Seeker Tactics Trial: A Whirlwind
    - Seeking the Master Seeker
    - Shield Sage Tactics Trial: A Magick Shield
    - Shield Sage Tactics Trial: Break Attack
    - Seeking the Master Shield Sage
    - Hunter Tactics Trial: An Ambushing Bow
    - Hunter Tactics Trial: Break Attack
    - Seeking the Master Hunter
    - Sorcer Tactics Trial: A Magick Attack
    - Seeking the Master Sorcerer
    - Element Archer Tactics Trial: A Magick Bow
    - Seeking the Master Element Archer
    - Warrior Tactics Trial: A Strong Sword
    - Seeking the Master Warrior
    - Alchemist Tactics Trial: Alchemy
    - Seeking the Master Alchemist
    - Spirit Lancer Tactics Trial: A Spirit Lance
    - Seeking the Master Spirit Lancer
- Rewrote or updated the following main story quests:
    - Rewrote "Resolutions and Omens" as a quest script
    - Updated "The Slumbering God" to use newer JSON block types
    - Rewrote "Soldiers of the Rift" as a quest script
    - Rewrote "The Crimson Crystal" as a quest script
    - Updated "The Dull Grey Ark" to have proper enemies for the boss fight
    - Updated "Envoy of Reconciliation" to have proper enemy nameplates in
      the cellar
    - Updated additional existing main story quests to distribute contents released
- Split IsBo an IsHo enemy parameter from the BO amount field to match
  behavior of old playback videos where an enemy has a normal health bar
  but still rewards BO/HO
- Added a generic mechanism to handle quest work items
- Added the message "The entire party has returned to a safe area." when
  the instance gets reset while the player is in a party
- Added better unlock support to json
2025-04-01 20:57:15 -04:00

47 lines
1.9 KiB
C#

using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.GameServer.Instance;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Logging;
namespace Arrowgene.Ddon.GameServer.Handler
{
public class InstanceSetOmInstantKeyValueHandler : GameRequestPacketHandler<C2SInstanceSetOmInstantKeyValueReq, S2CInstanceSetOmInstantKeyValueRes>
{
private static readonly ServerLogger Logger = LogProvider.Logger<ServerLogger>(typeof(InstanceSetOmInstantKeyValueHandler));
public InstanceSetOmInstantKeyValueHandler(DdonGameServer server) : base(server)
{
}
public override S2CInstanceSetOmInstantKeyValueRes Handle(GameClient client, C2SInstanceSetOmInstantKeyValueReq request)
{
Logger.Debug($"OM: Key=0x{request.Key:x16}, Value=0x{request.Value:x8}");
OmManager.SetOmData(client.Party.InstanceOmData, client.Character.Stage.Id, request.Key, request.Value);
S2CInstanceSetOmInstantKeyValueNtc ntc = new S2CInstanceSetOmInstantKeyValueNtc();
ntc.StageId = client.Character.Stage.Id;
ntc.Key = request.Key;
ntc.Value = request.Value;
client.Party.SendToAll(ntc);
S2CInstanceSetOmInstantKeyValueRes res = new S2CInstanceSetOmInstantKeyValueRes();
res.StageId = client.Character.Stage.Id;
res.Key = request.Key;
res.Value = request.Value;
// Check for OM callbacks in the quest
foreach (var questScheduleId in client.Party.QuestState.GetActiveQuestScheduleIds())
{
var quest = QuestManager.GetQuestByScheduleId(questScheduleId);
if (quest != null)
{
quest.HandleOmInstantValue(client, request.Key, request.Value);
}
}
return res;
}
}
}