From 6667f1fc34124bd0522a03434b0e306ef22b267c Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 23 Feb 2025 13:11:13 -0500 Subject: [PATCH] Core/Commands: Handle more quest objective types with .quest complete command Port From (https://github.com/TrinityCore/TrinityCore/commit/e071c08526666e542088439a36481afc13ecbdc2) --- Source/Game/Chat/Commands/QuestCommands.cs | 23 +++++++--------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Source/Game/Chat/Commands/QuestCommands.cs b/Source/Game/Chat/Commands/QuestCommands.cs index 8e5eac211..0642da83a 100644 --- a/Source/Game/Chat/Commands/QuestCommands.cs +++ b/Source/Game/Chat/Commands/QuestCommands.cs @@ -184,18 +184,9 @@ namespace Game.Chat } break; } - case QuestObjectiveType.Monster: + case QuestObjectiveType.Currency: { - CreatureTemplate creatureInfo = Global.ObjectMgr.GetCreatureTemplate((uint)obj.ObjectID); - if (creatureInfo != null) - for (var z = 0; z < obj.Amount; ++z) - player.KilledMonster(creatureInfo, ObjectGuid.Empty); - break; - } - case QuestObjectiveType.GameObject: - { - for (var z = 0; z < obj.Amount; ++z) - player.KillCreditGO((uint)obj.ObjectID); + player.ModifyCurrency((uint)obj.ObjectID, obj.Amount, CurrencyGainSource.Cheat); break; } case QuestObjectiveType.MinReputation: @@ -225,12 +216,12 @@ namespace Game.Chat player.ModifyMoney(obj.Amount); break; } - case QuestObjectiveType.PlayerKills: - { - for (var z = 0; z < obj.Amount; ++z) - player.KilledPlayerCredit(ObjectGuid.Empty); + case QuestObjectiveType.ProgressBar: + // do nothing + break; + default: + player.UpdateQuestObjectiveProgress(obj.Type, obj.ObjectID, obj.Amount); break; - } } } }