Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

event quest: Implement 2018 Christmas seasonal event quests #643

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.GameServer.Dump;
using Arrowgene.Ddon.GameServer.Quests;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using Arrowgene.Ddon.GameServer.Characters;
using Arrowgene.Ddon.Server;
using Arrowgene.Ddon.Shared.Entity.PacketStructure;
using Arrowgene.Ddon.Shared.Entity.Structure;
using Arrowgene.Ddon.Shared.Model.EpitaphRoad;
using Arrowgene.Logging;
using System.IO;

namespace Arrowgene.Ddon.GameServer.Handler
{
Expand Down
9 changes: 6 additions & 3 deletions Arrowgene.Ddon.GameServer/Quests/GenericQuest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,12 @@ private static CDataQuestProcessState BlockAsCDataQuestProcessState(GenericQuest
break;
case QuestBlockType.NewNpcTalkAndOrder:
{
var questId = (questBlock.NpcOrderDetails[0].QuestId == QuestId.None) ? quest.QuestId : questBlock.NpcOrderDetails[0].QuestId;
checkCommands.Add(QuestManager.CheckCommand.QuestNpcTalkAndOrderUi(
StageManager.ConvertIdToStageNo(questBlock.NpcOrderDetails[0].StageId),
(int)questBlock.NpcOrderDetails[0].StageId.GroupId,
questBlock.NpcOrderDetails[0].StageId.LayerNo,
(int)quest.QuestId));
(int) questId));
resultCommands.Add(QuestManager.ResultCommand.QstTalkChg(questBlock.NpcOrderDetails[0].NpcId, questBlock.NpcOrderDetails[0].MsgId));
}
break;
Expand Down Expand Up @@ -544,9 +545,11 @@ private static CDataQuestProcessState BlockAsCDataQuestProcessState(GenericQuest
case QuestBlockType.NewTalkToNpc:
{
var orderDetails = questBlock.NpcOrderDetails[0];
var questId = (orderDetails.QuestId == QuestId.None) ? quest.QuestId : orderDetails.QuestId;

var questCommand = questBlock.ShowMarker ?
QuestManager.CheckCommand.NewTalkNpc(StageManager.ConvertIdToStageNo(orderDetails.StageId), (int)orderDetails.StageId.GroupId, orderDetails.StageId.LayerNo, (int)quest.QuestId) :
QuestManager.CheckCommand.NewTalkNpcWithoutMarker(StageManager.ConvertIdToStageNo(orderDetails.StageId), (int)orderDetails.StageId.GroupId, orderDetails.StageId.LayerNo, (int)quest.QuestId);
QuestManager.CheckCommand.NewTalkNpc(StageManager.ConvertIdToStageNo(orderDetails.StageId), (int)orderDetails.StageId.GroupId, orderDetails.StageId.LayerNo, (int)questId) :
QuestManager.CheckCommand.NewTalkNpcWithoutMarker(StageManager.ConvertIdToStageNo(orderDetails.StageId), (int)orderDetails.StageId.GroupId, orderDetails.StageId.LayerNo, (int)questId);
checkCommands.Add(questCommand);
resultCommands.Add(QuestManager.ResultCommand.QstTalkChg(orderDetails.NpcId, orderDetails.MsgId));
}
Expand Down
8 changes: 8 additions & 0 deletions Arrowgene.Ddon.GameServer/Quests/Quest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,14 @@ public virtual CDataTutorialQuestList ToCDataTutorialQuestList(uint step, bool e
};
}

public virtual CDataTimeLimitedQuestOrderList ToCDataTimeLimitedQuestOrderList(uint step)
{
return new CDataTimeLimitedQuestOrderList()
{
Param = ToCDataQuestOrderList(step)
};
}

public virtual CDataPriorityQuest ToCDataPriorityQuest(uint step)
{
var questProcessStateList = GetProcessState(step, out uint announceNoCount);
Expand Down
6 changes: 6 additions & 0 deletions Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,12 @@ private bool ParseBlocks(QuestProcess questProcess, JsonElement jBlocks)
MsgId = jblock.GetProperty("message_id").GetInt32(),
StageId = AssetCommonDeserializer.ParseStageId(jblock.GetProperty("stage_id"))
});

questBlock.NpcOrderDetails[0].QuestId = QuestId.None;
if (jblock.TryGetProperty("quest_id", out JsonElement jOrderQuestId))
{
questBlock.NpcOrderDetails[0].QuestId = (QuestId)jOrderQuestId.GetUInt32();
}
}
break;
case QuestBlockType.IsQuestOrdered:
Expand Down
10 changes: 10 additions & 0 deletions Arrowgene.Ddon.Shared/Files/Assets/EventDrops.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@
"item_ids": [23395, 23396, 23397]
}
}
},
{
"item_id": 23548,
"comment": "Sparkling Snow Large Crystal (Christmas 2018)",
"min_num": 1,
"max_num": 1,
"drop_chance": 0.10,
"quest_ids": [60301057],
"stage_ids": [],
"enemy_ids": []
}
]

8 changes: 4 additions & 4 deletions Arrowgene.Ddon.Shared/Files/Assets/quests/q20085004.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"base_level": 47,
"minimum_item_rank": 0,
"discoverable": true,
"area_id": "EasternZandora",
"area_id": "EasternZandora",
"rewards": [
{
"type": "wallet",
Expand Down Expand Up @@ -35,7 +35,7 @@
},
{
"item_id": 9363,
"num": 3
"num": 3
}
]
},
Expand All @@ -61,7 +61,7 @@
"enemy_id": "0x015103",
"level": 48,
"exp": 13000,
"is_boss": true
"is_boss": true
}
]
}
Expand Down Expand Up @@ -92,7 +92,7 @@
"stage_id": {
"id": 1,
"group_id": 1,
"layer_no": 1
"layer_no": 1
},
"announce_type": "Update",
"npc_id": "Rick",
Expand Down
56 changes: 28 additions & 28 deletions Arrowgene.Ddon.Shared/Files/Assets/quests/q21014012.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"base_level": 75,
"minimum_item_rank": 0,
"discoverable": true,
"area_id": "ElanWaterGrove",
"area_id": "ElanWaterGrove",
"rewards": [
{
"type": "wallet",
Expand All @@ -29,13 +29,13 @@
"item_id": 13483,
"num": 3
},
{
{
"item_id": 15962,
"num": 3
},
{
{
"item_id": 7555,
"num": 3
"num": 3
}
]
}
Expand All @@ -60,40 +60,40 @@
{
"enemy_id": "0x015504",
"level": 75,
"exp": 5000
"exp": 5000
}
]
}
],
],
"blocks": [
{
"type": "NpcTalkAndOrder",
{
"type": "NpcTalkAndOrder",
"flags": [
{"type": "QstLayout", "action": "Set", "value": 4474, "comment": "Spawns Sullivan NPC"}
],
"stage_id": {
"id": 372,
"group_id": 1,
"layer_no": 1
},
"npc_id": "561",
"message_id": 10800
{"type": "QstLayout", "action": "Set", "value": 4474, "comment": "Spawns Sullivan NPC"}
],
"stage_id": {
"id": 372,
"group_id": 1,
"layer_no": 1
},
"npc_id": "561",
"message_id": 10800
},
{
{
"type": "NewTalkToNpc",
"flags": [
{"type": "QstLayout", "action": "Set", "value": 4471, "comment": "Spawns Glenis NPC"}
],
{"type": "QstLayout", "action": "Set", "value": 4471, "comment": "Spawns Glenis NPC"}
],
"stage_id": {
"id": 416,
"group_id": 1,
"layer_no": 1
},
"announce_type": "Accept",
"npc_id": "562",
"message_id": 11842
},
{
"message_id": 11842
},
{
"type": "SeekOutEnemiesAtMarkedLocation",
"announce_type": "Update",
"groups": [0]
Expand All @@ -103,7 +103,7 @@
"announce_type": "Update",
"groups": [0]
},
{
{
"type": "TalkToNpc",
"stage_id": {
"id": 372,
Expand All @@ -112,7 +112,7 @@
},
"announce_type": "Update",
"npc_id": "561",
"message_id": 11842
}
]
}
"message_id": 11842
}
]
}
36 changes: 18 additions & 18 deletions Arrowgene.Ddon.Shared/Files/Assets/quests/q21017014.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"base_level": 73,
"minimum_item_rank": 0,
"discoverable": true,
"area_id": "KingalCanyon",
"area_id": "KingalCanyon",
"rewards": [
{
"type": "wallet",
Expand All @@ -29,13 +29,13 @@
"item_id": 15923,
"num": 3
},
{
{
"item_id": 7555,
"num": 3
},
{
{
"item_id": 9364,
"num": 3
"num": 3
}
]
}
Expand All @@ -51,7 +51,7 @@
"enemy_id": "0x010313",
"level": 73,
"exp": 3500,
"is_boss": false
"is_boss": false
},
{
"enemy_id": "0x010313",
Expand Down Expand Up @@ -87,27 +87,27 @@
"enemy_id": "0x010607",
"level": 73,
"exp": 3500,
"is_boss": false
"is_boss": false
}
]
}
],
"blocks": [
],
"blocks": [
{
"type": "NpcTalkAndOrder",
"type": "NpcTalkAndOrder",
"stage_id": {
"id": 377,
"group_id": 1,
"layer_no": 1
},
},
"npc_id": "Maeve",
"message_id": 10800
},
{
{
"type": "TalkToNpc",
"flags": [
{"type": "QstLayout", "action": "Set", "value": 4362, "comment": "Spawns Plum NPC"}
],
{"type": "QstLayout", "action": "Set", "value": 4362, "comment": "Spawns Plum NPC"}
],
"stage_id": {
"id": 429,
"group_id": 1,
Expand All @@ -117,17 +117,17 @@
"npc_id": "Plum1",
"message_id": 11842
},
{
{
"type": "SeekOutEnemiesAtMarkedLocation",
"announce_type": "Update",
"groups": [0]
},
{
"type": "KillGroup",
"announce_type": "Update",
"groups": [0]
"groups": [0]
},
{
{
"type": "TalkToNpc",
"stage_id": {
"id": 377,
Expand All @@ -136,7 +136,7 @@
},
"announce_type": "Update",
"npc_id": "Maeve",
"message_id": 11842
"message_id": 11842
}
]
}
}
22 changes: 22 additions & 0 deletions Arrowgene.Ddon.Shared/Files/Assets/quests/q60200022.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"state_machine": "GenericStateMachine",
"type": "Tutorial",
"comment": "For Christmas event NPC set (2016)",
"quest_id": 60200022,
"next_quest": 0,
"base_level": 0,
"minimum_item_rank": 0,
"discoverable": false,
"stage_id": {"id": 2},
"order_conditions": [],
"rewards": [],
"enabled": false,
"blocks": [
{
"type": "Raw",
"flags": [
{"type": "QstLayout", "action": "Set", "value": 5276, "comment": "Spawns Nicholas, Marco and Mia"}
]
}
]
}
Loading
Loading