mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Scripts: Boss Jedoga Shadowseeker rewrite (#20279)
* Core/Scripts: Boss Jedoga Shadowseeker rewrite Added all missing spells and visuals Added Twilight volunteers in the fight Fixed Jedoga Controller's behavior, mostly moved to boss_prince_taldaram, where they belong Updated script register model Misc updates and improvements Updated instance model
This commit is contained in:
62
sql/updates/world/3.3.5/2017_09_25_00_world.sql
Normal file
62
sql/updates/world/3.3.5/2017_09_25_00_world.sql
Normal file
@@ -0,0 +1,62 @@
|
||||
UPDATE `creature_template` SET `unit_flags`=33587264, `InhabitType`=4 WHERE `entry` IN (29310,31465); -- Jedoga
|
||||
UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `guid`=131953;
|
||||
UPDATE `creature_addon` SET `auras`='56075 56327' WHERE `guid`=131953; -- Jedoga
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_twilight_volunteer' WHERE `entry`=30385;
|
||||
UPDATE `creature_template` SET `ScriptName`='' WHERE `entry` IN(30114,30181);
|
||||
DELETE FROM `creature` WHERE `id` IN(30114,30181);
|
||||
DELETE FROM `creature_addon` WHERE `guid` IN (132063,132066,132067,132068,132069,132070,132071,132072,132065);
|
||||
DELETE FROM `linked_respawn` WHERE `guid` IN (131997,131998,131999,132000,132001,132002,132003,132004,132005,132006,132007,132008,132009,132010,132011);
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry` IN (56312);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition` ,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,56312,0,0,31,0,3,29310,0,0,0,'','Spell \'Beam Visual\' targets Jedoga Shadowseeker');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_random_lightning_visual_effect';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(56328,'spell_random_lightning_visual_effect');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID`=30385;
|
||||
INSERT INTO `creature_text` (`CreatureID`,`GroupID`,`ID`,`Text`,`Type`,`Language`,`Probability`,`Emote`,`Duration`,`Sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
|
||||
(30385,0,0,'I have been chosen!',14,0,100,0,0,0,31179,0,'SAY_CHOSEN'),
|
||||
(30385,1,0,'I give myself to the master!',14,0,100,0,0,0,30863,0,'SAY_SACRIFICED');
|
||||
|
||||
DELETE FROM `creature_summon_groups` WHERE `summonerId`=29310 AND `groupId`=1;
|
||||
INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES
|
||||
(29310,0,1,30114, 362.458, -714.166, -16.0964, 0.977384,6,3000),
|
||||
(29310,0,1,30114, 368.781, -713.932, -16.0964, 1.46608,6,3000),
|
||||
(29310,0,1,30114, 364.937, -716.11, -16.0964, 1.25664,6,3000),
|
||||
(29310,0,1,30114, 362.02, -719.828, -16.0964, 1.20428,6,3000),
|
||||
(29310,0,1,30114, 368.151, -719.763, -16.0964, 1.53589,6,3000),
|
||||
(29310,0,1,30114, 392.276, -695.895, -16.0964, 3.40339,6,3000),
|
||||
(29310,0,1,30114, 387.224, -698.006, -16.0964, 3.36848,6,3000),
|
||||
(29310,0,1,30114, 389.626, -702.3, -16.0964, 3.07178,6,3000),
|
||||
(29310,0,1,30114, 383.812, -700.41, -16.0964, 3.15905,6,3000),
|
||||
(29310,0,1,30114, 385.693, -694.376, -16.0964, 3.59538,6,3000),
|
||||
(29310,0,1,30114, 379.204, -716.697, -16.0964, 2.1293,6,3000),
|
||||
(29310,0,1,30114, 375.4, -711.434, -16.0964, 2.09439,6,3000),
|
||||
(29310,0,1,30114, 382.583, -711.713, -16.0964, 2.53073,6,3000),
|
||||
(29310,0,1,30114, 379.049, -712.899, -16.0964, 2.28638,6,3000),
|
||||
(29310,0,1,30114, 378.424, -708.388, -16.0964, 2.58309,6,3000);
|
||||
|
||||
DELETE FROM `creature_summon_groups` WHERE `summonerId`=29310 AND `groupId`=2;
|
||||
INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES
|
||||
(29310,0,2,30111,427.3021,-717.3993,-17.95177,2.70526,7,0),
|
||||
(29310,0,2,30111,429.7342,-712.1823,-17.95688,2.86234,7,0),
|
||||
(29310,0,2,30111,434.4365,-709.4752,-17.96144,2.949606,7,0),
|
||||
(29310,0,2,30111,434.0043,-702.8975,-17.95797,3.124139,7,0),
|
||||
(29310,0,2,30111,439.9826,-699.0701,-17.95278,3.193953,7,0),
|
||||
(29310,0,2,30111,381.8384,-773.3898,-17.95301,1.762783,7,0),
|
||||
(29310,0,2,30111,387.0695,-770.9496,-17.95761,1.972222,7,0),
|
||||
(29310,0,2,30111,392.5775,-765.6364,-17.95891,2.251475,7,0),
|
||||
(29310,0,2,30111,394.3542,-760.8108,-17.95462,2.443461,7,0),
|
||||
(29310,0,2,30111,388.3078,-766.784,-17.96076,2.094395,7,0);
|
||||
|
||||
DELETE FROM `creature_summon_groups` WHERE `summonerId`=29308 AND `groupId`=1;
|
||||
INSERT INTO `creature_summon_groups` (`summonerId`,`summonerType`,`groupId`,`entry`,`position_x`,`position_y`,`position_z`,`orientation`,`summonType`,`summonTime`) VALUES
|
||||
(29308,0,1,30181,519.146,-792.274,49.4627,4.15388,8,0),
|
||||
(29308,0,1,30181,542.994,-762.115,36.0509,1.32645,8,0),
|
||||
(29308,0,1,30181,599.617,-762.315,35.3111,1.71042,8,0),
|
||||
(29308,0,1,30181,506.573,-890.563,45.1763,3.35103,8,0),
|
||||
(29308,0,1,30181,632.232,-774.304,34.0595,0.750492,8,0),
|
||||
(29308,0,1,30181,489.944,-851.356,52.09,4.95674,8,0),
|
||||
(29308,0,1,30181,655.409,-814.264,35.2257,0.436332,8,0);
|
||||
@@ -37,13 +37,7 @@ enum AKDataTypes
|
||||
// Additional Data
|
||||
DATA_SPHERE_1 = 5,
|
||||
DATA_SPHERE_2 = 6,
|
||||
DATA_PRINCE_TALDARAM_PLATFORM = 7,
|
||||
DATA_PL_JEDOGA_TARGET = 8,
|
||||
DATA_ADD_JEDOGA_OPFER = 9,
|
||||
DATA_ADD_JEDOGA_INITIAND = 10,
|
||||
DATA_JEDOGA_TRIGGER_SWITCH = 11,
|
||||
DATA_JEDOGA_RESET_INITIANDS = 12,
|
||||
DATA_ALL_INITIAND_DEAD = 13
|
||||
DATA_PRINCE_TALDARAM_PLATFORM = 7
|
||||
};
|
||||
|
||||
enum AKCreatureIds
|
||||
@@ -59,7 +53,9 @@ enum AKCreatureIds
|
||||
NPC_AHNKAHAR_SWARMER = 30178,
|
||||
|
||||
// Jedoga Shadowseeker
|
||||
NPC_INITIAND = 30114,
|
||||
NPC_TWILIGHT_INITIATE = 30114,
|
||||
NPC_TWILIGHT_VOLUNTEER = 30385,
|
||||
NPC_TWILIGHT_WORSHIPPER = 30111,
|
||||
NPC_JEDOGA_CONTROLLER = 30181,
|
||||
|
||||
// Amanitar
|
||||
@@ -88,4 +84,6 @@ inline AI* GetAhnKahetAI(T* obj)
|
||||
return GetInstanceAI<AI>(obj, AhnKahetScriptName);
|
||||
}
|
||||
|
||||
#define RegisterAhnKahetCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetAhnKahetAI)
|
||||
|
||||
#endif // AHNKAHET_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,7 +53,8 @@ enum Spells
|
||||
enum Misc
|
||||
{
|
||||
DATA_EMBRACE_DMG = 20000,
|
||||
H_DATA_EMBRACE_DMG = 40000
|
||||
H_DATA_EMBRACE_DMG = 40000,
|
||||
SUMMON_GROUP_CONTROLLERS = 1
|
||||
};
|
||||
|
||||
#define DATA_SPHERE_DISTANCE 25.0f
|
||||
@@ -104,6 +105,9 @@ class boss_prince_taldaram : public CreatureScript
|
||||
_flameSphereTargetGUID.Clear();
|
||||
_embraceTargetGUID.Clear();
|
||||
_embraceTakenDamage = 0;
|
||||
|
||||
if (!CheckSpheres())
|
||||
me->SummonCreatureGroup(SUMMON_GROUP_CONTROLLERS);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -125,6 +129,10 @@ class boss_prince_taldaram : public CreatureScript
|
||||
case NPC_FLAME_SPHERE_2:
|
||||
case NPC_FLAME_SPHERE_3:
|
||||
summon->AI()->SetGUID(_flameSphereTargetGUID);
|
||||
break;
|
||||
case NPC_JEDOGA_CONTROLLER:
|
||||
summon->CastSpell(me, SPELL_BEAM_VISUAL);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
@@ -266,13 +274,15 @@ class boss_prince_taldaram : public CreatureScript
|
||||
void RemovePrison()
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summons.DespawnEntry(NPC_JEDOGA_CONTROLLER);
|
||||
me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL);
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation());
|
||||
DoCast(SPELL_HOVER_FALL);
|
||||
me->SetDisableGravity(false);
|
||||
me->GetMotionMaster()->MoveLand(0, me->GetHomePosition());
|
||||
Talk(SAY_WARNING);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_PRINCE_TALDARAM_PLATFORM), true);
|
||||
if (GameObject* platform = instance->GetGameObject(DATA_PRINCE_TALDARAM_PLATFORM))
|
||||
instance->HandleGameObject(platform->GetGUID(), true);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -395,7 +405,7 @@ class go_prince_taldaram_sphere : public GameObjectScript
|
||||
|
||||
bool GossipHello(Player* /*player*/) override
|
||||
{
|
||||
Creature* princeTaldaram = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_PRINCE_TALDARAM));
|
||||
Creature* princeTaldaram = instance->GetCreature(DATA_PRINCE_TALDARAM);
|
||||
if (princeTaldaram && princeTaldaram->IsAlive())
|
||||
{
|
||||
me->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "ahnkahet.h"
|
||||
#include "Creature.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
@@ -29,6 +29,27 @@ DoorData const doorData[] =
|
||||
{ 0, 0, DOOR_TYPE_ROOM } // END
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_ELDER_NADOX, DATA_ELDER_NADOX },
|
||||
{ NPC_PRINCE_TALDARAM, DATA_PRINCE_TALDARAM },
|
||||
{ NPC_JEDOGA_SHADOWSEEKER, DATA_JEDOGA_SHADOWSEEKER },
|
||||
{ NPC_AMANITAR, DATA_AMANITAR },
|
||||
{ NPC_HERALD_VOLAZJ, DATA_HERALD_VOLAZJ },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
ObjectData const gameObjectData[] =
|
||||
{
|
||||
{ GO_PRINCE_TALDARAM_PLATFORM, DATA_PRINCE_TALDARAM_PLATFORM },
|
||||
{ 0, 0 } //END
|
||||
};
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_JEDOGA_SHADOWSEEKER, new ParallelogramBoundary(Position(460.365f, -661.997f, -20.985f), Position(364.958f,-790.211f, -14.207f), Position(347.436f,-657.978f,14.478f)) }
|
||||
};
|
||||
|
||||
class instance_ahnkahet : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -41,46 +62,20 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
SwitchTrigger = 0;
|
||||
LoadObjectData(creatureData, gameObjectData);
|
||||
LoadBossBoundaries(boundaries);
|
||||
|
||||
SpheresState[0] = 0;
|
||||
SpheresState[1] = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_ELDER_NADOX:
|
||||
ElderNadoxGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PRINCE_TALDARAM:
|
||||
PrinceTaldaramGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_JEDOGA_SHADOWSEEKER:
|
||||
JedogaShadowseekerGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_AMANITAR:
|
||||
AmanitarGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_HERALD_VOLAZJ:
|
||||
HeraldVolazjGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_INITIAND:
|
||||
InitiandGUIDs.insert(creature->GetGUID());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
InstanceScript::OnGameObjectCreate(go);
|
||||
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_PRINCE_TALDARAM_PLATFORM:
|
||||
PrinceTaldaramPlatformGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_PRINCE_TALDARAM) == DONE)
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
@@ -102,21 +97,6 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
else
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_PRINCE_TALDARAM_GATE:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* go) override
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_PRINCE_TALDARAM_GATE:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -130,20 +110,6 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
case DATA_SPHERE_2:
|
||||
SpheresState[type - DATA_SPHERE_1] = data;
|
||||
break;
|
||||
case DATA_JEDOGA_TRIGGER_SWITCH:
|
||||
SwitchTrigger = data;
|
||||
break;
|
||||
case DATA_JEDOGA_RESET_INITIANDS:
|
||||
for (ObjectGuid guid : InitiandGUIDs)
|
||||
{
|
||||
if (Creature* creature = instance->GetCreature(guid))
|
||||
{
|
||||
creature->Respawn();
|
||||
if (!creature->IsInEvadeMode())
|
||||
creature->AI()->EnterEvadeMode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -156,99 +122,12 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
case DATA_SPHERE_1:
|
||||
case DATA_SPHERE_2:
|
||||
return SpheresState[type - DATA_SPHERE_1];
|
||||
case DATA_ALL_INITIAND_DEAD:
|
||||
for (ObjectGuid guid : InitiandGUIDs)
|
||||
{
|
||||
Creature* cr = instance->GetCreature(guid);
|
||||
if (!cr || cr->IsAlive())
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
case DATA_JEDOGA_TRIGGER_SWITCH:
|
||||
return SwitchTrigger;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ADD_JEDOGA_OPFER:
|
||||
JedogaSacrifices = data;
|
||||
break;
|
||||
case DATA_PL_JEDOGA_TARGET:
|
||||
JedogaTarget = data;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ELDER_NADOX:
|
||||
return ElderNadoxGUID;
|
||||
case DATA_PRINCE_TALDARAM:
|
||||
return PrinceTaldaramGUID;
|
||||
case DATA_JEDOGA_SHADOWSEEKER:
|
||||
return JedogaShadowseekerGUID;
|
||||
case DATA_AMANITAR:
|
||||
return AmanitarGUID;
|
||||
case DATA_HERALD_VOLAZJ:
|
||||
return HeraldVolazjGUID;
|
||||
case DATA_PRINCE_TALDARAM_PLATFORM:
|
||||
return PrinceTaldaramPlatformGUID;
|
||||
case DATA_ADD_JEDOGA_INITIAND:
|
||||
{
|
||||
GuidVector vInitiands;
|
||||
vInitiands.reserve(InitiandGUIDs.size());
|
||||
for (ObjectGuid guid : InitiandGUIDs)
|
||||
{
|
||||
Creature* cr = instance->GetCreature(guid);
|
||||
if (cr && cr->IsAlive())
|
||||
vInitiands.push_back(guid);
|
||||
}
|
||||
if (vInitiands.empty())
|
||||
return ObjectGuid::Empty;
|
||||
|
||||
return Trinity::Containers::SelectRandomContainerElement(vInitiands);
|
||||
}
|
||||
case DATA_ADD_JEDOGA_OPFER:
|
||||
return JedogaSacrifices;
|
||||
case DATA_PL_JEDOGA_TARGET:
|
||||
return JedogaTarget;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_JEDOGA_SHADOWSEEKER:
|
||||
if (state == DONE)
|
||||
{
|
||||
for (ObjectGuid guid : InitiandGUIDs)
|
||||
if (Creature* cr = instance->GetCreature(guid))
|
||||
cr->DespawnOrUnsummon();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void WriteSaveDataMore(std::ostringstream& data) override
|
||||
{
|
||||
data << SpheresState[0] << ' ' << SpheresState[1];
|
||||
@@ -261,20 +140,7 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
}
|
||||
|
||||
protected:
|
||||
ObjectGuid ElderNadoxGUID;
|
||||
ObjectGuid PrinceTaldaramGUID;
|
||||
ObjectGuid JedogaShadowseekerGUID;
|
||||
ObjectGuid AmanitarGUID;
|
||||
ObjectGuid HeraldVolazjGUID;
|
||||
|
||||
ObjectGuid PrinceTaldaramPlatformGUID;
|
||||
ObjectGuid JedogaSacrifices;
|
||||
ObjectGuid JedogaTarget;
|
||||
|
||||
GuidSet InitiandGUIDs;
|
||||
|
||||
uint32 SpheresState[2];
|
||||
uint8 SwitchTrigger;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
Reference in New Issue
Block a user