mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 22:19:54 -04:00
Merge pull request #16523 from tkrokli/smart_action_set_corpse_delay
[3.3.5][6.x]Core/SmartScript: create SMART_ACTION_SET_CORPSE_DELAY
(cherry picked from commit 8e152e0d4a)
This commit is contained in:
@@ -2362,6 +2362,21 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
break;
|
||||
}
|
||||
}
|
||||
case SMART_ACTION_SET_CORPSE_DELAY:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets)
|
||||
break;
|
||||
|
||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||
{
|
||||
if (IsCreature(*itr))
|
||||
(*itr)->ToCreature()->SetCorpseDelay(e.action.corpseDelay.timer);
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry " SI64FMTD " SourceType %u, Event %u, Unhandled Action type %u", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user