fix(core/SMART_EVENT_LINK) - Seperation and clarification of "not found or invalid, skipped" (#22240)
This commit is contained in:
parent
31f466fa32
commit
84533758f9
1 changed files with 9 additions and 3 deletions
|
|
@ -3303,10 +3303,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||
if (e.link && e.link != e.event_id)
|
||||
{
|
||||
auto linked = FindLinkedEvent(e.link);
|
||||
if (linked.has_value() && linked.value().get().GetEventType() == SMART_EVENT_LINK)
|
||||
executionStack.emplace_back(SmartScriptFrame{ linked.value(), unit, var0, var1, bvar, spell, gob });
|
||||
if (linked.has_value())
|
||||
{
|
||||
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
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue