aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorVincent_Michael <Vincent_Michael@gmx.de>2014-01-21 21:57:09 +0100
committerVincent_Michael <Vincent_Michael@gmx.de>2014-01-21 21:58:30 +0100
commit3f99890b129c836cd364169ec4d69620bff0ca82 (patch)
treec71f17ba9f1425ec1044b6dfec60c4e8aa2902a8 /src/server/scripts/Outland
parent7c4a16e6c2f9cd6faa4d66ade9fa017267310632 (diff)
parent101ac7f5110030ac12fa13f3e9a9d2c671e48734 (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp39
-rw-r--r--src/server/scripts/Outland/zone_blades_edge_mountains.cpp6
2 files changed, 23 insertions, 22 deletions
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index 6d632c81bca..2ffa7284ec9 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -139,21 +139,20 @@ public:
RAdvisors[0] = instance->GetData64(DATA_SHARKKIS);
RAdvisors[1] = instance->GetData64(DATA_TIDALVESS);
RAdvisors[2] = instance->GetData64(DATA_CARIBDIS);
- //Respawn of the 3 Advisors
- Creature* pAdvisor = NULL;
- for (int i=0; i<MAX_ADVISORS; ++i)
+ // Respawn of the 3 Advisors
+ for (uint8 i = 0; i < MAX_ADVISORS; ++i)
if (RAdvisors[i])
{
- pAdvisor = (Unit::GetCreature((*me), RAdvisors[i]));
- if (pAdvisor && !pAdvisor->IsAlive())
+ Creature* advisor = ObjectAccessor::GetCreature(*me, RAdvisors[i]);
+ if (advisor && !advisor->IsAlive())
{
- pAdvisor->Respawn();
- pAdvisor->AI()->EnterEvadeMode();
- pAdvisor->GetMotionMaster()->MoveTargetedHome();
+ advisor->Respawn();
+ advisor->AI()->EnterEvadeMode();
+ advisor->GetMotionMaster()->MoveTargetedHome();
}
}
- instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
+ instance->SetData(DATA_KARATHRESSEVENT, NOT_STARTED);
}
void EventSharkkisDeath()
@@ -273,8 +272,8 @@ public:
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
if (Advisors[i])
{
- Advisor = (Unit::GetCreature(*me, Advisors[i]));
- if (Advisor && Advisor->IsAlive())
+ Creature* advisor = ObjectAccessor::GetCreature(*me, Advisors[i]);
+ if (advisor && advisor->IsAlive())
{
continueTriggering = true;
break;
@@ -333,11 +332,9 @@ public:
pet = false;
- Creature* Pet = Unit::GetCreature(*me, SummonedPet);
+ Creature* Pet = ObjectAccessor::GetCreature(*me, SummonedPet);
if (Pet && Pet->IsAlive())
- {
Pet->DealDamage(Pet, Pet->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
- }
SummonedPet = 0;
@@ -346,7 +343,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (Creature* Karathress = (Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS))))
+ if (Creature* Karathress = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KARATHRESS)))
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventSharkkisDeath();
}
@@ -394,11 +391,11 @@ public:
if (TheBeastWithin_Timer <= diff)
{
DoCast(me, SPELL_THE_BEAST_WITHIN);
- Creature* Pet = Unit::GetCreature(*me, SummonedPet);
+
+ Creature* Pet = ObjectAccessor::GetCreature(*me, SummonedPet);
if (Pet && Pet->IsAlive())
- {
Pet->CastSpell(Pet, SPELL_PET_ENRAGE, true);
- }
+
TheBeastWithin_Timer = 30000;
} else TheBeastWithin_Timer -= diff;
@@ -472,7 +469,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))
+ if (Creature* Karathress = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KARATHRESS)))
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventTidalvessDeath();
}
@@ -588,7 +585,7 @@ public:
void JustDied(Unit* /*killer*/) OVERRIDE
{
- if (Creature* Karathress = Unit::GetCreature((*me), instance->GetData64(DATA_KARATHRESS)))
+ if (Creature* Karathress = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KARATHRESS)))
CAST_AI(boss_fathomlord_karathress::boss_fathomlord_karathressAI, Karathress->AI())->EventCaribdisDeath();
}
@@ -612,7 +609,7 @@ public:
return;
//someone evaded!
- if (instance && !instance->GetData(DATA_KARATHRESSEVENT))
+ if (!instance->GetData(DATA_KARATHRESSEVENT))
{
EnterEvadeMode();
return;
diff --git a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
index cc58be26664..3f1579c42b1 100644
--- a/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
+++ b/src/server/scripts/Outland/zone_blades_edge_mountains.cpp
@@ -113,7 +113,10 @@ public:
struct npc_bloodmaul_bruteAI : public ScriptedAI
{
- npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature) { }
+ npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature)
+ {
+ hp30 = false;
+ }
void Reset() OVERRIDE
{
@@ -1128,6 +1131,7 @@ public:
npc_oscillating_frequency_scanner_master_bunnyAI(Creature* creature) : ScriptedAI(creature)
{
playerGuid = 0;
+ timer = 500;
}
void Reset() OVERRIDE