Core/Misc: Rename AddXXXFlag updatefield functions to SetXXXFlag
This commit is contained in:
@@ -279,19 +279,19 @@ struct boss_garothi_worldbreaker : public BossAI
|
||||
DoCastSelf(SPELL_APOCALYPSE_DRIVE_FINAL_DAMAGE);
|
||||
Talk(SAY_ANNOUNCE_APOCALYPSE_DRIVE);
|
||||
Talk(SAY_APOCALYPSE_DRIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
|
||||
if (Creature* decimator = instance->GetCreature(DATA_DECIMATOR))
|
||||
{
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, decimator, 2);
|
||||
decimator->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
decimator->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
decimator->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
|
||||
if (Creature* annihilator = instance->GetCreature(DATA_ANNIHILATOR))
|
||||
{
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, annihilator, 2);
|
||||
annihilator->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
annihilator->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
annihilator->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
++_apocalypseDriveCount;
|
||||
@@ -456,13 +456,13 @@ struct boss_garothi_worldbreaker : public BossAI
|
||||
if (Creature* decimator = instance->GetCreature(DATA_DECIMATOR))
|
||||
{
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, decimator);
|
||||
decimator->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_IMMUNE));
|
||||
decimator->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_IMMUNE);
|
||||
}
|
||||
|
||||
if (Creature* annihilator = instance->GetCreature(DATA_ANNIHILATOR))
|
||||
{
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, annihilator);
|
||||
annihilator->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_IMMUNE));
|
||||
annihilator->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_IMMUNE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -570,7 +570,7 @@ void BattlefieldWG::OnBattleStart()
|
||||
// Update faction of relic, only attacker can click on
|
||||
relic->SetFaction(WintergraspFaction[GetAttackerTeam()]);
|
||||
// Set in use (not allow to click on before last door is broken)
|
||||
relic->AddFlag(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NOT_SELECTABLE));
|
||||
relic->SetFlag(GO_FLAG_IN_USE | GO_FLAG_NOT_SELECTABLE);
|
||||
m_titansRelicGUID = relic->GetGUID();
|
||||
}
|
||||
else
|
||||
@@ -967,7 +967,7 @@ void BattlefieldWG::HandleKill(Player* killer, Unit* victim)
|
||||
HandlePromotion(killer, victim);
|
||||
|
||||
// Allow to Skin non-released corpse
|
||||
victim->AddUnitFlag(UNIT_FLAG_SKINNABLE);
|
||||
victim->SetUnitFlag(UNIT_FLAG_SKINNABLE);
|
||||
}
|
||||
|
||||
/// @todoRecent PvP activity worldstate
|
||||
@@ -1494,7 +1494,7 @@ void BfWGGameObjectBuilding::Destroyed()
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
_wg->SetRelicInteractible(true);
|
||||
if (_wg->GetRelic())
|
||||
_wg->GetRelic()->RemoveFlag(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NOT_SELECTABLE));
|
||||
_wg->GetRelic()->RemoveFlag(GO_FLAG_IN_USE | GO_FLAG_NOT_SELECTABLE);
|
||||
else
|
||||
TC_LOG_ERROR("bg.battlefield.wg", "Titan Relic not found.");
|
||||
break;
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ struct boss_pyroguard_emberseer : public BossAI
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetImmuneToPC(true);
|
||||
events.Reset();
|
||||
// Apply auras on spawn and reset
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ struct go_suppression_device : public GameObjectAI
|
||||
return;
|
||||
_active = false;
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -303,7 +303,7 @@ struct go_chromaggus_lever : public GameObjectAI
|
||||
_instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
}
|
||||
|
||||
me->AddFlag(GameObjectFlags(GO_FLAG_NOT_SELECTABLE | GO_FLAG_IN_USE));
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE | GO_FLAG_IN_USE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -184,7 +184,7 @@ struct boss_victor_nefarius : public BossAI
|
||||
_Reset();
|
||||
|
||||
me->SetVisible(true);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
|
||||
me->RemoveAura(SPELL_NEFARIANS_BARRIER);
|
||||
@@ -219,7 +219,7 @@ struct boss_victor_nefarius : public BossAI
|
||||
if (summon->GetEntry() != NPC_NEFARIAN)
|
||||
{
|
||||
summon->UpdateEntry(NPC_BONE_CONSTRUCT);
|
||||
summon->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
summon->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
}
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ struct boss_vaelastrasz : public BossAI
|
||||
boss_vaelastrasz(Creature* creature) : BossAI(creature, DATA_VAELASTRAZ_THE_CORRUPT)
|
||||
{
|
||||
Initialize();
|
||||
creature->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->SetFaction(FACTION_FRIENDLY);
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
|
||||
+2
-2
@@ -159,7 +159,7 @@ struct boss_majordomo : public BossAI
|
||||
{
|
||||
case EVENT_OUTRO_1:
|
||||
me->NearTeleportTo(RagnarosTelePos.GetPositionX(), RagnarosTelePos.GetPositionY(), RagnarosTelePos.GetPositionZ(), RagnarosTelePos.GetOrientation());
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
break;
|
||||
case EVENT_OUTRO_2:
|
||||
instance->instance->SummonCreature(NPC_RAGNAROS, RagnarosSummonPos);
|
||||
@@ -186,7 +186,7 @@ struct boss_majordomo : public BossAI
|
||||
else if (action == ACTION_START_RAGNAROS_ALT)
|
||||
{
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ struct boss_ragnaros : public BossAI
|
||||
Initialize();
|
||||
_introState = 0;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ struct boss_ragnaros : public BossAI
|
||||
//Root self
|
||||
//DoCast(me, 23973);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetEmoteState(EMOTE_STATE_SUBMERGED);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
|
||||
instance->SetData(DATA_RAGNAROS_ADDS, 0);
|
||||
|
||||
@@ -172,7 +172,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
void LeverStucked()
|
||||
{
|
||||
if (GameObject* pDoorLever = instance->GetGameObject(DoorLeverGUID))
|
||||
pDoorLever->AddFlag(GO_FLAG_INTERACT_COND);
|
||||
pDoorLever->SetFlag(GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
|
||||
@@ -311,7 +311,7 @@ public:
|
||||
if (GameObject* go = me->SummonGameObject(183410, -533.140f, -105.322f, -156.016f, 0.f, QuaternionData(), 1s))
|
||||
{
|
||||
GoSummonList.push_back(go->GetGUID());
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
}
|
||||
Summon(3);
|
||||
break;
|
||||
@@ -326,7 +326,7 @@ public:
|
||||
if (GameObject* go = me->SummonGameObject(183410, -542.199f, -96.854f, -155.790f, 0.f, QuaternionData(), 1s))
|
||||
{
|
||||
GoSummonList.push_back(go->GetGUID());
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
if (GameObject* go = me->SummonGameObject(183410, -507.820f, -103.333f, -151.353f, 0.f, QuaternionData(), 1s))
|
||||
{
|
||||
GoSummonList.push_back(go->GetGUID());
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
Summon(5);
|
||||
}
|
||||
break;
|
||||
@@ -348,7 +348,7 @@ public:
|
||||
if (GameObject* go = me->SummonGameObject(183410, -511.829f, -86.249f, -151.431f, 0.f, QuaternionData(), 1s))
|
||||
{
|
||||
GoSummonList.push_back(go->GetGUID());
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE); //We can't use it!
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
|
||||
@@ -438,7 +438,7 @@ class go_blackened_urn : public GameObjectScript
|
||||
|
||||
if (Creature* nightbane = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_NIGHTBANE)))
|
||||
{
|
||||
me->AddFlag(GO_FLAG_IN_USE);
|
||||
me->SetFlag(GO_FLAG_IN_USE);
|
||||
nightbane->AI()->DoAction(ACTION_SUMMON);
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
if (spellInfo->Id == SPELL_INFERNAL_RELAY)
|
||||
{
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
HellfireTimer = 4000;
|
||||
CleanupTimer = 170000;
|
||||
}
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
Creature* axe = me->SummonCreature(MALCHEZARS_AXE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1s);
|
||||
if (axe)
|
||||
{
|
||||
axe->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
axe->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
axe->SetFaction(me->GetFaction());
|
||||
axes[i] = axe->GetGUID();
|
||||
if (target)
|
||||
|
||||
@@ -1019,7 +1019,7 @@ void PretendToDie(Creature* creature)
|
||||
creature->InterruptNonMeleeSpells(true);
|
||||
creature->RemoveAllAuras();
|
||||
creature->SetHealth(0);
|
||||
creature->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->GetMotionMaster()->Clear();
|
||||
creature->GetMotionMaster()->MoveIdle();
|
||||
creature->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
case GO_SIDE_ENTRANCE_DOOR:
|
||||
SideEntranceDoor = go->GetGUID();
|
||||
if (GetBossState(DATA_OPERA_PERFORMANCE) == DONE)
|
||||
go->AddFlag(GO_FLAG_LOCKED);
|
||||
go->SetFlag(GO_FLAG_LOCKED);
|
||||
else
|
||||
go->RemoveFlag(GO_FLAG_LOCKED);
|
||||
break;
|
||||
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f,
|
||||
TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1min))
|
||||
{
|
||||
spotlight->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
spotlight->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
spotlight->CastSpell(spotlight, SPELL_SPOTLIGHT, false);
|
||||
m_uiSpotlightGUID = spotlight->GetGUID();
|
||||
}
|
||||
@@ -272,7 +272,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, 2h))
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
RaidWiped = false;
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (instance->GetGuidData(DATA_IMAGE_OF_MEDIVH).IsEmpty())
|
||||
{
|
||||
|
||||
@@ -410,7 +410,7 @@ struct npc_felblood_kaelthas_phoenix : public ScriptedAI
|
||||
me->AttackStop();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->RemoveAllAuras();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCastSelf(SPELL_EMBER_BLAST);
|
||||
// DoCastSelf(SPELL_SUMMON_PHOENIX_EGG); -- We do a manual summon for now. Feel free to move it to spelleffect_dbc
|
||||
if (Creature* egg = DoSummon(NPC_PHOENIX_EGG, me->GetPosition(), 0s))
|
||||
|
||||
@@ -421,7 +421,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
//time to make her lootable and complete event if she died before lackeys
|
||||
if (!delrissa->IsAlive())
|
||||
{
|
||||
delrissa->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
delrissa->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
|
||||
instance->SetBossState(DATA_PRIESTESS_DELRISSA, DONE);
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ public:
|
||||
|
||||
me->RestoreFaction();
|
||||
CombatAI::Reset();
|
||||
me->AddUnitFlag(UNIT_FLAG_CAN_SWIM);
|
||||
me->SetUnitFlag(UNIT_FLAG_CAN_SWIM);
|
||||
}
|
||||
|
||||
void SpellHit(WorldObject* caster, SpellInfo const* spellInfo) override
|
||||
@@ -931,7 +931,7 @@ public:
|
||||
|
||||
deathcharger->RestoreFaction();
|
||||
deathcharger->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
deathcharger->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
if (!me->GetVehicle() && deathcharger->IsVehicle() && deathcharger->GetVehicleKit()->HasEmptySeat(0))
|
||||
me->EnterVehicle(deathcharger);
|
||||
}
|
||||
@@ -944,7 +944,7 @@ public:
|
||||
|
||||
if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle())
|
||||
{
|
||||
deathcharger->AddNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->SetNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
deathcharger->SetFaction(FACTION_SCARLET_CRUSADE_2);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ struct npc_koltira_deathweaver : public ScriptedAI
|
||||
void Reset() override
|
||||
{
|
||||
me->SetImmuneToNPC(true);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
me->RemoveAllAuras();
|
||||
|
||||
@@ -203,7 +203,7 @@ struct npc_koltira_deathweaver : public ScriptedAI
|
||||
case EVENT_INTRO_6:
|
||||
Talk(SAY_KOLTIRA_3);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
_eventGossip = true;
|
||||
|
||||
break;
|
||||
|
||||
@@ -759,7 +759,7 @@ public:
|
||||
case 15: // summon gate
|
||||
if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22], TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 5min))
|
||||
{
|
||||
temp->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
temp->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
|
||||
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN06);
|
||||
uiAlexandrosGUID = temp->GetGUID();
|
||||
|
||||
@@ -197,7 +197,7 @@ struct npc_headless_horseman_head : public PassiveAI
|
||||
void HandleInitialSetup()
|
||||
{
|
||||
DoCastSelf(SPELL_HEADLESS_HORSEMAN_C_HEAD_STUN);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
_phase = PHASE_1;
|
||||
_events.SetPhase(PHASE_1);
|
||||
}
|
||||
@@ -309,11 +309,11 @@ struct npc_headless_horseman_head : public PassiveAI
|
||||
DoCast(horseman, SPELL_HEADLESS_HORSEMAN_C_RETURN_HEAD, true);
|
||||
me->RemoveAllAttackers();
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
break;
|
||||
case EVENT_RAIN_OF_TREATS:
|
||||
DoCastSelf(SPELL_RAIN_OF_TREATS);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
_instance->SetData(DATA_PREPARE_RESET, 0);
|
||||
if (GameObject* pumpkin = me->SummonGameObject(GO_PUMPKIN_SHRINE, GOPumpkinSpawnPosition, GOPumpkinSpawnQuat, 7_days))
|
||||
me->RemoveGameObject(pumpkin, false);
|
||||
@@ -706,7 +706,7 @@ struct npc_sir_thomas : public PassiveAI
|
||||
void Reset() override
|
||||
{
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCastSelf(SPELL_HEADLESS_HORSEMAN_WISP_INVIS);
|
||||
|
||||
_scheduler.Schedule(9s, [this](TaskContext /*context*/)
|
||||
@@ -720,7 +720,7 @@ struct npc_sir_thomas : public PassiveAI
|
||||
if (spellInfo->Id == SPELL_HEADLESS_HORSEMAN_WISP_FLIGHT_PORT)
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->RemoveAurasDueToSpell(SPELL_HEADLESS_HORSEMAN_WISP_INVIS);
|
||||
DoCastSelf(SPELL_HEADLESS_HORSEMAN_C_GHOST_VISUAL, true);
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
_killYellTimer.Reset(0s);
|
||||
|
||||
DoCastSelf(SPELL_RETRIBUTION_AURA, true);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAllAuras();
|
||||
me->ClearAllReactives();
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
me->SetReactState(REACT_PASSIVE); // prevent Mograine from attacking while fake death
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class instance_scarlet_monastery : public InstanceMapScript
|
||||
_horsemanState = IN_PROGRESS;
|
||||
for (uint32 data : {DATA_PUMPKIN_SHRINE, DATA_LOOSELY_TURNED_SOIL})
|
||||
if (GameObject* gob = GetGameObject(data))
|
||||
gob->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
gob->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
instance->SummonCreature(NPC_HEADLESS_HORSEMAN_HEAD, HeadlessHorsemanHeadSpawnPosition);
|
||||
instance->SummonCreature(NPC_FLAME_BUNNY, BunnySpawnPosition);
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
break;
|
||||
case EVENT_ILLUSION:
|
||||
DoCast(SPELL_ILLUSION);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetDisplayId(11686); // Invisible Model
|
||||
ModifyThreatByPercent(me->GetVictim(), -99);
|
||||
events.ScheduleEvent(EVENT_SET_VISIBILITY, 3s);
|
||||
|
||||
@@ -128,7 +128,7 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
events.ScheduleEvent(INTRO_1, 500ms);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
Talk(EMOTE_SUMMONED);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
case INTRO_5:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
me->SetVirtualItem(0, uint32(WEAPON_KIRTONOS_STAFF));
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
events.ScheduleEvent(INTRO_6, 5s);
|
||||
break;
|
||||
|
||||
@@ -148,7 +148,7 @@ struct boss_apothecary_hummel : public BossAI
|
||||
_isDead = true;
|
||||
me->RemoveAurasDueToSpell(SPELL_ALLURING_PERFUME);
|
||||
DoCastSelf(SPELL_PERMANENT_FEIGN_DEATH, true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
Talk(SAY_HUMMEL_DEATH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
break;
|
||||
case GO_GAUNTLET_GATE1:
|
||||
//weird, but unless flag is set, client will not respond as expected. DB bug?
|
||||
go->AddFlag(GO_FLAG_LOCKED);
|
||||
go->SetFlag(GO_FLAG_LOCKED);
|
||||
gauntletGate1GUID = go->GetGUID();
|
||||
break;
|
||||
case GO_ZIGGURAT1:
|
||||
@@ -279,7 +279,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
ysida->CastSpell(nullptr, SPELL_YSIDA_SAVED, true);
|
||||
ysida->SetWalk(true);
|
||||
ysida->AI()->Talk(SAY_YSIDA_SAVED);
|
||||
ysida->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
ysida->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
ysida->GetClosePoint(x, y, z, ysida->GetObjectScale() / 3, 4.0f);
|
||||
ysida->GetMotionMaster()->MovePoint(1, x, y, z);
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ public:
|
||||
void UseStatue(GameObject* go)
|
||||
{
|
||||
go->SummonGameObject(GO_ATALAI_LIGHT1, *go, QuaternionData::fromEulerAnglesZYX(go->GetOrientation(), 0.0f, 0.0f), 0s);
|
||||
go->AddFlag(GO_FLAG_INTERACT_COND);
|
||||
go->SetFlag(GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
IsIntro = true;
|
||||
Madrigosa->SetMaxHealth(me->GetMaxHealth());
|
||||
Madrigosa->SetHealth(me->GetMaxHealth());
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->Attack(Madrigosa, true);
|
||||
Madrigosa->Attack(me, true);
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
me->SetDisableGravity(true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
|
||||
@@ -444,8 +444,8 @@ public:
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddUnitState(UNIT_STATE_STUNNED);
|
||||
|
||||
ScriptedAI::InitializeAI();
|
||||
@@ -617,8 +617,8 @@ public:
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_ARMAGEDDON_TARGET)
|
||||
{
|
||||
summoned->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
summoned->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
summoned->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
summoned->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
// summoned->SetVisibility(VISIBILITY_OFF); //with this we cant see the armageddon visuals
|
||||
}
|
||||
else
|
||||
@@ -1038,7 +1038,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
|
||||
@@ -279,7 +279,7 @@ struct boss_muru : public BossAI
|
||||
_phase = PHASE_TWO;
|
||||
me->RemoveAllAuras();
|
||||
DoCast(me, SPELL_OPEN_ALL_PORTALS, true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
|
||||
scheduler.Schedule(Seconds(6), [this](TaskContext /*context*/)
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ class boss_archaedas : public CreatureScript
|
||||
|
||||
instance->SetData(0, 5); // respawn any dead minions
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->AddAura(SPELL_FREEZE_ANIM, me);
|
||||
}
|
||||
@@ -264,7 +264,7 @@ class npc_archaedas_minions : public CreatureScript
|
||||
Initialize();
|
||||
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->RemoveAllAuras();
|
||||
me->AddAura(SPELL_MINION_FREEZE_ANIM, me);
|
||||
@@ -353,7 +353,7 @@ class npc_stonekeepers : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->RemoveAllAuras();
|
||||
me->AddAura(SPELL_MINION_FREEZE_ANIM, me);
|
||||
|
||||
@@ -122,7 +122,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
case GO_ANCIENT_VAULT_DOOR:
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->ReplaceAllFlags(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN));
|
||||
go->ReplaceAllFlags(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN);
|
||||
ancientVaultDoor = go->GetGUID();
|
||||
|
||||
if (m_auiEncounter[1] == DONE)
|
||||
@@ -142,7 +142,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
{
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
go->AddFlag(GO_FLAG_INTERACT_COND);
|
||||
go->SetFlag(GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
creature->SetFaction(FACTION_FRIENDLY);
|
||||
creature->RemoveAllAuras();
|
||||
creature->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->SetControlled(true, UNIT_STATE_ROOT);
|
||||
creature->AddAura(SPELL_MINION_FREEZE_ANIM, creature);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!go)
|
||||
return;
|
||||
|
||||
go->AddFlag(GO_FLAG_INTERACT_COND);
|
||||
go->SetFlag(GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
|
||||
void ActivateStoneKeepers()
|
||||
|
||||
@@ -91,7 +91,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
{
|
||||
me->SetDisplayFromModel(0);
|
||||
if (_instance->GetData(DATA_ZULAMAN_STATE) == NOT_STARTED)
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -158,7 +158,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
case EVENT_START_DOOR_OPENING_2:
|
||||
me->SetVirtualItem(0, uint32(0));
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
|
||||
strangeGong->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
strangeGong->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
_events.ScheduleEvent(EVENT_START_DOOR_OPENING_3, 500ms);
|
||||
break;
|
||||
case EVENT_START_DOOR_OPENING_3:
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
{
|
||||
_tapped = true;
|
||||
_playerGUID = caster->GetGUID();
|
||||
me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
_events.ScheduleEvent(EVENT_TURN_TO_PLAYER, Seconds(2));
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ struct npc_thalorien_dawnseeker : public ScriptedAI
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
_summons.DespawnAll();
|
||||
_playerGUID.Clear();
|
||||
_morlenGUID.Clear();
|
||||
@@ -376,7 +376,7 @@ struct npc_thalorien_dawnseeker : public ScriptedAI
|
||||
thalorien->DespawnOrUnsummon(5s);
|
||||
}
|
||||
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ struct npc_tiger_matriarch : public ScriptedAI
|
||||
if (HealthBelowPct(20))
|
||||
{
|
||||
damage = 0;
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (Unit* vehSummoner = attacker->ToTempSummon()->GetSummonerUnit())
|
||||
{
|
||||
vehSummoner->AddAura(SPELL_SUMMON_ZENTABRA_TRIGGER, vehSummoner);
|
||||
|
||||
@@ -56,7 +56,7 @@ struct go_blackfathom_fire : public GameObjectAI
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
instance->SetData(DATA_FIRE, instance->GetData(DATA_FIRE) + 1);
|
||||
return true;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ struct npc_morridune : public EscortAI
|
||||
case 4:
|
||||
SetEscortPaused(true);
|
||||
me->SetFacingTo(1.775791f);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
Talk(SAY_MORRIDUNE_2);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -105,12 +105,12 @@ public:
|
||||
case GO_SHRINE_OF_GELIHAST:
|
||||
shrineOfGelihastGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_GELIHAST) != DONE)
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_ALTAR_OF_THE_DEEPS:
|
||||
altarOfTheDeepsGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_AKU_MAI) != DONE)
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_AKU_MAI_DOOR:
|
||||
if (GetBossState(DATA_AKU_MAI) == DONE)
|
||||
|
||||
@@ -127,7 +127,7 @@ public:
|
||||
|
||||
ArchimondeGUID = instance->GetGuidData(DATA_ARCHIMONDE);
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
@@ -404,7 +404,7 @@ void hyjalAI::Reset()
|
||||
}
|
||||
|
||||
//Flags
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
//Reset Instance Data for trash count
|
||||
if ((!instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == JAINA) || (instance->GetData(DATA_ALLIANCE_RETREAT) && me->GetEntry() == THRALL))
|
||||
@@ -835,7 +835,7 @@ void hyjalAI::UpdateAI(uint32 diff)
|
||||
}
|
||||
EventBegun = false;
|
||||
CheckTimer = 0;
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
BossGUID[i].Clear();
|
||||
instance->DoUpdateWorldState(WORLD_STATE_ENEMY, 0); // Reset world state for enemies to disable it
|
||||
}
|
||||
@@ -998,7 +998,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
{
|
||||
(*itr)->CastSpell(*itr, SPELL_TELEPORT_VISUAL, true);
|
||||
(*itr)->SetFaction(FACTION_FRIENDLY);//make them friendly so mobs won't attack them
|
||||
(*itr)->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
(*itr)->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
DoCast(me, SPELL_TELEPORT_VISUAL);
|
||||
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
CanMove = false;
|
||||
Delay = rand32() % 30000;
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetDisplayId(MODEL_INVIS);
|
||||
go = false;
|
||||
Initialize();
|
||||
|
||||
@@ -576,7 +576,7 @@ public:
|
||||
|
||||
// Adjust gossip flag based on whether we have a gossip menu or not
|
||||
if (target.HasGossip)
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
else
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
@@ -1465,7 +1465,7 @@ public:
|
||||
case RP5_EVENT_CHROMIE_SPAWN:
|
||||
if (Creature* chromie = instance->instance->SummonCreature(NPC_CHROMIE_3, ArthasPositions[RP5_CHROMIE_SPAWN]))
|
||||
{
|
||||
chromie->RemoveNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
chromie->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
Movement::PointsArray path(ChromieSplinePos, ChromieSplinePos + chromiePathSize);
|
||||
Movement::MoveSplineInit init(chromie);
|
||||
init.SetFly();
|
||||
@@ -1483,7 +1483,7 @@ public:
|
||||
{
|
||||
chromie->CastSpell(chromie, SPELL_CHROMIE_3_TRANSFORM);
|
||||
chromie->AI()->Talk(RP5_LINE_CHROMIE0);
|
||||
chromie->AddNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
chromie->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
break;
|
||||
case 30:
|
||||
SetEscortPaused(true);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
SetRun(false);
|
||||
break;
|
||||
case 31:
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
//make horsie run off
|
||||
SetEscortPaused(true);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
instance->SetData(TYPE_THRALL_PART2, DONE);
|
||||
SetRun();
|
||||
break;
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
// we make Immolthar non attackable, otherwise players with pets can pull him out of the forcefield
|
||||
// TODO: this change isnt correct but since of today (13.09.2020) mmaps dont support doors
|
||||
if (GetBossState(DATA_FORCEFIELD) != DONE)
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -412,7 +412,7 @@ class npc_brann_bronzebeard_anraphet : public CreatureScript
|
||||
break;
|
||||
case EVENT_BRANN_SAY_GET_IT:
|
||||
Talk(BRANN_SAY_GET_IT);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
break;
|
||||
case EVENT_BRANN_SET_ORIENTATION_4:
|
||||
me->SetFacingTo(3.141593f);
|
||||
|
||||
@@ -293,8 +293,8 @@ public:
|
||||
{
|
||||
if (Unit* ptah = GetCaster())
|
||||
{
|
||||
ptah->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT));
|
||||
ptah->AddUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
ptah->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
ptah->SetUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
{
|
||||
if (Unit* ptah = GetCaster())
|
||||
{
|
||||
ptah->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT));
|
||||
ptah->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT);
|
||||
ptah->RemoveUnitFlag2(UNIT_FLAG2_FEIGN_DEATH);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
//me->m_canMove = true;
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
// Invisible Model
|
||||
me->SetDisplayId(11686);
|
||||
SummonAdds(me->GetVictim());
|
||||
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
case GO_GONG:
|
||||
goGongGUID = gameObject->GetGUID();
|
||||
if (GetBossState(DATA_TUTEN_KASH) == DONE)
|
||||
gameObject->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
gameObject->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_IDOL_OVEN_FIRE:
|
||||
case GO_IDOL_CUP_FIRE:
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
case IN_PROGRESS:
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(goGongGUID))
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
switch (gongWave)
|
||||
{
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
channeling = false;
|
||||
eventProgress = 0;
|
||||
spawnerCount = 0;
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
if (WardKeeperDeath == WARD_KEEPERS_NR)
|
||||
if (GameObject* go = instance->GetGameObject(DoorWardGUID))
|
||||
{
|
||||
go->AddFlag(GameObjectFlags(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN));
|
||||
go->SetFlag(GO_FLAG_IN_USE | GO_FLAG_NODESPAWN);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
break;
|
||||
case 45:
|
||||
Talk(SAY_WIN, player);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
player->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, me);
|
||||
break;
|
||||
case 46:
|
||||
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
//Reset flags
|
||||
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
|
||||
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetVisible(true);
|
||||
|
||||
//Reset Phase
|
||||
@@ -420,7 +420,7 @@ public:
|
||||
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
|
||||
|
||||
//Reset to normal emote state and prevent select and attack
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
//Remove Target field
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
@@ -523,7 +523,7 @@ public:
|
||||
|
||||
//Reset flags
|
||||
me->RemoveAurasDueToSpell(SPELL_TRANSFORM);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetVisible(false);
|
||||
|
||||
instance->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
|
||||
@@ -632,7 +632,7 @@ public:
|
||||
me->SetFullHealth();
|
||||
|
||||
me->SetVisible(true);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE | UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
//Emerging phase
|
||||
//AttackStart(ObjectAccessor::GetUnit(*me, HoldpPlayer));
|
||||
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
{
|
||||
//Cast
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ struct boss_twinemperorsAI : public BossAI
|
||||
if (ohealth <= 0)
|
||||
{
|
||||
pOtherBoss->setDeathState(JUST_DIED);
|
||||
pOtherBoss->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
pOtherBoss->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ struct boss_twinemperorsAI : public BossAI
|
||||
{
|
||||
pOtherBoss->SetHealth(0);
|
||||
pOtherBoss->setDeathState(JUST_DIED);
|
||||
pOtherBoss->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
pOtherBoss->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
ENSURE_AI(boss_twinemperorsAI, pOtherBoss->AI())->DontYellWhenDead = true;
|
||||
}
|
||||
if (!DontYellWhenDead) // I hope AI is not threaded
|
||||
|
||||
@@ -84,8 +84,8 @@ public:
|
||||
|
||||
DoCastSelf(SPELL_IRRIDATION, true);
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_PLAYER_CONTROLLED);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetHealth(me->CountPctFromMaxHealth(10));
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
}
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
NormFaction = creature->GetFaction();
|
||||
NpcFlags = NPCFlags(creature->m_unitData->NpcFlags[0]);
|
||||
NpcFlags = creature->GetNpcFlags();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetHealth(me->CountPctFromMaxHealth(15));
|
||||
switch (urand(0, 1))
|
||||
{
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
}
|
||||
else if (spellInfo->Id == SPELL_KODO_KOMBO_GOSSIP)
|
||||
{
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void HandleAnimation()
|
||||
|
||||
@@ -376,8 +376,8 @@ public:
|
||||
if (!creature)
|
||||
continue;
|
||||
creature->SetFaction(35);
|
||||
creature->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
AffrayChallenger[i] = creature->GetGUID();
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ public:
|
||||
if (npc_ranshalla::npc_ranshallaAI* escortAI = dynamic_cast<npc_ranshalla::npc_ranshallaAI*>(ranshalla->AI()))
|
||||
escortAI->DoContinueEscort(isAltar);
|
||||
}
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -192,7 +192,7 @@ class boss_corborus : public CreatureScript
|
||||
events.RescheduleEvent(EVENT_SUBMERGE, 100s);
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
|
||||
me->AttackStop();
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ class instance_stonecore : public InstanceMapScript
|
||||
return;
|
||||
|
||||
teleporter->CastSpell(teleporter, SPELL_TELEPORTER_ACTIVE_VISUAL, true);
|
||||
teleporter->AddNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
teleporter->SetNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
}
|
||||
|
||||
GuidVector millhouseTrashGUIDs;
|
||||
|
||||
@@ -160,7 +160,7 @@ class npc_sc_millhouse_manastorm : public CreatureScript
|
||||
break;
|
||||
}
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 pointId) override
|
||||
@@ -178,7 +178,7 @@ class npc_sc_millhouse_manastorm : public CreatureScript
|
||||
switch (pointId)
|
||||
{
|
||||
case POINT_MILLHOUSE_GROUP_2:
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Creature* worldtrigger = me->FindNearestCreature(NPC_WORLDTRIGGER, 200.0f))
|
||||
me->SetFacingToObject(worldtrigger);
|
||||
@@ -187,7 +187,7 @@ class npc_sc_millhouse_manastorm : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_READY_FOR_COMBAT, 10s);
|
||||
break;
|
||||
case POINT_MILLHOUSE_GROUP_3:
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetFacingTo(5.931499f);
|
||||
DoCast(me, SPELL_ANCHOR_HERE);
|
||||
|
||||
@@ -225,7 +225,7 @@ struct boss_volazj : public BossAI
|
||||
Talk(SAY_INSANITY);
|
||||
DoCastSelf(SPELL_WHISPER_INSANITY, true);
|
||||
// Unattackable
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
// phase mask
|
||||
|
||||
@@ -328,7 +328,7 @@ struct boss_jedoga_shadowseeker : public BossAI
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->GetMotionMaster()->MovePoint(POINT_PHASE_TWO, JedogaGroundPosition);
|
||||
break;
|
||||
case EVENT_FLY_DELAY:
|
||||
|
||||
@@ -386,7 +386,7 @@ struct go_prince_taldaram_sphere : public GameObjectAI
|
||||
Creature* princeTaldaram = instance->GetCreature(DATA_PRINCE_TALDARAM);
|
||||
if (princeTaldaram && princeTaldaram->IsAlive())
|
||||
{
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
switch (me->GetEntry())
|
||||
|
||||
@@ -83,7 +83,7 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
if (SpheresState[0])
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
else
|
||||
go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
@@ -92,7 +92,7 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
if (SpheresState[1])
|
||||
{
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
else
|
||||
go->RemoveFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -117,7 +117,7 @@ struct boss_anub_arak : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
BossAI::Reset();
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
instance->DoStopCriteriaTimer(CriteriaStartEvent::SendEvent, ACHIEV_GOTTA_GO_START_EVENT);
|
||||
_nextSubmerge = 75;
|
||||
_petCount = 0;
|
||||
@@ -328,7 +328,7 @@ struct boss_anub_arak : public BossAI
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
|
||||
me->RemoveAurasDueToSpell(SPELL_IMPALE_AURA);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCastSelf(SPELL_EMERGE);
|
||||
events.SetPhase(PHASE_EMERGE);
|
||||
events.ScheduleEvent(EVENT_POUND, 13s, 18s, 0, PHASE_EMERGE);
|
||||
@@ -358,7 +358,7 @@ struct boss_anub_arak : public BossAI
|
||||
{
|
||||
if (spellInfo->Id == SPELL_SUBMERGE)
|
||||
{
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->RemoveAurasDueToSpell(SPELL_LEECHING_SWARM);
|
||||
DoCastSelf(SPELL_IMPALE_AURA, true);
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ struct boss_sartharion : public BossAI
|
||||
}
|
||||
fetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, TenebronPositions[0]);
|
||||
|
||||
fetchTene->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
fetchTene->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ struct boss_sartharion : public BossAI
|
||||
}
|
||||
fetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, ShadronPositions[0]);
|
||||
|
||||
fetchShad->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
fetchShad->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,7 +327,7 @@ struct boss_sartharion : public BossAI
|
||||
}
|
||||
fetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, VesperonPositions[0]);
|
||||
|
||||
fetchVesp->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
fetchVesp->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ struct npc_flame_tsunami : public ScriptedAI
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
events.ScheduleEvent(EVENT_TSUNAMI_TIMER, 100ms);
|
||||
events.ScheduleEvent(EVENT_TSUNAMI_BUFF, 1s);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -840,7 +840,7 @@ struct npc_twilight_fissure : public ScriptedAI
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->AddAura(46265, me); // Wrong, can't find proper visual
|
||||
me->AddAura(69422, me);
|
||||
events.ScheduleEvent(EVENT_VOID_BLAST, 5s);
|
||||
|
||||
@@ -290,7 +290,7 @@ class boss_halion : public CreatureScript
|
||||
Talk(SAY_PHASE_TWO);
|
||||
|
||||
me->CastStop();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCastSelf(SPELL_TWILIGHT_PHASING);
|
||||
|
||||
if (Creature* controller = instance->GetCreature(DATA_HALION_CONTROLLER))
|
||||
@@ -418,7 +418,7 @@ class boss_twilight_halion : public CreatureScript
|
||||
me->SetHealth(halion->GetHealth());
|
||||
PhasingHandler::AddPhase(me, 174, false);
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
me->SetUnitFlag(UNIT_FLAG_IN_COMBAT);
|
||||
events.ScheduleEvent(EVENT_TAIL_LASH, 12s);
|
||||
events.ScheduleEvent(EVENT_SOUL_CONSUMPTION, 15s);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ struct npc_xerestrasza : public ScriptedAI
|
||||
Talk(SAY_XERESTRASZA_EVENT_6);
|
||||
break;
|
||||
case EVENT_XERESTRASZA_EVENT_7:
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
Talk(SAY_XERESTRASZA_EVENT_7);
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ public:
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->RestoreFaction();
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -328,7 +328,7 @@ public:
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
}
|
||||
|
||||
@@ -466,7 +466,7 @@ public:
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
}
|
||||
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@ public:
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
}
|
||||
|
||||
@@ -923,7 +923,7 @@ public:
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
// THIS IS A HACK, SHOULD BE REMOVED WHEN THE EVENT IS FULL SCRIPTED
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetImmuneToPC(true);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -171,7 +171,7 @@ public:
|
||||
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic() ? GO_CHAMPIONS_LOOT_H : GO_CHAMPIONS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData::fromEulerAnglesZYX(1.42f, 0.0f, 0.0f), 25h);
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic() ? GO_EADRIC_LOOT_H : GO_EADRIC_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData(), 25h);
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
if (Creature* pAnnouncer = instance->GetCreature(uiAnnouncerGUID))
|
||||
{
|
||||
pAnnouncer->GetMotionMaster()->MovePoint(0, 748.309f, 619.487f, 411.171f);
|
||||
pAnnouncer->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
pAnnouncer->SummonGameObject(instance->IsHeroic() ? GO_PALETRESS_LOOT_H : GO_PALETRESS_LOOT, 746.59f, 618.49f, 411.09f, 1.42f, QuaternionData(), 25h);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -92,8 +92,8 @@ public:
|
||||
uiTimer = 0;
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
SetGrandChampionsForEncounter();
|
||||
SetArgentChampion();
|
||||
@@ -431,7 +431,7 @@ public:
|
||||
{
|
||||
if (instance->GetBossState(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
|
||||
{
|
||||
summon->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
summon->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -188,7 +188,7 @@ struct boss_anubarak_trial : public BossAI
|
||||
events.ScheduleEvent(EVENT_SUMMON_FROST_SPHERE, 20s);
|
||||
|
||||
Initialize();
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
// clean up spawned Frost Spheres
|
||||
std::list<Creature*> FrostSphereList;
|
||||
me->GetCreatureListWithEntryInGrid(FrostSphereList, NPC_FROST_SPHERE, 150.0f);
|
||||
@@ -268,7 +268,7 @@ struct boss_anubarak_trial : public BossAI
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(SAY_AGGRO);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
|
||||
// Despawn Scarab Swarms neutral
|
||||
EntryCheckPredicate pred(NPC_SCARAB);
|
||||
@@ -331,7 +331,7 @@ struct boss_anubarak_trial : public BossAI
|
||||
{
|
||||
DoCast(me, SPELL_SUBMERGE_ANUBARAK);
|
||||
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
Talk(EMOTE_BURROWER);
|
||||
events.SetPhase(PHASE_SUBMERGED);
|
||||
events.ScheduleEvent(EVENT_PURSUING_SPIKE, 2s, 0, PHASE_SUBMERGED);
|
||||
@@ -367,7 +367,7 @@ struct boss_anubarak_trial : public BossAI
|
||||
DoCast(SPELL_SPIKE_TELE);
|
||||
summons.DespawnEntry(NPC_SPIKE);
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE_ANUBARAK);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCast(me, SPELL_EMERGE_ANUBARAK);
|
||||
Talk(EMOTE_EMERGE);
|
||||
events.SetPhase(PHASE_MELEE);
|
||||
@@ -563,7 +563,7 @@ struct npc_nerubian_burrower : public ScriptedAI
|
||||
if (!me->HasAura(SPELL_PERMAFROST_HELPER))
|
||||
{
|
||||
DoCast(me, SPELL_SUBMERGE_EFFECT);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCast(me, SPELL_PERSISTENT_DIRT, true);
|
||||
}
|
||||
}
|
||||
@@ -604,7 +604,7 @@ struct npc_frost_sphere : public ScriptedAI
|
||||
{
|
||||
// we are close to the ground
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
||||
DoCast(SPELL_PERMAFROST_MODEL);
|
||||
DoCast(SPELL_PERMAFROST);
|
||||
@@ -614,7 +614,7 @@ struct npc_frost_sphere : public ScriptedAI
|
||||
{
|
||||
// we are in air
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
//At hit the ground
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND);
|
||||
|
||||
+1
-1
@@ -477,7 +477,7 @@ struct boss_toc_champion_controller : public BossAI
|
||||
{
|
||||
summons.Summon(champion);
|
||||
champion->SetReactState(REACT_PASSIVE);
|
||||
champion->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
champion->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
champion->SetImmuneToPC(false);
|
||||
if (playerTeam == ALLIANCE)
|
||||
{
|
||||
|
||||
+5
-5
@@ -380,7 +380,7 @@ struct boss_gormok : public boss_northrend_beastsAI
|
||||
if (Unit* snobold = me->GetVehicleKit()->GetPassenger(i))
|
||||
{
|
||||
snobold->ExitVehicle();
|
||||
snobold->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
snobold->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
snobold->GetAI()->DoAction(ACTION_DISABLE_FIRE_BOMB);
|
||||
snobold->CastSpell(me, SPELL_JUMP_TO_HAND, true);
|
||||
break;
|
||||
@@ -484,7 +484,7 @@ struct npc_snobold_vassal : public ScriptedAI
|
||||
}
|
||||
else
|
||||
{
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
_events.CancelEvent(EVENT_CHECK_MOUNT);
|
||||
_events.CancelEvent(EVENT_FIRE_BOMB);
|
||||
me->AttackStop();
|
||||
@@ -743,7 +743,7 @@ struct boss_jormungarAI : public boss_northrend_beastsAI
|
||||
DoCastSelf(SPELL_GROUND_VISUAL_0, true);
|
||||
events.SetPhase(PHASE_SUBMERGED);
|
||||
events.ScheduleEvent(EVENT_EMERGE, 5s, 0, PHASE_SUBMERGED);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -755,7 +755,7 @@ struct boss_jormungarAI : public boss_northrend_beastsAI
|
||||
events.SetPhase(PHASE_SUBMERGED);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
events.ScheduleEvent(EVENT_EMERGE, 6s, 0, PHASE_SUBMERGED);
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(0, ToCCommonLoc[1].GetPositionX() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionY() + frand(-40.0f, 40.0f), ToCCommonLoc[1].GetPositionZ() + me->GetCollisionHeight());
|
||||
}
|
||||
@@ -768,7 +768,7 @@ struct boss_jormungarAI : public boss_northrend_beastsAI
|
||||
me->RemoveAurasDueToSpell(SPELL_GROUND_VISUAL_0);
|
||||
DoCastSelf(SPELL_EMERGE);
|
||||
DoCastAOE(SPELL_HATE_TO_ZERO, true);
|
||||
me->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
AttackStart(target);
|
||||
|
||||
+3
-3
@@ -242,8 +242,8 @@ struct boss_twin_baseAI : public BossAI
|
||||
{
|
||||
if (!pSister->IsAlive())
|
||||
{
|
||||
me->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->AddDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
me->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
pSister->SetDynamicFlag(UNIT_DYNFLAG_LOOTABLE);
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
HandleRemoveAuras();
|
||||
@@ -556,7 +556,7 @@ struct npc_unleashed_ballAI : public ScriptedAI
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->AddUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE));
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetCanFly(true);
|
||||
|
||||
@@ -204,7 +204,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(SPELL_ARCANE_FIELD);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ struct npc_sylvanas_fos : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -168,7 +168,7 @@ struct npc_jaina_fos: public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
@@ -381,12 +381,12 @@ class npc_jaina_or_sylvanas_intro_hor : public CreatureScript
|
||||
case 0:
|
||||
CloseGossipMenuFor(player);
|
||||
_events.ScheduleEvent(EVENT_START_INTRO, 1s);
|
||||
me->RemoveNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
case 1:
|
||||
CloseGossipMenuFor(player);
|
||||
_events.ScheduleEvent(EVENT_SKIP_INTRO, 1s);
|
||||
me->RemoveNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -401,7 +401,7 @@ class npc_jaina_or_sylvanas_intro_hor : public CreatureScript
|
||||
_utherGUID.Clear();
|
||||
_lichkingGUID.Clear();
|
||||
|
||||
me->RemoveNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
_events.ScheduleEvent(EVENT_WALK_INTRO1, 3s);
|
||||
}
|
||||
@@ -434,7 +434,7 @@ class npc_jaina_or_sylvanas_intro_hor : public CreatureScript
|
||||
Talk(SAY_JAINA_INTRO_2);
|
||||
else
|
||||
Talk(SAY_SYLVANAS_INTRO_2);
|
||||
me->AddNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
case EVENT_START_INTRO:
|
||||
if (Creature* korelnOrLoralen = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_KORELN_LORALEN)))
|
||||
@@ -965,7 +965,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
me->RemoveAurasDueToSpell(SPELL_JAINA_ICE_BARRIER);
|
||||
else
|
||||
me->RemoveAurasDueToSpell(SPELL_SYLVANAS_CLOAK_OF_DARKNESS);
|
||||
me->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->SetHealth(JAINA_SYLVANAS_MAX_HEALTH);
|
||||
me->SetFacingTo(SylvanasShadowThroneDoorPosition.GetOrientation());
|
||||
break;
|
||||
@@ -1012,7 +1012,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
lichking->AI()->AttackStart(me);
|
||||
}
|
||||
me->SetHealth(JAINA_SYLVANAS_MAX_HEALTH);
|
||||
me->RemoveNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
case EVENT_ESCAPE_1:
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING_ESCAPE)))
|
||||
@@ -1037,7 +1037,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_THE_LICH_KING_ESCAPE)))
|
||||
{
|
||||
lichking->SetReactState(REACT_PASSIVE);
|
||||
lichking->AddUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
lichking->SetUnitFlag(UNIT_FLAG_PACIFIED);
|
||||
}
|
||||
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_3, 1500ms);
|
||||
@@ -1155,7 +1155,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
else
|
||||
Talk(SAY_SYLVANAS_ESCAPE_9);
|
||||
DoCast(me, SPELL_CREDIT_ESCAPING_ARTHAS);
|
||||
me->AddNpcFlag(NPCFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER));
|
||||
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+2
-2
@@ -321,7 +321,7 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
bunny->CastSpell(bunny, SPELL_START_HALLS_OF_REFLECTION_QUEST_AE, true);
|
||||
|
||||
if (Creature* korelnOrLoralen = instance->GetCreature(KorelnOrLoralenGUID))
|
||||
korelnOrLoralen->AddNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
korelnOrLoralen->SetNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
|
||||
HandleGameObject(EntranceDoorGUID, true);
|
||||
HandleGameObject(ImpenetrableDoorGUID, true);
|
||||
@@ -344,7 +344,7 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
break;
|
||||
case DONE:
|
||||
if (GameObject* chest = instance->GetGameObject(CaptainsChestGUID))
|
||||
chest->RemoveFlag(GameObjectFlags(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN));
|
||||
chest->RemoveFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
|
||||
DoUseDoorOrButton(CaveInGUID, 15);
|
||||
|
||||
|
||||
@@ -318,7 +318,7 @@ struct boss_krick : public ScriptedAI
|
||||
Initialize();
|
||||
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
|
||||
@@ -147,7 +147,7 @@ struct boss_tyrannus : public BossAI
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_NONE);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
instance->SetBossState(DATA_TYRANNUS, NOT_STARTED);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ struct boss_rimefang : public ScriptedAI
|
||||
Initialize();
|
||||
me->SetCanFly(true);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
|
||||
@@ -357,7 +357,7 @@ struct go_gundrak_altar : public GameObjectAI
|
||||
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
instance->SetData(DATA_STATUE_ACTIVATE, me->GetEntry());
|
||||
|
||||
@@ -528,7 +528,7 @@ struct BloodPrincesBossAI : public BossAI
|
||||
_isEmpowered = false;
|
||||
if (Creature* controller = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_BLOOD_PRINCES_CONTROL)))
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
controller->AI()->SetData(DATA_PRINCE_EVADE, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ struct boss_deathbringer_saurfang : public BossAI
|
||||
_dead = true;
|
||||
_JustDied();
|
||||
_EnterEvadeMode();
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetImmuneToPC(true);
|
||||
me->RemoveAurasOnEvade();
|
||||
DoCastAOE(SPELL_REMOVE_MARKS_OF_THE_FALLEN_CHAMPION);
|
||||
@@ -729,7 +729,7 @@ struct npc_high_overlord_saurfang_icc : public ScriptedAI
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_DEATHBRINGER_SAURFANG)))
|
||||
{
|
||||
deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); // for the packet logs.
|
||||
deathbringer->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
deathbringer->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
deathbringer->SetEmoteState(EMOTE_STATE_DROWNED);
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_OUTRO_HORDE_5, 1s); // move
|
||||
|
||||
@@ -644,7 +644,7 @@ struct npc_cult_fanatic : public ScriptedAI
|
||||
DoCastSelf(SPELL_PERMANENT_FEIGN_DEATH);
|
||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS);
|
||||
DoCastSelf(SPELL_FULL_HEAL, true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
})
|
||||
.Schedule(Seconds(6), [this](TaskContext /*context*/)
|
||||
{
|
||||
@@ -735,7 +735,7 @@ struct npc_cult_adherent : public ScriptedAI
|
||||
DoCastSelf(SPELL_PERMANENT_FEIGN_DEATH);
|
||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS);
|
||||
DoCastSelf(SPELL_FULL_HEAL, true);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
})
|
||||
.Schedule(Seconds(6), [this](TaskContext /*context*/)
|
||||
{
|
||||
|
||||
@@ -325,7 +325,7 @@ struct boss_sindragosa : public BossAI
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetSpeedRate(MOVE_FLIGHT, 4.0f);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
Milliseconds moveTime = Milliseconds(uint64(me->GetExactDist(&SindragosaFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f)));
|
||||
me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SindragosaLandPos), me->m_Events.CalculateTime(moveTime + 250ms));
|
||||
me->GetMotionMaster()->MovePoint(POINT_FROSTWYRM_FLY_IN, SindragosaFlyPos);
|
||||
@@ -695,7 +695,7 @@ struct npc_spinestalker : public ScriptedAI
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetSpeedRate(MOVE_FLIGHT, 2.0f);
|
||||
me->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
Milliseconds moveTime = Milliseconds(uint64(me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f)));
|
||||
me->m_Events.AddEvent(new FrostwyrmLandEvent(*me, SpinestalkerLandPos), me->m_Events.CalculateTime(moveTime + 250ms));
|
||||
me->SetDefaultMovementType(IDLE_MOTION_TYPE);
|
||||
|
||||
@@ -456,7 +456,7 @@ struct boss_sister_svalna : public BossAI
|
||||
CastSpellExtraArgs args;
|
||||
args.AddSpellBP0(1);
|
||||
summon->CastSpell(target, VEHICLE_SPELL_RIDE_HARDCODED, args);
|
||||
summon->AddUnitFlag2(UNIT_FLAG2_INTERACT_WHILE_HOSTILE);
|
||||
summon->SetUnitFlag2(UNIT_FLAG2_INTERACT_WHILE_HOSTILE);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -1714,7 +1714,7 @@ struct npc_terenas_menethil : public ScriptedAI
|
||||
damage = me->GetHealth() - 1;
|
||||
if (!me->HasAura(SPELL_TERENAS_LOSES_INSIDE) && !IsHeroic())
|
||||
{
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
DoCast(SPELL_TERENAS_LOSES_INSIDE);
|
||||
_events.ScheduleEvent(EVENT_TELEPORT_BACK, 1s);
|
||||
if (Creature* warden = me->FindNearestCreature(NPC_SPIRIT_WARDEN, 20.0f))
|
||||
@@ -1775,7 +1775,7 @@ struct npc_terenas_menethil : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
case EVENT_DESTROY_SOUL:
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
if (Creature* warden = me->FindNearestCreature(NPC_SPIRIT_WARDEN, 20.0f))
|
||||
warden->CastSpell(nullptr, SPELL_DESTROY_SOUL, TRIGGERED_NONE);
|
||||
DoCast(SPELL_TERENAS_LOSES_INSIDE);
|
||||
@@ -2529,7 +2529,7 @@ class spell_the_lich_king_vile_spirit_damage_target_search : public SpellScript
|
||||
summoner->GetAI()->SetData(DATA_VILE, 1);
|
||||
GetCaster()->CastSpell(nullptr, SPELL_SPIRIT_BURST, true);
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon(3s);
|
||||
GetCaster()->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
GetCaster()->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -380,7 +380,7 @@ struct boss_valithria_dreamwalker : public ScriptedAI
|
||||
DoCastSelf(SPELL_REPUTATION_BOSS_KILL, true);
|
||||
// this display id was found in sniff instead of the one on aura
|
||||
me->SetDisplayId(11686);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->DespawnOrUnsummon(4s);
|
||||
if (Creature* trigger = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_VALITHRIA_TRIGGER)))
|
||||
Unit::Kill(me, trigger);
|
||||
|
||||
@@ -754,7 +754,7 @@ struct npc_icc_orb_controller : public ScriptedAI
|
||||
UpdateValidGuids();
|
||||
ScheduleVisualChannel(true);
|
||||
if (GameObject* orb = me->FindNearestGameObject(GO_EMPOWERING_BLOOD_ORB, 5.0f))
|
||||
orb->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
orb->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1129,7 +1129,7 @@ struct go_empowering_blood_orb : public GameObjectAI
|
||||
|
||||
void HandleObjectUse()
|
||||
{
|
||||
me->AddFlag(GO_FLAG_IN_USE);
|
||||
me->SetFlag(GO_FLAG_IN_USE);
|
||||
me->SetGoAnimProgress(255);
|
||||
me->SetGoState(GO_STATE_DESTROYED);
|
||||
if (Creature* trigger = ObjectAccessor::GetCreature(*me, _triggerGuid))
|
||||
@@ -1310,7 +1310,7 @@ class spell_icc_stoneform : public AuraScript
|
||||
if (Creature* target = GetTarget()->ToCreature())
|
||||
{
|
||||
target->SetReactState(REACT_PASSIVE);
|
||||
target->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
target->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
target->SetImmuneToPC(true);
|
||||
target->SetEmoteState(EMOTE_STATE_CUSTOM_SPELL_02);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
else
|
||||
{
|
||||
go->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
@@ -647,7 +647,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case GO_CACHE_OF_THE_DREAMWALKER_25H:
|
||||
if (Creature* valithria = instance->GetCreature(ValithriaDreamwalkerGUID))
|
||||
go->SetLootRecipient(valithria->GetLootRecipient(), valithria->GetLootRecipientGroup());
|
||||
go->RemoveFlag(GameObjectFlags(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN));
|
||||
go->RemoveFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
break;
|
||||
case GO_ARTHAS_PLATFORM:
|
||||
ArthasPlatformGUID = go->GetGUID();
|
||||
@@ -887,7 +887,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
SetTeleporterState(teleporter, true);
|
||||
|
||||
if (GameObject* loot = instance->GetGameObject(GunshipArmoryGUID))
|
||||
loot->RemoveFlag(GameObjectFlags(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN));
|
||||
loot->RemoveFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
}
|
||||
else if (state == FAIL)
|
||||
Events.ScheduleEvent(EVENT_RESPAWN_GUNSHIP, 30s);
|
||||
@@ -901,7 +901,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
if (Creature* deathbringer = instance->GetCreature(DeathbringerSaurfangGUID))
|
||||
loot->SetLootRecipient(deathbringer->GetLootRecipient(), deathbringer->GetLootRecipientGroup());
|
||||
loot->RemoveFlag(GameObjectFlags(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN));
|
||||
loot->RemoveFlag(GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
}
|
||||
|
||||
if (GameObject* teleporter = instance->GetGameObject(TeleporterUpperSpireGUID))
|
||||
|
||||
@@ -223,7 +223,7 @@ struct boss_kelthuzad : public BossAI
|
||||
return;
|
||||
_Reset();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetImmuneToPC(true);
|
||||
_skeletonCount = 0;
|
||||
_bansheeCount = 0;
|
||||
|
||||
@@ -233,7 +233,7 @@ struct boss_noth : public BossAI
|
||||
case EVENT_BALCONY:
|
||||
events.SetPhase(PHASE_BALCONY);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AddUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
|
||||
me->AttackStop();
|
||||
me->StopMoving();
|
||||
me->RemoveAllAuras();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user