mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Creature/Creature.h src/server/game/Entities/Player/Player.h src/server/game/Spells/SpellMgr.cpp
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -24,14 +24,19 @@ enum InstanceData
|
||||
MAX_ENCOUNTER,
|
||||
|
||||
DATA_VORTEX_HANDLING,
|
||||
DATA_POWER_SPARKS_HANDLING
|
||||
DATA_POWER_SPARKS_HANDLING,
|
||||
DATA_RESPAWN_IRIS
|
||||
};
|
||||
|
||||
enum InstanceData64
|
||||
{
|
||||
DATA_TRIGGER,
|
||||
DATA_MALYGOS,
|
||||
DATA_PLATFORM
|
||||
DATA_PLATFORM,
|
||||
DATA_ALEXSTRASZA_BUNNY_GUID,
|
||||
DATA_HEART_OF_MAGIC_GUID,
|
||||
DATA_FOCUSING_IRIS_GUID,
|
||||
DATA_GIFT_BOX_BUNNY_GUID
|
||||
};
|
||||
|
||||
enum InstanceNpcs
|
||||
@@ -44,16 +49,22 @@ enum InstanceNpcs
|
||||
NPC_HOVER_DISK_CASTER = 30248,
|
||||
NPC_ARCANE_OVERLOAD = 30282,
|
||||
NPC_WYRMREST_SKYTALON = 30161,
|
||||
NPC_ALEXSTRASZA = 32295
|
||||
NPC_ALEXSTRASZA = 32295,
|
||||
NPC_ALEXSTRASZA_BUNNY = 31253,
|
||||
NPC_ALEXSTRASZAS_GIFT = 32448,
|
||||
NPC_SURGE_OF_POWER = 30334
|
||||
};
|
||||
|
||||
enum InstanceGameObjects
|
||||
{
|
||||
GO_NEXUS_RAID_PLATFORM = 193070,
|
||||
GO_EXIT_PORTAL = 193908,
|
||||
GO_FOCUSING_IRIS = 193958,
|
||||
GO_ALEXSTRASZA_S_GIFT = 193905,
|
||||
GO_ALEXSTRASZA_S_GIFT_2 = 193967
|
||||
GO_FOCUSING_IRIS_10 = 193958,
|
||||
GO_FOCUSING_IRIS_25 = 193960,
|
||||
GO_ALEXSTRASZA_S_GIFT_10 = 193905,
|
||||
GO_ALEXSTRASZA_S_GIFT_25 = 193967,
|
||||
GO_HEART_OF_MAGIC_10 = 194158,
|
||||
GO_HEART_OF_MAGIC_25 = 194159
|
||||
};
|
||||
|
||||
enum InstanceEvents
|
||||
@@ -63,10 +74,11 @@ enum InstanceEvents
|
||||
|
||||
enum InstanceSpells
|
||||
{
|
||||
SPELL_VORTEX_4 = 55853, // damage | used to enter to the vehicle
|
||||
SPELL_VORTEX_5 = 56263, // damage | used to enter to the vehicle
|
||||
SPELL_PORTAL_OPENED = 61236,
|
||||
SPELL_RIDE_RED_DRAGON = 56071,
|
||||
SPELL_VORTEX_4 = 55853, // damage | used to enter to the vehicle
|
||||
SPELL_VORTEX_5 = 56263, // damage | used to enter to the vehicle
|
||||
SPELL_PORTAL_OPENED = 61236,
|
||||
SPELL_RIDE_RED_DRAGON_TRIGGERED = 56072,
|
||||
SPELL_IRIS_OPENED = 61012 // visual when starting encounter
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
class instance_eye_of_eternity : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_eye_of_eternity() : InstanceMapScript("instance_eye_of_eternity", 616) {}
|
||||
instance_eye_of_eternity() : InstanceMapScript("instance_eye_of_eternity", 616) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
@@ -41,9 +41,11 @@ public:
|
||||
portalTriggers.clear();
|
||||
|
||||
malygosGUID = 0;
|
||||
irisGUID = 0;
|
||||
lastPortalGUID = 0;
|
||||
platformGUID = 0;
|
||||
exitPortalGUID = 0;
|
||||
alexstraszaBunnyGUID = 0;
|
||||
};
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state)
|
||||
@@ -65,31 +67,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
SpawnGameObject(GO_FOCUSING_IRIS, focusingIrisPosition);
|
||||
SpawnGameObject(GO_EXIT_PORTAL, exitPortalPosition);
|
||||
|
||||
if (GameObject* platform = instance->GetGameObject(platformGUID))
|
||||
platform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
}
|
||||
else if (state == DONE)
|
||||
{
|
||||
if (Creature* malygos = instance->GetCreature(malygosGUID))
|
||||
malygos->SummonCreature(NPC_ALEXSTRASZA, 829.0679f, 1244.77f, 279.7453f, 2.32f);
|
||||
|
||||
SpawnGameObject(GO_EXIT_PORTAL, exitPortalPosition);
|
||||
|
||||
// we make the platform appear again because at the moment we don't support looting using a vehicle
|
||||
if (GameObject* platform = instance->GetGameObject(platformGUID))
|
||||
platform->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
|
||||
if (GameObject* chest = instance->GetGameObject(chestGUID))
|
||||
chest->SetRespawnTime(7*DAY);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//TODO: this should be handled in map, maybe add a summon function in map
|
||||
// TO DO: this should be handled in map, maybe add a summon function in map
|
||||
// There is no other way afaik...
|
||||
void SpawnGameObject(uint32 entry, Position& pos)
|
||||
{
|
||||
@@ -112,16 +101,31 @@ public:
|
||||
case GO_NEXUS_RAID_PLATFORM:
|
||||
platformGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_FOCUSING_IRIS:
|
||||
go->GetPosition(&focusingIrisPosition);
|
||||
case GO_FOCUSING_IRIS_10:
|
||||
if (instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
{
|
||||
irisGUID = go->GetGUID();
|
||||
go->GetPosition(&focusingIrisPosition);
|
||||
}
|
||||
break;
|
||||
case GO_FOCUSING_IRIS_25:
|
||||
if (instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
|
||||
{
|
||||
irisGUID = go->GetGUID();
|
||||
go->GetPosition(&focusingIrisPosition);
|
||||
}
|
||||
break;
|
||||
case GO_EXIT_PORTAL:
|
||||
exitPortalGUID = go->GetGUID();
|
||||
go->GetPosition(&exitPortalPosition);
|
||||
break;
|
||||
case GO_ALEXSTRASZA_S_GIFT:
|
||||
case GO_ALEXSTRASZA_S_GIFT_2:
|
||||
chestGUID = go->GetGUID();
|
||||
case GO_HEART_OF_MAGIC_10:
|
||||
if (instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
heartOfMagicGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_HEART_OF_MAGIC_25:
|
||||
if (instance->GetDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL)
|
||||
heartOfMagicGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -139,18 +143,27 @@ public:
|
||||
case NPC_PORTAL_TRIGGER:
|
||||
portalTriggers.push_back(creature->GetGUID());
|
||||
break;
|
||||
case NPC_ALEXSTRASZA_BUNNY:
|
||||
alexstraszaBunnyGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ALEXSTRASZAS_GIFT:
|
||||
giftBoxBunnyGUID = creature->GetGUID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* obj, uint32 eventId)
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId)
|
||||
{
|
||||
if (eventId == EVENT_FOCUSING_IRIS)
|
||||
{
|
||||
if (GameObject* go = obj->ToGameObject())
|
||||
go->Delete(); // this is not the best way.
|
||||
if (Creature* alexstraszaBunny = instance->GetCreature(alexstraszaBunnyGUID))
|
||||
{
|
||||
alexstraszaBunny->CastSpell(alexstraszaBunny, SPELL_IRIS_OPENED);
|
||||
instance->GetGameObject(irisGUID)->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
if (Creature* malygos = instance->GetCreature(malygosGUID))
|
||||
malygos->GetMotionMaster()->MovePoint(4, 770.10f, 1275.33f, 267.23f); // MOVE_INIT_PHASE_ONE
|
||||
malygos->AI()->DoAction(0); // ACTION_LAND_ENCOUNTER_START
|
||||
|
||||
if (GameObject* exitPortal = instance->GetGameObject(exitPortalGUID))
|
||||
exitPortal->Delete();
|
||||
@@ -194,7 +207,7 @@ public:
|
||||
|
||||
void PowerSparksHandling()
|
||||
{
|
||||
bool next = (lastPortalGUID == portalTriggers.back() || !lastPortalGUID ? true : false);
|
||||
bool next = (lastPortalGUID == portalTriggers.back() || !lastPortalGUID ? true : false);
|
||||
|
||||
for (std::list<uint64>::const_iterator itr_trigger = portalTriggers.begin(); itr_trigger != portalTriggers.end(); ++itr_trigger)
|
||||
{
|
||||
@@ -223,6 +236,9 @@ public:
|
||||
case DATA_POWER_SPARKS_HANDLING:
|
||||
PowerSparksHandling();
|
||||
break;
|
||||
case DATA_RESPAWN_IRIS:
|
||||
SpawnGameObject(instance->GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL ? GO_FOCUSING_IRIS_10 : GO_FOCUSING_IRIS_25, focusingIrisPosition);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,6 +252,14 @@ public:
|
||||
return malygosGUID;
|
||||
case DATA_PLATFORM:
|
||||
return platformGUID;
|
||||
case DATA_ALEXSTRASZA_BUNNY_GUID:
|
||||
return alexstraszaBunnyGUID;
|
||||
case DATA_HEART_OF_MAGIC_GUID:
|
||||
return heartOfMagicGUID;
|
||||
case DATA_FOCUSING_IRIS_GUID:
|
||||
return irisGUID;
|
||||
case DATA_GIFT_BOX_BUNNY_GUID:
|
||||
return giftBoxBunnyGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -287,10 +311,13 @@ public:
|
||||
std::list<uint64> vortexTriggers;
|
||||
std::list<uint64> portalTriggers;
|
||||
uint64 malygosGUID;
|
||||
uint64 irisGUID;
|
||||
uint64 lastPortalGUID;
|
||||
uint64 platformGUID;
|
||||
uint64 exitPortalGUID;
|
||||
uint64 chestGUID;
|
||||
uint64 heartOfMagicGUID;
|
||||
uint64 alexstraszaBunnyGUID;
|
||||
uint64 giftBoxBunnyGUID;
|
||||
Position focusingIrisPosition;
|
||||
Position exitPortalPosition;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user