Scripts/Karazhan: Fixed some uninitialized variables
This commit is contained in:
@@ -75,8 +75,8 @@ public:
|
||||
{
|
||||
boss_moroesAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
AddId[i] = 0;
|
||||
memset(AddId, 0, sizeof(AddId));
|
||||
memset(AddGUID, 0, sizeof(AddGUID));
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
@@ -105,10 +105,8 @@ public:
|
||||
|
||||
Enrage = false;
|
||||
InVanish = false;
|
||||
if (me->GetHealth() > 0)
|
||||
{
|
||||
if (me->GetHealth())
|
||||
SpawnAdds();
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_MOROES, NOT_STARTED);
|
||||
@@ -193,10 +191,9 @@ public:
|
||||
bool isAddlistEmpty()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if (AddId[i] == 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -341,17 +338,10 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
uint64 MoroesGUID = instance->GetData64(DATA_MOROES);
|
||||
Creature* Moroes = (Unit::GetCreature((*me), MoroesGUID));
|
||||
if (Moroes)
|
||||
{
|
||||
if (Creature* Moroes = Unit::GetCreature(*me, instance->GetData64(DATA_MOROES)))
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
uint64 GUID = CAST_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i];
|
||||
if (GUID)
|
||||
if (uint64 GUID = CAST_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
GuestGUID[i] = GUID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Unit* SelectGuestTarget()
|
||||
|
||||
@@ -187,6 +187,7 @@ public:
|
||||
boss_malchezaarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(axes, 0, sizeof(axes));
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
@@ -218,7 +219,10 @@ public:
|
||||
positions.clear();
|
||||
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
|
||||
for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
|
||||
positions.push_back(&InfernalPoints[i]);
|
||||
|
||||
Reference in New Issue
Block a user