Core/Quests: Quest improvements

Port From (https://github.com/TrinityCore/TrinityCore/commit/91b91b502f30f781c8dea77dec4ce2f469b89744)
This commit is contained in:
hondacrx
2021-05-11 11:39:14 -04:00
parent 852cd21cae
commit 8847de54d5
13 changed files with 539 additions and 305 deletions
+2 -1
View File
@@ -120,7 +120,8 @@ namespace Scripts.Smart
// Called when a quest objective data change
public override void OnQuestObjectiveChange(Player player, Quest quest, QuestObjective objective, int oldAmount, int newAmount)
{
if (player.IsQuestObjectiveComplete(objective))
ushort slot = player.FindQuestSlot(quest.Id);
if (slot < SharedConst.MaxQuestLogSize && player.IsQuestObjectiveComplete(slot, quest, objective))
{
SmartScript smartScript = new SmartScript();
smartScript.OnInitialize(quest);