mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Scripts/BladesEdgeMountains: Adjust script to work for quest 10545 also
This commit is contained in:
@@ -431,9 +431,11 @@ public:
|
||||
|
||||
enum eBloodmaul
|
||||
{
|
||||
NPC_OGRE_BRUTE = 19995,
|
||||
NPC_QUEST_CREDIT = 21241,
|
||||
GO_KEG = 184315
|
||||
NPC_OGRE_BRUTE = 19995,
|
||||
NPC_QUEST_CREDIT = 21241,
|
||||
GO_KEG = 184315,
|
||||
QUEST_GETTING_THE_BLADESPIRE_TANKED = 10512,
|
||||
QUEST_BLADESPIRE_KEGGER = 10545,
|
||||
};
|
||||
|
||||
class npc_bloodmaul_brutebane : public CreatureScript
|
||||
@@ -441,14 +443,14 @@ class npc_bloodmaul_brutebane : public CreatureScript
|
||||
public:
|
||||
npc_bloodmaul_brutebane() : CreatureScript("npc_bloodmaul_brutebane") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_bloodmaul_brutebaneAI (pCreature);
|
||||
return new npc_bloodmaul_brutebaneAI(creature);
|
||||
}
|
||||
|
||||
struct npc_bloodmaul_brutebaneAI : public ScriptedAI
|
||||
{
|
||||
npc_bloodmaul_brutebaneAI(Creature *c) : ScriptedAI(c)
|
||||
npc_bloodmaul_brutebaneAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
if(Creature* Ogre = me->FindNearestCreature(NPC_OGRE_BRUTE, 50, true))
|
||||
{
|
||||
@@ -478,14 +480,14 @@ class npc_ogre_brute : public CreatureScript
|
||||
public:
|
||||
npc_ogre_brute() : CreatureScript("npc_ogre_brute") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ogre_bruteAI(pCreature);
|
||||
return new npc_ogre_bruteAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ogre_bruteAI : public ScriptedAI
|
||||
{
|
||||
npc_ogre_bruteAI(Creature *c) : ScriptedAI(c) {}
|
||||
npc_ogre_bruteAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint64 PlayerGUID;
|
||||
|
||||
@@ -494,13 +496,15 @@ public:
|
||||
PlayerGUID = 0;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!who || (!who->isAlive())) return;
|
||||
|
||||
if (me->IsWithinDistInMap(who, 50.0f) && (who->GetTypeId() == TYPEID_PLAYER) && who->ToPlayer()->GetQuestStatus(10512) == QUEST_STATUS_INCOMPLETE)
|
||||
if (me->IsWithinDistInMap(who, 50.0f))
|
||||
{
|
||||
PlayerGUID = who->GetGUID();
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
if (who->ToPlayer()->GetQuestStatus(QUEST_GETTING_THE_BLADESPIRE_TANKED || QUEST_BLADESPIRE_KEGGER) == QUEST_STATUS_INCOMPLETE)
|
||||
PlayerGUID = who->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user