Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Diff by Hundekuchen ( 16 years ago )
Index: scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp
===================================================================
--- scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp (revision 1696)
+++ scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp (working copy)
@@ -138,6 +138,8 @@
if (pSummoned->GetEntry() == NPC_WATER_GLOBULE)
{
+ pSummoned->setFaction(m_creature->getFaction());
+
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f);
}
@@ -154,7 +156,7 @@
{
if (!m_bEarthquake)
{
- DoCastSpellIfCan(m_creature->getVictim(), SPELL_EARTHQUAKE);
+ DoCastSpellIfCan(m_creature, SPELL_EARTHQUAKE);
m_bEarthquake = true;
m_uiEarthquake_Timer = 5000;
}
@@ -186,7 +188,7 @@
//m_uiTidalWave_Timer
if (m_uiTidalWave_Timer < uiDiff)
{
- DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIDAL_WAVE);
+ DoCastSpellIfCan(m_creature, SPELL_TIDAL_WAVE);
m_uiTidalWave_Timer = 20000;
}else m_uiTidalWave_Timer -= uiDiff;
@@ -247,49 +249,40 @@
{
mob_water_globuleAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); }
- // timers
- uint32 m_uiCheck_Timer;
-
void Reset()
{
- m_uiCheck_Timer = 1000;
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
void MoveInLineOfSight(Unit* pWho)
{
- if (!pWho || m_creature->getVictim())
+ if (!pWho || !m_creature->IsHostileTo(pWho) || (pWho->GetTypeId() == TYPEID_UNIT && ((Creature*)pWho)->isTotem()))
return;
- if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(pWho))
+ if (m_creature->IsWithinDistInMap(pWho, 2*CONTACT_DISTANCE))
{
- //no attack radius check - it attacks the first target that moves in his los
- pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
- AttackStart(pWho);
+ int32 damage = 4000;
+ m_creature->CastCustomSpell(m_creature,38237,&damage;,0,0,true);
+ //m_creature->SpellNonMeleeDamageLog(pWho, 37852, 4000+rand() 00);
+ //despawn
+ m_creature->ForcedDespawn();
+ return;
}
- }
- void UpdateAI(const uint32 uiDiff)
- {
- //Return since we have no target
- if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
- return;
-
- if (m_uiCheck_Timer < uiDiff)
+ if (pWho->isTargetableForAttack() && pWho->isInAccessablePlaceFor(m_creature))
{
- if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
+ if (pWho->GetTypeId() == TYPEID_PLAYER)
{
- m_creature->DealDamage(m_creature->getVictim(), 4000+rand() 00, NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_FROST, NULL, false);
-
- //despawn
- m_creature->ForcedDespawn();
- return;
+ //no attack radius check - it attacks the first target that moves in his los
+ pWho->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
+ AttackStart(pWho);
}
- m_uiCheck_Timer = 500;
- }else m_uiCheck_Timer -= uiDiff;
+ }
//do NOT deal any melee damage to the target.
}
+
+ void UpdateAI(const uint32 uiDiff){}
};
CreatureAI* GetAI_boss_morogrim_tidewalker(Creature* pCreature)
Revise this Paste