Merge [SD2]
r1211 Correct tempsummon type for adds and add spellId for future use. Patch by Abim - skip r1212 Added support for quest 6523. Patch by Meldanor - skip (already have that, just move waypoints to db) r1213 Add a few missing address-of operators and some general cleanup. r1214 Adjusting how pet are summoned and check when new pet can be summoned for sharkkis. - skip r1215 Added support for event related to quest 12727. Original patch by ckegg r1216 Some adjustments to function for controlling combat movement (MoveChase()) r1217 Use SetCombatMovement() for more scripts where expected and remove one useless function from Scripted_NoMovementAI (this may be fully removed) r1218 Correct script_texts, adding variable %s where missing (...and where expected. Note that not all creature emote texts contain name of sender). - skip r1219 Reset DATA_OPERA_OZ_DEATHCOUNT to 0 at start, in case event was previously run and incremented counter. r1220 Correct lost-in-process FillPointMovementListForCreature() for quest 12727 (copy/paste == bad) --HG-- branch : trunk
This commit is contained in:
@@ -79,7 +79,7 @@ void SummonList::DespawnAll()
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), CombatMovement(true), m_uiEvadeCheckCooldown(2500)
|
||||
ScriptedAI::ScriptedAI(Creature* creature) : CreatureAI(creature), m_creature(creature), IsFleeing(false), m_bCombatMovement(true), m_uiEvadeCheckCooldown(2500)
|
||||
{
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
@@ -572,9 +572,9 @@ void ScriptedAI::SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand, int32 ui
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 2, uint32(uiRanged));
|
||||
}
|
||||
|
||||
void ScriptedAI::SetCombatMovement(bool CombatMove)
|
||||
void ScriptedAI::SetCombatMovement(bool bCombatMove)
|
||||
{
|
||||
CombatMovement = CombatMove;
|
||||
m_bCombatMovement = bCombatMove;
|
||||
}
|
||||
|
||||
// Hacklike storage used for misc creatures that are expected to evade of outside of a certain area.
|
||||
@@ -623,22 +623,6 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff)
|
||||
return true;
|
||||
}
|
||||
|
||||
/*void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who)
|
||||
{
|
||||
if( !m_creature->getVictim() && m_creature->canAttack(who) && ( m_creature->IsHostileTo( who )) && who->isInAccessiblePlaceFor(m_creature) )
|
||||
{
|
||||
if (!m_creature->canFly() && !m_creature->IsWithinDist(who, CREATURE_Z_ATTACK_RANGE))
|
||||
return;
|
||||
|
||||
float attackRadius = m_creature->GetAttackDistance(who);
|
||||
if( m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )
|
||||
{
|
||||
who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
AttackStart(who);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void Scripted_NoMovementAI::AttackStart(Unit* who)
|
||||
{
|
||||
if (!who)
|
||||
|
||||
@@ -190,14 +190,14 @@ struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
|
||||
|
||||
void SetEquipmentSlots(bool bLoadDefault, int32 uiMainHand = EQUIP_NO_CHANGE, int32 uiOffHand = EQUIP_NO_CHANGE, int32 uiRanged = EQUIP_NO_CHANGE);
|
||||
|
||||
//Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims
|
||||
void SetCombatMovement(bool CombatMove);
|
||||
bool IsCombatMovement() { return m_bCombatMovement; }
|
||||
|
||||
bool EnterEvadeIfOutOfCombatArea(const uint32 uiDiff);
|
||||
|
||||
protected:
|
||||
bool CombatMovement;
|
||||
|
||||
private:
|
||||
bool m_bCombatMovement;
|
||||
uint32 m_uiEvadeCheckCooldown;
|
||||
};
|
||||
|
||||
@@ -205,8 +205,6 @@ struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
|
||||
{
|
||||
Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
//Called if IsVisible(Unit *who) is true at each *who move
|
||||
//void MoveInLineOfSight(Unit* who);
|
||||
|
||||
//Called at each attack of m_creature by any victim
|
||||
void AttackStart(Unit* who);
|
||||
|
||||
@@ -28,7 +28,7 @@ void npc_escortAI::AttackStart(Unit *who)
|
||||
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
m_creature->GetMotionMaster()->MovementExpired();
|
||||
|
||||
if(CombatMovement)
|
||||
if (IsCombatMovement())
|
||||
m_creature->GetMotionMaster()->MoveChase(who);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,9 @@ void npc_escortAI::JustRespawned()
|
||||
{
|
||||
IsBeingEscorted = false;
|
||||
IsOnHold = false;
|
||||
CombatMovement = true;
|
||||
|
||||
if (!IsCombatMovement())
|
||||
SetCombatMovement(true);
|
||||
|
||||
m_uiWPWaitTimer = 0;
|
||||
|
||||
|
||||
@@ -34,10 +34,11 @@ EndScriptData */
|
||||
#define SPELL_SONIC_SHOCK 38797
|
||||
#define SPELL_THUNDERING_STORM 39365
|
||||
|
||||
struct TRINITY_DLL_DECL boss_murmurAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL boss_murmurAI : public ScriptedAI
|
||||
{
|
||||
boss_murmurAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
boss_murmurAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ void AddSC_desolace()
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_aged_dying_ancient_kodo";
|
||||
newscript->GetAI = GetAI_npc_aged_dying_ancient_kodo;
|
||||
newscript->GetAI = &GetAI_npc_aged_dying_ancient_kodo;
|
||||
newscript->pEffectDummyCreature = &EffectDummyCreature_npc_aged_dying_ancient_kodo;
|
||||
newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "precompiled.h"
|
||||
#include "Vehicle.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
#define GCD_CAST 1
|
||||
|
||||
@@ -479,6 +480,190 @@ CreatureAI* GetAI_npc_a_special_surprise(Creature* pCreature)
|
||||
return new npc_a_special_surpriseAI(pCreature);
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_koltira_deathweaver
|
||||
######*/
|
||||
|
||||
enum eKoltira
|
||||
{
|
||||
SAY_BREAKOUT1 = -1609079,
|
||||
SAY_BREAKOUT2 = -1609080,
|
||||
SAY_BREAKOUT3 = -1609081,
|
||||
SAY_BREAKOUT4 = -1609082,
|
||||
SAY_BREAKOUT5 = -1609083,
|
||||
SAY_BREAKOUT6 = -1609084,
|
||||
SAY_BREAKOUT7 = -1609085,
|
||||
SAY_BREAKOUT8 = -1609086,
|
||||
SAY_BREAKOUT9 = -1609087,
|
||||
SAY_BREAKOUT10 = -1609088,
|
||||
|
||||
SPELL_KOLTIRA_TRANSFORM = 52899,
|
||||
SPELL_ANTI_MAGIC_ZONE = 52894,
|
||||
|
||||
QUEST_BREAKOUT = 12727,
|
||||
|
||||
NPC_CRIMSON_ACOLYTE = 29007,
|
||||
NPC_HIGH_INQUISITOR_VALROTH = 29001,
|
||||
NPC_KOLTIRA_ALT = 28447,
|
||||
|
||||
//not sure about this id
|
||||
//NPC_DEATH_KNIGHT_MOUNT = 29201,
|
||||
MODEL_DEATH_KNIGHT_MOUNT = 25278
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_koltira_deathweaverAI : public npc_escortAI
|
||||
{
|
||||
npc_koltira_deathweaverAI(Creature *pCreature) : npc_escortAI(pCreature) { }
|
||||
|
||||
uint32 m_uiWave;
|
||||
uint32 m_uiWave_Timer;
|
||||
uint64 m_uiValrothGUID;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (!IsBeingEscorted)
|
||||
{
|
||||
m_uiWave = 0;
|
||||
m_uiWave_Timer = 3000;
|
||||
m_uiValrothGUID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiPointId)
|
||||
{
|
||||
switch(uiPointId)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_BREAKOUT1, m_creature);
|
||||
break;
|
||||
case 1:
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
break;
|
||||
case 2:
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
//m_creature->UpdateEntry(NPC_KOLTIRA_ALT); //unclear if we must update or not
|
||||
DoCast(m_creature, SPELL_KOLTIRA_TRANSFORM);
|
||||
break;
|
||||
case 3:
|
||||
IsOnHold = true;
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
DoScriptText(SAY_BREAKOUT2, m_creature);
|
||||
DoCast(m_creature, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up
|
||||
break;
|
||||
case 4:
|
||||
SetRun(true);
|
||||
break;
|
||||
case 9:
|
||||
m_creature->Mount(MODEL_DEATH_KNIGHT_MOUNT);
|
||||
break;
|
||||
case 10:
|
||||
m_creature->Unmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
if (Unit* pPlayer = Unit::GetUnit(*m_creature, PlayerGUID))
|
||||
{
|
||||
pSummoned->AI()->AttackStart(pPlayer);
|
||||
pSummoned->AddThreat(m_creature, 0.0f);
|
||||
}
|
||||
|
||||
if (pSummoned->GetEntry() == NPC_HIGH_INQUISITOR_VALROTH)
|
||||
m_uiValrothGUID = pSummoned->GetGUID();
|
||||
}
|
||||
|
||||
void SummonAcolyte(uint32 uiAmount)
|
||||
{
|
||||
for(uint32 i = 0; i < uiAmount; ++i)
|
||||
m_creature->SummonCreature(NPC_CRIMSON_ACOLYTE, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(uiDiff);
|
||||
|
||||
if (IsOnHold)
|
||||
{
|
||||
if (m_uiWave_Timer < uiDiff)
|
||||
{
|
||||
switch(m_uiWave)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_BREAKOUT3, m_creature);
|
||||
SummonAcolyte(3);
|
||||
m_uiWave_Timer = 20000;
|
||||
break;
|
||||
case 1:
|
||||
DoScriptText(SAY_BREAKOUT4, m_creature);
|
||||
SummonAcolyte(3);
|
||||
m_uiWave_Timer = 20000;
|
||||
break;
|
||||
case 2:
|
||||
DoScriptText(SAY_BREAKOUT5, m_creature);
|
||||
SummonAcolyte(4);
|
||||
m_uiWave_Timer = 20000;
|
||||
break;
|
||||
case 3:
|
||||
DoScriptText(SAY_BREAKOUT6, m_creature);
|
||||
m_creature->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329, -6045.818, 127.583, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
|
||||
m_uiWave_Timer = 1000;
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
Unit* pTemp = Unit::GetUnit(*m_creature, m_uiValrothGUID);
|
||||
|
||||
if (!pTemp || !pTemp->isAlive())
|
||||
{
|
||||
DoScriptText(SAY_BREAKOUT8, m_creature);
|
||||
m_uiWave_Timer = 5000;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_uiWave_Timer = 2500;
|
||||
return; //return, we don't want m_uiWave to increment now
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
DoScriptText(SAY_BREAKOUT9, m_creature);
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
|
||||
m_uiWave_Timer = 2500;
|
||||
break;
|
||||
case 6:
|
||||
DoScriptText(SAY_BREAKOUT10, m_creature);
|
||||
IsOnHold = false;
|
||||
break;
|
||||
}
|
||||
|
||||
++m_uiWave;
|
||||
}
|
||||
else
|
||||
m_uiWave_Timer -= uiDiff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_koltira_deathweaver(Creature* pCreature)
|
||||
{
|
||||
npc_koltira_deathweaverAI* pTempAI = new npc_koltira_deathweaverAI(pCreature);
|
||||
|
||||
pTempAI->FillPointMovementListForCreature();
|
||||
|
||||
return (CreatureAI*)pTempAI;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_koltira_deathweaver(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
|
||||
{
|
||||
if (pQuest->GetQuestId() == QUEST_BREAKOUT)
|
||||
{
|
||||
pCreature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
CAST_AI(npc_escortAI,pCreature->AI())->Start(false, true, false, pPlayer->GetGUID());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
##Quest 12848
|
||||
######*/
|
||||
@@ -1241,6 +1426,12 @@ void AddSC_the_scarlet_enclave()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_koltira_deathweaver";
|
||||
newscript->GetAI = &GetAI_npc_koltira_deathweaver;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_koltira_deathweaver;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_unworthy_initiate";
|
||||
newscript->GetAI = &GetAI_npc_unworthy_initiate;
|
||||
|
||||
+3
-2
@@ -41,10 +41,11 @@ EndScriptData */
|
||||
#define H_SPELL_SHADOW_BOLT 39297
|
||||
#define SPELL_SUMMON_FIENDISH_HOUND 30707
|
||||
|
||||
struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI
|
||||
{
|
||||
boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
boss_omor_the_unscarredAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
HeroicMode = m_creature->GetMap()->IsHeroic();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ void AddSC_boss_warchief_kargath_bladefist()
|
||||
Script *newscript;
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_warchief_kargath_bladefist";
|
||||
newscript->GetAI = GetAI_boss_warchief_kargath_bladefist;
|
||||
newscript->GetAI = &GetAI_boss_warchief_kargath_bladefist;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ EndScriptData */
|
||||
|
||||
void SummonCroneIfReady(ScriptedInstance* pInstance, Creature* pCreature)
|
||||
{
|
||||
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, 0); // Increment DeathCount
|
||||
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount
|
||||
|
||||
if(pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4)
|
||||
{
|
||||
if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96, -1755.95, pCreature->GetPositionZ(), 4.64, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILISECONDS))
|
||||
|
||||
@@ -189,7 +189,12 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance
|
||||
break;
|
||||
Encounters[11] = data;
|
||||
break;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT: ++OzDeathCount; break;
|
||||
case DATA_OPERA_OZ_DEATHCOUNT:
|
||||
if (data == SPECIAL)
|
||||
++OzDeathCount;
|
||||
else if (data == IN_PROGRESS)
|
||||
OzDeathCount = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(data == DONE)
|
||||
|
||||
@@ -304,6 +304,11 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
||||
return;
|
||||
|
||||
pInstance->SetData(DATA_OPERA_EVENT, IN_PROGRESS);
|
||||
|
||||
//resets count for this event, in case earlier failed
|
||||
if (Event == EVENT_OZ)
|
||||
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, IN_PROGRESS);
|
||||
|
||||
pInstance->HandleGameObject(pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT), true);
|
||||
|
||||
m_creature->CastSpell(m_creature, SPELL_TUXEDO, true);
|
||||
|
||||
@@ -83,9 +83,12 @@ EndScriptData */
|
||||
#define ADD_8Z -229.683182
|
||||
#define ADD_8O 4.693108
|
||||
|
||||
struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL boss_ragnarosAI : public ScriptedAI
|
||||
{
|
||||
boss_ragnarosAI(Creature *c) : Scripted_NoMovementAI(c) {}
|
||||
boss_ragnarosAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint32 WrathOfRagnaros_Timer;
|
||||
uint32 HandOfRagnaros_Timer;
|
||||
|
||||
@@ -80,14 +80,20 @@ bool GossipSelect_npc_braug_dimspirit(Player *player, Creature *_Creature, uint3
|
||||
## npc_kaya_flathoof
|
||||
######*/
|
||||
|
||||
#define SAY_START -1000347
|
||||
#define SAY_AMBUSH -1000348
|
||||
#define SAY_END -1000349
|
||||
enum
|
||||
{
|
||||
FACTION_ESCORTEE_H = 775,
|
||||
|
||||
#define QUEST_PK 6523
|
||||
#define MOB_GB 11912
|
||||
#define MOB_GR 11910
|
||||
#define MOB_GS 11913
|
||||
NPC_GRIMTOTEM_RUFFIAN = 11910,
|
||||
NPC_GRIMTOTEM_BRUTE = 11912,
|
||||
NPC_GRIMTOTEM_SORCERER = 11913,
|
||||
|
||||
SAY_START = -1000347,
|
||||
SAY_AMBUSH = -1000348,
|
||||
SAY_END = -1000349,
|
||||
|
||||
QUEST_PROTECT_KAYA = 6523
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
|
||||
{
|
||||
@@ -102,16 +108,16 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 22:
|
||||
case 16:
|
||||
DoScriptText(SAY_AMBUSH, m_creature);
|
||||
m_creature->SummonCreature(MOB_GB, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(MOB_GR, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(MOB_GS, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
|
||||
m_creature->SummonCreature(NPC_GRIMTOTEM_BRUTE, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
m_creature->SummonCreature(NPC_GRIMTOTEM_RUFFIAN, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
m_creature->SummonCreature(NPC_GRIMTOTEM_SORCERER, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
break;
|
||||
case 23: m_creature->SetInFront(player);
|
||||
case 18: m_creature->SetInFront(player);
|
||||
DoScriptText(SAY_END, m_creature, player);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_PK, m_creature);
|
||||
CAST_PLR(player)->GroupEventHappens(QUEST_PROTECT_KAYA, m_creature);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +137,7 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
|
||||
{
|
||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||
if (player)
|
||||
CAST_PLR(player)->FailQuest(QUEST_PK);
|
||||
CAST_PLR(player)->FailQuest(QUEST_PROTECT_KAYA);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +149,7 @@ struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
|
||||
|
||||
bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_PK)
|
||||
if (quest->GetQuestId() == QUEST_PROTECT_KAYA)
|
||||
{
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, true, false, player->GetGUID());
|
||||
DoScriptText(SAY_START, creature);
|
||||
@@ -155,34 +161,11 @@ bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest con
|
||||
|
||||
CreatureAI* GetAI_npc_kaya_flathoofAI(Creature *_Creature)
|
||||
{
|
||||
npc_kaya_flathoofAI* thisAI = new npc_kaya_flathoofAI(_Creature);
|
||||
npc_kaya_flathoofAI* kayaAI = new npc_kaya_flathoofAI(_Creature);
|
||||
|
||||
thisAI->AddWaypoint(0, 122.37, -345.80, 3.59);
|
||||
thisAI->AddWaypoint(1, 113.69, -350.01, 4.54);
|
||||
thisAI->AddWaypoint(2, 107.32, -353.09, 3.33);
|
||||
thisAI->AddWaypoint(3, 99.25, -342.43, 2.87);
|
||||
thisAI->AddWaypoint(4, 111.19, -315.60, 3.71);
|
||||
thisAI->AddWaypoint(5, 109.99, -293.92, 5.16);
|
||||
thisAI->AddWaypoint(6, 104.59, -268.27, 4.78);
|
||||
thisAI->AddWaypoint(7, 82.80, -247.28, 5.73);
|
||||
thisAI->AddWaypoint(8, 66.44, -245.99, 5.85);
|
||||
thisAI->AddWaypoint(9, 34.36, -246.01, 5.97);
|
||||
thisAI->AddWaypoint(10, 13.24, -245.61, 5.25);
|
||||
thisAI->AddWaypoint(11, -10.27, -248.66, 4.69);
|
||||
thisAI->AddWaypoint(12, -26.07, -262.76, 0.01);
|
||||
thisAI->AddWaypoint(13, -33.15, -282.03, -4.12);
|
||||
thisAI->AddWaypoint(14, -28.42, -315.52, -8.56);
|
||||
thisAI->AddWaypoint(15, -32.05, -339.34, -10.84);
|
||||
thisAI->AddWaypoint(16, -35.22, -358.11, -16.20);
|
||||
thisAI->AddWaypoint(17, -51.57, -391.63, -24.85);
|
||||
thisAI->AddWaypoint(18, -58.58, -409.08, -29.97);
|
||||
thisAI->AddWaypoint(19, -60.37, -441.23, -36.80);
|
||||
thisAI->AddWaypoint(20, -59.03, -476.39, -44.98);
|
||||
thisAI->AddWaypoint(21, -53.18, -490.31, -46.11);
|
||||
thisAI->AddWaypoint(22, -43.77, -497.99, -46.13, 3000);// summon
|
||||
thisAI->AddWaypoint(23, -41.77, -518.15, -46.13, 5000);//end
|
||||
kayaAI->FillPointMovementListForCreature();
|
||||
|
||||
return thisAI;
|
||||
return kayaAI;
|
||||
}
|
||||
|
||||
/*######
|
||||
|
||||
@@ -106,9 +106,12 @@ EndScriptData */
|
||||
#define KICK_Y 1984.0f
|
||||
#define KICK_Z -96.0f
|
||||
|
||||
struct TRINITY_DLL_DECL flesh_tentacleAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL flesh_tentacleAI : public ScriptedAI
|
||||
{
|
||||
flesh_tentacleAI(Creature *c) : Scripted_NoMovementAI(c), Parent(0) {}
|
||||
flesh_tentacleAI(Creature *c) : ScriptedAI(c), Parent(0)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint64 Parent;
|
||||
uint32 CheckTimer;
|
||||
@@ -428,10 +431,12 @@ struct TRINITY_DLL_DECL eye_of_cthunAI : public Scripted_NoMovementAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
|
||||
{
|
||||
cthunAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
cthunAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
pInst = c->GetInstanceData();
|
||||
if (!pInst)
|
||||
error_log("TSCR: No Instance eye_of_cthunAI");
|
||||
@@ -909,10 +914,12 @@ struct TRINITY_DLL_DECL cthunAI : public Scripted_NoMovementAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL eye_tentacleAI : public ScriptedAI
|
||||
{
|
||||
eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
eye_tentacleAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
Portal = pPortal->GetGUID();
|
||||
}
|
||||
@@ -968,10 +975,12 @@ struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL claw_tentacleAI : public ScriptedAI
|
||||
{
|
||||
claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
claw_tentacleAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
Portal = pPortal->GetGUID();
|
||||
}
|
||||
@@ -1057,10 +1066,12 @@ struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL giant_claw_tentacleAI : public ScriptedAI
|
||||
{
|
||||
giant_claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
giant_claw_tentacleAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
Portal = pPortal->GetGUID();
|
||||
}
|
||||
@@ -1156,10 +1167,12 @@ struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI
|
||||
struct TRINITY_DLL_DECL giant_eye_tentacleAI : public ScriptedAI
|
||||
{
|
||||
giant_eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
|
||||
giant_eye_tentacleAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
|
||||
if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
Portal = pPortal->GetGUID();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user