Merge [SD2]
r1266 Added support for quest 4966 r1267 Remove obsolete ScriptedAI functions, no longer used. Clean up code. Patch by DasBlub --HG-- branch : trunk
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
// Spell summary for ScriptedAI::SelectSpell
|
||||
struct TSpellSummary {
|
||||
struct TSpellSummary
|
||||
{
|
||||
uint8 Targets; // set of enum SelectTarget
|
||||
uint8 Effects; // set of enum SelectEffect
|
||||
} *SpellSummary;
|
||||
@@ -84,43 +85,41 @@ ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(cr
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
void ScriptedAI::AttackStartNoMove(Unit* who)
|
||||
void ScriptedAI::AttackStartNoMove(Unit* pWho)
|
||||
{
|
||||
if (!who)
|
||||
if (!pWho)
|
||||
return;
|
||||
|
||||
if(m_creature->Attack(who, false))
|
||||
DoStartNoMovement(who);
|
||||
if(m_creature->Attack(pWho, false))
|
||||
DoStartNoMovement(pWho);
|
||||
}
|
||||
|
||||
void ScriptedAI::UpdateAI(const uint32 diff)
|
||||
void ScriptedAI::UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
//Check if we have a current target
|
||||
if (UpdateVictim())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (m_creature->isAttackReady())
|
||||
{
|
||||
if (m_creature->isAttackReady())
|
||||
//If we are within range melee the target
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
//If we are within range melee the target
|
||||
if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
|
||||
{
|
||||
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
||||
m_creature->resetAttackTimer();
|
||||
}
|
||||
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
||||
m_creature->resetAttackTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptedAI::DoStartMovement(Unit* victim, float distance, float angle)
|
||||
void ScriptedAI::DoStartMovement(Unit* pVictim, float fDistance, float fAngle)
|
||||
{
|
||||
if (!victim)
|
||||
return;
|
||||
|
||||
m_creature->GetMotionMaster()->MoveChase(victim, distance, angle);
|
||||
if (pVictim)
|
||||
m_creature->GetMotionMaster()->MoveChase(pVictim, fDistance, fAngle);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoStartNoMovement(Unit* victim)
|
||||
void ScriptedAI::DoStartNoMovement(Unit* pVictim)
|
||||
{
|
||||
if (!victim)
|
||||
if (!pVictim)
|
||||
return;
|
||||
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
@@ -128,50 +127,17 @@ void ScriptedAI::DoStartNoMovement(Unit* victim)
|
||||
|
||||
void ScriptedAI::DoStopAttack()
|
||||
{
|
||||
if (m_creature->getVictim() != NULL)
|
||||
{
|
||||
if (m_creature->getVictim())
|
||||
m_creature->AttackStop();
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptedAI::DoCastSpell(Unit* who,SpellEntry const *spellInfo, bool triggered)
|
||||
void ScriptedAI::DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered)
|
||||
{
|
||||
if (!who || m_creature->IsNonMeleeSpellCasted(false))
|
||||
if (!pTarget || m_creature->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
m_creature->StopMoving();
|
||||
m_creature->CastSpell(who, spellInfo, triggered);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoSay(const char* text, uint32 language, Unit* target, bool SayEmote)
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
m_creature->MonsterSay(text, language, target->GetGUID());
|
||||
if(SayEmote)
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
}
|
||||
else m_creature->MonsterSay(text, language, 0);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoYell(const char* text, uint32 language, Unit* target)
|
||||
{
|
||||
if (target) m_creature->MonsterYell(text, language, target->GetGUID());
|
||||
else m_creature->MonsterYell(text, language, 0);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTextEmote(const char* text, Unit* target, bool IsBossEmote)
|
||||
{
|
||||
if (target) m_creature->MonsterTextEmote(text, target->GetGUID(), IsBossEmote);
|
||||
else m_creature->MonsterTextEmote(text, 0, IsBossEmote);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper)
|
||||
{
|
||||
if (!reciever || reciever->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
m_creature->MonsterWhisper(text, reciever->GetGUID(), IsBossWhisper);
|
||||
m_creature->CastSpell(pTarget, pSpellInfo, bTriggered);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId)
|
||||
@@ -188,59 +154,59 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId)
|
||||
pSource->PlayDirectSound(uiSoundId);
|
||||
}
|
||||
|
||||
Creature* ScriptedAI::DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime)
|
||||
Creature* ScriptedAI::DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime)
|
||||
{
|
||||
return m_creature->SummonCreature(id,m_creature->GetPositionX() + x,m_creature->GetPositionY() + y,m_creature->GetPositionZ() + z, angle, (TempSummonType)type, despawntime);
|
||||
return m_creature->SummonCreature(uiId, m_creature->GetPositionX()+fX, m_creature->GetPositionY()+fY, m_creature->GetPositionZ()+fZ, fAngle, (TempSummonType)uiType, uiDespawntime);
|
||||
}
|
||||
|
||||
Creature *ScriptedAI::DoSummon(uint32 entry, const float pos[4], uint32 despawntime, TempSummonType type)
|
||||
Creature *ScriptedAI::DoSummon(uint32 uiEntry, const float fPos[4], uint32 uiDespawntime, TempSummonType uiType)
|
||||
{
|
||||
return me->SummonCreature(entry, pos[0], pos[1], pos[2], pos[3], type, despawntime);
|
||||
return me->SummonCreature(uiEntry, fPos[0], fPos[1], fPos[2], fPos[3], uiType, uiDespawntime);
|
||||
}
|
||||
|
||||
Creature *ScriptedAI::DoSummon(uint32 entry, WorldObject *obj, float radius, uint32 despawntime, TempSummonType type)
|
||||
Creature *ScriptedAI::DoSummon(uint32 uiEntry, WorldObject* pGo, float fRadius, uint32 uiDespawntime, TempSummonType uiType)
|
||||
{
|
||||
float x, y, z;
|
||||
obj->GetGroundPointAroundUnit(x, y, z, radius * rand_norm(), rand_norm()*2*M_PI);
|
||||
return me->SummonCreature(entry, x, y, z, me->GetOrientation(), type, despawntime);
|
||||
float fX, fY, fZ;
|
||||
pGo->GetGroundPointAroundUnit(fX, fY, fZ, fRadius * rand_norm(), rand_norm()*2*M_PI);
|
||||
return me->SummonCreature(uiEntry, fX, fY, fZ, me->GetOrientation(), uiType, uiDespawntime);
|
||||
}
|
||||
|
||||
|
||||
Unit* ScriptedAI::SelectUnit(SelectAggroTarget target, uint32 position)
|
||||
Unit* ScriptedAI::SelectUnit(SelectAggroTarget target, uint32 uiPosition)
|
||||
{
|
||||
//ThreatList m_threatlist;
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator i = m_threatlist.begin();
|
||||
std::list<HostilReference*>::reverse_iterator r = m_threatlist.rbegin();
|
||||
std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator itr = threatlist.begin();
|
||||
std::list<HostilReference*>::reverse_iterator ritr = threatlist.rbegin();
|
||||
|
||||
if (position >= m_threatlist.size() || !m_threatlist.size())
|
||||
if (uiPosition >= threatlist.size() || !threatlist.size())
|
||||
return NULL;
|
||||
|
||||
switch (target)
|
||||
{
|
||||
case SELECT_TARGET_RANDOM:
|
||||
advance ( i , position + (rand() % (m_threatlist.size() - position ) ));
|
||||
return Unit::GetUnit((*m_creature),(*i)->getUnitGuid());
|
||||
advance (itr , uiPosition + (rand() % (threatlist.size() - uiPosition ) ));
|
||||
return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid());
|
||||
break;
|
||||
|
||||
case SELECT_TARGET_TOPAGGRO:
|
||||
advance ( i , position);
|
||||
return Unit::GetUnit((*m_creature),(*i)->getUnitGuid());
|
||||
advance (itr , uiPosition);
|
||||
return Unit::GetUnit((*m_creature),(*itr)->getUnitGuid());
|
||||
break;
|
||||
|
||||
case SELECT_TARGET_BOTTOMAGGRO:
|
||||
advance ( r , position);
|
||||
return Unit::GetUnit((*m_creature),(*r)->getUnitGuid());
|
||||
advance (ritr , uiPosition);
|
||||
return Unit::GetUnit((*m_creature),(*ritr)->getUnitGuid());
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mechanic, SelectTargetType Targets, uint32 PowerCostMin, uint32 PowerCostMax, float RangeMin, float RangeMax, SelectEffect Effects)
|
||||
SpellEntry const* ScriptedAI::SelectSpell(Unit* pTarget, int32 uiSchool, int32 uiMechanic, SelectTargetType selectTargets, uint32 uiPowerCostMin, uint32 uiPowerCostMax, float fRangeMin, float fRangeMax, SelectEffect selectEffects)
|
||||
{
|
||||
//No target so we can't cast
|
||||
if (!Target)
|
||||
if (!pTarget)
|
||||
return false;
|
||||
|
||||
//Silenced so we can't cast
|
||||
@@ -248,105 +214,102 @@ SpellEntry const* ScriptedAI::SelectSpell(Unit* Target, int32 School, int32 Mech
|
||||
return false;
|
||||
|
||||
//Using the extended script system we first create a list of viable spells
|
||||
SpellEntry const* Spell[CREATURE_MAX_SPELLS];
|
||||
for (uint8 i=0;i<CREATURE_MAX_SPELLS;i++)
|
||||
Spell[i] = 0;
|
||||
SpellEntry const* apSpell[CREATURE_MAX_SPELLS];
|
||||
memset(apSpell, 0, sizeof(SpellEntry)*CREATURE_MAX_SPELLS);
|
||||
|
||||
uint32 SpellCount = 0;
|
||||
uint32 uiSpellCount = 0;
|
||||
|
||||
SpellEntry const* TempSpell;
|
||||
SpellRangeEntry const* TempRange;
|
||||
SpellEntry const* pTempSpell;
|
||||
SpellRangeEntry const* pTempRange;
|
||||
|
||||
//Check if each spell is viable(set it to null if not)
|
||||
for (uint32 i = 0; i < CREATURE_MAX_SPELLS; i++)
|
||||
{
|
||||
TempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]);
|
||||
pTempSpell = GetSpellStore()->LookupEntry(m_creature->m_spells[i]);
|
||||
|
||||
//This spell doesn't exist
|
||||
if (!TempSpell)
|
||||
if (!pTempSpell)
|
||||
continue;
|
||||
|
||||
// Targets and Effects checked first as most used restrictions
|
||||
//Check the spell targets if specified
|
||||
if ( Targets && !(SpellSummary[m_creature->m_spells[i]].Targets & (1 << (Targets-1))) )
|
||||
if (selectTargets && !(SpellSummary[m_creature->m_spells[i]].Targets & (1 << (selectTargets-1))))
|
||||
continue;
|
||||
|
||||
//Check the type of spell if we are looking for a specific spell type
|
||||
if ( Effects && !(SpellSummary[m_creature->m_spells[i]].Effects & (1 << (Effects-1))) )
|
||||
if (selectEffects && !(SpellSummary[m_creature->m_spells[i]].Effects & (1 << (selectEffects-1))))
|
||||
continue;
|
||||
|
||||
//Check for school if specified
|
||||
if (School >= 0 && TempSpell->SchoolMask & School)
|
||||
if (uiSchool >= 0 && pTempSpell->SchoolMask & uiSchool)
|
||||
continue;
|
||||
|
||||
//Check for spell mechanic if specified
|
||||
if (Mechanic >= 0 && TempSpell->Mechanic != Mechanic)
|
||||
if (uiMechanic >= 0 && pTempSpell->Mechanic != uiMechanic)
|
||||
continue;
|
||||
|
||||
//Make sure that the spell uses the requested amount of power
|
||||
if (PowerCostMin && TempSpell->manaCost < PowerCostMin)
|
||||
if (uiPowerCostMin && pTempSpell->manaCost < uiPowerCostMin)
|
||||
continue;
|
||||
|
||||
if (PowerCostMax && TempSpell->manaCost > PowerCostMax)
|
||||
if (uiPowerCostMax && pTempSpell->manaCost > uiPowerCostMax)
|
||||
continue;
|
||||
|
||||
//Continue if we don't have the mana to actually cast this spell
|
||||
if (TempSpell->manaCost > m_creature->GetPower((Powers)TempSpell->powerType))
|
||||
if (pTempSpell->manaCost > m_creature->GetPower((Powers)pTempSpell->powerType))
|
||||
continue;
|
||||
|
||||
//Get the Range
|
||||
TempRange = GetSpellRangeStore()->LookupEntry(TempSpell->rangeIndex);
|
||||
pTempRange = GetSpellRangeStore()->LookupEntry(pTempSpell->rangeIndex);
|
||||
|
||||
//Spell has invalid range store so we can't use it
|
||||
if (!TempRange)
|
||||
if (!pTempRange)
|
||||
continue;
|
||||
|
||||
//Check if the spell meets our range requirements
|
||||
if (RangeMin && m_creature->GetSpellMinRangeForTarget(Target, TempRange) < RangeMin)
|
||||
if (fRangeMin && m_creature->GetSpellMinRangeForTarget(pTarget, pTempRange) < fRangeMin)
|
||||
continue;
|
||||
if (RangeMax && m_creature->GetSpellMaxRangeForTarget(Target, TempRange) > RangeMax)
|
||||
if (fRangeMax && m_creature->GetSpellMaxRangeForTarget(pTarget, pTempRange) > fRangeMax)
|
||||
continue;
|
||||
|
||||
//Check if our target is in range
|
||||
if (m_creature->IsWithinDistInMap(Target, m_creature->GetSpellMinRangeForTarget(Target, TempRange)) || !m_creature->IsWithinDistInMap(Target, m_creature->GetSpellMaxRangeForTarget(Target, TempRange)))
|
||||
if (m_creature->IsWithinDistInMap(pTarget, m_creature->GetSpellMinRangeForTarget(pTarget, pTempRange)) || !m_creature->IsWithinDistInMap(pTarget, m_creature->GetSpellMaxRangeForTarget(pTarget, pTempRange)))
|
||||
continue;
|
||||
|
||||
//All good so lets add it to the spell list
|
||||
Spell[SpellCount] = TempSpell;
|
||||
SpellCount++;
|
||||
apSpell[uiSpellCount] = pTempSpell;
|
||||
++uiSpellCount;
|
||||
}
|
||||
|
||||
//We got our usable spells so now lets randomly pick one
|
||||
if (!SpellCount)
|
||||
if (!uiSpellCount)
|
||||
return NULL;
|
||||
|
||||
return Spell[rand()%SpellCount];
|
||||
return apSpell[rand()%uiSpellCount];
|
||||
}
|
||||
|
||||
bool ScriptedAI::CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered)
|
||||
bool ScriptedAI::CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered)
|
||||
{
|
||||
//No target so we can't cast
|
||||
if (!Target || !Spell)
|
||||
if (!pTarget || !pSpell)
|
||||
return false;
|
||||
|
||||
//Silenced so we can't cast
|
||||
if (!Triggered && me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
if (!bTriggered && me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SILENCED))
|
||||
return false;
|
||||
|
||||
//Check for power
|
||||
if (!Triggered && me->GetPower((Powers)Spell->powerType) < Spell->manaCost)
|
||||
if (!bTriggered && me->GetPower((Powers)pSpell->powerType) < pSpell->manaCost)
|
||||
return false;
|
||||
|
||||
SpellRangeEntry const *TempRange = NULL;
|
||||
|
||||
TempRange = GetSpellRangeStore()->LookupEntry(Spell->rangeIndex);
|
||||
SpellRangeEntry const* pTempRange = GetSpellRangeStore()->LookupEntry(pSpell->rangeIndex);
|
||||
|
||||
//Spell has invalid range store so we can't use it
|
||||
if (!TempRange)
|
||||
if (!pTempRange)
|
||||
return false;
|
||||
|
||||
//Unit is out of range of this spell
|
||||
if (me->IsInRange(Target,me->GetSpellMinRangeForTarget(Target, TempRange),me->GetSpellMaxRangeForTarget(Target, TempRange)))
|
||||
if (me->IsInRange(pTarget, m_creature->GetSpellMinRangeForTarget(pTarget, pTempRange), m_creature->GetSpellMaxRangeForTarget(pTarget, pTempRange)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -356,82 +319,82 @@ void FillSpellSummary()
|
||||
{
|
||||
SpellSummary = new TSpellSummary[GetSpellStore()->GetNumRows()];
|
||||
|
||||
SpellEntry const* TempSpell;
|
||||
SpellEntry const* pTempSpell;
|
||||
|
||||
for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i)
|
||||
{
|
||||
SpellSummary[i].Effects = 0;
|
||||
SpellSummary[i].Targets = 0;
|
||||
|
||||
TempSpell = GetSpellStore()->LookupEntry(i);
|
||||
pTempSpell = GetSpellStore()->LookupEntry(i);
|
||||
//This spell doesn't exist
|
||||
if (!TempSpell)
|
||||
if (!pTempSpell)
|
||||
continue;
|
||||
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
//Spell targets self
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER )
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER )
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SELF-1);
|
||||
|
||||
//Spell targets a single enemy
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ENEMY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DST_TARGET_ENEMY )
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ENEMY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_DST_TARGET_ENEMY )
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_ENEMY-1);
|
||||
|
||||
//Spell targets AoE at enemy
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_SRC ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_DST ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_SRC ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_DST ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1);
|
||||
|
||||
//Spell targets an enemy
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ENEMY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DST_TARGET_ENEMY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_SRC ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_DST ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ENEMY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_DST_TARGET_ENEMY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_SRC ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_AREA_ENEMY_DST ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1);
|
||||
|
||||
//Spell targets a single friend(or self)
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ALLY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_PARTY )
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ALLY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_PARTY )
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_SINGLE_FRIEND-1);
|
||||
|
||||
//Spell targets aoe friends
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_TARGET ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER)
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_TARGET ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER)
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_FRIEND-1);
|
||||
|
||||
//Spell targets any friend(or self)
|
||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ALLY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_PARTY ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_CASTER ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_TARGET ||
|
||||
TempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER)
|
||||
if (pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_ALLY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_TARGET_PARTY ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_CASTER ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_UNIT_PARTY_TARGET ||
|
||||
pTempSpell->EffectImplicitTargetA[j] == TARGET_SRC_CASTER)
|
||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_FRIEND-1);
|
||||
|
||||
//Make sure that this spell includes a damage effect
|
||||
if ( TempSpell->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE ||
|
||||
TempSpell->Effect[j] == SPELL_EFFECT_INSTAKILL ||
|
||||
TempSpell->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE ||
|
||||
TempSpell->Effect[j] == SPELL_EFFECT_HEALTH_LEECH )
|
||||
if (pTempSpell->Effect[j] == SPELL_EFFECT_SCHOOL_DAMAGE ||
|
||||
pTempSpell->Effect[j] == SPELL_EFFECT_INSTAKILL ||
|
||||
pTempSpell->Effect[j] == SPELL_EFFECT_ENVIRONMENTAL_DAMAGE ||
|
||||
pTempSpell->Effect[j] == SPELL_EFFECT_HEALTH_LEECH )
|
||||
SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_DAMAGE-1);
|
||||
|
||||
//Make sure that this spell includes a healing effect (or an apply aura with a periodic heal)
|
||||
if ( TempSpell->Effect[j] == SPELL_EFFECT_HEAL ||
|
||||
TempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH ||
|
||||
TempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL ||
|
||||
(TempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && TempSpell->EffectApplyAuraName[j]== 8 ))
|
||||
if (pTempSpell->Effect[j] == SPELL_EFFECT_HEAL ||
|
||||
pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MAX_HEALTH ||
|
||||
pTempSpell->Effect[j] == SPELL_EFFECT_HEAL_MECHANICAL ||
|
||||
(pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA && pTempSpell->EffectApplyAuraName[j]== 8 ))
|
||||
SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_HEALING-1);
|
||||
|
||||
//Make sure that this spell applies an aura
|
||||
if ( TempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA )
|
||||
if (pTempSpell->Effect[j] == SPELL_EFFECT_APPLY_AURA )
|
||||
SpellSummary[i].Effects |= 1 << (SELECT_EFFECT_AURA-1);
|
||||
}
|
||||
}
|
||||
@@ -442,17 +405,15 @@ void ScriptedAI::DoResetThreat()
|
||||
if (!m_creature->CanHaveThreatList() || m_creature->getThreatManager().isThreatListEmpty())
|
||||
{
|
||||
error_log("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (m_creature entry = %d)", m_creature->GetEntry());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
std::list<HostilReference*>& m_threatlist = m_creature->getThreatManager().getThreatList();
|
||||
std::list<HostilReference*>::iterator itr;
|
||||
std::list<HostilReference*>& threatlist = m_creature->getThreatManager().getThreatList();
|
||||
|
||||
for(itr = m_threatlist.begin(); itr != m_threatlist.end(); ++itr)
|
||||
for(std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||
{
|
||||
Unit* pUnit = NULL;
|
||||
pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
|
||||
Unit* pUnit = Unit::GetUnit((*m_creature), (*itr)->getUnitGuid());
|
||||
|
||||
if(pUnit && DoGetThreat(pUnit))
|
||||
DoModifyThreatPercent(pUnit, -100);
|
||||
}
|
||||
@@ -464,36 +425,36 @@ float ScriptedAI::DoGetThreat(Unit* pUnit)
|
||||
return m_creature->getThreatManager().getThreat(pUnit);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoModifyThreatPercent(Unit *pUnit, int32 pct)
|
||||
void ScriptedAI::DoModifyThreatPercent(Unit* pUnit, int32 pct)
|
||||
{
|
||||
if(!pUnit) return;
|
||||
m_creature->getThreatManager().modifyThreatPercent(pUnit, pct);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportTo(float x, float y, float z, uint32 time)
|
||||
void ScriptedAI::DoTeleportTo(float fX, float fY, float fZ, uint32 uiTime)
|
||||
{
|
||||
m_creature->Relocate(x,y,z);
|
||||
m_creature->SendMonsterMove(x, y, z, time);
|
||||
m_creature->Relocate(fX, fY, fZ);
|
||||
m_creature->SendMonsterMove(fX, fY, fZ, uiTime);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportTo(const float pos[4])
|
||||
void ScriptedAI::DoTeleportTo(const float fPos[4])
|
||||
{
|
||||
me->NearTeleportTo(pos[0], pos[1], pos[2], pos[3]);
|
||||
me->NearTeleportTo(fPos[0], fPos[1], fPos[2], fPos[3]);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o)
|
||||
void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO)
|
||||
{
|
||||
if(!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if(pUnit)
|
||||
error_log("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), x, y, z, o);
|
||||
error_log("TSCR: Creature %u (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: %u) to x: %f y:%f z: %f o: %f. Aborted.", m_creature->GetGUID(), m_creature->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO);
|
||||
return;
|
||||
}
|
||||
|
||||
CAST_PLR(pUnit)->TeleportTo(pUnit->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
CAST_PLR(pUnit)->TeleportTo(pUnit->GetMapId(), fX, fY, fZ, fO, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
}
|
||||
|
||||
void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
|
||||
void ScriptedAI::DoTeleportAll(float fX, float fY, float fZ, float fO)
|
||||
{
|
||||
Map *map = m_creature->GetMap();
|
||||
if (!map->IsDungeon())
|
||||
@@ -503,33 +464,34 @@ void ScriptedAI::DoTeleportAll(float x, float y, float z, float o)
|
||||
for(Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->getSource())
|
||||
if (i_pl->isAlive())
|
||||
i_pl->TeleportTo(m_creature->GetMapId(), x, y, z, o, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
i_pl->TeleportTo(m_creature->GetMapId(), fX, fY, fZ, fO, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
}
|
||||
|
||||
Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
|
||||
Unit* ScriptedAI::DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff)
|
||||
{
|
||||
Unit* pUnit = NULL;
|
||||
Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
|
||||
Trinity::MostHPMissingInRange u_check(m_creature, fRange, uiMinHPDiff);
|
||||
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(m_creature, pUnit, u_check);
|
||||
m_creature->VisitNearbyObject(range, searcher);
|
||||
m_creature->VisitNearbyObject(fRange, searcher);
|
||||
|
||||
return pUnit;
|
||||
}
|
||||
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float fRange)
|
||||
{
|
||||
std::list<Creature*> pList;
|
||||
Trinity::FriendlyCCedInRange u_check(m_creature, range);
|
||||
Trinity::FriendlyCCedInRange u_check(m_creature, fRange);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(m_creature, pList, u_check);
|
||||
m_creature->VisitNearbyObject(range, searcher);
|
||||
m_creature->VisitNearbyObject(fRange, searcher);
|
||||
return pList;
|
||||
}
|
||||
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 spellid)
|
||||
std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellid)
|
||||
{
|
||||
std::list<Creature*> pList;
|
||||
Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
|
||||
Trinity::FriendlyMissingBuffInRange u_check(m_creature, fRange, uiSpellid);
|
||||
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(m_creature, pList, u_check);
|
||||
m_creature->VisitNearbyObject(range, searcher);
|
||||
m_creature->VisitNearbyObject(fRange, searcher);
|
||||
return pList;
|
||||
}
|
||||
|
||||
@@ -577,6 +539,14 @@ void ScriptedAI::SetCombatMovement(bool bCombatMove)
|
||||
m_bCombatMovement = bCombatMove;
|
||||
}
|
||||
|
||||
enum
|
||||
{
|
||||
NPC_BROODLORD = 12017,
|
||||
NPC_VOID_REAVER = 19516,
|
||||
NPC_JAN_ALAI = 23578,
|
||||
NPC_SARTHARION = 28860
|
||||
};
|
||||
|
||||
// Hacklike storage used for misc creatures that are expected to evade of outside of a certain area.
|
||||
// It is assumed the information is found elswehere and can be handled by mangos. So far no luck finding such information/way to extract it.
|
||||
bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
|
||||
@@ -598,19 +568,19 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
|
||||
|
||||
switch(m_creature->GetEntry())
|
||||
{
|
||||
case 12017: // broodlord (not move down stairs)
|
||||
case NPC_BROODLORD: // broodlord (not move down stairs)
|
||||
if (fZ > 448.60f)
|
||||
return false;
|
||||
break;
|
||||
case 19516: // void reaver (calculate from center of room)
|
||||
case NPC_VOID_REAVER: // void reaver (calculate from center of room)
|
||||
if (m_creature->GetDistance2d(432.59f, 371.93f) < 105.0f)
|
||||
return false;
|
||||
break;
|
||||
case 23578: // jan'alai (calculate by Z)
|
||||
case NPC_JAN_ALAI: // jan'alai (calculate by Z)
|
||||
if (fZ > 12.0f)
|
||||
return false;
|
||||
break;
|
||||
case 28860: // sartharion (calculate box)
|
||||
case NPC_SARTHARION: // sartharion (calculate box)
|
||||
if (fX > 3218.86f && fX < 3275.69f && fY < 572.40f && fY > 484.68f)
|
||||
return false;
|
||||
break;
|
||||
@@ -623,14 +593,14 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Scripted_NoMovementAI::AttackStart(Unit* who)
|
||||
void Scripted_NoMovementAI::AttackStart(Unit* pWho)
|
||||
{
|
||||
if (!who)
|
||||
if (!pWho)
|
||||
return;
|
||||
|
||||
if (m_creature->Attack(who, true))
|
||||
if (m_creature->Attack(pWho, true))
|
||||
{
|
||||
DoStartNoMovement(who);
|
||||
DoStartNoMovement(pWho);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
void AttackStartNoMove(Unit *target);
|
||||
|
||||
// Called at any Damage from any attacker (before damage apply)
|
||||
void DamageTaken(Unit *done_by, uint32 &damage) {}
|
||||
void DamageTaken(Unit* pDone_by, uint32& uiDamage) {}
|
||||
|
||||
//Called at World update tick
|
||||
void UpdateAI(const uint32);
|
||||
@@ -78,7 +78,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
void JustSummoned(Creature* ) {}
|
||||
|
||||
// Called when a summoned creature is despawned
|
||||
void SummonedCreatureDespawn(Creature* /*unit*/) {}
|
||||
void SummonedCreatureDespawn(Creature*) {}
|
||||
|
||||
// Called when hit by a spell
|
||||
void SpellHit(Unit* caster, const SpellEntry *spell) {}
|
||||
@@ -119,28 +119,16 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
//*************
|
||||
|
||||
//Start movement toward victim
|
||||
void DoStartMovement(Unit* victim, float distance = 0, float angle = 0);
|
||||
void DoStartMovement(Unit* pVictim, float fDistance = 0, float fAngle = 0);
|
||||
|
||||
//Start no movement on victim
|
||||
void DoStartNoMovement(Unit* victim);
|
||||
void DoStartNoMovement(Unit* pVictim);
|
||||
|
||||
//Stop attack of current victim
|
||||
void DoStopAttack();
|
||||
|
||||
//Cast spell by spell info
|
||||
void DoCastSpell(Unit* who,SpellEntry const *spellInfo, bool triggered = false);
|
||||
|
||||
//Creature say
|
||||
void DoSay(const char* text, uint32 language, Unit* target, bool SayEmote = false);
|
||||
|
||||
//Creature Yell
|
||||
void DoYell(const char* text, uint32 language, Unit* target);
|
||||
|
||||
//Creature Text emote, optional bool for boss emote text
|
||||
void DoTextEmote(const char* text, Unit* target, bool IsBossEmote = false);
|
||||
|
||||
//Creature whisper, optional bool for boss whisper
|
||||
void DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper = false);
|
||||
void DoCastSpell(Unit* pTarget, SpellEntry const* pSpellInfo, bool bTriggered = false);
|
||||
|
||||
//Plays a sound to all nearby players
|
||||
void DoPlaySoundToSet(WorldObject* pSource, uint32 sound);
|
||||
@@ -148,37 +136,37 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
//Drops all threat to 0%. Does not remove players from the threat list
|
||||
void DoResetThreat();
|
||||
|
||||
float DoGetThreat(Unit *u);
|
||||
void DoModifyThreatPercent(Unit *pUnit, int32 pct);
|
||||
float DoGetThreat(Unit* u);
|
||||
void DoModifyThreatPercent(Unit* pUnit, int32 pct);
|
||||
|
||||
void DoTeleportTo(float x, float y, float z, uint32 time = 0);
|
||||
void DoTeleportTo(float fX, float fY, float fZ, uint32 uiTime = 0);
|
||||
void DoTeleportTo(const float pos[4]);
|
||||
|
||||
void DoAction(const int32 param) {}
|
||||
|
||||
//Teleports a player without dropping threat (only teleports to same map)
|
||||
void DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float o);
|
||||
void DoTeleportAll(float x, float y, float z, float o);
|
||||
void DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, float fO);
|
||||
void DoTeleportAll(float fX, float fY, float fZ, float fO);
|
||||
|
||||
//Returns friendly unit with the most amount of hp missing from max hp
|
||||
Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff = 1);
|
||||
Unit* DoSelectLowestHpFriendly(float fRange, uint32 uiMinHPDiff = 1);
|
||||
|
||||
//Returns a list of friendly CC'd units within range
|
||||
std::list<Creature*> DoFindFriendlyCC(float range);
|
||||
std::list<Creature*> DoFindFriendlyCC(float fRange);
|
||||
|
||||
//Returns a list of all friendly units missing a specific buff within range
|
||||
std::list<Creature*> DoFindFriendlyMissingBuff(float range, uint32 spellid);
|
||||
std::list<Creature*> DoFindFriendlyMissingBuff(float fRange, uint32 uiSpellId);
|
||||
|
||||
//Return a player with at least minimumRange from m_creature
|
||||
Player* GetPlayerAtMinimumRange(float fMinimumRange);
|
||||
|
||||
//Spawns a creature relative to m_creature
|
||||
Creature* DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime);
|
||||
Creature *DoSummon(uint32 entry, const float pos[4], uint32 despawntime = 30000, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
Creature *DoSummon(uint32 entry, WorldObject *obj, float radius = 5.0f, uint32 despawntime = 30000, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
Creature* DoSpawnCreature(uint32 uiId, float fX, float fY, float fZ, float fAngle, uint32 uiType, uint32 uiDespawntime);
|
||||
Creature *DoSummon(uint32 uiEntry, const float fPos[4], uint32 uiDespawntime = 30000, TempSummonType uiType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
Creature *DoSummon(uint32 uiEntry, WorldObject *obj, float fRadius = 5.0f, uint32 uiDespawntime = 30000, TempSummonType uiType = TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||
|
||||
//Selects a unit from the creature's current aggro list
|
||||
Unit* SelectUnit(SelectAggroTarget target, uint32 position);
|
||||
Unit* SelectUnit(SelectAggroTarget target, uint32 uiPosition);
|
||||
|
||||
bool HealthBelowPct(uint32 pct) const { return me->GetHealth() * 100 < m_creature->GetMaxHealth() * pct; }
|
||||
|
||||
@@ -186,7 +174,7 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
SpellEntry const* SelectSpell(Unit* Target, int32 School, int32 Mechanic, SelectTargetType Targets, uint32 PowerCostMin, uint32 PowerCostMax, float RangeMin, float RangeMax, SelectEffect Effect);
|
||||
|
||||
//Checks if you can cast the specified spell
|
||||
bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered = false);
|
||||
bool CanCast(Unit* pTarget, SpellEntry const* pSpell, bool bTriggered = false);
|
||||
|
||||
void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE);
|
||||
|
||||
|
||||
+3
-1
@@ -129,11 +129,13 @@ struct TRINITY_DLL_DECL boss_shirrak_the_dead_watcherAI : public ScriptedAI
|
||||
focusedTarget = target;
|
||||
m_creature->SummonCreature(ENTRY_FOCUS_FIRE,target->GetPositionX(),target->GetPositionY(),target->GetPositionZ(),0,TEMPSUMMON_TIMED_DESPAWN,5500);
|
||||
|
||||
// TODO: Find better way to handle emote
|
||||
// Emote
|
||||
std::string *emote = new std::string("focuses on ");
|
||||
emote->append(target->GetName());
|
||||
emote->append("!");
|
||||
DoTextEmote(emote->c_str(),NULL,true);
|
||||
const char* text = emote->c_str();
|
||||
m_creature->MonsterTextEmote(text, 0, true);
|
||||
delete emote;
|
||||
}
|
||||
FocusFire_Timer = 15000+(rand()%5000);
|
||||
|
||||
@@ -42,9 +42,9 @@ EndScriptData */
|
||||
#define SOUND_AKAMA_LEAVE 11390
|
||||
|
||||
// Self explanatory
|
||||
#define SAY_KILL1 "Who shall be next to taste my blades?!"
|
||||
const char* SAY_KILL1 = "Who shall be next to taste my blades?!";
|
||||
#define SOUND_KILL1 11473
|
||||
#define SAY_KILL2 "This is too easy!"
|
||||
const char* SAY_KILL2 = "This is too easy!";
|
||||
#define SOUND_KILL2 11472
|
||||
|
||||
// I think I'll fly now and let my subordinates take you on
|
||||
@@ -464,15 +464,15 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim == m_creature) return;
|
||||
|
||||
// TODO: Find better way to handle emote
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_KILL1, LANG_UNIVERSAL, victim);
|
||||
m_creature->MonsterYell(SAY_KILL1, LANG_UNIVERSAL, victim->GetGUID());
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_KILL2, LANG_UNIVERSAL, victim);
|
||||
m_creature->MonsterYell(SAY_KILL2, LANG_UNIVERSAL, victim->GetGUID());
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL2);
|
||||
break;
|
||||
}
|
||||
@@ -546,7 +546,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
|
||||
m_creature->StopMoving();
|
||||
DoYell(SAY_TAKEOFF, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_TAKEOFF, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_TAKEOFF);
|
||||
Timer[EVENT_FLIGHT_SEQUENCE] = 3000;
|
||||
break;
|
||||
@@ -749,7 +749,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
{
|
||||
//PHASE_NORMAL
|
||||
case EVENT_BERSERK:
|
||||
DoYell(SAY_ENRAGE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ENRAGE, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ENRAGE);
|
||||
DoCast(m_creature, SPELL_BERSERK, true);
|
||||
Timer[EVENT_BERSERK] = 5000;//The buff actually lasts forever.
|
||||
@@ -761,7 +761,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
char* yell = RandomTaunts[random].text;
|
||||
uint32 soundid = RandomTaunts[random].sound;
|
||||
if (yell)
|
||||
DoYell(yell, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(yell, LANG_UNIVERSAL, 0);
|
||||
if (soundid)
|
||||
DoPlaySoundToSet(m_creature, soundid);
|
||||
}
|
||||
@@ -908,7 +908,7 @@ struct TRINITY_DLL_DECL flame_of_azzinothAI : public ScriptedAI
|
||||
m_creature->AddThreat(target, 5000000.0f);
|
||||
AttackStart(target);
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
DoTextEmote("sets its gaze on $N!", target);
|
||||
m_creature->MonsterTextEmote("sets its gaze on $N!", target->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1196,7 +1196,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
Timer = 8000;
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_AKAMA_LEAVE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_AKAMA_LEAVE, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AKAMA_LEAVE);
|
||||
Timer = 3000;
|
||||
break;
|
||||
@@ -1248,7 +1248,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
Timer = 2000;
|
||||
break;
|
||||
case 5:
|
||||
DoYell(SAY_AKAMA_BEWARE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_AKAMA_BEWARE, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AKAMA_BEWARE);
|
||||
Channel->setDeathState(JUST_DIED);
|
||||
Spirit[0]->SetVisibility(VISIBILITY_OFF);
|
||||
@@ -1524,7 +1524,7 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
||||
uint32 random = rand()%4;
|
||||
char* text = MaievTaunts[random].text;
|
||||
uint32 sound = MaievTaunts[random].sound;
|
||||
DoYell(text, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(text, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, sound);
|
||||
Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000;
|
||||
}break;
|
||||
@@ -1960,7 +1960,7 @@ void boss_illidan_stormrageAI::CastEyeBlast()
|
||||
{
|
||||
m_creature->InterruptNonMeleeSpells(false);
|
||||
|
||||
DoYell(SAY_EYE_BLAST, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_EYE_BLAST, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_EYE_BLAST);
|
||||
|
||||
float distx, disty, dist[2];
|
||||
@@ -1996,7 +1996,7 @@ void boss_illidan_stormrageAI::CastEyeBlast()
|
||||
|
||||
void boss_illidan_stormrageAI::SummonFlamesOfAzzinoth()
|
||||
{
|
||||
DoYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SUMMONFLAMES);
|
||||
|
||||
for(uint8 i = 0; i < 2; ++i)
|
||||
@@ -2023,7 +2023,7 @@ void boss_illidan_stormrageAI::SummonMaiev()
|
||||
if (!MaievGUID) // If Maiev cannot be summoned, reset the encounter and post some errors to the console.
|
||||
{
|
||||
EnterEvadeMode();
|
||||
DoTextEmote("is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter.", NULL);
|
||||
m_creature->MonsterTextEmote("is unable to summon Maiev Shadowsong and enter Phase 4. Resetting Encounter.", 0);
|
||||
error_log("SD2 ERROR: Unable to summon Maiev Shadowsong (entry: 23197). Check your database to see if you have the proper SQL for Maiev Shadowsong (entry: 23197)");
|
||||
}
|
||||
}
|
||||
@@ -2095,7 +2095,7 @@ void boss_illidan_stormrageAI::EnterPhase(PhaseIllidan NextPhase)
|
||||
{
|
||||
TransformCount = 0;
|
||||
Timer[EVENT_TRANSFORM_SEQUENCE] = 500;
|
||||
DoYell(SAY_MORPH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_MORPH, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, SOUND_MORPH);
|
||||
}
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
|
||||
@@ -75,7 +75,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
|
||||
DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -84,15 +84,15 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
|
||||
DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY3);
|
||||
DoYell(SAY_ONSLAY3, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_ANETHERONEVENT, DONE);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONDEATH);
|
||||
DoYell(SAY_ONDEATH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -157,11 +157,11 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SWARM1);
|
||||
DoYell(SAY_SWARM1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SWARM1, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SWARM2);
|
||||
DoYell(SAY_SWARM2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SWARM2, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
}else SwarmTimer -= diff;
|
||||
@@ -170,8 +170,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
{
|
||||
for(uint8 i=0;i<3; ++i)
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,100,true);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM,0,100,true))
|
||||
target->CastSpell(target,SPELL_SLEEP,true);
|
||||
}
|
||||
SleepTimer = 60000;
|
||||
@@ -179,11 +178,11 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLEEP1);
|
||||
DoYell(SAY_SLEEP1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SLEEP1, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_SLEEP2);
|
||||
DoYell(SAY_SLEEP2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SLEEP2, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
}else SleepTimer -= diff;
|
||||
@@ -200,11 +199,11 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_INFERNO1);
|
||||
DoYell(SAY_INFERNO1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_INFERNO1, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_INFERNO2);
|
||||
DoYell(SAY_INFERNO2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_INFERNO2, LANG_UNIVERSAL, 0);
|
||||
break;
|
||||
}
|
||||
}else InfernoTimer -= diff;
|
||||
|
||||
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_AZGALOREVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
|
||||
DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -77,15 +77,15 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
|
||||
DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY3);
|
||||
DoYell(SAY_ONSLAY3, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_KAZROGALEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
|
||||
DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -72,15 +72,15 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
|
||||
DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 2:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY3);
|
||||
DoYell(SAY_ONSLAY3, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY3, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -169,11 +169,11 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_MARK1);
|
||||
DoYell(SAY_MARK1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_MARK1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_MARK2);
|
||||
DoYell(SAY_MARK2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_MARK2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}else MarkTimer -= diff;
|
||||
|
||||
@@ -63,7 +63,7 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, IN_PROGRESS);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
|
||||
DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, 0);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
@@ -72,11 +72,11 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
|
||||
DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
||||
if (pInstance && IsEvent)
|
||||
pInstance->SetData(DATA_RAGEWINTERCHILLEVENT, DONE);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONDEATH);
|
||||
DoYell(SAY_ONDEATH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONDEATH, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -143,11 +143,11 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_DECAY1);
|
||||
DoYell(SAY_DECAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_DECAY1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_DECAY2);
|
||||
DoYell(SAY_DECAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_DECAY2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}else DecayTimer -= diff;
|
||||
@@ -159,11 +159,11 @@ struct TRINITY_DLL_DECL boss_rage_winterchillAI : public hyjal_trashAI
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_NOVA1);
|
||||
DoYell(SAY_NOVA1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_NOVA1, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
case 1:
|
||||
DoPlaySoundToSet(m_creature, SOUND_NOVA2);
|
||||
DoYell(SAY_NOVA2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_NOVA2, LANG_UNIVERSAL, NULL);
|
||||
break;
|
||||
}
|
||||
}else NovaTimer -= diff;
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
||||
if (continueTriggering)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BLESSING_OF_THE_TIDES);
|
||||
DoYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_GAIN_BLESSING_OF_TIDES, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_GAIN_BLESSING_OF_TIDES);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1156,7 +1156,7 @@ struct TRINITY_DLL_DECL npc_dark_rider_of_acherusAI : public ScriptedAI
|
||||
switch(Phase)
|
||||
{
|
||||
case 0:
|
||||
DoSay("The realm of shadows awaits...", LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterSay("The realm of shadows awaits...", LANG_UNIVERSAL, 0);
|
||||
PhaseTimer = 5000;
|
||||
Phase = 1;
|
||||
break;
|
||||
@@ -1417,7 +1417,7 @@ struct TRINITY_DLL_DECL npc_valkyr_battle_maidenAI : public ScriptedAI
|
||||
{
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
|
||||
DoCast(Owner, SPELL_REVIVE,true);
|
||||
DoWhisper(VALK_WHISPER,Owner);
|
||||
m_creature->MonsterWhisper(VALK_WHISPER, Owner->GetGUID());
|
||||
}
|
||||
FlyBackTimer = 5000;
|
||||
phase = 3;
|
||||
|
||||
@@ -148,7 +148,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
pInstance->SetData(TYPE_NIGHTBANE, IN_PROGRESS);
|
||||
|
||||
HandleTerraceDoors(false);
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who)
|
||||
@@ -192,7 +192,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
{
|
||||
if (id == 0)
|
||||
{
|
||||
DoTextEmote(EMOTE_BREATH, NULL, true);
|
||||
m_creature->MonsterTextEmote(EMOTE_BREATH, 0, true);
|
||||
Flying = false;
|
||||
Phase = 2;
|
||||
return;
|
||||
@@ -224,7 +224,7 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
|
||||
void TakeOff()
|
||||
{
|
||||
DoYell(YELL_FLY_PHASE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_FLY_PHASE, LANG_UNIVERSAL, NULL);
|
||||
|
||||
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
@@ -392,9 +392,9 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
||||
if (FlyTimer < diff) //landing
|
||||
{
|
||||
if (rand()%2 == 0)
|
||||
DoYell(YELL_LAND_PHASE_1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_LAND_PHASE_1, LANG_UNIVERSAL, NULL);
|
||||
else
|
||||
DoYell(YELL_LAND_PHASE_2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_LAND_PHASE_2, LANG_UNIVERSAL, NULL);
|
||||
|
||||
(*m_creature).GetMotionMaster()->Clear(false);
|
||||
m_creature->GetMotionMaster()->MovePoint(3,IntroWay[3][0],IntroWay[3][1],IntroWay[3][2]);
|
||||
|
||||
@@ -298,7 +298,7 @@ struct TRINITY_DLL_DECL mob_headAI : public ScriptedAI
|
||||
Creature *speaker = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1000);
|
||||
if (speaker)
|
||||
speaker->CastSpell(speaker,SPELL_HEAD_SPEAKS,false);
|
||||
DoTextEmote("laughs",NULL);
|
||||
m_creature->MonsterTextEmote("laughs",NULL);
|
||||
} else laugh -= diff;
|
||||
|
||||
} else {
|
||||
@@ -654,7 +654,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
||||
|
||||
if (laugh < diff) {
|
||||
laugh = 11000 + rand()%12 * 1000;
|
||||
DoTextEmote("laughs",NULL);
|
||||
m_creature->MonsterTextEmote("laughs",NULL);
|
||||
DoPlaySoundToSet(m_creature, RandomLaugh[rand()%3]);
|
||||
} else laugh -= diff;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ struct TRINITY_DLL_DECL boss_timmy_the_cruelAI : public ScriptedAI
|
||||
{
|
||||
if (!HasYelled)
|
||||
{
|
||||
DoYell(SAY_SPAWN,LANG_UNIVERSAL,NULL);
|
||||
m_creature->MonsterYell(SAY_SPAWN,LANG_UNIVERSAL,NULL);
|
||||
HasYelled = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
||||
}
|
||||
else
|
||||
{
|
||||
DoTextEmote("is unable to find Kalecgos", NULL);
|
||||
m_creature->MonsterTextEmote("is unable to find Kalecgos", NULL);
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
/* ScriptData
|
||||
SDName: Thousand Needles
|
||||
SD%Complete: 100
|
||||
SDComment: Support for Quest: 1950, 4770, 4904
|
||||
SDComment: Support for Quest: 1950, 4770, 4904, 4966
|
||||
SDCategory: Thousand Needles
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_kanati
|
||||
npc_lakota_windsong
|
||||
npc_swiftmountain
|
||||
npc_plucky
|
||||
@@ -31,6 +32,74 @@ EndContentData */
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
/*#####
|
||||
# npc_kanati
|
||||
######*/
|
||||
|
||||
enum
|
||||
{
|
||||
SAY_KAN_START = -1000410,
|
||||
|
||||
QUEST_PROTECT_KANATI = 4966,
|
||||
NPC_GALAK_ASS = 10720
|
||||
};
|
||||
|
||||
const float m_afGalakLoc[]= {-4867.387695, -1357.353760, -48.226 };
|
||||
|
||||
struct TRINITY_DLL_DECL npc_kanatiAI : public npc_escortAI
|
||||
{
|
||||
npc_kanatiAI(Creature* pCreature) : npc_escortAI(pCreature) { }
|
||||
|
||||
void Reset() { }
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
{
|
||||
switch(uiPointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_KAN_START, m_creature);
|
||||
DoSpawnGalak();
|
||||
break;
|
||||
case 1:
|
||||
if (Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||
pPlayer->GroupEventHappens(QUEST_PROTECT_KANATI, m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DoSpawnGalak()
|
||||
{
|
||||
for(int i = 0; i < 3; ++i)
|
||||
m_creature->SummonCreature(NPC_GALAK_ASS,
|
||||
m_afGalakLoc[0], m_afGalakLoc[1], m_afGalakLoc[2], 0.0f,
|
||||
TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
pSummoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_kanati(Creature* pCreature)
|
||||
{
|
||||
npc_kanatiAI* pTempAI = new npc_kanatiAI(pCreature);
|
||||
|
||||
pTempAI->FillPointMovementListForCreature();
|
||||
|
||||
return (CreatureAI*)pTempAI;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_kanati(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_PROTECT_KANATI)
|
||||
{
|
||||
if (npc_kanatiAI* pEscortAI = CAST_AI(npc_kanatiAI, pCreature->AI()))
|
||||
pEscortAI->Start(false, false, pPlayer->GetGUID(), pQuest, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
# npc_lakota_windsong
|
||||
######*/
|
||||
|
||||
@@ -316,6 +385,12 @@ void AddSC_thousand_needles()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_kanati";
|
||||
newscript->GetAI = &GetAI_npc_kanati;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_kanati;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_lakota_windsong";
|
||||
newscript->GetAI = &GetAI_npc_lakota_windsong;
|
||||
|
||||
@@ -103,7 +103,7 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
||||
{
|
||||
// Being woken up from the altar, start the awaken sequence
|
||||
if (spell == GetSpellStore()->LookupEntry(SPELL_ARCHAEDAS_AWAKEN)) {
|
||||
DoYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
|
||||
m_creature->MonsterYell(SAY_AGGRO,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature,SOUND_AGGRO);
|
||||
Awaken_Timer = 4000;
|
||||
wakingUp = true;
|
||||
@@ -112,7 +112,7 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
DoYell(SAY_KILL,LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_KILL,LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
||||
ActivateMinion(pInstance->GetData64(8),true); // EarthenGuardian4
|
||||
ActivateMinion(pInstance->GetData64(9),true); // EarthenGuardian5
|
||||
ActivateMinion(pInstance->GetData64(10),false); // EarthenGuardian6
|
||||
DoYell(SAY_SUMMON,LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SUMMON,LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SUMMON);
|
||||
guardiansAwake = true;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
||||
ActivateMinion(pInstance->GetData64(2),true); // VaultWalker2
|
||||
ActivateMinion(pInstance->GetData64(3),true); // VaultWalker3
|
||||
ActivateMinion(pInstance->GetData64(4),false); // VaultWalker4
|
||||
DoYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SUMMON2);
|
||||
vaultWalkersAwake = true;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
|
||||
|
||||
void EnterCombat(Unit *who)
|
||||
{
|
||||
DoYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONAGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONAGGRO);
|
||||
//DoZoneInCombat();
|
||||
if (pInstance)
|
||||
@@ -123,7 +123,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* Killer)
|
||||
{
|
||||
DoYell(SAY_ONDEATH,LANG_UNIVERSAL,NULL);
|
||||
m_creature->MonsterYell(SAY_ONDEATH,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONDEATH);
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_AKILZONEVENT, DONE);
|
||||
@@ -135,11 +135,11 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSLAY2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY2);
|
||||
break;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
|
||||
}
|
||||
|
||||
if (Enrage_Timer < diff) {
|
||||
DoYell(SAY_ONENRAGE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONENRAGE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONENRAGE);
|
||||
m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
|
||||
Enrage_Timer = 600000;
|
||||
@@ -330,7 +330,7 @@ struct TRINITY_DLL_DECL boss_akilzonAI : public ScriptedAI
|
||||
|
||||
if (SummonEagles_Timer < diff)
|
||||
{
|
||||
DoYell(SAY_ONSUMMON, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(SAY_ONSUMMON, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSUMMON);
|
||||
|
||||
float x, y, z;
|
||||
|
||||
@@ -117,7 +117,7 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS);
|
||||
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AGGRO);
|
||||
|
||||
EnterPhase(PHASE_LYNX);
|
||||
@@ -172,7 +172,7 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
TotemTimer = 12000;
|
||||
break;
|
||||
case PHASE_SPLIT:
|
||||
DoYell(YELL_SPLIT, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_SPLIT, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_SPLIT);
|
||||
m_creature->CastSpell(m_creature, SPELL_TRANSFORM_SPLIT, true);
|
||||
break;
|
||||
@@ -187,7 +187,7 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
case PHASE_MERGE:
|
||||
if (Unit *Lynx = Unit::GetUnit(*m_creature, LynxGUID))
|
||||
{
|
||||
DoYell(YELL_MERGE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_MERGE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_MERGE);
|
||||
Lynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Lynx->GetMotionMaster()->Clear();
|
||||
@@ -209,7 +209,7 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
|
||||
if (BerserkTimer < diff)
|
||||
{
|
||||
DoYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_BERSERK);
|
||||
DoCast(m_creature, SPELL_BERSERK, true);
|
||||
BerserkTimer = 60000;
|
||||
@@ -305,12 +305,12 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL_ONE);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
DoYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL_TWO);
|
||||
break;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HALAZZIEVENT, DONE);
|
||||
|
||||
DoYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_DEATH);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -250,7 +250,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_HEXLORDEVENT, IN_PROGRESS);
|
||||
|
||||
DoZoneInCombat();
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_AGGRO);
|
||||
|
||||
for(uint8 i = 0; i < 4; ++i)
|
||||
@@ -271,11 +271,11 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_KILL_ONE);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_KILL_TWO);
|
||||
break;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_HEXLORDEVENT, DONE);
|
||||
|
||||
DoYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_DEATH);
|
||||
|
||||
for(uint8 i = 0; i < 4 ; ++i)
|
||||
@@ -361,7 +361,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
||||
if (DrainPower_Timer < diff)
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_DRAIN_POWER, true);
|
||||
DoYell(YELL_DRAIN_POWER, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_DRAIN_POWER, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_DRAIN_POWER);
|
||||
DrainPower_Timer = 40000 + rand()%15000; // must cast in 60 sec, or buff/debuff will disappear
|
||||
}else DrainPower_Timer -= diff;
|
||||
@@ -373,7 +373,7 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
||||
else
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_SPIRIT_BOLTS, false);
|
||||
DoYell(YELL_SPIRIT_BOLTS, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_SPIRIT_BOLTS, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_SPIRIT_BOLTS);
|
||||
SpiritBolts_Timer = 40000;
|
||||
SiphonSoul_Timer = 10000; // ready to drain
|
||||
|
||||
@@ -202,7 +202,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
case 0:
|
||||
if (m_creature->IsWithinDistInMap(who, 50))
|
||||
{
|
||||
DoYell(YELL_NALORAKK_WAVE1, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_NALORAKK_WAVE1, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NALORAKK_WAVE1);
|
||||
|
||||
(*m_creature).GetMotionMaster()->MovePoint(1,NalorakkWay[1][0],NalorakkWay[1][1],NalorakkWay[1][2]);
|
||||
@@ -215,7 +215,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
case 2:
|
||||
if (m_creature->IsWithinDistInMap(who, 40))
|
||||
{
|
||||
DoYell(YELL_NALORAKK_WAVE2, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_NALORAKK_WAVE2, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NALORAKK_WAVE2);
|
||||
|
||||
(*m_creature).GetMotionMaster()->MovePoint(3,NalorakkWay[3][0],NalorakkWay[3][1],NalorakkWay[3][2]);
|
||||
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
case 5:
|
||||
if (m_creature->IsWithinDistInMap(who, 40))
|
||||
{
|
||||
DoYell(YELL_NALORAKK_WAVE3, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_NALORAKK_WAVE3, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NALORAKK_WAVE3);
|
||||
|
||||
(*m_creature).GetMotionMaster()->MovePoint(6,NalorakkWay[6][0],NalorakkWay[6][1],NalorakkWay[6][2]);
|
||||
@@ -243,7 +243,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
{
|
||||
SendAttacker(who);
|
||||
|
||||
DoYell(YELL_NALORAKK_WAVE4, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_NALORAKK_WAVE4, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_NALORAKK_WAVE4);
|
||||
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_NALORAKKEVENT, IN_PROGRESS);
|
||||
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_AGGRO);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
@@ -273,7 +273,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_NALORAKKEVENT, DONE);
|
||||
|
||||
DoYell(YELL_DEATH,LANG_UNIVERSAL,NULL);
|
||||
m_creature->MonsterYell(YELL_DEATH,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_DEATH);
|
||||
}
|
||||
|
||||
@@ -282,11 +282,11 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_KILL_ONE);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_KILL_TWO);
|
||||
break;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
if (Berserk_Timer < diff)
|
||||
{
|
||||
DoCast(m_creature, SPELL_BERSERK, true);
|
||||
DoYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_BERSERK);
|
||||
Berserk_Timer = 600000;
|
||||
}else Berserk_Timer -= diff;
|
||||
@@ -361,7 +361,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
if (inBearForm)
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 5122);
|
||||
DoYell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_SHIFTEDTOTROLL, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_TOTROLL);
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_BEARFORM);
|
||||
Surge_Timer = 15000 + rand()%5000;
|
||||
@@ -373,7 +373,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
else
|
||||
{
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, 0);
|
||||
DoYell(YELL_SHIFTEDTOBEAR, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_SHIFTEDTOBEAR, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_TOBEAR);
|
||||
DoCast(m_creature, SPELL_BEARFORM, true);
|
||||
LaceratingSlash_Timer = 2000; // dur 18s
|
||||
@@ -404,7 +404,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
||||
|
||||
if (Surge_Timer < diff)
|
||||
{
|
||||
DoYell(YELL_SURGE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_SURGE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE);
|
||||
Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 45, true);
|
||||
if (target)
|
||||
|
||||
@@ -218,7 +218,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
|
||||
DoZoneInCombat();
|
||||
|
||||
DoYell(YELL_INTRO,LANG_UNIVERSAL,NULL);
|
||||
m_creature->MonsterYell(YELL_INTRO,LANG_UNIVERSAL,NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_INTRO);
|
||||
SpawnAdds();
|
||||
EnterPhase(0);
|
||||
@@ -232,11 +232,11 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
switch(rand()%2)
|
||||
{
|
||||
case 0:
|
||||
DoYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_ONE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL_ONE);
|
||||
break;
|
||||
case 1:
|
||||
DoYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_KILL_TWO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_KILL_TWO);
|
||||
break;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_ZULJINEVENT, DONE);
|
||||
|
||||
DoYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_DEATH, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_DEATH);
|
||||
Summons.DespawnEntry(CREATURE_COLUMN_OF_FIRE);
|
||||
|
||||
@@ -342,7 +342,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, 0);
|
||||
m_creature->RemoveAurasDueToSpell(Transform[Phase].unaura);
|
||||
DoCast(m_creature, Transform[Phase].spell);
|
||||
DoYell(Transform[Phase].text, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(Transform[Phase].text, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, Transform[Phase].sound);
|
||||
if (Phase > 0)
|
||||
{
|
||||
@@ -398,7 +398,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
if (Berserk_Timer < diff)
|
||||
{
|
||||
m_creature->CastSpell(m_creature, SPELL_BERSERK, true);
|
||||
DoYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_BERSERK, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_BERSERK);
|
||||
Berserk_Timer = 60000;
|
||||
}else Berserk_Timer -= diff;
|
||||
@@ -410,7 +410,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
{
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
DoYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterYell(YELL_AGGRO, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_AGGRO);
|
||||
Intro_Timer = 0;
|
||||
}else Intro_Timer -= diff;
|
||||
|
||||
@@ -138,7 +138,7 @@ struct TRINITY_DLL_DECL npc_captured_rageclawAI : public ScriptedAI
|
||||
m_creature->setFaction(m_creature->GetCreatureInfo()->faction_H);
|
||||
|
||||
DoCast(m_creature, SPELL_UNSHACKLED, true);
|
||||
DoSay(SAY_RAGECLAW, LANG_UNIVERSAL, NULL);
|
||||
m_creature->MonsterSay(SAY_RAGECLAW, LANG_UNIVERSAL, NULL);
|
||||
m_creature->GetMotionMaster()->MoveRandom(10);
|
||||
|
||||
DespawnTimer = 10000;
|
||||
|
||||
Reference in New Issue
Block a user