mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Scripts/Misc: Fix some warnings vs2014 ctp (no support)
This commit is contained in:
@@ -212,13 +212,12 @@ public:
|
||||
std::list<Creature*> creatureList;
|
||||
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f);
|
||||
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
|
||||
if (Creature* creatureList = *itr)
|
||||
if (Creature* creature = *itr)
|
||||
{
|
||||
if (!creatureList->IsAlive())
|
||||
{
|
||||
creatureList->Respawn();
|
||||
}
|
||||
creatureList->AI()->SetData(1, 1);
|
||||
if (!creature->IsAlive())
|
||||
creature->Respawn();
|
||||
|
||||
creature->AI()->SetData(1, 1);
|
||||
}
|
||||
me->AddAura(SPELL_ENCAGED_EMBERSEER, me);
|
||||
instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED);
|
||||
@@ -231,8 +230,8 @@ public:
|
||||
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f);
|
||||
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
|
||||
{
|
||||
if (Creature* creatureList = *itr)
|
||||
creatureList->AI()->SetData(1, 1);
|
||||
if (Creature* creature = *itr)
|
||||
creature->AI()->SetData(1, 1);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32000);
|
||||
break;
|
||||
@@ -355,9 +354,7 @@ public:
|
||||
}
|
||||
|
||||
if (data == 1 && value == 2)
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -371,8 +368,8 @@ public:
|
||||
GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 60.0f);
|
||||
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
|
||||
{
|
||||
if (Creature* creatureList = *itr)
|
||||
creatureList->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim());
|
||||
if (Creature* creature = *itr)
|
||||
creature->SetInCombatWithZone(); // AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
|
||||
_events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000));
|
||||
|
||||
@@ -410,24 +410,24 @@ public:
|
||||
|
||||
void Dragonspireroomstore()
|
||||
{
|
||||
uint8 creaturecount;
|
||||
uint8 creatureCount;
|
||||
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
{
|
||||
creaturecount = 0;
|
||||
creatureCount = 0;
|
||||
|
||||
if (GameObject* rune = instance->GetGameObject(go_roomrunes[i]))
|
||||
{
|
||||
for (uint8 ii = 0; ii < 3; ++ii)
|
||||
for (uint8 j = 0; j < 3; ++j)
|
||||
{
|
||||
std::list<Creature*> creatureList;
|
||||
GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[ii], 15.0f);
|
||||
GetCreatureListWithEntryInGrid(creatureList, rune, DragonspireMobs[j], 15.0f);
|
||||
for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
|
||||
{
|
||||
if (Creature* creatureList = *itr)
|
||||
if (Creature* creature = *itr)
|
||||
{
|
||||
runecreaturelist[i] [creaturecount] = creatureList->GetGUID();
|
||||
++creaturecount;
|
||||
runecreaturelist[i][creatureCount] = creature->GetGUID();
|
||||
++creatureCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ public:
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_GET_CHANNELERS, 3000);
|
||||
_enteredCombat = false;
|
||||
_bloodmage.clear();
|
||||
_deathshaper.clear();
|
||||
_bloodmageList.clear();
|
||||
_deathshaperList.clear();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override { }
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
if (!BloodMageList.empty())
|
||||
for (std::list<Creature*>::const_iterator itr = BloodMageList.begin(); itr != BloodMageList.end(); ++itr)
|
||||
{
|
||||
_bloodmage.push_back((*itr)->GetGUID());
|
||||
_bloodmageList.push_back((*itr)->GetGUID());
|
||||
if ((*itr)->isDead())
|
||||
(*itr)->Respawn();
|
||||
}
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
if (!DeathShaperList.empty())
|
||||
for (std::list<Creature*>::const_iterator itr = DeathShaperList.begin(); itr != DeathShaperList.end(); ++itr)
|
||||
{
|
||||
_deathshaper.push_back((*itr)->GetGUID());
|
||||
_deathshaperList.push_back((*itr)->GetGUID());
|
||||
if ((*itr)->isDead())
|
||||
(*itr)->Respawn();
|
||||
}
|
||||
@@ -156,11 +156,11 @@ public:
|
||||
}
|
||||
case EVENT_SET_CHANNELERS:
|
||||
{
|
||||
for (uint64 guid : _bloodmage)
|
||||
for (uint64 guid : _bloodmageList)
|
||||
if (Creature* bloodmage = ObjectAccessor::GetCreature(*me, guid))
|
||||
bloodmage->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
|
||||
|
||||
for (uint64 guid : _deathshaper)
|
||||
for (uint64 guid : _deathshaperList)
|
||||
if (Creature* deathshaper = ObjectAccessor::GetCreature(*me, guid))
|
||||
deathshaper->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
|
||||
|
||||
@@ -202,8 +202,8 @@ public:
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
EventMap _events;
|
||||
std::list<uint64> _bloodmage;
|
||||
std::list<uint64> _deathshaper;
|
||||
std::list<uint64> _bloodmageList;
|
||||
std::list<uint64> _deathshaperList;
|
||||
bool _enteredCombat;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user