Files
TCPlayerbotCore/src/server/scripts/Outland/hellfire_peninsula.cpp
T

543 lines
16 KiB
C++
Raw Normal View History

/*
* Copyright (C) 2008-2010 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2009-10-17 15:51:44 -07:00
/* ScriptData
SDName: Hellfire_Peninsula
SD%Complete: 100
SDComment: Quest support: 9375, 9410, 9418, 10129, 10146, 10162, 10163, 10340, 10346, 10347, 10382 (Special flight paths)
SDCategory: Hellfire Peninsula
EndScriptData */
2009-10-17 15:51:44 -07:00
/* ContentData
2008-12-22 04:03:54 +02:00
npc_aeranas
npc_ancestral_wolf
2008-12-22 04:03:54 +02:00
go_haaleshi_altar
2009-08-16 02:46:55 +02:00
npc_naladu
2009-08-16 17:54:31 +02:00
npc_tracy_proudwell
2009-08-17 01:41:39 +02:00
npc_trollbane
npc_wounded_blood_elf
EndContentData */
2009-10-17 15:51:44 -07:00
#include "ScriptPCH.h"
2010-01-19 11:36:05 +01:00
#include "ScriptedEscortAI.h"
2009-10-17 15:51:44 -07:00
2008-12-22 04:03:54 +02:00
/*######
## npc_aeranas
######*/
2009-10-17 15:51:44 -07:00
2009-10-17 07:42:48 -07:00
enum eAeranas
2009-05-20 23:08:46 +02:00
{
SAY_SUMMON = -1000138,
SAY_FREE = -1000139,
2009-10-17 15:51:44 -07:00
2009-05-20 23:08:46 +02:00
FACTION_HOSTILE = 16,
FACTION_FRIENDLY = 35,
2009-10-17 15:51:44 -07:00
2009-05-20 23:08:46 +02:00
SPELL_ENVELOPING_WINDS = 15535,
SPELL_SHOCK = 12553,
2009-10-17 15:51:44 -07:00
2009-05-20 23:08:46 +02:00
C_AERANAS = 17085
};
2010-08-08 22:54:58 +06:00
2008-12-22 04:03:54 +02:00
class npc_aeranas : public CreatureScript
2010-08-08 22:54:58 +06:00
{
public:
2009-10-17 15:51:44 -07:00
npc_aeranas() : CreatureScript("npc_aeranas") { }
2010-08-08 22:54:58 +06:00
2008-12-22 04:03:54 +02:00
CreatureAI* GetAI(Creature* pCreature) const
2010-08-08 22:54:58 +06:00
{
2008-12-22 04:03:54 +02:00
return new npc_aeranasAI (pCreature);
2009-10-17 15:51:44 -07:00
}
2010-08-08 22:54:58 +06:00
2008-12-22 04:03:54 +02:00
struct npc_aeranasAI : public ScriptedAI
2010-08-08 22:54:58 +06:00
{
2009-10-17 15:51:44 -07:00
npc_aeranasAI(Creature* c) : ScriptedAI(c) {}
2010-08-08 22:54:58 +06:00
uint32 Faction_Timer;
uint32 EnvelopingWinds_Timer;
2009-10-17 15:51:44 -07:00
uint32 Shock_Timer;
2010-08-08 22:54:58 +06:00
2008-12-22 04:03:54 +02:00
void Reset()
2010-08-08 22:54:58 +06:00
{
Faction_Timer = 8000;
EnvelopingWinds_Timer = 9000;
Shock_Timer = 5000;
2010-04-14 23:07:41 +02:00
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
2010-08-08 22:54:58 +06:00
me->setFaction(FACTION_FRIENDLY);
2008-12-22 04:03:54 +02:00
DoScriptText(SAY_SUMMON, me);
2009-10-17 15:51:44 -07:00
}
2010-08-08 22:54:58 +06:00
2008-12-22 04:03:54 +02:00
void UpdateAI(const uint32 diff)
2010-08-08 22:54:58 +06:00
{
if (Faction_Timer)
{
if (Faction_Timer <= diff)
{
me->setFaction(FACTION_HOSTILE);
Faction_Timer = 0;
} else Faction_Timer -= diff;
2009-10-17 15:51:44 -07:00
}
2010-08-08 22:54:58 +06:00
if (!UpdateVictim())
return;
if ((me->GetHealth()*100) / me->GetMaxHealth() < 30)
{
me->setFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->RemoveAllAuras();
me->DeleteThreatList();
me->CombatStop(true);
DoScriptText(SAY_FREE, me);
return;
}
if (Shock_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SHOCK);
Shock_Timer = 10000;
} else Shock_Timer -= diff;
if (EnvelopingWinds_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_ENVELOPING_WINDS);
EnvelopingWinds_Timer = 25000;
} else EnvelopingWinds_Timer -= diff;
DoMeleeAttackIfReady();
}
2009-10-17 15:51:44 -07:00
};
2008-12-22 04:03:54 +02:00
2009-10-17 15:51:44 -07:00
};
2009-09-19 12:25:26 -07:00
/*######
## npc_ancestral_wolf
2009-10-17 15:51:44 -07:00
######*/
2009-10-17 07:42:48 -07:00
2009-09-19 12:25:26 -07:00
enum eAncestralWolf
{
EMOTE_WOLF_LIFT_HEAD = -1000496,
EMOTE_WOLF_HOWL = -1000497,
2009-10-17 15:51:44 -07:00
SAY_WOLF_WELCOME = -1000498,
2009-09-19 12:25:26 -07:00
2009-10-17 15:51:44 -07:00
SPELL_ANCESTRAL_WOLF_BUFF = 29981,
2009-09-19 12:25:26 -07:00
NPC_RYGA = 17123
2010-08-08 22:54:58 +06:00
};
2009-09-19 12:25:26 -07:00
2010-08-08 22:54:58 +06:00
class npc_ancestral_wolf : public CreatureScript
{
2009-10-17 15:51:44 -07:00
public:
2010-08-08 22:54:58 +06:00
npc_ancestral_wolf() : CreatureScript("npc_ancestral_wolf") { }
2009-09-19 12:25:26 -07:00
2010-08-08 22:54:58 +06:00
CreatureAI* GetAI(Creature* pCreature) const
2009-09-19 12:25:26 -07:00
{
2009-10-17 15:51:44 -07:00
return new npc_ancestral_wolfAI(pCreature);
2010-08-08 22:54:58 +06:00
}
2009-09-19 12:25:26 -07:00
2010-08-08 22:54:58 +06:00
struct npc_ancestral_wolfAI : public npc_escortAI
{
npc_ancestral_wolfAI(Creature* pCreature) : npc_escortAI(pCreature)
{
if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
Start(false, false, pCreature->GetOwner()->GetGUID());
2009-10-17 15:51:44 -07:00
else
2010-08-08 22:54:58 +06:00
sLog.outError("TRINITY: npc_ancestral_wolf can not obtain owner or owner is not a player.");
pCreature->SetSpeed(MOVE_WALK, 1.5f);
2009-10-17 15:51:44 -07:00
Reset();
2010-08-08 22:54:58 +06:00
}
Unit* pRyga;
2009-09-19 12:25:26 -07:00
2010-08-08 22:54:58 +06:00
void Reset()
{
2009-09-19 12:25:26 -07:00
pRyga = NULL;
2010-08-08 22:54:58 +06:00
DoCast(me, SPELL_ANCESTRAL_WOLF_BUFF, true);
}
void MoveInLineOfSight(Unit* pWho)
{
if (!pRyga && pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RYGA && me->IsWithinDistInMap(pWho, 15.0f))
pRyga = pWho;
npc_escortAI::MoveInLineOfSight(pWho);
}
void WaypointReached(uint32 uiPointId)
{
switch(uiPointId)
{
case 0:
DoScriptText(EMOTE_WOLF_LIFT_HEAD, me);
break;
case 2:
DoScriptText(EMOTE_WOLF_HOWL, me);
break;
case 50:
if (pRyga && pRyga->isAlive() && !pRyga->isInCombat())
DoScriptText(SAY_WOLF_WELCOME, pRyga);
break;
}
}
2009-09-19 12:25:26 -07:00
};
2009-10-17 15:51:44 -07:00
};
2008-12-22 04:03:54 +02:00
/*######
2010-08-08 22:54:58 +06:00
## go_haaleshi_altar
2008-12-22 04:03:54 +02:00
######*/
2010-08-08 22:54:58 +06:00
class go_haaleshi_altar : public GameObjectScript
{
public:
go_haaleshi_altar() : GameObjectScript("go_haaleshi_altar") { }
bool OnGossipHello(Player* /*pPlayer*/, GameObject* pGo)
{
pGo->SummonCreature(C_AERANAS,-1321.79, 4043.80, 116.24, 1.25, TEMPSUMMON_TIMED_DESPAWN, 180000);
return false;
2009-10-17 15:51:44 -07:00
}
2009-08-16 02:46:55 +02:00
};
2009-10-17 15:51:44 -07:00
/*######
2009-08-16 02:46:55 +02:00
## npc_naladu
2009-10-17 15:51:44 -07:00
######*/
2009-10-17 07:42:48 -07:00
2009-08-16 02:46:55 +02:00
#define GOSSIP_NALADU_ITEM1 "Why don't you escape?"
enum eNaladu
2010-08-08 22:54:58 +06:00
{
2009-08-16 02:46:55 +02:00
GOSSIP_TEXTID_NALADU1 = 9788
2010-08-08 22:54:58 +06:00
};
2009-10-17 15:51:44 -07:00
class npc_naladu : public CreatureScript
2010-08-08 22:54:58 +06:00
{
public:
npc_naladu() : CreatureScript("npc_naladu") { }
2009-10-17 15:51:44 -07:00
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
2010-08-08 22:54:58 +06:00
{
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_NALADU1, pCreature->GetGUID());
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_NALADU_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
}
2009-08-16 17:54:31 +02:00
};
2009-10-17 15:51:44 -07:00
2009-08-16 17:54:31 +02:00
/*######
## npc_tracy_proudwell
######*/
2009-10-17 15:51:44 -07:00
2009-10-17 07:42:48 -07:00
#define GOSSIP_TEXT_REDEEM_MARKS "I have marks to redeem!"
2009-08-16 17:54:31 +02:00
#define GOSSIP_TRACY_PROUDWELL_ITEM1 "I heard that your dog Fei Fei took Klatu's prayer beads..."
#define GOSSIP_TRACY_PROUDWELL_ITEM2 "<back>"
enum eTracy
2010-08-08 22:54:58 +06:00
{
2009-08-16 17:54:31 +02:00
GOSSIP_TEXTID_TRACY_PROUDWELL1 = 10689,
2010-08-08 22:54:58 +06:00
QUEST_DIGGING_FOR_PRAYER_BEADS = 10916
};
2009-10-17 15:51:44 -07:00
2010-08-08 22:54:58 +06:00
class npc_tracy_proudwell : public CreatureScript
{
public:
npc_tracy_proudwell() : CreatureScript("npc_tracy_proudwell") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TRACY_PROUDWELL1, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
break;
2010-08-08 22:54:58 +06:00
case GOSSIP_ACTION_TRADE:
pPlayer->SEND_VENDORLIST(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
break;
2010-08-08 22:54:58 +06:00
}
2009-08-16 17:54:31 +02:00
2010-08-08 22:54:58 +06:00
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (pCreature->isVendor())
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_REDEEM_MARKS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
2009-08-16 17:54:31 +02:00
if (pPlayer->GetQuestStatus(QUEST_DIGGING_FOR_PRAYER_BEADS) == QUEST_STATUS_INCOMPLETE)
2009-10-17 15:51:44 -07:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TRACY_PROUDWELL_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
2010-08-08 22:54:58 +06:00
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
return true;
2009-08-17 01:41:39 +02:00
}
};
2009-10-17 15:51:44 -07:00
2009-08-17 01:41:39 +02:00
/*######
## npc_trollbane
2009-10-17 15:51:44 -07:00
######*/
2009-10-17 07:42:48 -07:00
2009-08-17 01:41:39 +02:00
#define GOSSIP_TROLLBANE_ITEM1 "Tell me of the Sons of Lothar."
#define GOSSIP_TROLLBANE_ITEM2 "<more>"
#define GOSSIP_TROLLBANE_ITEM3 "Tell me of your homeland."
enum eTrollbane
2010-08-08 22:54:58 +06:00
{
2009-08-17 01:41:39 +02:00
GOSSIP_TEXTID_TROLLBANE1 = 9932,
2010-08-08 22:54:58 +06:00
GOSSIP_TEXTID_TROLLBANE2 = 9933,
GOSSIP_TEXTID_TROLLBANE3 = 8772
2009-10-17 15:51:44 -07:00
};
2010-08-08 22:54:58 +06:00
class npc_trollbane : public CreatureScript
{
public:
npc_trollbane() : CreatureScript("npc_trollbane") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
{
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE1, pCreature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
2009-10-17 15:51:44 -07:00
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE2, pCreature->GetGUID());
2010-08-08 22:54:58 +06:00
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_TROLLBANE3, pCreature->GetGUID());
break;
2009-08-17 01:41:39 +02:00
}
2010-08-08 22:54:58 +06:00
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
{
if (pCreature->isQuestGiver())
2009-08-17 01:41:39 +02:00
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
2009-10-17 15:51:44 -07:00
2010-08-08 22:54:58 +06:00
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_TROLLBANE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
2009-10-17 15:51:44 -07:00
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
return true;
}
2009-10-17 15:51:44 -07:00
};
2009-10-17 07:42:48 -07:00
2009-05-20 23:08:46 +02:00
/*######
## npc_wounded_blood_elf
######*/
enum eWoundedBloodElf
{
2009-10-17 15:51:44 -07:00
SAY_ELF_START = -1000117,
2009-05-20 23:08:46 +02:00
SAY_ELF_SUMMON1 = -1000118,
SAY_ELF_RESTING = -1000119,
2010-08-08 22:54:58 +06:00
SAY_ELF_SUMMON2 = -1000120,
SAY_ELF_COMPLETE = -1000121,
2010-08-08 22:54:58 +06:00
SAY_ELF_AGGRO = -1000122,
2009-10-17 15:51:44 -07:00
QUEST_ROAD_TO_FALCON_WATCH = 9375
2010-08-08 22:54:58 +06:00
};
2009-02-09 08:16:34 -05:00
2010-08-08 22:54:58 +06:00
class npc_wounded_blood_elf : public CreatureScript
2009-02-09 08:16:34 -05:00
{
2010-08-08 22:54:58 +06:00
public:
npc_wounded_blood_elf() : CreatureScript("npc_wounded_blood_elf") { }
bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const* quest)
{
2009-02-09 08:16:34 -05:00
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
2009-10-17 15:51:44 -07:00
{
2010-08-08 22:54:58 +06:00
if (npc_escortAI* pEscortAI = CAST_AI(npc_wounded_blood_elf::npc_wounded_blood_elfAI, pCreature->AI()))
pEscortAI->Start(true, false, pPlayer->GetGUID());
2009-10-17 15:51:44 -07:00
2010-08-08 22:54:58 +06:00
// Change faction so mobs attack
2009-02-09 08:16:34 -05:00
pCreature->setFaction(775);
2010-08-08 22:54:58 +06:00
}
2009-02-09 08:16:34 -05:00
2009-10-17 15:51:44 -07:00
return true;
2010-08-08 22:54:58 +06:00
}
2009-02-09 08:16:34 -05:00
2010-08-08 22:54:58 +06:00
CreatureAI* GetAI(Creature* pCreature) const
2009-10-17 15:51:44 -07:00
{
2010-08-08 22:54:58 +06:00
return new npc_wounded_blood_elfAI(pCreature);
}
2009-10-17 15:51:44 -07:00
struct npc_wounded_blood_elfAI : public npc_escortAI
2010-08-08 22:54:58 +06:00
{
npc_wounded_blood_elfAI(Creature *c) : npc_escortAI(c) {}
void WaypointReached(uint32 i)
{
Player* pPlayer = GetPlayerForEscort();
if (!pPlayer)
return;
switch (i)
{
case 0:
DoScriptText(SAY_ELF_START, me, pPlayer);
break;
case 9:
DoScriptText(SAY_ELF_SUMMON1, me, pPlayer);
// Spawn two Haal'eshi Talonguard
DoSpawnCreature(16967, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16967, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 13:
DoScriptText(SAY_ELF_RESTING, me, pPlayer);
break;
case 14:
DoScriptText(SAY_ELF_SUMMON2, me, pPlayer);
// Spawn two Haal'eshi Windwalker
DoSpawnCreature(16966, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
DoSpawnCreature(16966, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
break;
case 27:
DoScriptText(SAY_ELF_COMPLETE, me, pPlayer);
// Award quest credit
pPlayer->GroupEventHappens(QUEST_ROAD_TO_FALCON_WATCH,me);
break;
}
}
void Reset() { }
void EnterCombat(Unit* /*who*/)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
DoScriptText(SAY_ELF_AGGRO, me);
}
2009-10-17 15:51:44 -07:00
void JustSummoned(Creature* summoned)
{
summoned->AI()->AttackStart(me);
}
};
};
/*######
## npc_fel_guard_hound
######*/
2010-08-08 22:54:58 +06:00
enum eFelGuard
2010-08-08 22:54:58 +06:00
{
SPELL_SUMMON_POO = 37688,
2010-08-08 22:54:58 +06:00
NPC_DERANGED_HELBOAR = 16863
};
2010-08-08 22:54:58 +06:00
class npc_fel_guard_hound : public CreatureScript
{
2010-08-08 22:54:58 +06:00
public:
npc_fel_guard_hound() : CreatureScript("npc_fel_guard_hound") { }
2010-08-08 22:54:58 +06:00
CreatureAI* GetAI(Creature* pCreature) const
{
return new npc_fel_guard_houndAI(pCreature);
}
struct npc_fel_guard_houndAI : public ScriptedAI
{
npc_fel_guard_houndAI(Creature* pCreature) : ScriptedAI(pCreature) {}
uint32 uiCheckTimer;
2010-08-08 22:54:58 +06:00
uint64 uiHelboarGUID;
2010-08-08 22:54:58 +06:00
void Reset()
{
uiCheckTimer = 5000; //check for creature every 5 sec
2010-08-08 22:54:58 +06:00
uiHelboarGUID = 0;
}
void MovementInform(uint32 uiType, uint32 uiId)
{
if (uiType != POINT_MOTION_TYPE || uiId != 1)
return;
if (Creature* pHelboar = me->GetCreature(*me,uiHelboarGUID))
{
2010-08-08 22:54:58 +06:00
pHelboar->RemoveCorpse();
DoCast(SPELL_SUMMON_POO);
2010-08-08 22:54:58 +06:00
if (Player* pOwner = me->GetCharmerOrOwnerPlayerOrPlayerItself())
2010-08-08 22:54:58 +06:00
me->GetMotionMaster()->MoveFollow(pOwner,0.0f,0.0f);
}
2010-08-08 22:54:58 +06:00
}
void UpdateAI(const uint32 uiDiff)
{
if (uiCheckTimer <= uiDiff)
{
2010-08-08 22:54:58 +06:00
if (Creature* pHelboar = me->FindNearestCreature(NPC_DERANGED_HELBOAR, 10.0f, false))
{
if (pHelboar->GetGUID() != uiHelboarGUID && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE && !me->FindCurrentSpellBySpellId(SPELL_SUMMON_POO))
2010-08-08 22:54:58 +06:00
{
uiHelboarGUID = pHelboar->GetGUID();
me->GetMotionMaster()->MovePoint(1,pHelboar->GetPositionX(),pHelboar->GetPositionY(),pHelboar->GetPositionZ());
}
}
uiCheckTimer = 5000;
}else uiCheckTimer -= uiDiff;
if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
2010-08-08 22:54:58 +06:00
}
};
};
void AddSC_hellfire_peninsula()
{
2009-02-17 20:07:49 -06:00
new npc_aeranas();