Merge branch 'master' of [email protected]:TrinityCore/TrinityCore
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
DELETE FROM `creature_questrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
|
||||||
|
DELETE FROM `creature_involvedrelation` WHERE `quest` IN (24510,24499,24498,24710,24711,24506,24511,24682,24507,24712,24713);
|
||||||
|
INSERT INTO `creature_questrelation` (`id`,`quest`) VALUES
|
||||||
|
-- alliance
|
||||||
|
(37776,24510),
|
||||||
|
(37597,24499),
|
||||||
|
(38160,24683),
|
||||||
|
(36993,24498),
|
||||||
|
(37591,24710),
|
||||||
|
(38188,24711),
|
||||||
|
-- horde
|
||||||
|
(37780,24506),
|
||||||
|
(37596,24511),
|
||||||
|
(38161,24682),
|
||||||
|
(36990,24507),
|
||||||
|
(37592,24712),
|
||||||
|
(38189,24713);
|
||||||
|
INSERT INTO `creature_involvedrelation` (`id`,`quest`) VALUES
|
||||||
|
-- alliance
|
||||||
|
(37597,24510),
|
||||||
|
(38160,24499),
|
||||||
|
(36993,24683),
|
||||||
|
(37591,24498),
|
||||||
|
(38188,24710),
|
||||||
|
(37221,24711),
|
||||||
|
-- horde
|
||||||
|
(37596,24506),
|
||||||
|
(38161,24511),
|
||||||
|
(36990,24682),
|
||||||
|
(37592,24507),
|
||||||
|
(38189,24712),
|
||||||
|
(37223,24713);
|
||||||
|
|
||||||
|
SET @GOBJ := 201969; -- ball and chain
|
||||||
|
UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GOBJ;
|
||||||
|
DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@GOBJ;
|
||||||
|
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||||
|
(@GOBJ,1,0,0,64,0,100,0,0,0,0,0,33,36764,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - alliance'),
|
||||||
|
(@GOBJ,1,1,0,64,0,100,0,0,0,0,0,33,36770,0,0,0,0,0,7,0,0,0,0,0,0,0, 'credit on gossip hello - horde');
|
||||||
@@ -10046,7 +10046,8 @@ Bag* Player::GetBagByPos(uint8 bag) const
|
|||||||
{
|
{
|
||||||
if ((bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END)
|
if ((bag >= INVENTORY_SLOT_BAG_START && bag < INVENTORY_SLOT_BAG_END)
|
||||||
|| (bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END))
|
|| (bag >= BANK_SLOT_BAG_START && bag < BANK_SLOT_BAG_END))
|
||||||
return GetItemByPos(INVENTORY_SLOT_BAG_0, bag)->ToBag();
|
if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, bag))
|
||||||
|
return item->ToBag();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,11 @@
|
|||||||
#include "ScriptPCH.h"
|
#include "ScriptPCH.h"
|
||||||
#include "pit_of_saron.h"
|
#include "pit_of_saron.h"
|
||||||
|
|
||||||
|
// positions for Martin Victus (37591) and Gorkun Ironskull (37592)
|
||||||
|
Position const SlaveLeaderPos = {689.7158f, -104.8736f, 513.7360f, 0.0f};
|
||||||
|
// position for Jaina and Sylvanas
|
||||||
|
Position const EventLeaderPos2 = {1054.368f, 107.14620f, 628.4467f, 0.0f};
|
||||||
|
|
||||||
class instance_pit_of_saron : public InstanceMapScript
|
class instance_pit_of_saron : public InstanceMapScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -149,6 +154,44 @@ class instance_pit_of_saron : public InstanceMapScript
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SetBossState(uint32 type, EncounterState state)
|
||||||
|
{
|
||||||
|
if (!InstanceScript::SetBossState(type, state))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case DATA_GARFROST:
|
||||||
|
if(state == DONE)
|
||||||
|
{
|
||||||
|
if (Creature* summoner = instance->GetCreature(_garfrostGUID))
|
||||||
|
{
|
||||||
|
if (_teamInInstance == ALLIANCE)
|
||||||
|
summoner->SummonCreature(NPC_MARTIN_VICTUS_1, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
|
else
|
||||||
|
summoner->SummonCreature(NPC_GORKUN_IRONSKULL_2, SlaveLeaderPos, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DATA_TYRANNUS:
|
||||||
|
if (state == DONE)
|
||||||
|
{
|
||||||
|
if (Creature* summoner = instance->GetCreature(_tyrannusGUID))
|
||||||
|
{
|
||||||
|
if (_teamInInstance == ALLIANCE)
|
||||||
|
summoner->SummonCreature(NPC_JAINA_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
|
else
|
||||||
|
summoner->SummonCreature(NPC_SYLVANAS_PART2, EventLeaderPos2, TEMPSUMMON_MANUAL_DESPAWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
uint32 GetData(uint32 type)
|
uint32 GetData(uint32 type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|||||||
@@ -1436,7 +1436,6 @@ class spell_stinky_precious_decimate : public SpellScriptLoader
|
|||||||
if (GetHitUnit()->GetHealthPct() > float(GetEffectValue()))
|
if (GetHitUnit()->GetHealthPct() > float(GetEffectValue()))
|
||||||
{
|
{
|
||||||
uint32 newHealth = GetHitUnit()->GetMaxHealth() * uint32(GetEffectValue()) / 100;
|
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_MORTAL_WOUND = 5,
|
||||||
|
|
||||||
EVENT_STICKY_OOZE = 6,
|
EVENT_STICKY_OOZE = 6,
|
||||||
EVENT_UNSTABLE_DESPAWN = 7,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_rotface : public CreatureScript
|
class boss_rotface : public CreatureScript
|
||||||
@@ -330,13 +329,6 @@ class npc_big_ooze : public CreatureScript
|
|||||||
{
|
{
|
||||||
if (action == EVENT_STICKY_OOZE)
|
if (action == EVENT_STICKY_OOZE)
|
||||||
events.CancelEvent(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)
|
void UpdateAI(const uint32 diff)
|
||||||
@@ -353,10 +345,6 @@ class npc_big_ooze : public CreatureScript
|
|||||||
case EVENT_STICKY_OOZE:
|
case EVENT_STICKY_OOZE:
|
||||||
DoCastVictim(SPELL_STICKY_OOZE);
|
DoCastVictim(SPELL_STICKY_OOZE);
|
||||||
events.ScheduleEvent(EVENT_STICKY_OOZE, 15000);
|
events.ScheduleEvent(EVENT_STICKY_OOZE, 15000);
|
||||||
break;
|
|
||||||
case EVENT_UNSTABLE_DESPAWN:
|
|
||||||
me->Kill(me);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -707,7 +695,9 @@ class spell_rotface_unstable_ooze_explosion_suicide : public SpellScriptLoader
|
|||||||
if (target->GetTypeId() != TYPEID_UNIT)
|
if (target->GetTypeId() != TYPEID_UNIT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
target->ToCreature()->AI()->DoAction(EVENT_UNSTABLE_DESPAWN);
|
target->RemoveAllAuras();
|
||||||
|
target->SetVisible(false);
|
||||||
|
target->ToCreature()->DespawnOrUnsummon(60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Register()
|
void Register()
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
//* Deprogramming (DONE)
|
//* Deprogramming (DONE)
|
||||||
//* Securing the Ramparts (DONE)
|
//* Securing the Ramparts (DONE)
|
||||||
//* Residue Rendezvous (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
|
//* Respite for a Tormented Soul
|
||||||
|
|
||||||
enum Texts
|
enum Texts
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
#define DEF_ICECROWN_CITADEL_H
|
#define DEF_ICECROWN_CITADEL_H
|
||||||
|
|
||||||
#define ICCScriptName "instance_icecrown_citadel"
|
#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
|
// Shared spells used by more than one script
|
||||||
enum SharedSpells
|
enum SharedSpells
|
||||||
@@ -39,7 +44,7 @@ enum TeleporterSpells
|
|||||||
DEATHBRINGER_S_RISE_TELEPORT = 70858,
|
DEATHBRINGER_S_RISE_TELEPORT = 70858,
|
||||||
UPPER_SPIRE_TELEPORT = 70859,
|
UPPER_SPIRE_TELEPORT = 70859,
|
||||||
FROZEN_THRONE_TELEPORT = 70860,
|
FROZEN_THRONE_TELEPORT = 70860,
|
||||||
SINDRAGOSA_S_LAIR_TELEPORT = 70861
|
SINDRAGOSA_S_LAIR_TELEPORT = 70861,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum DataTypes
|
enum DataTypes
|
||||||
@@ -78,9 +83,6 @@ enum DataTypes
|
|||||||
DATA_HEROIC_ATTEMPTS = 28,
|
DATA_HEROIC_ATTEMPTS = 28,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_ENCOUNTER 12
|
|
||||||
#define WEEKLY_NPCS 7
|
|
||||||
|
|
||||||
enum CreaturesIds
|
enum CreaturesIds
|
||||||
{
|
{
|
||||||
// At Light's Hammer
|
// At Light's Hammer
|
||||||
@@ -324,7 +326,4 @@ enum WorldStatesICC
|
|||||||
WORLDSTATE_ATTEMPTS_MAX = 4942,
|
WORLDSTATE_ATTEMPTS_MAX = 4942,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Declaration
|
|
||||||
extern Position const SindragosaSpawnPos;
|
|
||||||
|
|
||||||
#endif // DEF_ICECROWN_CITADEL_H
|
#endif // DEF_ICECROWN_CITADEL_H
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ struct WeeklyQuest
|
|||||||
{
|
{
|
||||||
uint32 creatureEntry;
|
uint32 creatureEntry;
|
||||||
uint32 questId[2]; // 10 and 25 man versions
|
uint32 questId[2]; // 10 and 25 man versions
|
||||||
} WeeklyQuestData[WEEKLY_NPCS] =
|
} WeeklyQuestData[WeeklyNPCs] =
|
||||||
{
|
{
|
||||||
{NPC_INFILTRATOR_MINCHAR, {QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25 }}, // Deprogramming
|
{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
|
{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)
|
instance_icecrown_citadel_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||||
{
|
{
|
||||||
SetBossNumber(MAX_ENCOUNTER);
|
SetBossNumber(EncounterCount);
|
||||||
LoadDoorData(doorData);
|
LoadDoorData(doorData);
|
||||||
teamInInstance = 0;
|
teamInInstance = 0;
|
||||||
heroicAttempts = 50;
|
heroicAttempts = MaxHeroicAttempts;
|
||||||
ladyDeathwisperElevator = 0;
|
ladyDeathwisperElevator = 0;
|
||||||
deathbringerSaurfang = 0;
|
deathbringerSaurfang = 0;
|
||||||
saurfangDoor = 0;
|
saurfangDoor = 0;
|
||||||
@@ -118,7 +118,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(bloodQuickeningMinutes);
|
data << uint32(WORLDSTATE_EXECUTION_TIME) << uint32(bloodQuickeningMinutes);
|
||||||
data << uint32(WORLDSTATE_SHOW_ATTEMPTS) << uint32(instance->IsHeroic());
|
data << uint32(WORLDSTATE_SHOW_ATTEMPTS) << uint32(instance->IsHeroic());
|
||||||
data << uint32(WORLDSTATE_ATTEMPTS_REMAINING) << uint32(heroicAttempts);
|
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)
|
void OnPlayerEnter(Player* player)
|
||||||
@@ -248,7 +248,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
case NPC_MINCHAR_BEAM_STALKER:
|
case NPC_MINCHAR_BEAM_STALKER:
|
||||||
case NPC_VALITHRIA_DREAMWALKER_QUEST:
|
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)
|
if (WeeklyQuestData[questIndex].creatureEntry == entry)
|
||||||
{
|
{
|
||||||
@@ -876,7 +876,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
|||||||
|
|
||||||
if (dataHead1 == 'I' && dataHead2 == 'C')
|
if (dataHead1 == 'I' && dataHead2 == 'C')
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||||
{
|
{
|
||||||
uint32 tmpState;
|
uint32 tmpState;
|
||||||
loadStream >> tmpState;
|
loadStream >> tmpState;
|
||||||
|
|||||||
Reference in New Issue
Block a user