diff options
4 files changed, 22 insertions, 19 deletions
diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp index d4b2b7a7f09..b8864fe6506 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp @@ -211,16 +211,20 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI if(SpoutAnimTimer<diff) { DoCast(m_creature,SPELL_SPOUT_ANIM,true); - SpoutAnimTimer = 1000; - }else SpoutAnimTimer-=diff; - - std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList(); - for(std::list<HostilReference*>::iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr) - { - Unit *target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); - if(target && target->GetTypeId() == TYPEID_PLAYER && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,target) && m_creature->GetDistance(target) <= SPOUT_DIST && !target->IsInWater()) - DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water - } + SpoutAnimTimer = 1000; + }else SpoutAnimTimer-=diff; + + Map *map = m_creature->GetMap(); + if (map->IsDungeon() && pInstance->GetData(DATA_THELURKERBELOWEVENT) == IN_PROGRESS) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + { + Player *target = i->getSource(); + if(target->isAlive() && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,target) && m_creature->GetDistance(target) <= SPOUT_DIST && !target->IsInWater()) + DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water + } + } } void StartRotate(Unit* victim) diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp index a00bbae283c..8255893763e 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/boss_terestian_illhoof.cpp @@ -272,7 +272,8 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI if(SummonKilrek && Kilrek) { Kilrek->Respawn(); - Kilrek->AI()->AttackStart(m_creature->getVictim()); + if(Kilrek->AI()) + Kilrek->AI()->AttackStart(m_creature->getVictim()); SummonKilrek = false; } diff --git a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp index 3eaaf773629..433cb691f2e 100644 --- a/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp +++ b/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_alar.cpp @@ -111,11 +111,12 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI m_creature->SetDisplayId(m_creature->GetNativeDisplayId()); m_creature->SetSpeed(MOVE_RUN, DefaultMoveSpeedRate); - m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); - m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); + //m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); + //m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); m_creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true); m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_creature->setActive(false); } void Aggro(Unit *who) @@ -125,6 +126,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); // after enterevademode will be set walk movement DoZoneInCombat(); + m_creature->setActive(true); } void JustDied(Unit *victim) @@ -136,13 +138,8 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI void JustSummoned(Creature *summon) { if(summon->GetEntry() == CREATURE_EMBER_OF_ALAR) - { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0)) - { summon->AI()->AttackStart(target); - summon->SetInCombatWith(target); - } - } } void MoveInLineOfSight(Unit *who) {} @@ -405,7 +402,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI else { Unit *target = NULL; - if(Phase1 && (target = m_creature->SelectNearbyTarget()) && m_creature->IsHostileTo(target)) // core bug, 1620 faction bugged + if(Phase1 && (target = m_creature->SelectNearestTarget(5))) m_creature->AI()->AttackStart(target); else { diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 03eeecb3e10..226d2e97ebb 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1643,6 +1643,7 @@ void Creature::setDeathState(DeathState s) { SetUInt64Value (UNIT_FIELD_TARGET,0); // remove target selection in any cases (can be set at aura remove in Unit::setDeathState) SetUInt32Value(UNIT_NPC_FLAGS, 0); + setActive(false); if(!isPet() && GetCreatureInfo()->SkinLootId) if ( LootTemplates_Skinning.HaveLootFor(GetCreatureInfo()->SkinLootId) ) |
