*Update script of heigan.
--HG-- branch : trunk
This commit is contained in:
@@ -29,20 +29,22 @@ EndScriptData */
|
|||||||
#define SAY_TAUNT RAND(-1533113,-1533114,-1533115,-1533116,-1533117)
|
#define SAY_TAUNT RAND(-1533113,-1533114,-1533115,-1533116,-1533117)
|
||||||
#define SAY_DEATH -1533118
|
#define SAY_DEATH -1533118
|
||||||
|
|
||||||
//Spells by boss
|
|
||||||
#define SPELL_WILT 23772
|
|
||||||
#define SPELL_FEAVER 29998
|
|
||||||
|
|
||||||
#define SPELL_SPELL_DISRUPTION 29310
|
#define SPELL_SPELL_DISRUPTION 29310
|
||||||
#define SPELL_DECREPIT_FEVER HEROIC(29998,55011)
|
#define SPELL_DECREPIT_FEVER HEROIC(29998,55011)
|
||||||
#define SPELL_PLAGUE_CLOUD 30122
|
#define SPELL_PLAGUE_CLOUD 29350
|
||||||
|
|
||||||
enum Events
|
enum Events
|
||||||
{
|
{
|
||||||
EVENT_DISRUPT = 1,
|
EVENT_DISRUPT = 1,
|
||||||
EVENT_FEVER,
|
EVENT_FEVER,
|
||||||
EVENT_CLOUD,
|
|
||||||
EVENT_ERUPT,
|
EVENT_ERUPT,
|
||||||
|
EVENT_PHASE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Phases
|
||||||
|
{
|
||||||
|
PHASE_FIGHT = 1,
|
||||||
|
PHASE_DANCE,
|
||||||
};
|
};
|
||||||
|
|
||||||
//Spell by eye stalks
|
//Spell by eye stalks
|
||||||
@@ -57,6 +59,9 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI
|
|||||||
|
|
||||||
EventMap events;
|
EventMap events;
|
||||||
ScriptedInstance *instance;
|
ScriptedInstance *instance;
|
||||||
|
uint32 eruptSection;
|
||||||
|
bool eruptDirection;
|
||||||
|
Phases phase;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -80,12 +85,33 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, me);
|
DoScriptText(SAY_AGGRO, me);
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
events.ScheduleEvent(EVENT_FEVER, 1200);
|
EnterPhase(PHASE_FIGHT);
|
||||||
events.ScheduleEvent(EVENT_CLOUD, 360000);
|
|
||||||
events.ScheduleEvent(EVENT_ERUPT, 3000);
|
|
||||||
instance->SetBossState(BOSS_HEIGAN, IN_PROGRESS);
|
instance->SetBossState(BOSS_HEIGAN, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EnterPhase(Phases newPhase)
|
||||||
|
{
|
||||||
|
phase = newPhase;
|
||||||
|
events.Reset();
|
||||||
|
eruptSection = 3;
|
||||||
|
if(phase == PHASE_FIGHT)
|
||||||
|
{
|
||||||
|
events.ScheduleEvent(EVENT_DISRUPT, 0);
|
||||||
|
events.ScheduleEvent(EVENT_FEVER, 20000);
|
||||||
|
events.ScheduleEvent(EVENT_PHASE, 85000);
|
||||||
|
events.ScheduleEvent(EVENT_ERUPT, 10000);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float x, y, z, o;
|
||||||
|
me->GetHomePosition(x, y, z, o);
|
||||||
|
me->NearTeleportTo(x, y, z, o);
|
||||||
|
DoCastAOE(SPELL_PLAGUE_CLOUD);
|
||||||
|
events.ScheduleEvent(EVENT_PHASE, 45000);
|
||||||
|
events.ScheduleEvent(EVENT_ERUPT, 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(!UpdateVictim())
|
if(!UpdateVictim())
|
||||||
@@ -98,21 +124,27 @@ struct TRINITY_DLL_DECL boss_heiganAI : public ScriptedAI
|
|||||||
switch(eventId)
|
switch(eventId)
|
||||||
{
|
{
|
||||||
case EVENT_DISRUPT:
|
case EVENT_DISRUPT:
|
||||||
events.ScheduleEvent(EVENT_DISRUPT, 1200);
|
DoCastAOE(SPELL_SPELL_DISRUPTION);
|
||||||
|
events.ScheduleEvent(EVENT_DISRUPT, 5000);
|
||||||
return;
|
return;
|
||||||
case EVENT_FEVER:
|
case EVENT_FEVER:
|
||||||
events.ScheduleEvent(EVENT_FEVER, 2000);
|
DoCastAOE(SPELL_DECREPIT_FEVER);
|
||||||
|
events.ScheduleEvent(EVENT_FEVER, 20000);
|
||||||
return;
|
return;
|
||||||
case EVENT_CLOUD:
|
case EVENT_PHASE:
|
||||||
events.ScheduleEvent(EVENT_CLOUD, 2000);
|
EnterPhase(phase == PHASE_FIGHT ? PHASE_DANCE : PHASE_FIGHT);
|
||||||
return;
|
return;
|
||||||
case EVENT_ERUPT:
|
case EVENT_ERUPT:
|
||||||
if(instance)
|
instance->SetData(DATA_HEIGAN_ERUPT, eruptSection);
|
||||||
{
|
|
||||||
uint32 section = rand()%4;
|
if(eruptSection == 0)
|
||||||
instance->SetData(DATA_HEIGAN_ERUPT, section);
|
eruptDirection = true;
|
||||||
}
|
else if(eruptSection == 3)
|
||||||
events.ScheduleEvent(EVENT_ERUPT, 2000);
|
eruptDirection = false;
|
||||||
|
|
||||||
|
eruptDirection ? ++eruptSection : --eruptSection;
|
||||||
|
|
||||||
|
events.ScheduleEvent(EVENT_ERUPT, phase == PHASE_FIGHT ? 10000 : 3000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -2297,7 +2297,8 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura
|
|||||||
ReSetTimer();
|
ReSetTimer();
|
||||||
//Containers for channeled spells have to be set
|
//Containers for channeled spells have to be set
|
||||||
//TODO:Apply this to all casted spells if needed
|
//TODO:Apply this to all casted spells if needed
|
||||||
if(m_IsTriggeredSpell && !IsChanneledSpell(m_spellInfo))
|
// Why check m_casttime? 29350: channelled triggers channelled
|
||||||
|
if(m_IsTriggeredSpell && (!IsChanneledSpell(m_spellInfo) || !m_casttime))
|
||||||
cast(true);
|
cast(true);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-2
@@ -13861,11 +13861,12 @@ void Unit::NearTeleportTo( float x, float y, float z, float orientation, bool ca
|
|||||||
DestroyForNearbyPlayers();
|
DestroyForNearbyPlayers();
|
||||||
|
|
||||||
GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation);
|
GetMap()->CreatureRelocation((Creature*)this, x, y, z, orientation);
|
||||||
|
ObjectAccessor::UpdateObjectVisibility(this);
|
||||||
|
|
||||||
//WorldPacket data;
|
//WorldPacket data;
|
||||||
// Work strange for many spells: triggered active mover set for targeted player to creature
|
// Work strange for many spells: triggered active mover set for targeted player to creature
|
||||||
//BuildTeleportAckMsg(&data, x, y, z, orientation);
|
//BuildTeleportAckMsg(&data, x, y, z, orientation);
|
||||||
BuildHeartBeatMsg(&data);
|
//BuildHeartBeatMsg(&data);
|
||||||
SendMessageToSet(&data, false);
|
//SendMessageToSet(&data, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user