Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
f517467817
116 files changed
+7709
-3082
No files matched your search
@@ -198,16 +198,14 @@ public:
|
||||
if (argstr == "off")
|
||||
{
|
||||
target->SetCommandStatusOff(CHEAT_WATERWALK);
|
||||
target->RemoveUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
|
||||
target->SendMovementWaterWalking(); // OFF
|
||||
target->SetWaterWalking(false);
|
||||
handler->SendSysMessage("Waterwalking is OFF. You can't walk on water.");
|
||||
return true;
|
||||
}
|
||||
else if (argstr == "on")
|
||||
{
|
||||
target->SetCommandStatusOn(CHEAT_WATERWALK);
|
||||
target->AddUnitMovementFlag(MOVEMENTFLAG_WATERWALKING);
|
||||
target->SendMovementWaterWalking(); // ON
|
||||
target->SetWaterWalking(true);
|
||||
handler->SendSysMessage("Waterwalking is ON. You can walk on water.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -103,15 +103,9 @@ public:
|
||||
|
||||
WorldPacket data;
|
||||
if (strncmp(args, "on", 3) == 0)
|
||||
{
|
||||
target->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY);
|
||||
target->SendMovementCanFlyChange();
|
||||
}
|
||||
target->SetCanFly(true);
|
||||
else if (strncmp(args, "off", 4) == 0)
|
||||
{
|
||||
target->RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY);
|
||||
target->SendMovementCanFlyChange();
|
||||
}
|
||||
target->SetCanFly(false);
|
||||
else
|
||||
{
|
||||
handler->SendSysMessage(LANG_USE_BOL);
|
||||
|
||||
@@ -153,7 +153,11 @@ public:
|
||||
// navmesh poly -> navmesh tile location
|
||||
dtQueryFilter filter = dtQueryFilter();
|
||||
dtPolyRef polyRef = INVALID_POLYREF;
|
||||
navmeshquery->findNearestPoly(location, extents, &filter, &polyRef, NULL);
|
||||
if (dtStatusFailed(navmeshquery->findNearestPoly(location, extents, &filter, &polyRef, NULL)))
|
||||
{
|
||||
handler->PSendSysMessage("Dt [??,??] (invalid poly, probably no tile loaded)");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (polyRef == INVALID_POLYREF)
|
||||
handler->PSendSysMessage("Dt [??, ??] (invalid poly, probably no tile loaded)");
|
||||
@@ -161,11 +165,16 @@ public:
|
||||
{
|
||||
dtMeshTile const* tile;
|
||||
dtPoly const* poly;
|
||||
navmesh->getTileAndPolyByRef(polyRef, &tile, &poly);
|
||||
if (tile)
|
||||
handler->PSendSysMessage("Dt [%02i, %02i]", tile->header->x, tile->header->y);
|
||||
else
|
||||
handler->PSendSysMessage("Dt [??, ??] (no tile loaded)");
|
||||
if (dtStatusSucceed(navmesh->getTileAndPolyByRef(polyRef, &tile, &poly)))
|
||||
{
|
||||
if (tile)
|
||||
{
|
||||
handler->PSendSysMessage("Dt [%02i,%02i]", tile->header->x, tile->header->y);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
handler->PSendSysMessage("Dt [??,??] (no tile loaded)");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -443,7 +443,7 @@ public:
|
||||
{
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetSpeed(MOVE_WALK, 5.0f, true);
|
||||
wp_reached = false;
|
||||
count = 0;
|
||||
@@ -476,7 +476,7 @@ public:
|
||||
instance->SetData(GAMEOBJECT_PUMPKIN_SHRINE, 0); //hide gameobject
|
||||
break;
|
||||
case 19:
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(false);
|
||||
break;
|
||||
case 20:
|
||||
{
|
||||
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
case PHASE_GROUND:
|
||||
me->CastStop(SPELL_FOG_BREATH);
|
||||
me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_NONE);
|
||||
me->StopMoving();
|
||||
me->SetSpeed(MOVE_RUN, 2.0f);
|
||||
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_FLIGHT, 60000);
|
||||
break;
|
||||
case PHASE_FLIGHT:
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(true);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1000);
|
||||
uiFlightCount = 0;
|
||||
uiBreathCount = 0;
|
||||
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
{
|
||||
OrbsEmpowered = 0;
|
||||
EmpowerCount = 0;
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setActive(true);
|
||||
|
||||
@@ -442,7 +442,7 @@ public:
|
||||
summoned->CastSpell(summoned, SPELL_SHADOW_CHANNELING, false);
|
||||
break;
|
||||
case CREATURE_ANVEENA:
|
||||
summoned->AddUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
summoned->SetDisableGravity(true);
|
||||
summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
|
||||
@@ -25,7 +25,6 @@ EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
mob_jadespine_basilisk
|
||||
npc_lore_keeper_of_norgannon
|
||||
go_keystone_chamber
|
||||
at_map_chamber
|
||||
EndContentData */
|
||||
|
||||
@@ -479,8 +479,7 @@ public:
|
||||
{
|
||||
if (temp->IsAlive() && !temp->GetVictim())
|
||||
{
|
||||
if (temp->HasUnitMovementFlag(MOVEMENTFLAG_WALKING))
|
||||
temp->SetWalk(false);
|
||||
temp->SetWalk(false);
|
||||
|
||||
if (temp->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
|
||||
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
+8
-8
@@ -132,9 +132,9 @@ bool GrandChampionsOutVehicle(Creature* me)
|
||||
|
||||
if (pGrandChampion1 && pGrandChampion2 && pGrandChampion3)
|
||||
{
|
||||
if (!pGrandChampion1->m_movementInfo.t_guid &&
|
||||
!pGrandChampion2->m_movementInfo.t_guid &&
|
||||
!pGrandChampion3->m_movementInfo.t_guid)
|
||||
if (!pGrandChampion1->m_movementInfo.transport.guid &&
|
||||
!pGrandChampion2->m_movementInfo.transport.guid &&
|
||||
!pGrandChampion3->m_movementInfo.transport.guid)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
}
|
||||
}else uiPhaseTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim() || me->m_movementInfo.t_guid)
|
||||
if (!UpdateVictim() || me->m_movementInfo.transport.guid)
|
||||
return;
|
||||
|
||||
if (uiInterceptTimer <= uiDiff)
|
||||
@@ -530,7 +530,7 @@ public:
|
||||
uiFireBallTimer = 5000;
|
||||
} else uiFireBallTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim() || me->m_movementInfo.t_guid)
|
||||
if (!UpdateVictim() || me->m_movementInfo.transport.guid)
|
||||
return;
|
||||
|
||||
if (uiFireBallTimer <= uiDiff)
|
||||
@@ -668,7 +668,7 @@ public:
|
||||
}
|
||||
}else uiPhaseTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim() || me->m_movementInfo.t_guid)
|
||||
if (!UpdateVictim() || me->m_movementInfo.transport.guid)
|
||||
return;
|
||||
|
||||
if (uiChainLightningTimer <= uiDiff)
|
||||
@@ -814,7 +814,7 @@ public:
|
||||
}
|
||||
}else uiPhaseTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim() || me->m_movementInfo.t_guid)
|
||||
if (!UpdateVictim() || me->m_movementInfo.transport.guid)
|
||||
return;
|
||||
|
||||
if (uiLightningArrowsTimer <= uiDiff)
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
}
|
||||
} else uiPhaseTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim() || me->m_movementInfo.t_guid)
|
||||
if (!UpdateVictim() || me->m_movementInfo.transport.guid)
|
||||
return;
|
||||
|
||||
if (uiEviscerateTimer <= uiDiff)
|
||||
|
||||
@@ -431,7 +431,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
|
||||
// Spawn LK in front of door, and make him move to the sword.
|
||||
if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_PART1, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
lichking->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
lichking->SetWalk(true);
|
||||
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
|
||||
//lichking->SetReactState(REACT_PASSIVE);
|
||||
lichkingGUID = lichking->GetGUID();
|
||||
@@ -494,7 +494,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
|
||||
if (Creature* lichking = me->GetCreature(*me, lichkingGUID))
|
||||
{
|
||||
lichking->AI()->Talk(SAY_LK_INTRO_3);
|
||||
lichking->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
lichking->SetWalk(true);
|
||||
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveAwayPos);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_INTRO_LK_7, 10000);
|
||||
@@ -554,7 +554,7 @@ class npc_jaina_or_sylvanas_hor : public CreatureScript
|
||||
/// @todo Loralen/Koreln shall run also
|
||||
if (Creature* lichking = me->SummonCreature(NPC_LICH_KING_PART1, LichKingSpawnPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
lichking->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
lichking->SetWalk(true);
|
||||
lichking->GetMotionMaster()->MovePoint(0, LichKingMoveThronePos);
|
||||
lichking->SetReactState(REACT_PASSIVE);
|
||||
lichkingGUID = lichking->GetGUID();
|
||||
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
|
||||
me->NearTeleportTo(pPos.GetPositionX(), pPos.GetPositionY(), pPos.GetPositionZ(), pPos.GetOrientation());
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim(), 0, 0);
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
me->SetWalk(true);
|
||||
|
||||
Talk(EMOTE_ARCANE_EXPLOSION);
|
||||
Talk(SAY_ARCANE_EXPLOSION);
|
||||
|
||||
@@ -311,11 +311,7 @@ public:
|
||||
void Reset()
|
||||
{
|
||||
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING | MOVEMENTFLAG_HOVER);
|
||||
me->SetSpeed(MOVE_SWIM, 1.0f);
|
||||
me->SetSpeed(MOVE_RUN, 1.0f);
|
||||
me->SetSpeed(MOVE_WALK, 1.0f);
|
||||
//me->SetSpeed(MOVE_FLIGHT, 1.0f);
|
||||
me->SetHover(true);
|
||||
|
||||
me->GetPosition(x, y, z);
|
||||
DoTeleportTo(x+1, y, z+30);
|
||||
|
||||
@@ -812,7 +812,10 @@ public:
|
||||
|
||||
struct npc_nexus_drake_hatchlingAI : public FollowerAI //The spell who makes the npc follow the player is missing, also we can use FollowerAI!
|
||||
{
|
||||
npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature) {}
|
||||
npc_nexus_drake_hatchlingAI(Creature* creature) : FollowerAI(creature)
|
||||
{
|
||||
HarpoonerGUID = 0;
|
||||
}
|
||||
|
||||
uint64 HarpoonerGUID;
|
||||
bool WithRedDragonBlood;
|
||||
|
||||
@@ -27,33 +27,34 @@
|
||||
## Quest 12027: Mr. Floppy's Perilous Adventure
|
||||
######*/
|
||||
|
||||
enum eFloppy
|
||||
enum Floppy
|
||||
{
|
||||
// Creature
|
||||
NPC_MRFLOPPY = 26589,
|
||||
NPC_HUNGRY_WORG = 26586,
|
||||
NPC_RAVENOUS_WORG = 26590, //RWORG
|
||||
NPC_RAVENOUS_WORG = 26590, // RWORG
|
||||
NPC_EMILY = 26588,
|
||||
|
||||
// Quest
|
||||
QUEST_PERILOUS_ADVENTURE = 12027,
|
||||
|
||||
SPELL_MRFLOPPY = 47184, //vehicle aura
|
||||
|
||||
SAY_WORGHAGGRO1 = 0, //Um... I think one of those wolves is back...
|
||||
SAY_WORGHAGGRO2 = 1, //He's going for Mr. Floppy!
|
||||
SAY_WORGRAGGRO3 = 2, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
|
||||
SAY_WORGRAGGRO4 = 3, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
|
||||
SAY_RANDOMAGGRO = 4, //There's a big meanie attacking Mr. Floppy! Help!
|
||||
SAY_VICTORY1 = 5, //Let's get out of here before more wolves find us!
|
||||
SAY_VICTORY2 = 6, //Don't go toward the light, Mr. Floppy!
|
||||
SAY_VICTORY3 = 7, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
|
||||
SAY_VICTORY4 = 8, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
|
||||
TEXT_EMOTE_WP1 = 9, //Mr. Floppy revives
|
||||
TEXT_EMOTE_AGGRO = 10, //The Ravenous Worg chomps down on Mr. Floppy
|
||||
SAY_QUEST_ACCEPT = 11, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
|
||||
SAY_QUEST_COMPLETE = 12 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
|
||||
// Spell
|
||||
SPELL_MRFLOPPY = 47184, // vehicle aura
|
||||
// Text
|
||||
SAY_WORGHAGGRO1 = 0, // Um... I think one of those wolves is back...
|
||||
SAY_WORGHAGGRO2 = 1, // He's going for Mr. Floppy!
|
||||
SAY_WORGRAGGRO3 = 2, // Oh, no! Look, it's another wolf, and it's a biiiiiig one!
|
||||
SAY_WORGRAGGRO4 = 3, // He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
|
||||
SAY_RANDOMAGGRO = 4, // There's a big meanie attacking Mr. Floppy! Help!
|
||||
SAY_VICTORY1 = 5, // Let's get out of here before more wolves find us!
|
||||
SAY_VICTORY2 = 6, // Don't go toward the light, Mr. Floppy!
|
||||
SAY_VICTORY3 = 7, // Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
|
||||
SAY_VICTORY4 = 8, // I think I see the camp! We're almost home, Mr. Floppy! Let's go!
|
||||
TEXT_EMOTE_WP1 = 9, // Mr. Floppy revives
|
||||
TEXT_EMOTE_AGGRO = 10, // The Ravenous Worg chomps down on Mr. Floppy
|
||||
SAY_QUEST_ACCEPT = 11, // Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
|
||||
SAY_QUEST_COMPLETE = 12 // Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
|
||||
};
|
||||
|
||||
//emily
|
||||
// emily
|
||||
class npc_emily : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -63,13 +64,6 @@ public:
|
||||
{
|
||||
npc_emilyAI(Creature* creature) : npc_escortAI(creature) { }
|
||||
|
||||
uint32 m_uiChatTimer;
|
||||
|
||||
uint64 RWORGGUID;
|
||||
uint64 MrfloppyGUID;
|
||||
|
||||
bool Completed;
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 50.0f))
|
||||
@@ -88,55 +82,55 @@ public:
|
||||
{
|
||||
case 9:
|
||||
if (Creature* Mrfloppy = GetClosestCreatureWithEntry(me, NPC_MRFLOPPY, 100.0f))
|
||||
MrfloppyGUID = Mrfloppy->GetGUID();
|
||||
_mrfloppyGUID = Mrfloppy->GetGUID();
|
||||
break;
|
||||
case 10:
|
||||
if (Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
{
|
||||
Talk(SAY_WORGHAGGRO1);
|
||||
me->SummonCreature(NPC_HUNGRY_WORG, me->GetPositionX()+5, me->GetPositionY()+2, me->GetPositionZ()+1, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
Mrfloppy->GetMotionMaster()->MoveFollow(me, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
break;
|
||||
case 17:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
Mrfloppy->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
Talk(SAY_WORGRAGGRO3);
|
||||
if (Creature* RWORG = me->SummonCreature(NPC_RAVENOUS_WORG, me->GetPositionX()+10, me->GetPositionY()+8, me->GetPositionZ()+2, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000))
|
||||
{
|
||||
RWORG->setFaction(35);
|
||||
RWORGGUID = RWORG->GetGUID();
|
||||
_RavenousworgGUID = RWORG->GetGUID();
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
{
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, RWORGGUID))
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
|
||||
RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
|
||||
DoCast(Mrfloppy, SPELL_MRFLOPPY);
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
{
|
||||
if (Mrfloppy->HasAura(SPELL_MRFLOPPY, 0))
|
||||
{
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, RWORGGUID))
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
|
||||
Mrfloppy->EnterVehicle(RWORG);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, RWORGGUID))
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
|
||||
RWORG->HandleEmoteCommand(34);
|
||||
break;
|
||||
case 21:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
{
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, RWORGGUID))
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
|
||||
{
|
||||
RWORG->Kill(Mrfloppy);
|
||||
Mrfloppy->ExitVehicle();
|
||||
@@ -147,11 +141,11 @@ public:
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
{
|
||||
if (Mrfloppy->isDead())
|
||||
{
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, RWORGGUID))
|
||||
if (Creature* RWORG = Unit::GetCreature(*me, _RavenousworgGUID))
|
||||
RWORG->DisappearAndDie();
|
||||
me->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
|
||||
Mrfloppy->setDeathState(ALIVE);
|
||||
@@ -163,7 +157,6 @@ public:
|
||||
case 24:
|
||||
if (player)
|
||||
{
|
||||
Completed = true;
|
||||
player->GroupEventHappens(QUEST_PERILOUS_ADVENTURE, me);
|
||||
Talk(SAY_QUEST_COMPLETE, player->GetGUID());
|
||||
}
|
||||
@@ -174,7 +167,7 @@ public:
|
||||
break;
|
||||
case 27:
|
||||
me->DisappearAndDie();
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, MrfloppyGUID))
|
||||
if (Creature* Mrfloppy = Unit::GetCreature(*me, _mrfloppyGUID))
|
||||
Mrfloppy->DisappearAndDie();
|
||||
break;
|
||||
}
|
||||
@@ -187,23 +180,13 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiChatTimer = 4000;
|
||||
MrfloppyGUID = 0;
|
||||
RWORGGUID = 0;
|
||||
_mrfloppyGUID = 0;
|
||||
_RavenousworgGUID = 0;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(uiDiff);
|
||||
|
||||
if (HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (m_uiChatTimer <= uiDiff)
|
||||
m_uiChatTimer = 12000;
|
||||
else
|
||||
m_uiChatTimer -= uiDiff;
|
||||
}
|
||||
}
|
||||
private:
|
||||
uint64 _RavenousworgGUID;
|
||||
uint64 _mrfloppyGUID;
|
||||
};
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest)
|
||||
@@ -226,7 +209,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//mrfloppy
|
||||
// mrfloppy
|
||||
class npc_mrfloppy : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -236,10 +219,6 @@ public:
|
||||
{
|
||||
npc_mrfloppyAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint64 EmilyGUID;
|
||||
uint64 RWORGGUID;
|
||||
uint64 HWORGGUID;
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void EnterCombat(Unit* Who)
|
||||
@@ -277,21 +256,21 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// Outhouse Bunny
|
||||
/*######
|
||||
## Quest 12227: Doing Your Duty
|
||||
######*/
|
||||
|
||||
enum eOuthouseBunny
|
||||
enum Outhouse
|
||||
{
|
||||
// Sound
|
||||
SOUND_FEMALE = 12671,
|
||||
SOUND_MALE = 12670,
|
||||
// Spell
|
||||
SPELL_OUTHOUSE_GROANS = 48382,
|
||||
SPELL_CAMERA_SHAKE = 47533,
|
||||
SPELL_DUST_FIELD = 48329
|
||||
};
|
||||
|
||||
enum eSounds
|
||||
{
|
||||
SOUND_FEMALE = 12671,
|
||||
SOUND_MALE = 12670
|
||||
};
|
||||
|
||||
class npc_outhouse_bunny : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -301,32 +280,29 @@ public:
|
||||
{
|
||||
npc_outhouse_bunnyAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint8 m_counter;
|
||||
uint8 m_gender;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_counter = 0;
|
||||
m_gender = 0;
|
||||
_counter = 0;
|
||||
_gender = 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData)
|
||||
void SetData(uint32 Type, uint32 Data)
|
||||
{
|
||||
if (uiType == 1)
|
||||
m_gender = uiData;
|
||||
if (Type == 1)
|
||||
_gender = Data;
|
||||
}
|
||||
|
||||
void SpellHit(Unit* pCaster, const SpellInfo* pSpell)
|
||||
void SpellHit(Unit* Caster, const SpellInfo* Spell)
|
||||
{
|
||||
if (pSpell->Id == SPELL_OUTHOUSE_GROANS)
|
||||
if (Spell->Id == SPELL_OUTHOUSE_GROANS)
|
||||
{
|
||||
++m_counter;
|
||||
if (m_counter < 5)
|
||||
DoCast(pCaster, SPELL_CAMERA_SHAKE, true);
|
||||
++_counter;
|
||||
if (_counter < 5)
|
||||
DoCast(Caster, SPELL_CAMERA_SHAKE, true);
|
||||
else
|
||||
m_counter = 0;
|
||||
_counter = 0;
|
||||
DoCast(me, SPELL_DUST_FIELD, true);
|
||||
switch (m_gender)
|
||||
switch (_gender)
|
||||
{
|
||||
case GENDER_FEMALE:
|
||||
DoPlaySoundToSet(me, SOUND_FEMALE);
|
||||
@@ -338,6 +314,9 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
uint8 _counter;
|
||||
uint8 _gender;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -348,8 +327,9 @@ public:
|
||||
|
||||
// Tallhorn Stage
|
||||
|
||||
enum etallhornstage
|
||||
enum TallhornStage
|
||||
{
|
||||
//Gameobject
|
||||
OBJECT_HAUNCH = 188665
|
||||
};
|
||||
|
||||
@@ -362,16 +342,14 @@ public:
|
||||
{
|
||||
npc_tallhorn_stagAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint8 m_uiPhase;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiPhase = 1;
|
||||
_phase = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*uiDiff*/)
|
||||
void UpdateAI(uint32 /*diff*/)
|
||||
{
|
||||
if (m_uiPhase == 1)
|
||||
if (_phase == 1)
|
||||
{
|
||||
if (me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f))
|
||||
{
|
||||
@@ -379,10 +357,12 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
}
|
||||
m_uiPhase = 0;
|
||||
_phase = 0;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
uint8 _phase;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -393,9 +373,16 @@ public:
|
||||
|
||||
// Amberpine Woodsman
|
||||
|
||||
enum eamberpinewoodsman
|
||||
enum AmberpineWoodsman
|
||||
{
|
||||
TALLHORN_STAG = 26363
|
||||
// Creature
|
||||
NPC_TALLHORN_STAG = 26363
|
||||
};
|
||||
|
||||
enum AmberpineWoodsmanEvents
|
||||
{
|
||||
EVENT_WOODSMAN_1 = 1,
|
||||
EVENT_WOODSMAN_2 = 2
|
||||
};
|
||||
|
||||
class npc_amberpine_woodsman : public CreatureScript
|
||||
@@ -407,48 +394,40 @@ public:
|
||||
{
|
||||
npc_amberpine_woodsmanAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint8 m_uiPhase;
|
||||
uint32 m_uiTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_uiTimer = 0;
|
||||
m_uiPhase = 1;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff)
|
||||
{
|
||||
// call this each update tick?
|
||||
if (me->FindNearestCreature(TALLHORN_STAG, 0.2f))
|
||||
if (me->FindNearestCreature(NPC_TALLHORN_STAG, 0.2f))
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
|
||||
}
|
||||
else
|
||||
if (m_uiPhase)
|
||||
{
|
||||
if (m_uiTimer <= uiDiff)
|
||||
{
|
||||
switch (m_uiPhase)
|
||||
{
|
||||
case 1:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LOOT);
|
||||
m_uiTimer = 3000;
|
||||
m_uiPhase = 2;
|
||||
break;
|
||||
case 2:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
|
||||
m_uiTimer = 4000;
|
||||
m_uiPhase = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
m_uiTimer -= uiDiff;
|
||||
}
|
||||
ScriptedAI::UpdateAI(uiDiff);
|
||||
_events.ScheduleEvent(EVENT_WOODSMAN_1, 0);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WOODSMAN_1:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LOOT);
|
||||
_events.ScheduleEvent(EVENT_WOODSMAN_2, 3000);
|
||||
break;
|
||||
case EVENT_WOODSMAN_2:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
|
||||
_events.ScheduleEvent(EVENT_WOODSMAN_1, 4000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
UpdateVictim();
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -456,16 +435,20 @@ public:
|
||||
return new npc_amberpine_woodsmanAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest 12288: Overwhelmed!
|
||||
######*/
|
||||
|
||||
enum eSkirmisher
|
||||
enum Skirmisher
|
||||
{
|
||||
// Quest
|
||||
QUEST_OVERWHELMED = 12288,
|
||||
// Spell
|
||||
SPELL_RENEW_SKIRMISHER = 48812,
|
||||
CREDIT_NPC = 27466,
|
||||
|
||||
RANDOM_SAY = 0,
|
||||
SPELL_KILL_CREDIT = 48813,
|
||||
// Text
|
||||
SAY_RANDOM = 0
|
||||
};
|
||||
|
||||
class npc_wounded_skirmisher : public CreatureScript
|
||||
@@ -477,35 +460,31 @@ public:
|
||||
{
|
||||
npc_wounded_skirmisherAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint64 uiPlayerGUID;
|
||||
|
||||
uint32 DespawnTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
DespawnTimer = 5000;
|
||||
uiPlayerGUID = 0;
|
||||
_despawnTimer = 5000;
|
||||
_playerGUID = 0;
|
||||
}
|
||||
|
||||
void MovementInform(uint32, uint32 id)
|
||||
{
|
||||
if (id == 1)
|
||||
me->DespawnOrUnsummon(DespawnTimer);
|
||||
me->DespawnOrUnsummon(_despawnTimer);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_RENEW_SKIRMISHER && caster->GetTypeId() == TYPEID_PLAYER
|
||||
&& caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE)
|
||||
&& caster->ToPlayer()->GetQuestStatus(QUEST_OVERWHELMED) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
caster->ToPlayer()->KilledMonsterCredit(CREDIT_NPC, 0);
|
||||
sCreatureTextMgr->SendChat(me, RANDOM_SAY, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_NORMAL, 0, TEAM_OTHER, false, caster->ToPlayer());
|
||||
DoCast(caster, SPELL_KILL_CREDIT);
|
||||
Talk(SAY_RANDOM);
|
||||
if (me->IsStandState())
|
||||
me->GetMotionMaster()->MovePoint(1, me->GetPositionX()+7, me->GetPositionY()+7, me->GetPositionZ());
|
||||
else
|
||||
{
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->DespawnOrUnsummon(DespawnTimer);
|
||||
me->DespawnOrUnsummon(_despawnTimer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -517,6 +496,9 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
uint64 _playerGUID;
|
||||
uint32 _despawnTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -526,15 +508,22 @@ public:
|
||||
};
|
||||
|
||||
/*Lightning Sentry - if you kill it when you have your Minion with you, you will get a quest credit*/
|
||||
enum eSentry
|
||||
enum Sentry
|
||||
{
|
||||
QUEST_OR_MAYBE_WE_DONT_A = 12138,
|
||||
QUEST_OR_MAYBE_WE_DONT_H = 12198,
|
||||
//Creature
|
||||
NPC_LIGHTNING_SENTRY = 26407,
|
||||
NPC_WAR_GOLEM = 27017,
|
||||
// Quest
|
||||
QUEST_OR_MAYBE_WE_DONT_A = 12138,
|
||||
QUEST_OR_MAYBE_WE_DONT_H = 12198,
|
||||
// Spell
|
||||
SPELL_CHARGED_SENTRY_TOTEM = 52703,
|
||||
SPELL_WAR_GOLEM_CHARGE_CREDIT = 47797,
|
||||
};
|
||||
|
||||
NPC_LIGHTNING_SENTRY = 26407,
|
||||
NPC_WAR_GOLEM = 27017,
|
||||
|
||||
SPELL_CHARGED_SENTRY_TOTEM = 52703,
|
||||
enum SentryEvents
|
||||
{
|
||||
EVENT_SENTRY = 1
|
||||
};
|
||||
|
||||
class npc_lightning_sentry : public CreatureScript
|
||||
@@ -542,34 +531,37 @@ class npc_lightning_sentry : public CreatureScript
|
||||
public:
|
||||
npc_lightning_sentry() : CreatureScript("npc_lightning_sentry") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_lightning_sentryAI(creature);
|
||||
}
|
||||
|
||||
struct npc_lightning_sentryAI : public ScriptedAI
|
||||
{
|
||||
npc_lightning_sentryAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiChargedSentryTotem;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiChargedSentryTotem = urand(10000, 12000);
|
||||
_events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff)
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiChargedSentryTotem <= uiDiff)
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
DoCast(SPELL_CHARGED_SENTRY_TOTEM);
|
||||
uiChargedSentryTotem = urand(10000, 12000);
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SENTRY:
|
||||
DoCast(SPELL_CHARGED_SENTRY_TOTEM);
|
||||
_events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
uiChargedSentryTotem -= uiDiff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
@@ -582,108 +574,117 @@ public:
|
||||
{
|
||||
if (killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_A) == QUEST_STATUS_INCOMPLETE ||
|
||||
killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_H) == QUEST_STATUS_INCOMPLETE)
|
||||
killer->ToPlayer()->KilledMonsterCredit(NPC_WAR_GOLEM, 0);
|
||||
DoCast(killer, SPELL_WAR_GOLEM_CHARGE_CREDIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_lightning_sentryAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/
|
||||
enum eSmokeEmOut
|
||||
enum SmokeEmOut
|
||||
{
|
||||
SAY_SEO = 0,
|
||||
// Quest
|
||||
QUEST_SMOKE_EM_OUT_A = 12323,
|
||||
QUEST_SMOKE_EM_OUT_H = 12324,
|
||||
// Spell
|
||||
SPELL_SMOKE_BOMB = 49075,
|
||||
SPELL_CHOP = 43410,
|
||||
SPELL_VENTURE_STRAGGLER_CREDIT = 49093,
|
||||
// Text
|
||||
SAY_SEO = 0
|
||||
};
|
||||
|
||||
enum StragglerEvents
|
||||
{
|
||||
EVENT_STRAGGLER_1 = 1,
|
||||
EVENT_STRAGGLER_2 = 2,
|
||||
EVENT_STRAGGLER_3 = 3,
|
||||
EVENT_STRAGGLER_4 = 4,
|
||||
EVENT_CHOP = 5
|
||||
};
|
||||
|
||||
class npc_venture_co_straggler : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_venture_co_straggler() : CreatureScript("npc_venture_co_straggler") { }
|
||||
public:
|
||||
npc_venture_co_straggler() : CreatureScript("npc_venture_co_straggler") { }
|
||||
|
||||
struct npc_venture_co_stragglerAI : public ScriptedAI
|
||||
struct npc_venture_co_stragglerAI : public ScriptedAI
|
||||
{
|
||||
npc_venture_co_stragglerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
npc_venture_co_stragglerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
_playerGUID = 0;
|
||||
|
||||
uint64 uiPlayerGUID;
|
||||
uint32 uiRunAwayTimer;
|
||||
uint32 uiTimer;
|
||||
uint32 uiChopTimer;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void Reset()
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
uiPlayerGUID = 0;
|
||||
uiTimer = 0;
|
||||
uiRunAwayTimer = 0;
|
||||
uiChopTimer = urand(10000, 12500);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff)
|
||||
{
|
||||
if (uiPlayerGUID && uiRunAwayTimer <= uiDiff)
|
||||
switch (eventId)
|
||||
{
|
||||
if (Player* player = Unit::GetPlayer(*me, uiPlayerGUID))
|
||||
{
|
||||
switch (uiTimer)
|
||||
{
|
||||
case 0:
|
||||
DoCast(player, SPELL_VENTURE_STRAGGLER_CREDIT);
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()+7, me->GetPositionZ());
|
||||
uiRunAwayTimer = 2500;
|
||||
++uiTimer;
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_SEO);
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
|
||||
uiRunAwayTimer = 2500;
|
||||
++uiTimer;
|
||||
break;
|
||||
case 2:
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-5, me->GetPositionY()-5, me->GetPositionZ());
|
||||
uiRunAwayTimer = 2500;
|
||||
++uiTimer;
|
||||
break;
|
||||
case 3:
|
||||
me->DisappearAndDie();
|
||||
uiTimer = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (uiRunAwayTimer)
|
||||
uiRunAwayTimer -= uiDiff;
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiChopTimer <= uiDiff)
|
||||
{
|
||||
DoCast(me->GetVictim(), SPELL_CHOP);
|
||||
uiChopTimer = urand(10000, 12000);
|
||||
}
|
||||
else
|
||||
uiChopTimer -= uiDiff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_SMOKE_BOMB && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CombatStop(false);
|
||||
uiPlayerGUID = caster->GetGUID();
|
||||
uiRunAwayTimer = 3500;
|
||||
case EVENT_STRAGGLER_1:
|
||||
if (Player* player = Unit::GetPlayer(*me, _playerGUID))
|
||||
DoCast(player, SPELL_VENTURE_STRAGGLER_CREDIT);
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()+7, me->GetPositionZ());
|
||||
_events.ScheduleEvent(EVENT_STRAGGLER_2, 2500);
|
||||
break;
|
||||
case EVENT_STRAGGLER_2:
|
||||
Talk(SAY_SEO);
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-7, me->GetPositionY()-5, me->GetPositionZ());
|
||||
_events.ScheduleEvent(EVENT_STRAGGLER_3, 2500);
|
||||
break;
|
||||
case EVENT_STRAGGLER_3:
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()-5, me->GetPositionY()-5, me->GetPositionZ());
|
||||
_events.ScheduleEvent(EVENT_STRAGGLER_4, 2500);
|
||||
break;
|
||||
case EVENT_STRAGGLER_4:
|
||||
me->DisappearAndDie();
|
||||
break;
|
||||
case EVENT_CHOP:
|
||||
if (UpdateVictim())
|
||||
DoCast(me->GetVictim(), SPELL_CHOP);
|
||||
_events.ScheduleEvent(EVENT_CHOP, 10000, 12000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_SMOKE_BOMB && caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->CombatStop(false);
|
||||
_playerGUID = caster->GetGUID();
|
||||
_events.ScheduleEvent(EVENT_STRAGGLER_1, 3500);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
uint64 _playerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
@@ -693,26 +694,24 @@ class npc_venture_co_straggler : public CreatureScript
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest A Blade Fit For A Champion
|
||||
## Quest: A Blade Fit For A Champion
|
||||
######*/
|
||||
|
||||
enum LakeFrog
|
||||
{
|
||||
// Creature
|
||||
NPC_LAKE_FROG = 33211,
|
||||
NPC_LAKE_FROG_QUEST = 33224,
|
||||
NPC_MAIDEN_OF_ASHWOOD_LAKE = 33220,
|
||||
// Items
|
||||
ITEM_WARTS_B_GONE_LIP_BALM = 44986,
|
||||
// Spells
|
||||
SPELL_WARTSBGONE_LIP_BALM = 62574,
|
||||
SPELL_FROG_LOVE = 62537, // for 1 minute !
|
||||
SPELL_WARTS = 62581,
|
||||
SPELL_MAIDEN_OF_ASHWOOD_LAKE_TRANSFORM = 62550,
|
||||
SPELL_SUMMON_ASHWOOD_BRAND = 62554,
|
||||
|
||||
// Items
|
||||
ITEM_WARTS_B_GONE_LIP_BALM = 44986,
|
||||
|
||||
// Creature
|
||||
NPC_LAKE_FROG = 33211,
|
||||
NPC_LAKE_FROG_QUEST = 33224,
|
||||
NPC_MAIDEN_OF_ASHWOOD_LAKE = 33220,
|
||||
|
||||
SPELL_FROG_KISS = 62536,
|
||||
// Text
|
||||
SAY_MAIDEN_0 = 0,
|
||||
SAY_MAIDEN_1 = 1
|
||||
@@ -720,17 +719,17 @@ enum LakeFrog
|
||||
|
||||
enum LakeFrogEvents
|
||||
{
|
||||
EVENT_SCRIPT_1 = 1,
|
||||
EVENT_SCRIPT_2 = 2,
|
||||
EVENT_SCRIPT_3 = 3,
|
||||
EVENT_SCRIPT_4 = 4,
|
||||
EVENT_SCRIPT_5 = 5
|
||||
EVENT_LAKEFROG_1 = 1,
|
||||
EVENT_LAKEFROG_2 = 2,
|
||||
EVENT_LAKEFROG_3 = 3,
|
||||
EVENT_LAKEFROG_4 = 4,
|
||||
EVENT_LAKEFROG_5 = 5
|
||||
};
|
||||
|
||||
class npc_lake_frog : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_lake_frog() : CreatureScript("npc_lake_frog") { }
|
||||
public:
|
||||
npc_lake_frog() : CreatureScript("npc_lake_frog") { }
|
||||
|
||||
struct npc_lake_frogAI : public ScriptedAI
|
||||
{
|
||||
@@ -756,24 +755,24 @@ class npc_lake_frog : public CreatureScript
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SCRIPT_1:
|
||||
case EVENT_LAKEFROG_1:
|
||||
DoCast(me, SPELL_MAIDEN_OF_ASHWOOD_LAKE_TRANSFORM);
|
||||
me->SetEntry(NPC_MAIDEN_OF_ASHWOOD_LAKE);
|
||||
_events.ScheduleEvent(EVENT_SCRIPT_2, 2000);
|
||||
_events.ScheduleEvent(EVENT_LAKEFROG_2, 2000);
|
||||
break;
|
||||
case EVENT_SCRIPT_2:
|
||||
case EVENT_LAKEFROG_2:
|
||||
Talk(SAY_MAIDEN_0);
|
||||
_events.ScheduleEvent(EVENT_SCRIPT_3, 3000);
|
||||
_events.ScheduleEvent(EVENT_LAKEFROG_3, 3000);
|
||||
break;
|
||||
case EVENT_SCRIPT_3:
|
||||
case EVENT_LAKEFROG_3:
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
_events.ScheduleEvent(EVENT_SCRIPT_4, 25000);
|
||||
_events.ScheduleEvent(EVENT_LAKEFROG_4, 25000);
|
||||
break;
|
||||
case EVENT_SCRIPT_4:
|
||||
case EVENT_LAKEFROG_4:
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
_events.ScheduleEvent(EVENT_SCRIPT_5, 2000);
|
||||
_events.ScheduleEvent(EVENT_LAKEFROG_5, 2000);
|
||||
break;
|
||||
case EVENT_SCRIPT_5:
|
||||
case EVENT_LAKEFROG_5:
|
||||
Talk(SAY_MAIDEN_1);
|
||||
me->DespawnOrUnsummon(4000);
|
||||
break;
|
||||
@@ -794,7 +793,7 @@ class npc_lake_frog : public CreatureScript
|
||||
player->AddAura(SPELL_WARTS, player);
|
||||
else
|
||||
{
|
||||
player->RemoveAura(SPELL_WARTSBGONE_LIP_BALM);
|
||||
DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM
|
||||
|
||||
if (me->GetEntry() == NPC_LAKE_FROG)
|
||||
{
|
||||
@@ -807,7 +806,7 @@ class npc_lake_frog : public CreatureScript
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetFacingToObject(player);
|
||||
_runningScript = true;
|
||||
_events.ScheduleEvent(EVENT_SCRIPT_1, 2000);
|
||||
_events.ScheduleEvent(EVENT_LAKEFROG_1, 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
if (!summonerGUID)
|
||||
return;
|
||||
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
|
||||
me->SetWalk(true);
|
||||
Start(false, false, summonerGUID);
|
||||
}
|
||||
|
||||
|
||||
@@ -98,13 +98,13 @@ public:
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_SWIMMING);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_FALLING);
|
||||
me->SetSpeed(MOVE_SWIM, 0.85f, true);
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetSwim(true);
|
||||
me->SetDisableGravity(true);
|
||||
break;
|
||||
case 19:
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
|
||||
me->GetMotionMaster()->MoveFall();
|
||||
break;
|
||||
case 28:
|
||||
player->GroupEventHappens(QUEST_FORTUNATE_MISUNDERSTANDINGS, me);
|
||||
@@ -148,7 +148,6 @@ public:
|
||||
{
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
|
||||
CAST_AI(npc_escortAI, (creature->AI()))->SetMaxPlayerDistance(35.0f);
|
||||
creature->SetUnitMovementFlags(MOVEMENTFLAG_FALLING);
|
||||
creature->AI()->Talk(SAY_START_IRO);
|
||||
|
||||
switch (player->GetTeam()){
|
||||
|
||||
@@ -21,12 +21,15 @@
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
/*####
|
||||
## npc_drakuru_shackles
|
||||
####*/
|
||||
|
||||
enum eDrakuruShackles
|
||||
enum DrakuruShackles
|
||||
{
|
||||
SPELL_LEFT_CHAIN = 59951,
|
||||
SPELL_RIGHT_CHAIN = 59952,
|
||||
@@ -34,7 +37,7 @@ enum eDrakuruShackles
|
||||
SPELL_FREE_RAGECLAW = 55223,
|
||||
|
||||
NPC_RAGECLAW = 29686,
|
||||
QUEST_TROLLS_IS_GONE_CRAZY = 12861,
|
||||
QUEST_TROLLS_IS_GONE_CRAZY = 12861
|
||||
};
|
||||
|
||||
class npc_drakuru_shackles : public CreatureScript
|
||||
@@ -115,7 +118,7 @@ public:
|
||||
## npc_captured_rageclaw
|
||||
####*/
|
||||
|
||||
enum eRageclaw
|
||||
enum Rageclaw
|
||||
{
|
||||
SPELL_UNSHACKLED = 55085,
|
||||
SPELL_KNEEL = 39656
|
||||
@@ -1384,7 +1387,7 @@ public:
|
||||
## go_scourge_enclosure
|
||||
######*/
|
||||
|
||||
enum eScourgeEnclosure
|
||||
enum ScourgeEnclosure
|
||||
{
|
||||
QUEST_OUR_ONLY_HOPE = 12916,
|
||||
NPC_GYMER_DUMMY = 29928 //from quest template
|
||||
@@ -1412,6 +1415,532 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest: Troll Patrol: The Alchemist's Apprentice
|
||||
######*/
|
||||
|
||||
enum Finklestein
|
||||
{
|
||||
// Creature
|
||||
NPC_FINKLESTEIN = 28205,
|
||||
// Item
|
||||
ITEM_KNOTROOT = 38338,
|
||||
ITEM_PICKLED_EAGLE_EGG = 38341,
|
||||
ITEM_SPECKLED_GUANO = 38337,
|
||||
ITEM_WITHERED_BATWING = 38339,
|
||||
ITEM_SEASONED_SLIDER_CIDER = 38381,
|
||||
ITEM_PULVERIZED_GARGOYLE_TEETH = 38384,
|
||||
ITEM_MUDDY_MIRE_MAGGOT = 38386,
|
||||
ITEM_SPIKY_SPIDER_EGG = 38393,
|
||||
ITEM_HAIRY_HERRING_HEAD = 38396,
|
||||
ITEM_PUTRID_PIRATE_PERSPIRATION = 38397,
|
||||
ITEM_ICECROWN_BOTTLED_WATER = 38398,
|
||||
ITEM_WASPS_WINGS = 38369,
|
||||
ITEM_PRISMATIC_MOJO = 38343,
|
||||
ITEM_RAPTOR_CLAW = 38370,
|
||||
ITEM_AMBERSEED = 38340,
|
||||
ITEM_SHRUNKEN_DRAGONS_CLAW = 38344,
|
||||
ITEM_CHILLED_SERPENT_MUCUS = 38346,
|
||||
ITEM_CRYSTALLIZED_HOGSNOT = 38336,
|
||||
ITEM_CRUSHED_BASILISK_CRYSTALS = 38379,
|
||||
ITEM_TROLLBANE = 38342,
|
||||
ITEM_FROZEN_SPIDER_ICHOR = 38345,
|
||||
// Quest
|
||||
QUEST_THE_ALCHEMIST_APPRENTICE_DAILY = 12541,
|
||||
// Spells
|
||||
SPELL_ALCHEMIST_APPRENTICE_INVISBUFF = 51216,
|
||||
SPELL_RANDOM_INGREDIENT_EASY_AURA = 51015,
|
||||
SPELL_RANDOM_INGREDIENT_MEDIUM_AURA = 51154,
|
||||
SPELL_RANDOM_INGREDIENT_HARD_AURA = 51157,
|
||||
SPELL_RANDOM_INGREDIENT_EASY = 51134,
|
||||
SPELL_RANDOM_INGREDIENT_MEDIUM = 51105,
|
||||
SPELL_RANDOM_INGREDIENT_HARD = 51107,
|
||||
SPELL_NEXT_INGREDIENT = 51049,
|
||||
SPELL_POT_CHECK = 51046,
|
||||
SPELL_THROW_INGREDIENT = 51025,
|
||||
SPELL_KILL_CREDIT = 51111,
|
||||
// Spell Fetch Easy
|
||||
SPELL_FETCH_KNOTROOT = 51018,
|
||||
SPELL_FETCH_PICKLED_EAGLE_EGG = 51055,
|
||||
SPELL_FETCH_SPECKLED_GUANO = 51057,
|
||||
SPELL_FETCH_WITHERED_BATWING = 51059,
|
||||
SPELL_FETCH_SEASONED_SLIDER_CIDER = 51062,
|
||||
SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH = 51064,
|
||||
SPELL_FETCH_MUDDY_MIRE_MAGGOT = 51067,
|
||||
SPELL_FETCH_SPIKY_SPIDER_EGG = 51069,
|
||||
SPELL_FETCH_HAIRY_HERRING_HEAD = 51072,
|
||||
SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION = 51077,
|
||||
SPELL_FETCH_ICECROWN_BOTTLED_WATER = 51079,
|
||||
// Spell Have Easy
|
||||
SPELL_HAVE_KNOTROOT = 51047,
|
||||
SPELL_HAVE_PICKLED_EAGLE_EGG = 51056,
|
||||
SPELL_HAVE_SPECKLED_GUANO = 51058,
|
||||
SPELL_HAVE_WITHERED_BATWING = 51060,
|
||||
SPELL_HAVE_SEASONED_SLIDER_CIDER = 51063,
|
||||
SPELL_HAVE_PULVERIZED_GARGOYLE_TEETH = 51065,
|
||||
SPELL_HAVE_MUDDY_MIRE_MAGGOT = 51068,
|
||||
SPELL_HAVE_SPIKY_SPIDER_EGG = 51070,
|
||||
SPELL_HAVE_HAIRY_HERRING_HEAD = 51075,
|
||||
SPELL_HAVE_PUTRID_PIRATE_PERSPIRATION = 51078,
|
||||
SPELL_HAVE_ICECROWN_BOTTLED_WATER = 51080,
|
||||
// Spell Fetch Medium
|
||||
SPELL_FETCH_WASPS_WINGS = 51081,
|
||||
SPELL_FETCH_PRISMATIC_MOJO = 51083,
|
||||
SPELL_FETCH_RAPTOR_CLAW = 51085,
|
||||
SPELL_FETCH_AMBERSEED = 51087,
|
||||
SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW = 51091,
|
||||
// Spell Have Medium
|
||||
SPELL_HAVE_WASPS_WINGS = 51082,
|
||||
SPELL_HAVE_PRISMATIC_MOJO = 51084,
|
||||
SPELL_HAVE_RAPTOR_CLAW = 51086,
|
||||
SPELL_HAVE_AMBERSEED = 51088,
|
||||
SPELL_HAVE_SHRUNKEN_DRAGONS_CLAW = 51092,
|
||||
// Spell Fetch Hard
|
||||
SPELL_FETCH_CHILLED_SERPENT_MUCUS = 51093,
|
||||
SPELL_FETCH_CRYSTALLIZED_HOGSNOT = 51095,
|
||||
SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS = 51097,
|
||||
SPELL_FETCH_TROLLBANE = 51100,
|
||||
SPELL_FETCH_FROZEN_SPIDER_ICHOR = 51102,
|
||||
// Spell Have Hard
|
||||
SPELL_HAVE_CHILLED_SERPENT_MUCUS = 51094,
|
||||
SPELL_HAVE_CRYSTALLIZED_HOGSNOT = 51096,
|
||||
SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS = 51098,
|
||||
SPELL_HAVE_TROLLBANE = 51101,
|
||||
SPELL_HAVE_FROZEN_SPIDER_ICHOR = 51104,
|
||||
// Text
|
||||
SAY_EASY_123 = 0,
|
||||
SAY_MEDIUM_4 = 1,
|
||||
SAY_MEDIUM_5 = 2,
|
||||
SAY_HARD_6 = 3,
|
||||
SAY_RUINED = 4,
|
||||
// Text Easy
|
||||
SAY_KNOTROOT = 5,
|
||||
SAY_PICKLED_EAGLE_EGG = 6,
|
||||
SAY_SPECKLED_GUANO = 7,
|
||||
SAY_WITHERED_BATWING = 8,
|
||||
SAY_SEASONED_SLIDER_CIDER = 9,
|
||||
SAY_PULVERIZED_GARGOYLE_TEETH = 10,
|
||||
SAY_MUDDY_MIRE_MAGGOT = 11,
|
||||
SAY_SPIKY_SPIDER_EGG = 12,
|
||||
SAY_HAIRY_HERRING_HEAD = 13,
|
||||
SAY_PUTRID_PIRATE_PERSPIRATION = 14,
|
||||
SAY_ICECROWN_BOTTLED_WATER = 15,
|
||||
// Text Medium
|
||||
SAY_WASPS_WINGS = 16,
|
||||
SAY_PRISMATIC_MOJO = 17,
|
||||
SAY_RAPTOR_CLAW = 18,
|
||||
SAY_AMBERSEED = 19,
|
||||
SAY_SHRUNKEN_DRAGONS_CLAW = 20,
|
||||
// Text Hard
|
||||
SAY_CHILLED_SERPENT_MUCUS = 21,
|
||||
SAY_CRYSTALLIZED_HOGSNOT = 22,
|
||||
SAY_CRUSHED_BASILISK_CRYSTALS = 23,
|
||||
SAY_TROLLBANE = 24,
|
||||
SAY_FROZEN_SPIDER_ICHOR = 25
|
||||
};
|
||||
|
||||
enum FinklesteinEvents
|
||||
{
|
||||
EVENT_TURN_TO_POT = 1,
|
||||
EVENT_TURN_BACK = 2,
|
||||
EVENT_EASY_123 = 3,
|
||||
EVENT_MEDIUM_4 = 4,
|
||||
EVENT_MEDIUM_5 = 5,
|
||||
EVENT_HARD_6 = 6
|
||||
};
|
||||
|
||||
class npc_alchemist_finklestein : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_alchemist_finklestein() : CreatureScript("npc_alchemist_finklestein") { }
|
||||
|
||||
struct npc_alchemist_finklesteinAI : public ScriptedAI
|
||||
{
|
||||
npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_TURN_TO_POT, urand(15000, 26000));
|
||||
}
|
||||
|
||||
void SetData(uint32 Type, uint32 Data)
|
||||
{
|
||||
if (Type == 1 && Data == 1)
|
||||
switch (_getingredienttry)
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
_events.ScheduleEvent(EVENT_EASY_123, 100);
|
||||
break;
|
||||
case 4:
|
||||
_events.ScheduleEvent(EVENT_MEDIUM_4, 100);
|
||||
break;
|
||||
case 5:
|
||||
_events.ScheduleEvent(EVENT_MEDIUM_5, 100);
|
||||
break;
|
||||
case 6:
|
||||
_events.ScheduleEvent(EVENT_HARD_6, 100);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_TURN_TO_POT:
|
||||
me->SetFacingTo(6.230825f);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING_NO_SHEATHE);
|
||||
_events.ScheduleEvent(EVENT_TURN_BACK, 11000);
|
||||
break;
|
||||
case EVENT_TURN_BACK:
|
||||
me->SetFacingTo(4.886922f);
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
_events.ScheduleEvent(EVENT_TURN_TO_POT, urand(25000, 41000));
|
||||
break;
|
||||
case EVENT_EASY_123:
|
||||
if (Player* player = Unit::GetPlayer(*me, _playerGUID))
|
||||
{
|
||||
Talk(SAY_EASY_123, _playerGUID);
|
||||
DoCast(player, SPELL_RANDOM_INGREDIENT_EASY_AURA);
|
||||
++_getingredienttry;
|
||||
}
|
||||
break;
|
||||
case EVENT_MEDIUM_4:
|
||||
if (Player* player = Unit::GetPlayer(*me, _playerGUID))
|
||||
{
|
||||
Talk(SAY_MEDIUM_4, _playerGUID);
|
||||
DoCast(player, SPELL_RANDOM_INGREDIENT_MEDIUM_AURA);
|
||||
++_getingredienttry;
|
||||
}
|
||||
break;
|
||||
case EVENT_MEDIUM_5:
|
||||
if (Player* player = Unit::GetPlayer(*me, _playerGUID))
|
||||
{
|
||||
Talk(SAY_MEDIUM_5, _playerGUID);
|
||||
DoCast(player, SPELL_RANDOM_INGREDIENT_MEDIUM_AURA);
|
||||
++_getingredienttry;
|
||||
}
|
||||
break;
|
||||
case EVENT_HARD_6:
|
||||
if (Player* player = Unit::GetPlayer(*me, _playerGUID))
|
||||
{
|
||||
Talk(SAY_HARD_6, _playerGUID);
|
||||
DoCast(player, SPELL_RANDOM_INGREDIENT_HARD_AURA);
|
||||
++_getingredienttry;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/)
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
DoCast(player, SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
|
||||
_playerGUID = player->GetGUID();
|
||||
_getingredienttry = 1;
|
||||
_events.ScheduleEvent(EVENT_EASY_123, 100);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
uint64 _playerGUID;
|
||||
uint8 _getingredienttry;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_alchemist_finklesteinAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class go_finklesteins_cauldron : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_finklesteins_cauldron() : GameObjectScript("go_finklesteins_cauldron") { }
|
||||
|
||||
bool OnGossipHello(Player* player, GameObject* /*go*/)
|
||||
{
|
||||
player->CastSpell(player, SPELL_POT_CHECK);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
uint32 const FetchIngredients[21] [4] =
|
||||
{
|
||||
{ SPELL_FETCH_KNOTROOT, SPELL_HAVE_KNOTROOT, ITEM_KNOTROOT, SAY_KNOTROOT },
|
||||
{ SPELL_FETCH_PICKLED_EAGLE_EGG, SPELL_HAVE_PICKLED_EAGLE_EGG, ITEM_PICKLED_EAGLE_EGG, SAY_PICKLED_EAGLE_EGG },
|
||||
{ SPELL_FETCH_SPECKLED_GUANO, SPELL_HAVE_SPECKLED_GUANO, ITEM_SPECKLED_GUANO, SAY_SPECKLED_GUANO },
|
||||
{ SPELL_FETCH_WITHERED_BATWING, SPELL_HAVE_WITHERED_BATWING, ITEM_WITHERED_BATWING, SAY_WITHERED_BATWING },
|
||||
{ SPELL_FETCH_SEASONED_SLIDER_CIDER, SPELL_HAVE_SEASONED_SLIDER_CIDER, ITEM_SEASONED_SLIDER_CIDER, SAY_SEASONED_SLIDER_CIDER },
|
||||
{ SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH, SPELL_HAVE_PULVERIZED_GARGOYLE_TEETH, ITEM_PULVERIZED_GARGOYLE_TEETH, SAY_PULVERIZED_GARGOYLE_TEETH },
|
||||
{ SPELL_FETCH_MUDDY_MIRE_MAGGOT, SPELL_HAVE_MUDDY_MIRE_MAGGOT, ITEM_MUDDY_MIRE_MAGGOT, SAY_MUDDY_MIRE_MAGGOT },
|
||||
{ SPELL_FETCH_SPIKY_SPIDER_EGG, SPELL_HAVE_SPIKY_SPIDER_EGG, ITEM_SPIKY_SPIDER_EGG, SAY_SPIKY_SPIDER_EGG },
|
||||
{ SPELL_FETCH_HAIRY_HERRING_HEAD, SPELL_HAVE_HAIRY_HERRING_HEAD, ITEM_HAIRY_HERRING_HEAD, SAY_HAIRY_HERRING_HEAD },
|
||||
{ SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION, SPELL_HAVE_PUTRID_PIRATE_PERSPIRATION, ITEM_PUTRID_PIRATE_PERSPIRATION, SAY_PUTRID_PIRATE_PERSPIRATION },
|
||||
{ SPELL_FETCH_ICECROWN_BOTTLED_WATER, SPELL_HAVE_ICECROWN_BOTTLED_WATER, ITEM_ICECROWN_BOTTLED_WATER, SAY_ICECROWN_BOTTLED_WATER },
|
||||
{ SPELL_FETCH_WASPS_WINGS, SPELL_HAVE_WASPS_WINGS, ITEM_WASPS_WINGS, SAY_WASPS_WINGS },
|
||||
{ SPELL_FETCH_PRISMATIC_MOJO, SPELL_HAVE_PRISMATIC_MOJO, ITEM_PRISMATIC_MOJO, SAY_PRISMATIC_MOJO },
|
||||
{ SPELL_FETCH_RAPTOR_CLAW, SPELL_HAVE_RAPTOR_CLAW, ITEM_RAPTOR_CLAW, SAY_RAPTOR_CLAW },
|
||||
{ SPELL_FETCH_AMBERSEED, SPELL_HAVE_AMBERSEED, ITEM_AMBERSEED, SAY_AMBERSEED },
|
||||
{ SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW, SPELL_HAVE_SHRUNKEN_DRAGONS_CLAW, ITEM_SHRUNKEN_DRAGONS_CLAW, SAY_SHRUNKEN_DRAGONS_CLAW },
|
||||
{ SPELL_FETCH_CHILLED_SERPENT_MUCUS, SPELL_HAVE_CHILLED_SERPENT_MUCUS, ITEM_CHILLED_SERPENT_MUCUS, SAY_CHILLED_SERPENT_MUCUS },
|
||||
{ SPELL_FETCH_CRYSTALLIZED_HOGSNOT, SPELL_HAVE_CRYSTALLIZED_HOGSNOT, ITEM_CRYSTALLIZED_HOGSNOT, SAY_CRYSTALLIZED_HOGSNOT },
|
||||
{ SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS, SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS, ITEM_CRUSHED_BASILISK_CRYSTALS, SAY_CRUSHED_BASILISK_CRYSTALS },
|
||||
{ SPELL_FETCH_TROLLBANE, SPELL_HAVE_TROLLBANE, ITEM_TROLLBANE, SAY_TROLLBANE },
|
||||
{ SPELL_FETCH_FROZEN_SPIDER_ICHOR, SPELL_HAVE_FROZEN_SPIDER_ICHOR, ITEM_FROZEN_SPIDER_ICHOR, SAY_FROZEN_SPIDER_ICHOR }
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_random_ingredient_aura
|
||||
#####*/
|
||||
|
||||
class spell_random_ingredient_aura : public SpellScriptLoader
|
||||
{
|
||||
public: spell_random_ingredient_aura() : SpellScriptLoader("spell_random_ingredient_aura") { }
|
||||
|
||||
class spell_random_ingredient_aura_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_random_ingredient_aura_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_EASY) || !sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_MEDIUM) || !sSpellMgr->GetSpellInfo(SPELL_RANDOM_INGREDIENT_HARD))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void PeriodicTick(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
switch (GetSpellInfo()->Id)
|
||||
{
|
||||
case SPELL_RANDOM_INGREDIENT_EASY_AURA:
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_RANDOM_INGREDIENT_EASY);
|
||||
break;
|
||||
case SPELL_RANDOM_INGREDIENT_MEDIUM_AURA:
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_RANDOM_INGREDIENT_MEDIUM);
|
||||
break;
|
||||
case SPELL_RANDOM_INGREDIENT_HARD_AURA:
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_RANDOM_INGREDIENT_HARD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_random_ingredient_aura_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_random_ingredient_aura_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_random_ingredient
|
||||
#####*/
|
||||
|
||||
class spell_random_ingredient : public SpellScriptLoader
|
||||
{
|
||||
public: spell_random_ingredient() : SpellScriptLoader("spell_random_ingredient") { }
|
||||
|
||||
class spell_random_ingredient_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_random_ingredient_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_FETCH_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPECKLED_GUANO) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_MUDDY_MIRE_MAGGOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPIKY_SPIDER_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_HAIRY_HERRING_HEAD) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_WASPS_WINGS) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_AMBERSEED) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRYSTALLIZED_HOGSNOT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
{
|
||||
|
||||
uint8 ingredient = 0;
|
||||
|
||||
switch (GetSpellInfo()->Id)
|
||||
{
|
||||
case SPELL_RANDOM_INGREDIENT_EASY:
|
||||
ingredient = urand(0, 10);
|
||||
break;
|
||||
case SPELL_RANDOM_INGREDIENT_MEDIUM:
|
||||
ingredient = urand(11, 15);
|
||||
break;
|
||||
case SPELL_RANDOM_INGREDIENT_HARD:
|
||||
ingredient = urand(16, 20);
|
||||
break;
|
||||
}
|
||||
|
||||
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
|
||||
{
|
||||
finklestein->CastSpell(player, FetchIngredients[ingredient] [0], true, NULL);
|
||||
finklestein->AI()->Talk(FetchIngredients[ingredient] [3], player->GetGUID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_random_ingredient_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_random_ingredient_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_pot_check
|
||||
#####*/
|
||||
|
||||
class spell_pot_check : public SpellScriptLoader
|
||||
{
|
||||
public: spell_pot_check() : SpellScriptLoader("spell_pot_check") { }
|
||||
|
||||
class spell_pot_check_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pot_check_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_FETCH_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPECKLED_GUANO) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_PULVERIZED_GARGOYLE_TEETH) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_MUDDY_MIRE_MAGGOT) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_SPIKY_SPIDER_EGG) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_HAIRY_HERRING_HEAD) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_WASPS_WINGS) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_AMBERSEED) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_CRYSTALLIZED_HOGSNOT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_FETCH_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_FETCH_FROZEN_SPIDER_ICHOR) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_KNOTROOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PICKLED_EAGLE_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPECKLED_GUANO) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_WITHERED_BATWING) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SEASONED_SLIDER_CIDER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_PULVERIZED_GARGOYLE_TEETH) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_MUDDY_MIRE_MAGGOT) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_SPIKY_SPIDER_EGG) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_HAIRY_HERRING_HEAD) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PUTRID_PIRATE_PERSPIRATION) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_ICECROWN_BOTTLED_WATER) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_WASPS_WINGS) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_PRISMATIC_MOJO) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_RAPTOR_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_AMBERSEED) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_SHRUNKEN_DRAGONS_CLAW) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CHILLED_SERPENT_MUCUS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_CRYSTALLIZED_HOGSNOT) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HAVE_CRUSHED_BASILISK_CRYSTALS) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_TROLLBANE) || !sSpellMgr->GetSpellInfo(SPELL_HAVE_FROZEN_SPIDER_ICHOR))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
{
|
||||
for (uint8 i = 0; i < 21; ++i)
|
||||
{
|
||||
if(player->HasAura(FetchIngredients[i] [0]))
|
||||
{
|
||||
player->CastSpell(player, SPELL_THROW_INGREDIENT);
|
||||
player->RemoveAura(FetchIngredients[i] [0]);
|
||||
if(player->HasAura(FetchIngredients[i] [1]))
|
||||
{
|
||||
player->RemoveAura(FetchIngredients[i] [1]);
|
||||
player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
|
||||
if (i < 15)
|
||||
{
|
||||
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
|
||||
finklestein->AI()->SetData(1, 1);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_THE_ALCHEMIST_APPRENTICE_DAILY) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
|
||||
player->CastSpell(player, SPELL_KILL_CREDIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RemoveItems(player);
|
||||
player->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
|
||||
if (Creature* finklestein = GetClosestCreatureWithEntry(player, NPC_FINKLESTEIN, 25.0f))
|
||||
finklestein->AI()->Talk(SAY_RUINED, player->GetGUID());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveItems(Player* player)
|
||||
{
|
||||
for (uint8 i = 0; i < 21; ++i)
|
||||
if (player->HasItemCount(FetchIngredients[i] [2], 1, true))
|
||||
player->DestroyItemCount(FetchIngredients[i] [2], 1, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pot_check_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_pot_check_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_fetch_ingredient_aura
|
||||
#####*/
|
||||
|
||||
class spell_fetch_ingredient_aura : public SpellScriptLoader
|
||||
{
|
||||
public: spell_fetch_ingredient_aura() : SpellScriptLoader("spell_fetch_ingredient_aura") { }
|
||||
|
||||
class spell_fetch_ingredient_aura_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_fetch_ingredient_aura_AuraScript);
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
|
||||
if (Unit* target = GetTarget())
|
||||
if (target->HasAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF))
|
||||
if (Creature* finklestein = GetClosestCreatureWithEntry(target, NPC_FINKLESTEIN, 100.0f))
|
||||
{
|
||||
target->RemoveAura(SPELL_ALCHEMIST_APPRENTICE_INVISBUFF);
|
||||
finklestein->AI()->Talk(SAY_RUINED, target->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_fetch_ingredient_aura_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_fetch_ingredient_aura_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_zuldrak()
|
||||
{
|
||||
new npc_drakuru_shackles;
|
||||
@@ -1427,4 +1956,10 @@ void AddSC_zuldrak()
|
||||
new npc_elemental_lord;
|
||||
new npc_fiend_elemental;
|
||||
new go_scourge_enclosure;
|
||||
new npc_alchemist_finklestein;
|
||||
new go_finklesteins_cauldron;
|
||||
new spell_random_ingredient_aura;
|
||||
new spell_random_ingredient;
|
||||
new spell_pot_check;
|
||||
new spell_fetch_ingredient_aura;
|
||||
}
|
||||
+64
-67
@@ -16,12 +16,12 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Blackheart_the_Inciter
|
||||
SD%Complete: 75
|
||||
SDComment: Incite Chaos not functional since core lacks Mind Control support
|
||||
SDCategory: Auchindoun, Shadow Labyrinth
|
||||
EndScriptData */
|
||||
/*
|
||||
Name: Boss_Blackheart_the_Inciter
|
||||
%Complete: 75
|
||||
Comment: Incite Chaos not functional since core lacks Mind Control support
|
||||
Category: Auchindoun, Shadow Labyrinth
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -48,38 +48,26 @@ enum BlackheartTheInciter
|
||||
SAY2_DEATH = 9
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_INCITE_CHAOS_WAIT = 1,
|
||||
EVENT_INCITE_CHAOS = 2,
|
||||
EVENT_CHARGE_ATTACK = 3,
|
||||
EVENT_WAR_STOMP = 4
|
||||
};
|
||||
|
||||
class boss_blackheart_the_inciter : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_blackheart_the_inciter() : CreatureScript("boss_blackheart_the_inciter") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
struct boss_blackheart_the_inciterAI : public BossAI
|
||||
{
|
||||
return new boss_blackheart_the_inciterAI (creature);
|
||||
}
|
||||
|
||||
struct boss_blackheart_the_inciterAI : public ScriptedAI
|
||||
{
|
||||
boss_blackheart_the_inciterAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool InciteChaos;
|
||||
uint32 InciteChaos_Timer;
|
||||
uint32 InciteChaosWait_Timer;
|
||||
uint32 Charge_Timer;
|
||||
uint32 Knockback_Timer;
|
||||
boss_blackheart_the_inciterAI(Creature* creature) : BossAI(creature, DATA_BLACKHEARTTHEINCITEREVENT) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
InciteChaos = false;
|
||||
InciteChaos_Timer = 20000;
|
||||
InciteChaosWait_Timer = 15000;
|
||||
Charge_Timer = 5000;
|
||||
Knockback_Timer = 15000;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, NOT_STARTED);
|
||||
@@ -100,6 +88,11 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_INCITE_CHAOS_WAIT, 15000);
|
||||
events.ScheduleEvent(EVENT_INCITE_CHAOS, 20000);
|
||||
events.ScheduleEvent(EVENT_CHARGE_ATTACK, 5000);
|
||||
events.ScheduleEvent(EVENT_WAR_STOMP, 15000);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
@@ -108,56 +101,60 @@ public:
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (InciteChaos)
|
||||
{
|
||||
if (InciteChaosWait_Timer <= diff)
|
||||
{
|
||||
InciteChaos = false;
|
||||
InciteChaosWait_Timer = 15000;
|
||||
} else InciteChaosWait_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
if (InciteChaos_Timer <= diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoCast(me, SPELL_INCITE_CHAOS);
|
||||
|
||||
std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
switch (eventId)
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
me->CastSpell(target, SPELL_INCITE_CHAOS_B, true);
|
||||
case EVENT_INCITE_CHAOS_WAIT:
|
||||
InciteChaos = false;
|
||||
events.ScheduleEvent(EVENT_INCITE_CHAOS_WAIT, 15000);
|
||||
break;
|
||||
case EVENT_INCITE_CHAOS:
|
||||
{
|
||||
DoCast(me, SPELL_INCITE_CHAOS);
|
||||
|
||||
std::list<HostileReference*> t_list = me->getThreatManager().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)
|
||||
{
|
||||
Unit* target = Unit::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if (target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
me->CastSpell(target, SPELL_INCITE_CHAOS_B, true);
|
||||
}
|
||||
|
||||
DoResetThreat();
|
||||
InciteChaos = true;
|
||||
events.ScheduleEvent(EVENT_INCITE_CHAOS, 40000);
|
||||
break;
|
||||
}
|
||||
case EVENT_CHARGE_ATTACK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
events.ScheduleEvent(EVENT_CHARGE, urand(15000, 25000));
|
||||
break;
|
||||
case EVENT_WAR_STOMP:
|
||||
DoCast(me, SPELL_WAR_STOMP);
|
||||
events.ScheduleEvent(EVENT_WAR_STOMP, urand(18000, 24000));
|
||||
break;
|
||||
}
|
||||
|
||||
DoResetThreat();
|
||||
InciteChaos = true;
|
||||
InciteChaos_Timer = 40000;
|
||||
return;
|
||||
} else InciteChaos_Timer -= diff;
|
||||
|
||||
//Charge_Timer
|
||||
if (Charge_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
Charge_Timer = urand(15000, 25000);
|
||||
} else Charge_Timer -= diff;
|
||||
|
||||
//Knockback_Timer
|
||||
if (Knockback_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_WAR_STOMP);
|
||||
Knockback_Timer = urand(18000, 24000);
|
||||
} else Knockback_Timer -= diff;
|
||||
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool InciteChaos;
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_blackheart_the_inciterAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -16,12 +16,11 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Grandmaster_Vorpil
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Auchindoun, Shadow Labyrinth
|
||||
EndScriptData */
|
||||
/*
|
||||
Name: Boss_Grandmaster_Vorpil
|
||||
%Complete: 100
|
||||
Category: Auchindoun, Shadow Labyrinth
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -43,13 +42,13 @@ enum GrandmasterVorpil
|
||||
SPELL_SHADOWBOLT_VOLLEY = 33841,
|
||||
SPELL_BANISH = 38791,
|
||||
|
||||
MOB_VOID_TRAVELER = 19226,
|
||||
NPC_VOID_TRAVELER = 19226,
|
||||
SPELL_SACRIFICE = 33587,
|
||||
SPELL_SHADOW_NOVA = 33846,
|
||||
SPELL_EMPOWERING_SHADOWS = 33783,
|
||||
H_SPELL_EMPOWERING_SHADOWS = 39364,
|
||||
|
||||
MOB_VOID_PORTAL = 19224,
|
||||
NPC_VOID_PORTAL = 19224,
|
||||
SPELL_VOID_PORTAL_VISUAL = 33569
|
||||
};
|
||||
|
||||
@@ -64,21 +63,22 @@ float VoidPortalCoords[5][3] =
|
||||
{-261.4533f, -297.3298f, 17.1f}
|
||||
};
|
||||
|
||||
class mob_voidtraveler : public CreatureScript
|
||||
enum Events
|
||||
{
|
||||
EVENT_SHADOWBOLT_VOLLEY = 1,
|
||||
EVENT_BANISH = 2,
|
||||
EVENT_DRAW_SHADOWS = 3,
|
||||
EVENT_SUMMON_TRAVELER = 4
|
||||
};
|
||||
|
||||
class npc_voidtraveler : public CreatureScript
|
||||
{
|
||||
public:
|
||||
mob_voidtraveler() : CreatureScript("mob_voidtraveler") { }
|
||||
npc_voidtraveler() : CreatureScript("npc_voidtraveler") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
struct npc_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
return new mob_voidtravelerAI (creature);
|
||||
}
|
||||
|
||||
struct mob_voidtravelerAI : public ScriptedAI
|
||||
{
|
||||
mob_voidtravelerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
npc_voidtravelerAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
uint64 VorpilGUID;
|
||||
uint32 move;
|
||||
@@ -133,6 +133,11 @@ public:
|
||||
move = 1000;
|
||||
} else move -= diff;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_voidtravelerAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
@@ -142,35 +147,15 @@ class boss_grandmaster_vorpil : public CreatureScript
|
||||
public:
|
||||
boss_grandmaster_vorpil() : CreatureScript("boss_grandmaster_vorpil") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
struct boss_grandmaster_vorpilAI : public BossAI
|
||||
{
|
||||
return new boss_grandmaster_vorpilAI (creature);
|
||||
}
|
||||
|
||||
struct boss_grandmaster_vorpilAI : public ScriptedAI
|
||||
{
|
||||
boss_grandmaster_vorpilAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_grandmaster_vorpilAI(Creature* creature) : BossAI(creature, DATA_GRANDMASTERVORPIL)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
Intro = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
bool Intro, HelpYell;
|
||||
bool sumportals;
|
||||
|
||||
uint32 ShadowBoltVolley_Timer;
|
||||
uint32 DrawShadows_Timer;
|
||||
uint32 summonTraveler_Timer;
|
||||
uint32 banish_Timer;
|
||||
uint64 PortalsGuid[5];
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ShadowBoltVolley_Timer = urand(7000, 14000);
|
||||
DrawShadows_Timer = 45000;
|
||||
summonTraveler_Timer = 90000;
|
||||
banish_Timer = 17000;
|
||||
HelpYell = false;
|
||||
sumportals = false;
|
||||
destroyPortals();
|
||||
@@ -186,7 +171,7 @@ public:
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
Creature* Portal = NULL;
|
||||
Portal = me->SummonCreature(MOB_VOID_PORTAL, VoidPortalCoords[i][0], VoidPortalCoords[i][1], VoidPortalCoords[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 3000000);
|
||||
Portal = me->SummonCreature(NPC_VOID_PORTAL, VoidPortalCoords[i][0], VoidPortalCoords[i][1], VoidPortalCoords[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 3000000);
|
||||
if (Portal)
|
||||
{
|
||||
PortalsGuid[i] = Portal->GetGUID();
|
||||
@@ -194,7 +179,7 @@ public:
|
||||
}
|
||||
}
|
||||
sumportals = true;
|
||||
summonTraveler_Timer = 5000;
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 5000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +201,7 @@ public:
|
||||
void spawnVoidTraveler()
|
||||
{
|
||||
int pos = urand(0, 4);
|
||||
me->SummonCreature(MOB_VOID_TRAVELER, VoidPortalCoords[pos][0], VoidPortalCoords[pos][1], VoidPortalCoords[pos][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
me->SummonCreature(NPC_VOID_TRAVELER, VoidPortalCoords[pos][0], VoidPortalCoords[pos][1], VoidPortalCoords[pos][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
if (!HelpYell)
|
||||
{
|
||||
Talk(SAY_HELP);
|
||||
@@ -226,8 +211,8 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
if (summoned && summoned->GetEntry() == MOB_VOID_TRAVELER)
|
||||
CAST_AI(mob_voidtraveler::mob_voidtravelerAI, summoned->AI())->VorpilGUID = me->GetGUID();
|
||||
if (summoned && summoned->GetEntry() == NPC_VOID_TRAVELER)
|
||||
CAST_AI(npc_voidtraveler::npc_voidtravelerAI, summoned->AI())->VorpilGUID = me->GetGUID();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/)
|
||||
@@ -246,11 +231,18 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, urand(7000, 14000));
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_BANISH, 17000);
|
||||
events.ScheduleEvent(EVENT_DRAW_SHADOWS, 45000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 90000);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
summonPortals();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||
_EnterCombat();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
@@ -269,51 +261,61 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (ShadowBoltVolley_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_SHADOWBOLT_VOLLEY);
|
||||
ShadowBoltVolley_Timer = urand(15000, 30000);
|
||||
} else ShadowBoltVolley_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
if (IsHeroic() && banish_Timer <= diff)
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, false);
|
||||
if (target)
|
||||
switch (eventId)
|
||||
{
|
||||
DoCast(target, SPELL_BANISH);
|
||||
banish_Timer = 16000;
|
||||
case EVENT_SHADOWBOLT_VOLLEY:
|
||||
DoCast(me, SPELL_SHADOWBOLT_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, urand(15000, 30000));
|
||||
break;
|
||||
case EVENT_BANISH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, false))
|
||||
DoCast(target, SPELL_BANISH);
|
||||
events.ScheduleEvent(EVENT_BANISH, 16000);
|
||||
break;
|
||||
case EVENT_DRAW_SHADOWS:
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->GetSource())
|
||||
if (i_pl->IsAlive() && !i_pl->HasAura(SPELL_BANISH))
|
||||
i_pl->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
|
||||
me->SetPosition(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
DoCast(me, SPELL_DRAW_SHADOWS, true);
|
||||
DoCast(me, SPELL_RAIN_OF_FIRE);
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT_VOLLEY, 6000);
|
||||
events.ScheduleEvent(EVENT_DRAW_SHADOWS, 30000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SUMMON_TRAVELER:
|
||||
spawnVoidTraveler();
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 10000);
|
||||
//enrage at 20%
|
||||
if (HealthBelowPct(20))
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 5000);
|
||||
break;
|
||||
}
|
||||
} else banish_Timer -= diff;
|
||||
|
||||
if (DrawShadows_Timer <= diff)
|
||||
{
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const &PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (Player* i_pl = i->GetSource())
|
||||
if (i_pl->IsAlive() && !i_pl->HasAura(SPELL_BANISH))
|
||||
i_pl->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
|
||||
me->SetPosition(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
DoCast(me, SPELL_DRAW_SHADOWS, true);
|
||||
|
||||
DoCast(me, SPELL_RAIN_OF_FIRE);
|
||||
|
||||
ShadowBoltVolley_Timer = 6000;
|
||||
DrawShadows_Timer = 30000;
|
||||
} else DrawShadows_Timer -= diff;
|
||||
|
||||
if (summonTraveler_Timer <= diff)
|
||||
{
|
||||
spawnVoidTraveler();
|
||||
summonTraveler_Timer = 10000;
|
||||
//enrage at 20%
|
||||
if (HealthBelowPct(20))
|
||||
summonTraveler_Timer = 5000;
|
||||
} else summonTraveler_Timer -=diff;
|
||||
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool Intro, HelpYell;
|
||||
bool sumportals;
|
||||
uint64 PortalsGuid[5];
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_grandmaster_vorpilAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
@@ -321,5 +323,5 @@ public:
|
||||
void AddSC_boss_grandmaster_vorpil()
|
||||
{
|
||||
new boss_grandmaster_vorpil();
|
||||
new mob_voidtraveler();
|
||||
new npc_voidtraveler();
|
||||
}
|
||||
@@ -30,53 +30,51 @@ EndScriptData */
|
||||
|
||||
enum Murmur
|
||||
{
|
||||
// Spell
|
||||
SPELL_RESONANCE = 33657,
|
||||
SPELL_MAGNETIC_PULL = 33689,
|
||||
SPELL_SONIC_SHOCK = 38797,
|
||||
SPELL_THUNDERING_STORM = 39365,
|
||||
SPELL_SONIC_BOOM_CAST = 33923,
|
||||
SPELL_SONIC_BOOM_EFFECT = 33666,
|
||||
SPELL_MURMURS_TOUCH = 33711,
|
||||
// Text
|
||||
EMOTE_SONIC_BOOM = 0
|
||||
};
|
||||
|
||||
#define SPELL_SONIC_BOOM_CAST DUNGEON_MODE(33923, 38796)
|
||||
#define SPELL_SONIC_BOOM_EFFECT DUNGEON_MODE(33666, 38795)
|
||||
|
||||
#define SPELL_MURMURS_TOUCH DUNGEON_MODE(33711, 38794)
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SONIC_BOOM = 1,
|
||||
EVENT_MURMURS_TOUCH = 2,
|
||||
EVENT_RESONANCE = 3,
|
||||
EVENT_MAGNETIC_PULL = 4,
|
||||
EVENT_THUNDERING_STORM = 5,
|
||||
EVENT_SONIC_SHOCK = 6
|
||||
};
|
||||
|
||||
class boss_murmur : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_murmur() : CreatureScript("boss_murmur") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
struct boss_murmurAI : public BossAI
|
||||
{
|
||||
return new boss_murmurAI (creature);
|
||||
}
|
||||
|
||||
struct boss_murmurAI : public ScriptedAI
|
||||
{
|
||||
boss_murmurAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_murmurAI(Creature* creature) : BossAI(creature, DATA_MURMUREVENT)
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
uint32 SonicBoom_Timer;
|
||||
uint32 MurmursTouch_Timer;
|
||||
uint32 Resonance_Timer;
|
||||
uint32 MagneticPull_Timer;
|
||||
uint32 SonicShock_Timer;
|
||||
uint32 ThunderingStorm_Timer;
|
||||
bool SonicBoom;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
SonicBoom_Timer = 30000;
|
||||
MurmursTouch_Timer = urand(8000, 20000);
|
||||
Resonance_Timer = 5000;
|
||||
MagneticPull_Timer = urand(15000, 30000);
|
||||
ThunderingStorm_Timer = 15000;
|
||||
SonicShock_Timer = 10000;
|
||||
SonicBoom = false;
|
||||
events.ScheduleEvent(EVENT_SONIC_BOOM, 30000);
|
||||
events.ScheduleEvent(EVENT_MURMURS_TOUCH, urand(8000, 20000));
|
||||
events.ScheduleEvent(EVENT_RESONANCE, 5000);
|
||||
events.ScheduleEvent(EVENT_MAGNETIC_PULL, urand(15000, 30000));
|
||||
if (IsHeroic())
|
||||
{
|
||||
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
|
||||
events.ScheduleEvent(EVENT_SONIC_SHOCK, 10000);
|
||||
}
|
||||
|
||||
//database should have `RegenHealth`=0 to prevent regen
|
||||
uint32 hp = me->CountPctFromMaxHealth(40);
|
||||
@@ -117,81 +115,65 @@ public:
|
||||
if (!UpdateVictim() || me->IsNonMeleeSpellCasted(false))
|
||||
return;
|
||||
|
||||
// Sonic Boom
|
||||
if (SonicBoom)
|
||||
{
|
||||
DoCast(me, SPELL_SONIC_BOOM_EFFECT, true);
|
||||
SonicBoomEffect();
|
||||
events.Update(diff);
|
||||
|
||||
SonicBoom = false;
|
||||
Resonance_Timer = 1500;
|
||||
}
|
||||
if (SonicBoom_Timer <= diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
Talk(EMOTE_SONIC_BOOM);
|
||||
DoCast(me, SPELL_SONIC_BOOM_CAST);
|
||||
SonicBoom_Timer = 30000;
|
||||
SonicBoom = true;
|
||||
return;
|
||||
} else SonicBoom_Timer -= diff;
|
||||
|
||||
// Murmur's Touch
|
||||
if (MurmursTouch_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 80, true))
|
||||
DoCast(target, SPELL_MURMURS_TOUCH);
|
||||
MurmursTouch_Timer = urand(25000, 35000);
|
||||
} else MurmursTouch_Timer -= diff;
|
||||
|
||||
// Resonance
|
||||
if (!SonicBoom && !(me->IsWithinMeleeRange(me->GetVictim())))
|
||||
{
|
||||
if (Resonance_Timer <= diff)
|
||||
switch (eventId)
|
||||
{
|
||||
DoCast(me, SPELL_RESONANCE);
|
||||
Resonance_Timer = 5000;
|
||||
} else Resonance_Timer -= diff;
|
||||
}
|
||||
|
||||
// Magnetic Pull
|
||||
if (MagneticPull_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->IsAlive())
|
||||
case EVENT_SONIC_BOOM:
|
||||
Talk(EMOTE_SONIC_BOOM);
|
||||
DoCast(me, SPELL_SONIC_BOOM_CAST);
|
||||
DoCast(me, SPELL_SONIC_BOOM_EFFECT, true);
|
||||
SonicBoomEffect();
|
||||
events.ScheduleEvent(EVENT_SONIC_BOOM, 30000);
|
||||
events.ScheduleEvent(EVENT_RESONANCE, 1500);
|
||||
break;
|
||||
case EVENT_MURMURS_TOUCH:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 80, true))
|
||||
DoCast(target, SPELL_MURMURS_TOUCH);
|
||||
events.ScheduleEvent(EVENT_MURMURS_TOUCH, urand(25000, 35000));
|
||||
break;
|
||||
case EVENT_RESONANCE:
|
||||
if (!(me->IsWithinMeleeRange(me->GetVictim())))
|
||||
{
|
||||
DoCast(me, SPELL_RESONANCE);
|
||||
events.ScheduleEvent(EVENT_RESONANCE, 5000);
|
||||
}
|
||||
break;
|
||||
case EVENT_MAGNETIC_PULL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (target->GetTypeId() == TYPEID_PLAYER && target->IsAlive())
|
||||
{
|
||||
DoCast(target, SPELL_MAGNETIC_PULL);
|
||||
events.ScheduleEvent(EVENT_MAGNETIC_PULL, 15000+rand()%15000);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGNETIC_PULL, 500);
|
||||
break;
|
||||
case EVENT_THUNDERING_STORM:
|
||||
{
|
||||
DoCast(target, SPELL_MAGNETIC_PULL);
|
||||
MagneticPull_Timer = 15000+rand()%15000;
|
||||
return;
|
||||
}
|
||||
MagneticPull_Timer = 500;
|
||||
} else MagneticPull_Timer -= diff;
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
// Thundering Storm
|
||||
if (ThunderingStorm_Timer <= diff)
|
||||
{
|
||||
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
|
||||
if (Unit* target = Unit::GetUnit(*me, (*i)->getUnitGuid()))
|
||||
if (target->IsAlive() && !me->IsWithinDist(target, 35, false))
|
||||
DoCast(target, SPELL_THUNDERING_STORM, true);
|
||||
ThunderingStorm_Timer = 15000;
|
||||
} else ThunderingStorm_Timer -= diff;
|
||||
|
||||
// Sonic Shock
|
||||
if (SonicShock_Timer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_SONIC_SHOCK);
|
||||
SonicShock_Timer = 10000+rand()%10000;
|
||||
} else SonicShock_Timer -= diff;
|
||||
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
|
||||
if (Unit* target = Unit::GetUnit(*me, (*i)->getUnitGuid()))
|
||||
if (target->IsAlive() && !me->IsWithinDist(target, 35, false))
|
||||
DoCast(target, SPELL_THUNDERING_STORM, true);
|
||||
events.ScheduleEvent(EVENT_THUNDERING_STORM, 15000);
|
||||
break;
|
||||
}
|
||||
case EVENT_SONIC_SHOCK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 20, false))
|
||||
if (target->IsAlive())
|
||||
DoCast(target, SPELL_SONIC_SHOCK);
|
||||
events.ScheduleEvent(EVENT_SONIC_SHOCK, 10000+rand()%10000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Select nearest most aggro target if top aggro too far
|
||||
if (!me->isAttackReady())
|
||||
return;
|
||||
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList();
|
||||
@@ -206,6 +188,11 @@ public:
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_murmurAI (creature);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -27,11 +27,6 @@ EndScriptData */
|
||||
#include "InstanceScript.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
|
||||
#define MAX_ENCOUNTER 5
|
||||
|
||||
#define REFECTORY_DOOR 183296 //door opened when blackheart the inciter dies
|
||||
#define SCREAMING_HALL_DOOR 183295 //door opened when grandmaster vorpil dies
|
||||
|
||||
/* Shadow Labyrinth encounters:
|
||||
1 - Ambassador Hellmaw event
|
||||
2 - Blackheart the Inciter event
|
||||
@@ -53,7 +48,7 @@ public:
|
||||
{
|
||||
instance_shadow_labyrinth_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint32 m_auiEncounter[EncounterCount];
|
||||
std::string str_data;
|
||||
|
||||
uint64 m_uiRefectoryDoorGUID;
|
||||
@@ -75,7 +70,7 @@ public:
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
@@ -217,7 +212,7 @@ public:
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] >> m_auiEncounter[4];
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
for (uint8 i = 0; i < EncounterCount; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
|
||||
@@ -19,11 +19,23 @@
|
||||
#ifndef DEF_SHADOW_LABYRINTH_H
|
||||
#define DEF_SHADOW_LABYRINTH_H
|
||||
|
||||
#define TYPE_HELLMAW 1
|
||||
#define TYPE_OVERSEER 2
|
||||
#define DATA_BLACKHEARTTHEINCITEREVENT 3
|
||||
#define DATA_GRANDMASTERVORPILEVENT 4
|
||||
#define DATA_MURMUREVENT 5
|
||||
#define DATA_GRANDMASTERVORPIL 6
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
TYPE_HELLMAW = 1,
|
||||
TYPE_OVERSEER = 2,
|
||||
DATA_BLACKHEARTTHEINCITEREVENT = 3,
|
||||
DATA_GRANDMASTERVORPILEVENT = 4,
|
||||
DATA_MURMUREVENT = 5,
|
||||
DATA_GRANDMASTERVORPIL = 6
|
||||
};
|
||||
|
||||
enum Objects
|
||||
{
|
||||
REFECTORY_DOOR = 183296, // door opened when blackheart the inciter dies
|
||||
SCREAMING_HALL_DOOR = 183295 // door opened when grandmaster vorpil dies
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -810,7 +810,7 @@ public:
|
||||
{
|
||||
case 1: // lift off
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(true);
|
||||
me->StopMoving();
|
||||
me->MonsterYell(SAY_TAKEOFF, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(me, SOUND_TAKEOFF);
|
||||
|
||||
@@ -112,7 +112,8 @@ public:
|
||||
}
|
||||
void Reset()
|
||||
{
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetSwim(true);
|
||||
me->SetDisableGravity(true);
|
||||
SpoutAnimTimer = 1000;
|
||||
RotTimer = 0;
|
||||
WaterboltTimer = 15000; // give time to get in range when fight starts
|
||||
|
||||
+2
-1
@@ -156,7 +156,8 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
if (Creature* frenzy = player->SummonCreature(MOB_COILFANG_FRENZY, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 2000))
|
||||
{
|
||||
frenzy->Attack(player, false);
|
||||
frenzy->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
frenzy->SetSwim(true);
|
||||
frenzy->SetDisableGravity(true);
|
||||
}
|
||||
DoSpawnFrenzy = false;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class boss_alar : public CreatureScript
|
||||
//me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10);
|
||||
//me->SetFloatValue(UNIT_FIELD_COMBATREACH, 10);
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
me->SetDisableGravity(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->setActive(false);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ class boss_alar : public CreatureScript
|
||||
if (instance)
|
||||
instance->SetData(DATA_ALAREVENT, IN_PROGRESS);
|
||||
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY); // after enterevademode will be set walk movement
|
||||
me->SetDisableGravity(true); // after enterevademode will be set walk movement
|
||||
DoZoneInCombat();
|
||||
me->setActive(true);
|
||||
}
|
||||
@@ -472,7 +472,7 @@ class mob_ember_of_alar : public CreatureScript
|
||||
mob_ember_of_alarAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
creature->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY);
|
||||
creature->SetDisableGravity(true);
|
||||
creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FIRE, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -986,7 +986,7 @@ class spell_gen_parachute_ic : public SpellScriptLoader
|
||||
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (Player* target = GetTarget()->ToPlayer())
|
||||
if (target->m_movementInfo.fallTime > 2000)
|
||||
if (target->m_movementInfo.jump.fallTime > 2000)
|
||||
target->CastSpell(target, SPELL_PARACHUTE_IC, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -1602,6 +1602,37 @@ class spell_q12527_zuldrak_rat : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q12661_q12669_q12676_q12677_q12713_summon_stefan : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q12661_q12669_q12676_q12677_q12713_summon_stefan() : SpellScriptLoader("spell_q12661_q12669_q12676_q12677_q12713_summon_stefan") { }
|
||||
|
||||
class spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript);
|
||||
|
||||
void ChangeSummonPos(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// Adjust effect summon position
|
||||
WorldLocation summonPos = *GetExplTargetDest();
|
||||
Position offset = { 0.0f, 0.0f, 20.0f, 0.0f };
|
||||
summonPos.RelocateOffset(offset);
|
||||
SetExplTargetDest(summonPos);
|
||||
GetHitDest()->RelocateOffset(offset);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_q12661_q12669_q12676_q12677_q12713_summon_stefan_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum QuenchingMist
|
||||
{
|
||||
SPELL_FLICKERING_FLAMES = 53504
|
||||
@@ -1789,6 +1820,7 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q11010_q11102_q11023_q11008_check_fly_mount();
|
||||
new spell_q12372_azure_on_death_force_whisper();
|
||||
new spell_q12527_zuldrak_rat();
|
||||
new spell_q12661_q12669_q12676_q12677_q12713_summon_stefan();
|
||||
new spell_q12730_quenching_mist();
|
||||
new spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy();
|
||||
new spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon();
|
||||
|
||||
@@ -1904,7 +1904,7 @@ public:
|
||||
|
||||
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
|
||||
// Fly Away
|
||||
me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY|MOVEMENTFLAG_ASCENDING|MOVEMENTFLAG_FLYING);
|
||||
me->SetCanFly(true);
|
||||
me->SetSpeed(MOVE_FLIGHT, 0.75f, true);
|
||||
me->SetSpeed(MOVE_RUN, 0.75f, true);
|
||||
float x = me->GetPositionX() + 20 * std::cos(me->GetOrientation());
|
||||
|
||||
Reference in new issue
Block a user