feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227)

This commit is contained in:
Kitzunu
2022-03-30 12:59:42 +02:00
committed by GitHub
parent 54c06eb72e
commit 856aed6fc6
243 changed files with 1205 additions and 1191 deletions

View File

@@ -189,7 +189,7 @@ public:
me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f,
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000))
{
spotlight->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
spotlight->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
spotlight->CastSpell(spotlight, SPELL_SPOTLIGHT, false);
m_uiSpotlightGUID = spotlight->GetGUID();
}
@@ -265,11 +265,7 @@ public:
float PosX = Spawns[index][1];
if (Creature* creature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR * 2 * IN_MILLISECONDS))
{
// In case database has bad flags
creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
}
RaidWiped = false;