Core/SAI: add cooldownMin (event_param2) and cooldownMax (event_param3) to SMART_EVENT_ACCEPTED_QUEST and SMART_EVENT_REWARD_QUEST.
Port From (https://github.com/TrinityCore/TrinityCore/commit/7745e3f94389cf22cf9be04b411e94936306a6f6)
This commit is contained in:
@@ -689,6 +689,9 @@ namespace Game.AI
|
||||
case SmartEvents.RewardQuest:
|
||||
if (e.Event.quest.questId != 0 && !IsQuestValid(e, e.Event.quest.questId))
|
||||
return false;
|
||||
|
||||
if (!IsMinMaxValid(e, e.Event.quest.cooldownMin, e.Event.quest.cooldownMax))
|
||||
return false;
|
||||
break;
|
||||
case SmartEvents.ReceiveEmote:
|
||||
{
|
||||
@@ -2097,6 +2100,8 @@ namespace Game.AI
|
||||
public struct Quest
|
||||
{
|
||||
public uint questId;
|
||||
public uint cooldownMin;
|
||||
public uint cooldownMax;
|
||||
}
|
||||
public struct QuestObjective
|
||||
{
|
||||
|
||||
@@ -3478,6 +3478,7 @@ namespace Game.AI
|
||||
{
|
||||
if (e.Event.quest.questId != 0 && var0 != e.Event.quest.questId)
|
||||
return;
|
||||
RecalcTimer(e, e.Event.quest.cooldownMin, e.Event.quest.cooldownMax);
|
||||
ProcessAction(e, unit, var0);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user