Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2023-04-24 09:38:43 -06:00
committed by GitHub
27 changed files with 7015 additions and 27 deletions

View File

@@ -1243,7 +1243,7 @@ class spell_shadowblink : public SpellScript
return;
}
for (auto itr : spellPos)
for (auto& itr : spellPos)
{
float distTarget = target->GetDistance2d(itr.second.m_positionX, itr.second.m_positionY);
if (distTarget <= 30.f)

View File

@@ -248,7 +248,7 @@ struct boss_malchezaar : public BossAI
void EnfeebleResetHealth()
{
for (auto targets : _enfeebleTargets)
for (auto& targets : _enfeebleTargets)
{
if (Unit* target = ObjectAccessor::GetUnit(*me, targets.first))
{

View File

@@ -131,7 +131,7 @@ public:
if (!cobraList.empty())
{
for (auto cobras : cobraList)
for (auto& cobras : cobraList)
{
cobras->SetInCombatWithZone();
}

View File

@@ -101,7 +101,7 @@ struct npc_cameron : public ScriptedAI
Acore::Containers::RandomShuffle(MovePosPositions);
// first we break formation because children will need to move on their own now
for (auto guid : _childrenGUIDs)
for (auto& guid : _childrenGUIDs)
if (Creature* child = ObjectAccessor::GetCreature(*me, guid))
if (child->GetFormation())
child->GetFormation()->RemoveMember(child);
@@ -228,7 +228,7 @@ struct npc_cameron : public ScriptedAI
// If Formation was disbanded, remake.
if (!me->GetFormation()->IsFormed())
for (auto guid : _childrenGUIDs)
for (auto& guid : _childrenGUIDs)
if (Creature* child = ObjectAccessor::GetCreature(*me, guid))
child->SearchFormation();

View File

@@ -573,7 +573,7 @@ public:
if (_summonAddsTimer <= diff)
{
for (auto itr : shadowpriestSezzizAdds[_summmonAddsCount])
for (auto& itr : shadowpriestSezzizAdds[_summmonAddsCount])
{
if (Creature* add = me->SummonCreature(itr.first, itr.second, TEMPSUMMON_DEAD_DESPAWN, 10 * IN_MILLISECONDS))
{

View File

@@ -132,7 +132,7 @@ public:
me->CastSpell(me, SPELL_ARCANE_FIELD, true);
me->CastSpell(me, SPELL_DESPAWN_CRYSTAL_HANDLER, true);
for (auto itr : npcSummon)
for (auto& itr : npcSummon)
{
uint32 summonEntry;
Position summonPos;