mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
feat(Core/SmartScripts): SMART_EVENT_ACCEPTED_QUEST, SMART_EVENT_REWARD_QUEST (#10210)
This commit is contained in:
committed by
GitHub
parent
627fb80d54
commit
dfa2198d98
@@ -4400,6 +4400,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
|
||||
{
|
||||
if (e.event.quest.quest && var0 != e.event.quest.quest)
|
||||
return;
|
||||
RecalcTimer(e, e.event.quest.cooldownMin, e.event.quest.cooldownMax);
|
||||
ProcessAction(e, unit, var0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1009,7 +1009,14 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_EVENT_ACCEPTED_QUEST:
|
||||
case SMART_EVENT_REWARD_QUEST:
|
||||
if (e.event.quest.quest && !IsQuestValid(e, e.event.quest.quest))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsMinMaxValid(e, e.event.quest.cooldownMin, e.event.quest.cooldownMax))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_EVENT_RECEIVE_EMOTE:
|
||||
{
|
||||
|
||||
@@ -123,8 +123,8 @@ enum SMART_EVENT
|
||||
SMART_EVENT_FRIENDLY_MISSING_BUFF = 16, // SpellId, Radius, RepeatMin, RepeatMax
|
||||
SMART_EVENT_SUMMONED_UNIT = 17, // CreatureId(0 all), CooldownMin, CooldownMax
|
||||
SMART_EVENT_TARGET_MANA_PCT = 18, // ManaMin%, ManaMax%, RepeatMin, RepeatMax
|
||||
SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID(0any)
|
||||
SMART_EVENT_REWARD_QUEST = 20, // QuestID(0any)
|
||||
SMART_EVENT_ACCEPTED_QUEST = 19, // QuestID (0 = any), CooldownMin, CooldownMax
|
||||
SMART_EVENT_REWARD_QUEST = 20, // QuestID (0 = any), CooldownMin, CooldownMax
|
||||
SMART_EVENT_REACHED_HOME = 21, // NONE
|
||||
SMART_EVENT_RECEIVE_EMOTE = 22, // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3
|
||||
SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
|
||||
@@ -293,6 +293,8 @@ struct SmartEvent
|
||||
struct
|
||||
{
|
||||
uint32 quest;
|
||||
uint32 cooldownMin;
|
||||
uint32 cooldownMax;
|
||||
} quest;
|
||||
|
||||
struct
|
||||
|
||||
Reference in New Issue
Block a user