Scripts/Ulduar: Kologarn (90% complete)
- Kologarn is unable to parry (correct spellID used) - Fix Arm respawning - Correct Arm despawn animation - Only cast Arm Sweep if left arm is alive - Remove minimum required range for Focused Eyebeams - Fix possible crash in Rubble despawn - Correct gameobject handling - Fix bridge visual - Correct instance load operations for this encounter
This commit is contained in:
@@ -2067,6 +2067,9 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
( 63985, 'spell_ulduar_stone_grip'),
|
||||
( 64224, 'spell_ulduar_stone_grip_absorb'),
|
||||
( 64225, 'spell_ulduar_stone_grip_absorb'),
|
||||
( 62166, 'spell_ulduar_stone_grip_cast_target'),
|
||||
( 63981, 'spell_ulduar_stone_grip_cast_target'),
|
||||
( 64702, 'spell_ulduar_squeezed_lifeless'),
|
||||
-- quest
|
||||
( 8913, 'spell_q55_sacred_cleansing'),
|
||||
( 17271, 'spell_q5206_test_fetid_skull'),
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Correct bounding radius and combat reach for Right Arm and Left Arm
|
||||
UPDATE `creature_model_info` SET `bounding_radius`=0.31, `combat_reach`=25 WHERE `modelid` IN(28821,28822);
|
||||
|
||||
-- Remove static spawns that are spawned by the encounter script and vehicle_accessory table
|
||||
DELETE FROM `creature` WHERE `id` IN(32933,32934);
|
||||
|
||||
-- Update spawn data
|
||||
UPDATE `creature` SET `unit_flags`=33554432, `deathstate`= 1, `MovementType`=0 WHERE `id`=34297;
|
||||
@@ -0,0 +1,2 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=64702;
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES (64702, 'spell_ulduar_squeezed_lifeless');
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_kologarn
|
||||
SD%Complete: 80
|
||||
SDComment: TODO: Achievements, begin/end animations
|
||||
SD%Complete: 90
|
||||
SDComment: TODO: Achievements
|
||||
SDCategory: Ulduar
|
||||
EndScriptData */
|
||||
|
||||
@@ -45,6 +45,11 @@ EndScriptData */
|
||||
#define SPELL_FOCUSED_EYEBEAM_VISUAL_LEFT 63676
|
||||
#define SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT 63702
|
||||
|
||||
// Passive
|
||||
#define SPELL_KOLOGARN_REDUCE_PARRY 64651
|
||||
#define SPELL_KOLOGARN_PACIFY 63726
|
||||
#define SPELL_KOLOGARN_UNK_0 65219 // Not found in DBC
|
||||
|
||||
#define SPELL_BERSERK 47008 // guess
|
||||
|
||||
#define NPC_RUBBLE_STALKER 33809
|
||||
@@ -102,6 +107,8 @@ class boss_kologarn : public CreatureScript
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
|
||||
DoCast(SPELL_KOLOGARN_REDUCE_PARRY);
|
||||
SetCombatMovement(false);
|
||||
Reset();
|
||||
}
|
||||
@@ -131,18 +138,15 @@ class boss_kologarn : public CreatureScript
|
||||
void Reset()
|
||||
{
|
||||
_Reset();
|
||||
|
||||
if (Creature* arm = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_LEFT_ARM) : 0))
|
||||
RespawnArm(arm);
|
||||
if (Creature* arm = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_RIGHT_ARM) : 0))
|
||||
RespawnArm(arm);
|
||||
|
||||
eyebeamTarget = 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*victim*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
DoCast(SPELL_KOLOGARN_PACIFY);
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
@@ -151,12 +155,13 @@ class boss_kologarn : public CreatureScript
|
||||
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me);
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit *who, int8 /*seatId*/, bool apply)
|
||||
void PassengerBoarded(Unit *who, int8 seatId, bool apply)
|
||||
{
|
||||
bool isEncounterInProgress = instance->GetBossState(TYPE_KOLOGARN) == IN_PROGRESS;
|
||||
if (who->GetEntry() == NPC_LEFT_ARM)
|
||||
{
|
||||
left = apply;
|
||||
if (!apply)
|
||||
if (!apply && isEncounterInProgress)
|
||||
{
|
||||
DoScriptText(SAY_LEFT_ARM_GONE, me);
|
||||
events.ScheduleEvent(EVENT_RESPAWN_LEFT_ARM, 40000);
|
||||
@@ -168,7 +173,7 @@ class boss_kologarn : public CreatureScript
|
||||
else if (who->GetEntry() == NPC_RIGHT_ARM)
|
||||
{
|
||||
right = apply;
|
||||
if (!apply)
|
||||
if (!apply && isEncounterInProgress)
|
||||
{
|
||||
DoScriptText(SAY_RIGHT_ARM_GONE, me);
|
||||
events.ScheduleEvent(EVENT_RESPAWN_RIGHT_ARM, 40000);
|
||||
@@ -179,10 +184,12 @@ class boss_kologarn : public CreatureScript
|
||||
|
||||
if (!apply)
|
||||
{
|
||||
if (!isEncounterInProgress)
|
||||
return;
|
||||
|
||||
who->CastSpell(me, SPELL_ARM_DEAD_DAMAGE, true);
|
||||
who->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (Creature* rubbleStalker = me->FindNearestCreature(NPC_RUBBLE_STALKER, 20.0f))
|
||||
if (Creature* rubbleStalker = who->FindNearestCreature(NPC_RUBBLE_STALKER, 70.0f))
|
||||
{
|
||||
if (rubbleStalker)
|
||||
{
|
||||
@@ -214,6 +221,9 @@ class boss_kologarn : public CreatureScript
|
||||
case NPC_FOCUSED_EYEBEAM_RIGHT:
|
||||
summon->CastSpell(me, SPELL_FOCUSED_EYEBEAM_VISUAL_RIGHT, true);
|
||||
break;
|
||||
case NPC_RUBBLE:
|
||||
summons.push_back(summon->GetGUID());
|
||||
// absence of break intended
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -254,7 +264,8 @@ class boss_kologarn : public CreatureScript
|
||||
events.RepeatEvent(1000);
|
||||
break;
|
||||
case EVENT_SWEEP:
|
||||
DoCast(me->FindNearestCreature(NPC_ARM_SWEEP_STALKER, 500.0f, true), SPELL_ARM_SWEEP, true);
|
||||
if (left)
|
||||
DoCast(me->FindNearestCreature(NPC_ARM_SWEEP_STALKER, 500.0f, true), SPELL_ARM_SWEEP, true);
|
||||
events.RepeatEvent(25000);
|
||||
break;
|
||||
case EVENT_SMASH:
|
||||
@@ -277,14 +288,14 @@ class boss_kologarn : public CreatureScript
|
||||
{
|
||||
if (Creature* arm = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_LEFT_ARM) : 0))
|
||||
RespawnArm(arm->ToCreature());
|
||||
events.CancelEvent(EVENT_RESPAWN_LEFT_ARM);
|
||||
events.CancelEvent(EVENT_RESPAWN_LEFT_ARM);
|
||||
break;
|
||||
}
|
||||
case EVENT_RESPAWN_RIGHT_ARM:
|
||||
{
|
||||
if (Creature* arm = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_RIGHT_ARM) : 0))
|
||||
RespawnArm(arm->ToCreature());
|
||||
events.CancelEvent(EVENT_RESPAWN_RIGHT_ARM);
|
||||
events.CancelEvent(EVENT_RESPAWN_RIGHT_ARM);
|
||||
break;
|
||||
}
|
||||
case EVENT_STONE_GRIP:
|
||||
@@ -298,7 +309,7 @@ class boss_kologarn : public CreatureScript
|
||||
}
|
||||
break;
|
||||
case EVENT_FOCUSED_EYEBEAM:
|
||||
Unit* eyebeamTargetUnit = SelectTarget(SELECT_TARGET_FARTHEST, 0, -10.0f, true);
|
||||
Unit* eyebeamTargetUnit = SelectTarget(SELECT_TARGET_FARTHEST, 0, 0, true);
|
||||
if (eyebeamTargetUnit)
|
||||
{
|
||||
eyebeamTarget = eyebeamTargetUnit->GetGUID();
|
||||
@@ -316,7 +327,10 @@ class boss_kologarn : public CreatureScript
|
||||
if (!arm->isAlive())
|
||||
arm->Respawn();
|
||||
|
||||
arm->EnterVehicle(vehicle);
|
||||
// HACK: We should send spell SPELL_ARM_ENTER_VEHICLE here, but this will not work, because
|
||||
// the aura system will not allow it to stack from two different casters
|
||||
int32 seatId = arm->GetEntry() == NPC_LEFT_ARM ? 0 : 1;
|
||||
arm->EnterVehicle(vehicle, seatId);
|
||||
arm->CastSpell(arm, SPELL_ARM_ENTER_VISUAL, true);
|
||||
}
|
||||
};
|
||||
@@ -337,9 +351,10 @@ class spell_ulduar_rubble_summon : public SpellScriptLoader
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
uint64 originalCaster = caster->GetInstanceScript() ? caster->GetInstanceScript()->GetData64(TYPE_KOLOGARN) : 0;
|
||||
uint32 spellId = GetEffectValue();
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
caster->CastSpell(caster, spellId, true, NULL, NULL, originalCaster);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -419,9 +434,10 @@ class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
|
||||
|
||||
void HandleForceCast(SpellEffIndex i)
|
||||
{
|
||||
ASSERT (GetCaster()->ToCreature())
|
||||
Player * plr = GetHitPlayer();
|
||||
ASSERT (plr)
|
||||
if (!plr)
|
||||
return;
|
||||
|
||||
plr->CastSpell(GetTargetUnit(), GetSpellInfo()->EffectTriggerSpell[i], true); // Don't send m_originalCasterGUID param here or underlying
|
||||
PreventHitEffect(i); // AureEffect::HandleAuraControlVehicle will fail on caster == target
|
||||
}
|
||||
@@ -485,6 +501,42 @@ class spell_ulduar_cancel_stone_grip : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_ulduar_squeezed_lifeless() : SpellScriptLoader("spell_ulduar_squeezed_lifeless") { }
|
||||
|
||||
class spell_ulduar_squeezed_lifeless_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_ulduar_squeezed_lifeless_SpellScript);
|
||||
|
||||
void HandleInstaKill(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (!GetHitPlayer()->GetVehicle())
|
||||
return;
|
||||
|
||||
Position pos;
|
||||
pos.m_positionX = 1756.25f + irand(-3, 3);
|
||||
pos.m_positionY = -8.3f + irand(-3, 3);
|
||||
pos.m_positionZ = 448.8f;
|
||||
pos.m_orientation = M_PI;
|
||||
GetHitPlayer()->DestroyForNearbyPlayers();
|
||||
GetHitPlayer()->ExitVehicle(&pos);
|
||||
GetHitPlayer()->UpdateObjectVisibility(false);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_ulduar_squeezed_lifeless_SpellScript::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_ulduar_squeezed_lifeless_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_ulduar_stone_grip_absorb : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -548,20 +600,17 @@ class spell_ulduar_stone_grip : public SpellScriptLoader
|
||||
if (!(mode & AURA_EFFECT_HANDLE_REAL))
|
||||
return;
|
||||
|
||||
Creature* cOwner = GetOwner()->ToCreature();
|
||||
if (!cOwner)
|
||||
if (GetOwner()->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
Player* pCaster = GetCaster() ? GetCaster()->ToPlayer() : NULL;
|
||||
if (!pCaster || !pCaster->IsOnVehicle(cOwner))
|
||||
if (!pCaster || !pCaster->IsOnVehicle(GetOwner()->ToUnit()))
|
||||
return;
|
||||
|
||||
pCaster->RemoveAurasDueToSpell(GetId());
|
||||
pCaster->ExitVehicle();
|
||||
pCaster->GetMotionMaster()->MoveJump(1756.25f + irand(-3, 3), -8.3f + irand(-3, 3), 448.8f, 5.0f, 5.0f);
|
||||
PreventDefaultAction();
|
||||
|
||||
//GetOwner()->ToUnit()->NearTeleportTo(1756.25f + irand(-3, 3), -8.3f + irand(-3, 3), 448.8f, 3.62f);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -581,6 +630,7 @@ void AddSC_boss_kologarn()
|
||||
{
|
||||
new boss_kologarn();
|
||||
new spell_ulduar_rubble_summon();
|
||||
new spell_ulduar_squeezed_lifeless();
|
||||
new spell_ulduar_cancel_stone_grip();
|
||||
new spell_ulduar_stone_grip_cast_target();
|
||||
new spell_ulduar_stone_grip_absorb();
|
||||
|
||||
@@ -22,6 +22,8 @@ enum eGameObjects
|
||||
{
|
||||
GO_KOLOGARN_CHEST_HERO = 195047,
|
||||
GO_KOLOGARN_CHEST = 195046,
|
||||
GO_KOLOGARN_BRIDGE = 194232,
|
||||
GO_KOLOGARN_DOOR = 194553,
|
||||
GO_THORIM_CHEST_HERO = 194315,
|
||||
GO_THORIM_CHEST = 194314,
|
||||
GO_HODIR_CHEST_HERO = 194308,
|
||||
@@ -58,8 +60,6 @@ public:
|
||||
uint64 uiXT002GUID;
|
||||
uint64 uiAssemblyGUIDs[3];
|
||||
uint64 uiKologarnGUID;
|
||||
uint64 uiFocusedEyebeamGUID;
|
||||
uint64 uiFocusedEyebeamRightGUID;
|
||||
uint64 uiLeftArmGUID;
|
||||
uint64 uiRightArmGUID;
|
||||
uint64 uiAuriayaGUID;
|
||||
@@ -75,6 +75,8 @@ public:
|
||||
uint64 uiVezaxDoorGUID;
|
||||
|
||||
uint64 uiKologarnChestGUID;
|
||||
uint64 uiKologarnBridgeGUID;
|
||||
uint64 uiKologarnDoorGUID;
|
||||
uint64 uiThorimChestGUID;
|
||||
uint64 uiHodirChestGUID;
|
||||
uint64 uiFreyaChestGUID;
|
||||
@@ -84,30 +86,30 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
uiIgnisGUID = 0;
|
||||
uiRazorscaleGUID = 0;
|
||||
uiExpCommanderGUID = 0;
|
||||
uiXT002GUID = 0;
|
||||
uiKologarnGUID = 0;
|
||||
uiFocusedEyebeamGUID = 0;
|
||||
uiFocusedEyebeamRightGUID = 0;
|
||||
uiLeftArmGUID = 0;
|
||||
uiRightArmGUID = 0;
|
||||
uiAuriayaGUID = 0;
|
||||
uiMimironGUID = 0;
|
||||
uiHodirGUID = 0;
|
||||
uiThorimGUID = 0;
|
||||
uiFreyaGUID = 0;
|
||||
uiVezaxGUID = 0;
|
||||
uiYoggSaronGUID = 0;
|
||||
uiAlgalonGUID = 0;
|
||||
uiKologarnChestGUID = 0;
|
||||
uiThorimChestGUID = 0;
|
||||
uiHodirChestGUID = 0;
|
||||
uiFreyaChestGUID = 0;
|
||||
uiLeviathanGateGUID = 0;
|
||||
uiVezaxDoorGUID = 0;
|
||||
flag = 0;
|
||||
uiIgnisGUID = 0;
|
||||
uiRazorscaleGUID = 0;
|
||||
uiExpCommanderGUID = 0;
|
||||
uiXT002GUID = 0;
|
||||
uiKologarnGUID = 0;
|
||||
uiLeftArmGUID = 0;
|
||||
uiRightArmGUID = 0;
|
||||
uiAuriayaGUID = 0;
|
||||
uiMimironGUID = 0;
|
||||
uiHodirGUID = 0;
|
||||
uiThorimGUID = 0;
|
||||
uiFreyaGUID = 0;
|
||||
uiVezaxGUID = 0;
|
||||
uiYoggSaronGUID = 0;
|
||||
uiAlgalonGUID = 0;
|
||||
uiKologarnChestGUID = 0;
|
||||
uiKologarnBridgeGUID = 0;
|
||||
uiKologarnChestGUID = 0;
|
||||
uiThorimChestGUID = 0;
|
||||
uiHodirChestGUID = 0;
|
||||
uiFreyaChestGUID = 0;
|
||||
uiLeviathanGateGUID = 0;
|
||||
uiVezaxDoorGUID = 0;
|
||||
flag = 0;
|
||||
|
||||
memset(&uiEncounter, 0, sizeof(uiEncounter));
|
||||
memset(&uiAssemblyGUIDs, 0, sizeof(uiAssemblyGUIDs));
|
||||
@@ -160,8 +162,21 @@ public:
|
||||
case NPC_KOLOGARN:
|
||||
uiKologarnGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_RUBBLE:
|
||||
mRubbleSpawns.insert(creature->GetGUID());
|
||||
case NPC_KOLOGARN_BRIDGE:
|
||||
// The below hacks are courtesy of the grid/visibilitysystem
|
||||
if (GetBossState(TYPE_KOLOGARN) == DONE)
|
||||
{
|
||||
creature->SetDeadByDefault(true);
|
||||
creature->setDeathState(CORPSE);
|
||||
creature->DestroyForNearbyPlayers();
|
||||
creature->UpdateObjectVisibility(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
creature->SetDeadByDefault(false);
|
||||
creature->setDeathState(CORPSE);
|
||||
creature->RemoveCorpse(true);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPC_AURIAYA:
|
||||
@@ -200,6 +215,14 @@ public:
|
||||
case GO_KOLOGARN_CHEST:
|
||||
uiKologarnChestGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_KOLOGARN_BRIDGE:
|
||||
uiKologarnBridgeGUID = go->GetGUID();
|
||||
if (GetBossState(TYPE_KOLOGARN) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
break;
|
||||
case GO_KOLOGARN_DOOR:
|
||||
uiKologarnDoorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_THORIM_CHEST_HERO:
|
||||
case GO_THORIM_CHEST:
|
||||
uiThorimChestGUID =go->GetGUID();
|
||||
@@ -285,25 +308,12 @@ public:
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(uiKologarnChestGUID))
|
||||
go->SetRespawnTime(go->GetRespawnDelay());
|
||||
HandleGameObject(uiKologarnBridgeGUID, false);
|
||||
}
|
||||
if (state != IN_PROGRESS)
|
||||
{
|
||||
std::set<uint64>::const_iterator itr;
|
||||
for (itr = mRubbleSpawns.begin(); itr != mRubbleSpawns.end(); )
|
||||
{
|
||||
if (Creature* rubble = instance->GetCreature((*itr)))
|
||||
{
|
||||
if (rubble->isSummon())
|
||||
{
|
||||
rubble->DestroyForNearbyPlayers();
|
||||
rubble->ToTempSummon()->UnSummon();
|
||||
}
|
||||
else
|
||||
rubble->DisappearAndDie();
|
||||
}
|
||||
mRubbleSpawns.erase(itr++);
|
||||
}
|
||||
}
|
||||
if (state == IN_PROGRESS)
|
||||
HandleGameObject(uiKologarnDoorGUID, false);
|
||||
else
|
||||
HandleGameObject(uiKologarnDoorGUID, true);
|
||||
break;
|
||||
case TYPE_HODIR:
|
||||
if (state == DONE)
|
||||
|
||||
@@ -61,6 +61,7 @@ enum eNPCs
|
||||
NPC_MOLGEIM = 32927,
|
||||
NPC_BRUNDIR = 32857,
|
||||
NPC_KOLOGARN = 32930,
|
||||
NPC_KOLOGARN_BRIDGE = 34297,
|
||||
NPC_FOCUSED_EYEBEAM = 33632,
|
||||
NPC_FOCUSED_EYEBEAM_RIGHT = 33802,
|
||||
NPC_LEFT_ARM = 32933,
|
||||
|
||||
Reference in New Issue
Block a user