mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore
This commit is contained in:
@@ -88,11 +88,11 @@ class example_creature : public CreatureScript
|
||||
|
||||
struct example_creatureAI : public ScriptedAI
|
||||
{
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
//This is the constructor, called only once when the Creature is first created
|
||||
example_creatureAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
//*** CUSTOM VARIABLES ****
|
||||
// *** CUSTOM VARIABLES ****
|
||||
//These variables are for use only by this individual script.
|
||||
//Nothing else will ever call them but us.
|
||||
|
||||
@@ -105,7 +105,7 @@ class example_creature : public CreatureScript
|
||||
uint32 m_uiPhase; // The current battle phase we are in
|
||||
uint32 m_uiPhaseTimer; // Timer until phase transition
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
//This is called after spawn and whenever the core decides we need to evade
|
||||
void Reset()
|
||||
{
|
||||
@@ -119,7 +119,7 @@ class example_creature : public CreatureScript
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Enter Combat called once per combat
|
||||
void EnterCombat(Unit* pWho)
|
||||
{
|
||||
@@ -127,7 +127,7 @@ class example_creature : public CreatureScript
|
||||
DoScriptText(SAY_AGGRO, me, pWho);
|
||||
}
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Attack Start is called when victim change (including at start of combat)
|
||||
// By default, attack pWho and start movement toward the victim.
|
||||
//void AttackStart(Unit* pWho)
|
||||
@@ -135,14 +135,14 @@ class example_creature : public CreatureScript
|
||||
// ScriptedAI::AttackStart(pWho);
|
||||
//}
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
// Called when going out of combat. Reset is called just after.
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
DoScriptText(SAY_EVADE, me);
|
||||
}
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
//Our Receive emote function
|
||||
void ReceiveEmote(Player* /*pPlayer*/, uint32 uiTextEmote)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ class example_creature : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
//*** HANDLED FUNCTION ***
|
||||
// *** HANDLED FUNCTION ***
|
||||
//Update AI is called Every single map update (roughly once every 50ms if a player is within the grid)
|
||||
void UpdateAI(const uint32 uiDiff)
|
||||
{
|
||||
|
||||
@@ -78,13 +78,13 @@ enum Creatures
|
||||
{
|
||||
MOB_CTHUN_PORTAL = 15896,
|
||||
|
||||
//***** Main Phase 1 ********
|
||||
// ***** Main Phase 1 ********
|
||||
BOSS_EYE_OF_CTHUN = 15589,
|
||||
MOB_CLAW_TENTACLE = 15725,
|
||||
MOB_EYE_TENTACLE = 15726,
|
||||
MOB_SMALL_PORTAL = 15904,
|
||||
|
||||
//***** Main Phase 2 ********
|
||||
// ***** Main Phase 2 ********
|
||||
MOB_BODY_OF_CTHUN = 15809,
|
||||
MOB_GIANT_CLAW_TENTACLE = 15728,
|
||||
MOB_GIANT_EYE_TENTACLE = 15334,
|
||||
@@ -94,7 +94,7 @@ enum Creatures
|
||||
|
||||
enum Spells
|
||||
{
|
||||
//***** Main Phase 1 ********
|
||||
// ***** Main Phase 1 ********
|
||||
//Eye Spells
|
||||
SPELL_FREEZE_ANIM = 16245,
|
||||
SPELL_GREEN_BEAM = 26134,
|
||||
@@ -108,7 +108,7 @@ enum Spells
|
||||
SPELL_GROUND_RUPTURE = 26139,
|
||||
SPELL_HAMSTRING = 26141,
|
||||
|
||||
//***** Main Phase 2 ******
|
||||
// ***** Main Phase 2 ******
|
||||
//Body spells
|
||||
//#define SPELL_CARAPACE_CTHUN 26156 //Was removed from client dbcs
|
||||
SPELL_TRANSFORM = 26232,
|
||||
@@ -142,7 +142,7 @@ enum Yells
|
||||
//Text emote
|
||||
EMOTE_WEAKENED = -1531011,
|
||||
|
||||
//****** Out of Combat ******
|
||||
// ****** Out of Combat ******
|
||||
// Random Wispers - No txt only sound
|
||||
// The random sound is chosen by the client.
|
||||
RANDOM_SOUND_WHISPER = 8663,
|
||||
|
||||
@@ -1059,7 +1059,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
|
||||
struct npc_ball_of_flameAI : public ScriptedAI
|
||||
{
|
||||
npc_ball_of_flameAI(Creature* creature) : ScriptedAI(creature)
|
||||
npc_ball_of_flameAI(Creature* creature) : ScriptedAI(creature), instance(creature->GetInstanceScript())
|
||||
{
|
||||
despawnTimer = 0;
|
||||
}
|
||||
@@ -1102,6 +1102,15 @@ class npc_ball_of_flame : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void DamageDealt(Unit* /*target*/, uint32& damage, DamageEffectType damageType)
|
||||
{
|
||||
if (!instance || damageType != SPELL_DIRECT_DAMAGE)
|
||||
return;
|
||||
|
||||
if (damage > RAID_MODE<uint32>(23000, 25000, 23000, 25000))
|
||||
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(false));
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!despawnTimer)
|
||||
@@ -1117,6 +1126,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
uint64 chaseGUID;
|
||||
uint32 despawnTimer;
|
||||
};
|
||||
|
||||
@@ -139,7 +139,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
_Reset();
|
||||
events.ScheduleEvent(EVENT_BERSERK, 330000);
|
||||
events.ScheduleEvent(EVENT_VAMPIRIC_BITE, 15000);
|
||||
events.ScheduleEvent(EVENT_BLOOD_MIRROR, 2500, EVENT_GROUP_CANCELLABLE);
|
||||
@@ -151,8 +151,6 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
me->SetSpeed(MOVE_FLIGHT, 0.642857f, true);
|
||||
offtank = NULL;
|
||||
vampires.clear();
|
||||
|
||||
instance->SetBossState(DATA_BLOOD_QUEEN_LANA_THEL, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
@@ -164,6 +162,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
instance->SetBossState(DATA_BLOOD_QUEEN_LANA_THEL, IN_PROGRESS);
|
||||
@@ -174,6 +173,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(ESSENCE_OF_BLOOD_QUEEN);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(ESSENCE_OF_BLOOD_QUEEN_PLR);
|
||||
@@ -184,11 +184,11 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_BLOOD_MIRROR_DUMMY);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DELIRIOUS_SLASH);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_PACT_OF_THE_DARKFALLEN);
|
||||
instance->SetBossState(DATA_BLOOD_QUEEN_LANA_THEL, DONE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
Talk(SAY_WIPE);
|
||||
instance->SetBossState(DATA_BLOOD_QUEEN_LANA_THEL, FAIL);
|
||||
}
|
||||
|
||||
@@ -257,8 +257,8 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
frenzy = false;
|
||||
me->SetPower(POWER_ENERGY, 0);
|
||||
@@ -269,8 +269,6 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
DoCast(me, SPELL_RUNE_OF_BLOOD_S, true);
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK);
|
||||
me->RemoveAurasDueToSpell(SPELL_FRENZY);
|
||||
summons.DespawnAll();
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
@@ -283,6 +281,9 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
}
|
||||
|
||||
// oh just screw intro, enter combat - no exploits please
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
introDone = true;
|
||||
@@ -301,11 +302,11 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
DoCastAOE(SPELL_ACHIEVEMENT, true);
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, DONE);
|
||||
if (Creature* creature = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SAURFANG_EVENT_NPC)))
|
||||
creature->AI()->DoAction(ACTION_START_OUTRO);
|
||||
}
|
||||
@@ -327,6 +328,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, FAIL);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
_Reset();
|
||||
events.ScheduleEvent(EVENT_BERSERK, 300000);
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, urand(25000, 30000));
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
@@ -111,12 +111,10 @@ class boss_festergut : public CreatureScript
|
||||
gasDummyGUID = gasDummy->GetGUID();
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
me->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
|
||||
instance->SetBossState(DATA_FESTERGUT, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
@@ -128,19 +126,19 @@ class boss_festergut : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
Talk(SAY_AGGRO);
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
gasDummyGUID = gasDummy->GetGUID();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
|
||||
|
||||
DoZoneInCombat(me);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_FESTERGUT, DONE);
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
|
||||
|
||||
@@ -149,6 +147,7 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_FESTERGUT, FAIL);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,9 +180,9 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
me->SetPower(POWER_MANA, me->GetMaxPower(POWER_MANA));
|
||||
me->SetLastManaUse(0xFFFFFFFF); // hacky, but no other way atm to prevent mana regen
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_ONE);
|
||||
addWaveCounter = 0;
|
||||
nextVengefulShadeTarget = 0;
|
||||
@@ -191,7 +191,6 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
me->RemoveAurasDueToSpell(SPELL_MANA_BARRIER);
|
||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false);
|
||||
instance->SetBossState(DATA_LADY_DEATHWHISPER, NOT_STARTED);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
@@ -230,6 +229,9 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_ONE);
|
||||
// phase-independent events
|
||||
@@ -254,8 +256,6 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetBossState(DATA_LADY_DEATHWHISPER, DONE);
|
||||
|
||||
std::set<uint32> livingAddEntries;
|
||||
// Full House achievement
|
||||
for (SummonList::iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
@@ -284,11 +284,12 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
summons.DespawnAll();
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_LADY_DEATHWHISPER, FAIL);
|
||||
|
||||
summons.DespawnAll();
|
||||
|
||||
@@ -50,6 +50,7 @@ enum Spells
|
||||
|
||||
// Coldflame
|
||||
SPELL_COLDFLAME_PASSIVE = 69145,
|
||||
SPELL_COLDFLAME_SUMMON = 69147,
|
||||
};
|
||||
|
||||
static const uint32 boneSpikeSummonId[3] = {69062, 72669, 72670};
|
||||
@@ -103,22 +104,23 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
me->RemoveAurasDueToSpell(SPELL_BONE_STORM);
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10000);
|
||||
events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(10000, 15000), EVENT_GROUP_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(45000, 50000));
|
||||
events.ScheduleEvent(EVENT_ENRAGE, 600000);
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -126,11 +128,12 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, DONE);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, FAIL);
|
||||
instance->SetData(DATA_BONED_ACHIEVEMENT, uint32(true)); // reset
|
||||
}
|
||||
@@ -281,7 +284,6 @@ class npc_coldflame : public CreatureScript
|
||||
return;
|
||||
Creature* creOwner = owner->ToCreature();
|
||||
DoCast(me, SPELL_COLDFLAME_PASSIVE, true);
|
||||
float x, y, z;
|
||||
// random target case
|
||||
if (!owner->HasAura(SPELL_BONE_STORM))
|
||||
{
|
||||
@@ -295,23 +297,17 @@ class npc_coldflame : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
target->GetPosition(x, y, z);
|
||||
float scale = 70.0f / me->GetExactDist2d(x, y);
|
||||
x = me->GetPositionX() + (x - me->GetPositionX()) * scale;
|
||||
y = me->GetPositionY() + (y - me->GetPositionY()) * scale;
|
||||
me->SetOrientation(me->GetAngle(target));
|
||||
}
|
||||
else
|
||||
{
|
||||
me->GetPosition(x, y, z);
|
||||
MarrowgarAI* marrowgarAI = CAST_AI(MarrowgarAI, creOwner->AI());
|
||||
Position const* ownerPos = marrowgarAI->GetLastColdflamePosition();
|
||||
float ang = me->GetAngle(ownerPos) - static_cast<float>(M_PI);
|
||||
MapManager::NormalizeOrientation(ang);
|
||||
x += 50.0f * cosf(ang);
|
||||
y += 50.0f * sinf(ang);
|
||||
me->SetOrientation(ang);
|
||||
}
|
||||
me->GetMotionMaster()->MovePoint(POINT_TARGET_COLDFLAME, x, y, z);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 400);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 200);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -321,20 +317,18 @@ class npc_coldflame : public CreatureScript
|
||||
if (events.ExecuteEvent() == EVENT_COLDFLAME_TRIGGER)
|
||||
{
|
||||
if (me->HasAura(SPELL_COLDFLAME_PASSIVE))
|
||||
DoCast(SPELL_COLDFLAME_PASSIVE);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 400);
|
||||
{
|
||||
float x, y;
|
||||
me->GetPosition(x, y);
|
||||
x += 5.5f * cos(me->GetOrientation());
|
||||
y += 5.5f * sin(me->GetOrientation());
|
||||
me->NearTeleportTo(x, y, me->GetPositionZ(), me->GetOrientation());
|
||||
DoCast(SPELL_COLDFLAME_SUMMON);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 200);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE || id != POINT_TARGET_COLDFLAME)
|
||||
return;
|
||||
|
||||
// stop triggering but dont despawn
|
||||
me->RemoveAura(SPELL_COLDFLAME_PASSIVE);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
@@ -436,6 +430,34 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_marrowgar_coldflame_damage : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_marrowgar_coldflame_damage() : SpellScriptLoader("spell_marrowgar_coldflame_damage") { }
|
||||
|
||||
class spell_marrowgar_coldflame_damage_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_marrowgar_coldflame_damage_AuraScript);
|
||||
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
if (DynamicObject* owner = GetDynobjOwner())
|
||||
if (GetTarget()->GetExactDist2d(owner) > owner->GetRadius() || GetTarget()->HasAura(SPELL_IMPALED))
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_marrowgar_coldflame_damage_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_marrowgar_coldflame_damage_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -451,22 +473,20 @@ class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
|
||||
if (Creature* marrowgar = GetCaster()->ToCreature())
|
||||
{
|
||||
CreatureAI* marrowgarAI = marrowgar->AI();
|
||||
bool yell = false;
|
||||
uint8 boneSpikeCount = uint8(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1);
|
||||
for (uint8 i = 0; i < boneSpikeCount; ++i)
|
||||
{
|
||||
// select any unit but not the tank
|
||||
Unit* target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_IMPALED);
|
||||
// try the tank only in first iteration
|
||||
if (!target && !i)
|
||||
target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_IMPALED);
|
||||
if (!target)
|
||||
break;
|
||||
yell = true;
|
||||
return;
|
||||
target->CastCustomSpell(boneSpikeSummonId[i], SPELLVALUE_BASE_POINT0, 0, target, true);
|
||||
}
|
||||
|
||||
if (yell)
|
||||
marrowgarAI->Talk(SAY_BONESPIKE);
|
||||
marrowgarAI->Talk(SAY_BONESPIKE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,13 +513,12 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
|
||||
|
||||
void RecalculateDamage(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
int32 dmg = GetHitDamage();
|
||||
float distance = GetHitUnit()->GetExactDist2d(GetCaster());
|
||||
if (distance < 5.0f)
|
||||
return;
|
||||
|
||||
float distVar = distance >= 20.0f ? 4 : (10.0f/3.0f);
|
||||
SetHitDamage(int32(dmg * distVar / distance));
|
||||
float distVar = distance >= 40.0f ? 4 : (10.0f/3.0f);
|
||||
SetHitDamage(int32(GetHitDamage() * distVar / distance));
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -520,6 +539,7 @@ void AddSC_boss_lord_marrowgar()
|
||||
new npc_coldflame();
|
||||
new npc_bone_spike();
|
||||
new spell_marrowgar_coldflame();
|
||||
new spell_marrowgar_coldflame_damage();
|
||||
new spell_marrowgar_bone_spike_graveyard();
|
||||
new spell_marrowgar_bone_storm();
|
||||
}
|
||||
|
||||
@@ -221,6 +221,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_BERSERK, 600000);
|
||||
events.ScheduleEvent(EVENT_SLIME_PUDDLE, 10000);
|
||||
@@ -240,6 +241,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
if (events.GetPhaseMask() & PHASE_MASK_COMBAT)
|
||||
instance->SetBossState(DATA_PROFESSOR_PUTRICIDE, FAIL);
|
||||
@@ -253,8 +255,8 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_PROFESSOR_PUTRICIDE, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
@@ -290,6 +292,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
summon->ClearUnitState(UNIT_STAT_CASTING);
|
||||
summon->GetMotionMaster()->MoveIdle();
|
||||
summon->m_Events.AddEvent(new StartMovementEvent(*summon), summon->m_Events.CalculateTime(3500));
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
return;
|
||||
case NPC_CHOKING_GAS_BOMB:
|
||||
@@ -703,7 +706,11 @@ class npc_volatile_ooze : public CreatureScript
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
// simplified update, we do not want to select new target
|
||||
if (!me->isInCombat())
|
||||
return;
|
||||
|
||||
if (!me->getVictim())
|
||||
return;
|
||||
|
||||
if (!newTargetSelectTimer)
|
||||
|
||||
@@ -100,15 +100,12 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
_Reset();
|
||||
events.ScheduleEvent(EVENT_SLIME_SPRAY, 20000);
|
||||
events.ScheduleEvent(EVENT_HASTEN_INFECTIONS, 90000);
|
||||
events.ScheduleEvent(EVENT_MUTATED_INFECTION, 14000);
|
||||
infectionStage = 0;
|
||||
infectionCooldown = 14000;
|
||||
summons.DespawnAll();
|
||||
|
||||
instance->SetBossState(DATA_ROTFACE, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
@@ -120,23 +117,24 @@ class boss_rotface : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
Talk(SAY_AGGRO);
|
||||
if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_ROTFACE_COMBAT);
|
||||
|
||||
DoZoneInCombat(me);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_ROTFACE, DONE);
|
||||
if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_ROTFACE_DEATH);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
_JustReachedHome();
|
||||
instance->SetBossState(DATA_ROTFACE, FAIL);
|
||||
instance->SetData(DATA_OOZE_DANCE_ACHIEVEMENT, uint32(true)); // reset
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
{
|
||||
switch (sayStep)
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
sayStep++;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 1:
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
@@ -521,7 +521,7 @@ public:
|
||||
sayStep++;
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case 2:
|
||||
{
|
||||
switch (me->GetEntry())
|
||||
{
|
||||
@@ -555,17 +555,17 @@ public:
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
if (NPC_HEMET != me->GetEntry())
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
case 2:
|
||||
case 1:
|
||||
if (NPC_HADRIUS != me->GetEntry())
|
||||
continue;
|
||||
else
|
||||
break;
|
||||
case 3:
|
||||
case 2:
|
||||
if (NPC_TAMARA != me->GetEntry())
|
||||
continue;
|
||||
else
|
||||
@@ -577,7 +577,7 @@ public:
|
||||
|
||||
caster->ToPlayer()->KilledMonsterCredit(me->GetEntry(), 0);
|
||||
caster->ToPlayer()->Say(SAY_OFFER, LANG_UNIVERSAL);
|
||||
sayStep = 1;
|
||||
sayStep = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user