mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
fix(core/SMART_EVENT_LINK) - Seperation and clarification of "not found or invalid, skipped" (#22240)
This commit is contained in:
@@ -3303,10 +3303,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
if (e.link && e.link != e.event_id)
|
if (e.link && e.link != e.event_id)
|
||||||
{
|
{
|
||||||
auto linked = FindLinkedEvent(e.link);
|
auto linked = FindLinkedEvent(e.link);
|
||||||
if (linked.has_value() && linked.value().get().GetEventType() == SMART_EVENT_LINK)
|
if (linked.has_value())
|
||||||
executionStack.emplace_back(SmartScriptFrame{ linked.value(), unit, var0, var1, bvar, spell, gob });
|
{
|
||||||
|
auto& linkedEvent = linked.value().get();
|
||||||
|
if (linkedEvent.GetEventType() == SMART_EVENT_LINK)
|
||||||
|
executionStack.emplace_back(SmartScriptFrame{ linkedEvent, unit, var0, var1, bvar, spell, gob });
|
||||||
|
else
|
||||||
|
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Link Event {} found but has wrong type (should be 61, is {}).", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link, linkedEvent.GetEventType());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Link Event {} not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
|
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Link Event {} not found, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user