mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(Core/SmartScripts): SMART_ACTION_SET_CORPSE_DELAY
This commit is contained in:
committed by
GitHub
parent
0d6b8dba18
commit
9faec8ef1b
@@ -3275,6 +3275,25 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
CAST_AI(SmartAI, me->AI())->SetEvadeDisabled(e.action.disableEvade.disable != 0);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_CORPSE_DELAY:
|
||||
{
|
||||
ObjectList* targets = GetTargets(e, unit);
|
||||
if (!targets)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
for (auto const& target : *targets)
|
||||
{
|
||||
if (IsCreature(target))
|
||||
{
|
||||
target->ToCreature()->SetCorpseDelay(e.action.corpseDelay.timer);
|
||||
}
|
||||
}
|
||||
|
||||
delete targets;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d 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