Core/Conditions: Sync CONDITION_QUEST_OBJECTIVE_PROGRESS implementation
Port From (https://github.com/TrinityCore/TrinityCore/commit/3d3d255a47725398fd4d011a1a01eee141691ec4)
This commit is contained in:
@@ -1625,7 +1625,7 @@ namespace Game
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ConditionTypes.ObjectiveComplete:
|
||||
case ConditionTypes.ObjectiveProgress:
|
||||
{
|
||||
QuestObjective obj = Global.ObjectMgr.GetQuestObjective(cond.ConditionValue1);
|
||||
if (obj == null)
|
||||
@@ -1633,6 +1633,12 @@ namespace Game
|
||||
Log.outError(LogFilter.Sql, "{0} points to non-existing quest objective ({1}), skipped.", cond.ToString(true), cond.ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
int limit = obj.IsStoringFlag() ? 1 : obj.Amount;
|
||||
if (cond.ConditionValue3 > limit)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"{cond.ToString(true)} has quest objective count {cond.ConditionValue3} in value3, but quest objective {cond.ConditionValue1} has a maximum objective count of {limit}, skipped.");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ConditionTypes.PetType:
|
||||
@@ -2573,7 +2579,7 @@ namespace Game
|
||||
new ConditionTypeInfo("Pet type", true, false, false),
|
||||
new ConditionTypeInfo("On Taxi", false,false, false),
|
||||
new ConditionTypeInfo("Quest state mask", true, true, false),
|
||||
new ConditionTypeInfo("Objective Complete", true, false, false),
|
||||
new ConditionTypeInfo("Quest objective progress", true, false, true),
|
||||
new ConditionTypeInfo("Map Difficulty", true, false, false),
|
||||
new ConditionTypeInfo("Is Gamemaster", true, false, false),
|
||||
new ConditionTypeInfo("Object Entry or Guid", true, true, true),
|
||||
|
||||
Reference in New Issue
Block a user