mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(Core/SAI): Implement SMART_ACTION_DISABLE (#16254)
* init * Create rev_1684036819129474700.sql * Update rev_1684036819129474700.sql
This commit is contained in:
@@ -2797,6 +2797,18 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_DISABLE:
|
||||
{
|
||||
for (WorldObject* target : targets)
|
||||
{
|
||||
if (IsUnit(target))
|
||||
{
|
||||
target->ToUnit()->SetImmuneToAll(!e.action.disable.state);
|
||||
target->ToUnit()->SetVisible(e.action.disable.state);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry {} SourceType {}, Event {}, Unhandled Action type {}", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user