*Some minor fix

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2009-02-11 19:06:54 +01:00
parent a886693c01
commit 46078aeec9
3 changed files with 38 additions and 37 deletions

View File

@@ -158,7 +158,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
AttackLoc[i] = AttackArea[Faction][i];
}
Creature* pCreature = m_creature->SummonCreature(entry, SpawnLoc[0], SpawnLoc[1], SpawnLoc[2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
Creature* pCreature = m_creature->SummonCreature(entry, SpawnLoc[0], SpawnLoc[1], SpawnLoc[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 120000);
if(pCreature)
{
// Increment Enemy Count to be used in World States and instance script
@@ -167,6 +167,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
pCreature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
pCreature->GetMotionMaster()->MovePoint(0, AttackLoc[0],AttackLoc[1],AttackLoc[2]);
pCreature->AddThreat(m_creature, 0.0f);
pCreature->setActive(true);
DoZoneInCombat(pCreature);
// Check if creature is a boss.

View File

@@ -118,6 +118,7 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
DoScriptText(SAY_AGGRO, m_creature);
AddsAttack();
DoZoneInCombat();
}
void KilledUnit(Unit* victim)
@@ -251,8 +252,10 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
{
Temp = Unit::GetUnit((*m_creature),AddGUID[i]);
if (Temp && Temp->isAlive())
{
((Creature*)Temp)->AI()->AttackStart(m_creature->getVictim());
else
DoZoneInCombat(Temp);
}else
EnterEvadeMode();
}
}

View File

@@ -50,7 +50,7 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
uint32 Fly2_Timer;
uint32 Beserk_Timer;
uint32 phase;
bool landoff;
bool IsInFly;
uint32 land_Timer;
void Reset()
@@ -60,13 +60,13 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
Blizzard_Timer = 20000;
Fly_Timer = 45000;
Icebolt_Timer = 4000;
land_Timer = 2000;
land_Timer = 0;
Beserk_Timer = 0;
phase = 1;
Icebolt_Count = 0;
landoff = false;
IsInFly = false;
//m_creature->ApplySpellMod(SPELL_FROST_AURA, SPELLMOD_DURATION, -1);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
}
void Aggro(Unit *who)
@@ -105,16 +105,14 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
if(Fly_Timer < diff)
{
phase = 2;
m_creature->InterruptNonMeleeSpells(false);
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
(*m_creature).GetMotionMaster()->Clear(false);
(*m_creature).GetMotionMaster()->MoveIdle();
DoCast(m_creature,11010);
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveIdle();
m_creature->SetHover(true);
DoCast(m_creature,18430);
Icebolt_Timer = 4000;
Icebolt_Count = 0;
landoff = false;
IsInFly = true;
}else Fly_Timer -= diff;
}
}
@@ -124,36 +122,35 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
if(Icebolt_Timer < diff && Icebolt_Count < 5)
{
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
{
DoCast(target,SPELL_ICEBOLT);
Icebolt_Count ++;
++Icebolt_Count;
error_log("Count incremented");
}
FrostBreath_Timer = 6000;
Icebolt_Timer = 4000;
}else Icebolt_Timer -= diff;
if(Icebolt_Count == 5 && !landoff)
{
if(FrostBreath_Timer < diff )
{
DoScriptText(EMOTE_BREATH, m_creature);
DoCast(m_creature->getVictim(),SPELL_FROST_BREATH);
land_Timer = 2000;
landoff = true;
FrostBreath_Timer = 6000;
}else FrostBreath_Timer -= diff;
}
if(landoff)
{
if(land_Timer < diff)
{
phase = 1;
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
m_creature->SetHover(false);
(*m_creature).GetMotionMaster()->Clear(false);
(*m_creature).GetMotionMaster()->MoveChase(m_creature->getVictim());
Fly_Timer = 67000;
}else land_Timer -= diff;
}
if(Icebolt_Count == 5 && IsInFly && FrostBreath_Timer < diff )
{
DoScriptText(EMOTE_BREATH, m_creature);
DoCast(m_creature->getVictim(),SPELL_FROST_BREATH);
land_Timer = 2000;
IsInFly = false;
FrostBreath_Timer = 6000;
}else FrostBreath_Timer -= diff;
if(!IsInFly && land_Timer < diff)
{
phase = 1;
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT);
m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
m_creature->SetHover(true);
land_Timer = 0;
Fly_Timer = 67000;
}else land_Timer -= diff;
}
if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 10)