mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
This commit is contained in:
@@ -151,7 +151,7 @@ void CasterAI::UpdateAI(uint32 diff)
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->EnsureVictim()->HasBreakableByDamageCrowdControlAura(me))
|
||||
if (me->GetVictim() && me->EnsureVictim()->HasBreakableByDamageCrowdControlAura(me))
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
return;
|
||||
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
return;
|
||||
|
||||
if (me->GetUInt64Value(UNIT_FIELD_TARGET) != me->EnsureVictim()->GetGUID())
|
||||
if (me->GetVictim() && me->GetUInt64Value(UNIT_FIELD_TARGET) != me->EnsureVictim()->GetGUID())
|
||||
me->SetTarget(me->EnsureVictim()->GetGUID());
|
||||
|
||||
if (phase == 1)
|
||||
|
||||
@@ -484,7 +484,7 @@ public:
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
else if (me->EnsureVictim()->GetTypeId() == TYPEID_PLAYER && me->EnsureVictim()->HealthBelowPct(10))
|
||||
else if (me->GetVictim() && me->EnsureVictim()->GetTypeId() == TYPEID_PLAYER && me->EnsureVictim()->HealthBelowPct(10))
|
||||
{
|
||||
me->EnsureVictim()->CastSpell(me->GetVictim(), 7267, true); // beg
|
||||
me->EnsureVictim()->RemoveGameObject(SPELL_DUEL_FLAG, true);
|
||||
@@ -832,7 +832,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
//ScriptedAI::UpdateAI(diff);
|
||||
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
Unit* target = (*itr)->getTarget();
|
||||
if (target
|
||||
&& target->GetTypeId() == TYPEID_PLAYER
|
||||
&& target->GetGUID() != me->EnsureVictim()->GetGUID()
|
||||
&& (!target->GetVictim() || target->GetGUID() != me->EnsureVictim()->GetGUID())
|
||||
&& target->GetPositionZ() > me->GetPositionZ() - 5
|
||||
&& !target->HasAura(AURA_SPECTRAL_EXHAUSTION))
|
||||
{
|
||||
|
||||
@@ -156,9 +156,12 @@ class boss_ayamiss : public CreatureScript
|
||||
_phase = PHASE_GROUND;
|
||||
SetCombatMovement(true);
|
||||
me->SetCanFly(false);
|
||||
Position VictimPos;
|
||||
me->EnsureVictim()->GetPosition(&VictimPos);
|
||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, VictimPos);
|
||||
if (me->GetVictim())
|
||||
{
|
||||
Position VictimPos;
|
||||
me->EnsureVictim()->GetPosition(&VictimPos);
|
||||
me->GetMotionMaster()->MovePoint(POINT_GROUND, VictimPos);
|
||||
}
|
||||
DoResetThreat();
|
||||
events.ScheduleEvent(EVENT_LASH, urand(5000, 8000));
|
||||
events.ScheduleEvent(EVENT_TRASH, urand(3000, 6000));
|
||||
|
||||
@@ -272,7 +272,8 @@ class npc_glob_of_viscidus : public CreatureScript
|
||||
if (Viscidus->IsAlive() && Viscidus->GetHealthPct() < 5.0f)
|
||||
{
|
||||
Viscidus->SetVisible(true);
|
||||
Viscidus->EnsureVictim()->Kill(Viscidus);
|
||||
if (Viscidus->GetVictim())
|
||||
Viscidus->EnsureVictim()->Kill(Viscidus);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
{
|
||||
if (SendItemTimer <= diff)
|
||||
{
|
||||
if (me->EnsureVictim()->GetTypeId() == TYPEID_PLAYER)
|
||||
if (me->GetVictim() && me->EnsureVictim()->GetTypeId() == TYPEID_PLAYER)
|
||||
SendItem(me->GetVictim());
|
||||
SendItemTimer = 5000;
|
||||
} else SendItemTimer -= diff;
|
||||
|
||||
@@ -230,11 +230,14 @@ class boss_urom : public CreatureScript
|
||||
{
|
||||
if (arcaneExplosionTimer <= diff)
|
||||
{
|
||||
Position pos;
|
||||
me->EnsureVictim()->GetPosition(&pos);
|
||||
if (me->GetVictim())
|
||||
{
|
||||
Position pos;
|
||||
me->EnsureVictim()->GetPosition(&pos);
|
||||
|
||||
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
}
|
||||
me->SetWalk(true);
|
||||
|
||||
Talk(EMOTE_ARCANE_EXPLOSION);
|
||||
|
||||
@@ -199,7 +199,10 @@ class npc_flash_freeze : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim() || me->EnsureVictim()->HasAura(SPELL_BLOCK_OF_ICE) || me->EnsureVictim()->HasAura(SPELL_FLASH_FREEZE_HELPER))
|
||||
if (!UpdateVictim()
|
||||
|| !me->GetVictim()
|
||||
|| me->EnsureVictim()->HasAura(SPELL_BLOCK_OF_ICE)
|
||||
|| me->EnsureVictim()->HasAura(SPELL_FLASH_FREEZE_HELPER))
|
||||
return;
|
||||
|
||||
if (me->EnsureVictim()->GetGUID() != targetGUID || instance->GetBossState(BOSS_HODIR) != IN_PROGRESS)
|
||||
|
||||
@@ -2074,7 +2074,7 @@ public:
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
if (me->EnsureVictim()->GetTypeId() != TYPEID_PLAYER)
|
||||
|
||||
@@ -668,7 +668,7 @@ public:
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
if (!CheckedAggro)
|
||||
|
||||
@@ -626,7 +626,8 @@ public:
|
||||
{
|
||||
DoCastVictim(SPELL_TIDAL_SURGE);
|
||||
// Hacky way to do it - won't trigger elseways
|
||||
me->EnsureVictim()->CastSpell(me->GetVictim(), SPELL_TIDAL_SURGE_FREEZE, true);
|
||||
if (me->GetVictim())
|
||||
me->EnsureVictim()->CastSpell(me->GetVictim(), SPELL_TIDAL_SURGE_FREEZE, true);
|
||||
TidalSurge_Timer = 15000+rand()%5000;
|
||||
} else TidalSurge_Timer -= diff;
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
if (me->EnsureVictim()->GetGUID() != victimGUID)
|
||||
|
||||
@@ -93,7 +93,7 @@ class npc_warp_splinter_treant : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
{
|
||||
if (WarpGuid && check_Timer <= diff)
|
||||
{
|
||||
@@ -115,7 +115,7 @@ class npc_warp_splinter_treant : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->EnsureVictim()->GetGUID() != WarpGuid)
|
||||
if (me->EnsureVictim()->GetGUID() != WarpGuid)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -93,7 +93,7 @@ class npc_pet_hunter_snake_trap : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (!UpdateVictim() || !me->GetVictim())
|
||||
return;
|
||||
|
||||
if (me->EnsureVictim()->HasBreakableByDamageCrowdControlAura(me))
|
||||
|
||||
Reference in New Issue
Block a user