mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Scripts/Icecrown Citadel:
Removed unneccesary checks and timer at Rotface Replaced defines with constants
This commit is contained in:
@@ -1436,8 +1436,7 @@ class spell_stinky_precious_decimate : public SpellScriptLoader
|
||||
if (GetHitUnit()->GetHealthPct() > float(GetEffectValue()))
|
||||
{
|
||||
uint32 newHealth = GetHitUnit()->GetMaxHealth() * uint32(GetEffectValue()) / 100;
|
||||
if (GetHitUnit()->GetMaxHealth() >= newHealth)
|
||||
GetHitUnit()->SetHealth(newHealth);
|
||||
GetHitUnit()->SetHealth(newHealth);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,6 @@ enum Events
|
||||
EVENT_MORTAL_WOUND = 5,
|
||||
|
||||
EVENT_STICKY_OOZE = 6,
|
||||
EVENT_UNSTABLE_DESPAWN = 7,
|
||||
};
|
||||
|
||||
class boss_rotface : public CreatureScript
|
||||
@@ -330,13 +329,6 @@ class npc_big_ooze : public CreatureScript
|
||||
{
|
||||
if (action == EVENT_STICKY_OOZE)
|
||||
events.CancelEvent(EVENT_STICKY_OOZE);
|
||||
else if (action == EVENT_UNSTABLE_DESPAWN)
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->SetVisible(false);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_UNSTABLE_DESPAWN, 60000);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -353,10 +345,6 @@ class npc_big_ooze : public CreatureScript
|
||||
case EVENT_STICKY_OOZE:
|
||||
DoCastVictim(SPELL_STICKY_OOZE);
|
||||
events.ScheduleEvent(EVENT_STICKY_OOZE, 15000);
|
||||
break;
|
||||
case EVENT_UNSTABLE_DESPAWN:
|
||||
me->Kill(me);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -707,7 +695,9 @@ class spell_rotface_unstable_ooze_explosion_suicide : public SpellScriptLoader
|
||||
if (target->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
target->ToCreature()->AI()->DoAction(EVENT_UNSTABLE_DESPAWN);
|
||||
target->RemoveAllAuras();
|
||||
target->SetVisible(false);
|
||||
target->ToCreature()->DespawnOrUnsummon(60000);
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//* Deprogramming (DONE)
|
||||
//* Securing the Ramparts (DONE)
|
||||
//* Residue Rendezvous (DONE)
|
||||
//* Blood Quickening // AreaTrigger 5729 starts the timer, pulling BQ before it runs out means success
|
||||
//* Blood Quickening (DONE)
|
||||
//* Respite for a Tormented Soul
|
||||
|
||||
enum Texts
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
#define DEF_ICECROWN_CITADEL_H
|
||||
|
||||
#define ICCScriptName "instance_icecrown_citadel"
|
||||
uint32 const EncounterCount = 12;
|
||||
uint32 const WeeklyNPCs = 7;
|
||||
uint32 const MaxHeroicAttempts = 50;
|
||||
// Defined in boss_sindragosa.cpp
|
||||
extern Position const SindragosaSpawnPos;
|
||||
|
||||
// Shared spells used by more than one script
|
||||
enum SharedSpells
|
||||
@@ -39,7 +44,7 @@ enum TeleporterSpells
|
||||
DEATHBRINGER_S_RISE_TELEPORT = 70858,
|
||||
UPPER_SPIRE_TELEPORT = 70859,
|
||||
FROZEN_THRONE_TELEPORT = 70860,
|
||||
SINDRAGOSA_S_LAIR_TELEPORT = 70861
|
||||
SINDRAGOSA_S_LAIR_TELEPORT = 70861,
|
||||
};
|
||||
|
||||
enum DataTypes
|
||||
@@ -78,9 +83,6 @@ enum DataTypes
|
||||
DATA_HEROIC_ATTEMPTS = 28,
|
||||
};
|
||||
|
||||
#define MAX_ENCOUNTER 12
|
||||
#define WEEKLY_NPCS 7
|
||||
|
||||
enum CreaturesIds
|
||||
{
|
||||
// At Light's Hammer
|
||||
@@ -324,7 +326,4 @@ enum WorldStatesICC
|
||||
WORLDSTATE_ATTEMPTS_MAX = 4942,
|
||||
};
|
||||
|
||||
// Declaration
|
||||
extern Position const SindragosaSpawnPos;
|
||||
|
||||
#endif // DEF_ICECROWN_CITADEL_H
|
||||
|
||||
@@ -53,7 +53,7 @@ struct WeeklyQuest
|
||||
{
|
||||
uint32 creatureEntry;
|
||||
uint32 questId[2]; // 10 and 25 man versions
|
||||
} WeeklyQuestData[WEEKLY_NPCS] =
|
||||
} WeeklyQuestData[WeeklyNPCs] =
|
||||
{
|
||||
{NPC_INFILTRATOR_MINCHAR, {QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25 }}, // Deprogramming
|
||||
{NPC_KOR_KRON_LIEUTENANT, {QUEST_SECURING_THE_RAMPARTS_10, QUEST_SECURING_THE_RAMPARTS_25 }}, // Securing the Ramparts
|
||||
@@ -73,10 +73,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
instance_icecrown_citadel_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
teamInInstance = 0;
|
||||
heroicAttempts = 50;
|
||||
heroicAttempts = MaxHeroicAttempts;
|
||||
ladyDeathwisperElevator = 0;
|
||||
deathbringerSaurfang = 0;
|
||||
saurfangDoor = 0;
|
||||
@@ -118,7 +118,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(bloodQuickeningMinutes);
|
||||
data << uint32(WORLDSTATE_SHOW_ATTEMPTS) << uint32(instance->IsHeroic());
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(heroicAttempts);
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(50);
|
||||
data << uint32(WORLDSTATE_ATTEMPTS_MAX) << uint32(MaxHeroicAttempts);
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player)
|
||||
@@ -248,7 +248,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case NPC_MINCHAR_BEAM_STALKER:
|
||||
case NPC_VALITHRIA_DREAMWALKER_QUEST:
|
||||
{
|
||||
for (uint8 questIndex = 0; questIndex < WEEKLY_NPCS; ++questIndex)
|
||||
for (uint8 questIndex = 0; questIndex < WeeklyNPCs; ++questIndex)
|
||||
{
|
||||
if (WeeklyQuestData[questIndex].creatureEntry == entry)
|
||||
{
|
||||
@@ -876,7 +876,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
if (dataHead1 == 'I' && dataHead2 == 'C')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
|
||||
Reference in New Issue
Block a user