mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Core: Fix warnings and random changes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user