Core: Fix warnings and random changes

This commit is contained in:
Vincent-Michael
2013-08-21 18:46:52 +02:00
parent 62c7e309ee
commit 1e89ae1960
3 changed files with 14 additions and 21 deletions

View File

@@ -619,7 +619,7 @@ public:
for (uint8 i = 0; i < 3; ++i)
{
if (quest->RequiredNpcOrGo[i] != me->GetEntry())
if (uint32(quest->RequiredNpcOrGo[i]) != me->GetEntry())
continue;
if (itr->second.CreatureOrGOCount[i] != 0)

View File

@@ -1802,16 +1802,12 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::Reset()
if (instance)
instance->SetBossState(DATA_ILLIDAN_STORMRAGE, NOT_STARTED);
if (AkamaGUID)
if (Creature* akama = ObjectAccessor::GetCreature(*me, AkamaGUID))
{
if (Creature* akama = ObjectAccessor::GetCreature(*me, AkamaGUID))
{
if (!akama->IsAlive())
akama->Respawn();
else
akama->AI()->EnterEvadeMode();
}
AkamaGUID = 0;
if (!akama->IsAlive())
akama->Respawn();
else
akama->AI()->EnterEvadeMode();
}
MaievGUID = 0;

View File

@@ -443,7 +443,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
if (Creature* Shade = Unit::GetCreature((*me), ShadeGUID))
if (Creature* Shade = ObjectAccessor::GetCreature(*me, ShadeGUID))
if (Shade->IsAlive())
CAST_AI(boss_shade_of_akama::boss_shade_of_akamaAI, Shade->AI())->HasKilledAkama = true;
me->GetMotionMaster()->Clear(true);
@@ -452,17 +452,14 @@ public:
void SpellHit(Unit* /*caster*/, SpellInfo const* spell) OVERRIDE
{
if (!StartCombat)
if (spell->Id == SPELL_THREAT && !StartCombat)
{
if (spell->Id == SPELL_THREAT)
{
me->ClearUnitState(UNIT_STATE_ROOT);
me->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
if (Creature* Shade = Unit::GetCreature((*me), ShadeGUID))
Shade->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
StartCombat = true;
}
me->ClearUnitState(UNIT_STATE_ROOT);
me->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
if (Creature* Shade = ObjectAccessor::GetCreature(*me, ShadeGUID))
Shade->RemoveAura(SPELL_AKAMA_SOUL_CHANNEL);
StartCombat = true;
}
}