mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/AI: Remove unnecessary parameter from DoZoneInCombat after eb1972f
This commit is contained in:
@@ -58,7 +58,7 @@ void CreatureAI::Talk(uint8 id, WorldObject const* whisperTarget /*= nullptr*/)
|
||||
sCreatureTextMgr->SendChat(me, id, whisperTarget);
|
||||
}
|
||||
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/, float maxRangeToNearestTarget /* = 250.0f*/)
|
||||
void CreatureAI::DoZoneInCombat(Creature* creature /*= nullptr*/)
|
||||
{
|
||||
if (!creature)
|
||||
creature = me;
|
||||
|
||||
@@ -144,7 +144,7 @@ class TC_GAME_API CreatureAI : public UnitAI
|
||||
// Called at reaching home after evade
|
||||
virtual void JustReachedHome() { }
|
||||
|
||||
void DoZoneInCombat(Creature* creature = nullptr, float maxRangeToNearestTarget = 250.0f);
|
||||
void DoZoneInCombat(Creature* creature = nullptr);
|
||||
|
||||
// Called at text emote receive from player
|
||||
virtual void ReceiveEmote(Player* /*player*/, uint32 /*emoteId*/) { }
|
||||
|
||||
@@ -48,7 +48,7 @@ void SummonList::Despawn(Creature const* summon)
|
||||
storage_.remove(summon->GetGUID());
|
||||
}
|
||||
|
||||
void SummonList::DoZoneInCombat(uint32 entry, float maxRangeToNearestTarget)
|
||||
void SummonList::DoZoneInCombat(uint32 entry)
|
||||
{
|
||||
for (StorageType::iterator i = storage_.begin(); i != storage_.end();)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ void SummonList::DoZoneInCombat(uint32 entry, float maxRangeToNearestTarget)
|
||||
if (summon && summon->IsAIEnabled
|
||||
&& (!entry || summon->GetEntry() == entry))
|
||||
{
|
||||
summon->AI()->DoZoneInCombat(nullptr, maxRangeToNearestTarget);
|
||||
summon->AI()->DoZoneInCombat(nullptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
DoActionImpl(info, listCopy);
|
||||
}
|
||||
|
||||
void DoZoneInCombat(uint32 entry = 0, float maxRangeToNearestTarget = 250.0f);
|
||||
void DoZoneInCombat(uint32 entry = 0);
|
||||
void RemoveNotExisting();
|
||||
bool HasEntry(uint32 entry) const;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ void boss_horAI::DoAction(int32 actionId)
|
||||
case ACTION_ENTER_COMBAT: // called by InstanceScript when boss shall enter in combat.
|
||||
me->SetImmuneToAll(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoZoneInCombat(me, 150.0f);
|
||||
DoZoneInCombat(me);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1657,7 +1657,7 @@ class npc_phantom_hallucination : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
DoZoneInCombat(me, 150.0f);
|
||||
DoZoneInCombat(me);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason why) override
|
||||
@@ -2182,7 +2182,7 @@ struct npc_escape_event_trash : public ScriptedAI
|
||||
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
DoZoneInCombat(me, 0.0f);
|
||||
DoZoneInCombat(me);
|
||||
if (Creature* leader = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_ESCAPE_LEADER)))
|
||||
{
|
||||
me->SetImmuneToPC(false);
|
||||
|
||||
@@ -592,7 +592,7 @@ class instance_halls_of_reflection : public InstanceMapScript
|
||||
temp->CastSpell(temp, SPELL_SPIRIT_ACTIVATE, false);
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
temp->SetImmuneToAll(false);
|
||||
temp->AI()->DoZoneInCombat(temp, 100.00f);
|
||||
temp->AI()->DoZoneInCombat(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ class npc_faerlina_add : public CreatureScript
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (Creature* faerlina = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_FAERLINA)))
|
||||
faerlina->AI()->DoZoneInCombat(nullptr, 250.0f);
|
||||
faerlina->AI()->DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
summons.Summon(summon);
|
||||
summon->setActive(true);
|
||||
summon->SetFarVisible(true);
|
||||
summon->AI()->DoZoneInCombat(nullptr, 250.0f); // specify range to cover entire room - default 50yd is not enough
|
||||
summon->AI()->DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
@@ -189,7 +189,7 @@ class npc_dk_understudy : public CreatureScript
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
if (Creature* razuvious = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_RAZUVIOUS)))
|
||||
razuvious->AI()->DoZoneInCombat(nullptr, 250.0f);
|
||||
razuvious->AI()->DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
@@ -232,7 +232,7 @@ class npc_dk_understudy : public CreatureScript
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
if (Unit* charmer = ObjectAccessor::GetUnit(*me, _charmer))
|
||||
AddThreat(charmer, 100000.0f);
|
||||
DoZoneInCombat(nullptr, 250.0f);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
}
|
||||
private:
|
||||
|
||||
@@ -1610,7 +1610,7 @@ class npc_sif : public CreatureScript
|
||||
if (action == ACTION_START_HARD_MODE)
|
||||
{
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoZoneInCombat(me, 250.0f);
|
||||
DoZoneInCombat(me);
|
||||
Talk(SAY_SIF_EVENT);
|
||||
_events.Reset();
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT, 2000);
|
||||
|
||||
@@ -104,7 +104,7 @@ struct generic_boss_controllerAI : public BossAI
|
||||
if (IsInGhostForm)
|
||||
{
|
||||
// Call this here since ghosts aren't set in combat as they spawn.
|
||||
DoZoneInCombat(me, 50.0f);
|
||||
DoZoneInCombat(me);
|
||||
}
|
||||
else
|
||||
_Reset();
|
||||
|
||||
@@ -558,7 +558,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* moragg = GetCreature(DATA_MORAGG))
|
||||
{
|
||||
moragg->SetImmuneToAll(false);
|
||||
moragg->AI()->DoZoneInCombat(moragg, 200.0f);
|
||||
moragg->AI()->DoZoneInCombat(moragg);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -596,7 +596,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* erekem = GetCreature(DATA_EREKEM))
|
||||
{
|
||||
erekem->SetImmuneToAll(false);
|
||||
erekem->AI()->DoZoneInCombat(erekem, 200.0f);
|
||||
erekem->AI()->DoZoneInCombat(erekem);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -619,7 +619,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* ichoron = GetCreature(DATA_ICHORON))
|
||||
{
|
||||
ichoron->SetImmuneToAll(false);
|
||||
ichoron->AI()->DoZoneInCombat(ichoron, 200.0f);
|
||||
ichoron->AI()->DoZoneInCombat(ichoron);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -641,7 +641,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* lavanthor = GetCreature(DATA_LAVANTHOR))
|
||||
{
|
||||
lavanthor->SetImmuneToAll(false);
|
||||
lavanthor->AI()->DoZoneInCombat(lavanthor, 200.0f);
|
||||
lavanthor->AI()->DoZoneInCombat(lavanthor);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -668,7 +668,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* xevozz = GetCreature(DATA_XEVOZZ))
|
||||
{
|
||||
xevozz->SetImmuneToAll(false);
|
||||
xevozz->AI()->DoZoneInCombat(xevozz, 200.0f);
|
||||
xevozz->AI()->DoZoneInCombat(xevozz);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -694,7 +694,7 @@ class instance_violet_hold : public InstanceMapScript
|
||||
if (Creature* zuramat = GetCreature(DATA_ZURAMAT))
|
||||
{
|
||||
zuramat->SetImmuneToAll(false);
|
||||
zuramat->AI()->DoZoneInCombat(zuramat, 200.0f);
|
||||
zuramat->AI()->DoZoneInCombat(zuramat);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user