Permalink
Browse files

Scripts/Ahn'kahet/Prince Taldaram:

Fix movement after shield drops.(no more LoS issues)
Update boss texts and move them to creature_text.
Add proper sounds to text.
Add condition for a visual spell.
Add usage of different Embrace of the Vampyr spell based on difficulty.
  • Loading branch information...
1 parent ee305cb commit dae82111b7ff621445c96ab9d3775aae51b9fd26 @w1sht0l1v3 committed Mar 24, 2012
@@ -0,0 +1,22 @@
+-- Beam Visual
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=60342;
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(13,1,60342,0,0,31,0,3,29308,0,0,0,'','Beam Visual target Prince Taldaram');
+
+-- script texts for Prince Taldaram
+DELETE FROM `creature_text` WHERE `entry`=29308;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(29308,0,0,'The hum of magic energy in the air diminishes...',16,0,100,0,0,0,'prince taldaram SAY_1'),
+(29308,1,0,'Intruders! Who trespasses in the Old Kingdom?',14,0,100,0,0,0,'prince taldaram SAY_WARNING'),
+(29308,2,0,'I will feast on your remains.',14,0,100,0,0,14360,'prince taldaram SAY_AGGRO'),
+(29308,3,0,'',14,10,100,0,0,14365,'prince taldaram SAY_SLAY_0'),
+(29308,3,1,'I will drink no blood before it''s time.',14,0,100,0,0,14366,'prince taldaram SAY_SLAY_1'),
+(29308,3,2,'One final embrace.',14,0,100,0,0,14367,'prince taldaram SAY_SLAY_2'),
+(29308,4,0,'Still I hunger. Still... I... thirst.',14,0,100,0,0,14368,'prince taldaram SAY_DEATH'),
+(29308,5,0,'So... appetizing.',14,0,100,0,0,14363,'prince taldaram SAY_FEED1'),
+(29308,5,1,'Fresh, warm blood. It has been too long.',14,0,100,0,0,14364,'prince taldaram SAY_FEED2'),
+(29308,6,0,'Your heartbeat is... music to my ears.',14,0,100,0,0,14361,'prince taldaram SAY_VANISH1'),
+(29308,6,1,'I am nowhere... I am everywhere. I am the watcher, unseen.',14,0,100,0,0,14362,'prince taldaram SAY_VANISH2');
+
+-- cleanup
+DELETE FROM `script_texts` WHERE `npc_entry`=29308;
@@ -36,7 +36,8 @@ enum Spells
SPELL_VANISH = 55964,
CREATURE_FLAME_SPHERE = 30106,
H_CREATURE_FLAME_SPHERE_1 = 31686,
- H_CREATURE_FLAME_SPHERE_2 = 31687
+ H_CREATURE_FLAME_SPHERE_2 = 31687,
+ SPELL_HOVER_FALL = 60425
};
enum Misc
{
@@ -45,18 +46,17 @@ enum Misc
DATA_SPHERE_DISTANCE = 15
};
#define DATA_SPHERE_ANGLE_OFFSET 0.7f
-#define DATA_GROUND_POSITION_Z 11.4f
+#define DATA_GROUND_POSITION_Z 11.30809f
enum Yells
{
- SAY_AGGRO = -1619021,
- SAY_SLAY_1 = -1619022,
- SAY_SLAY_2 = -1619023,
- SAY_DEATH = -1619024,
- SAY_FEED_1 = -1619025,
- SAY_FEED_2 = -1619026,
- SAY_VANISH_1 = -1619027,
- SAY_VANISH_2 = -1619028
+ SAY_1 = 0,
+ SAY_WARNING = 1,
+ SAY_AGGRO = 2,
+ SAY_SLAY = 3,
+ SAY_DEATH = 4,
+ SAY_FEED = 5,
+ SAY_VANISH = 6,
};
enum CombatPhase
{
@@ -82,8 +82,7 @@ class boss_taldaram : public CreatureScript
boss_taldaramAI(Creature* creature) : ScriptedAI(creature)
{
instance = creature->GetInstanceScript();
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ me->SetDisableGravity(true);
}
uint32 uiBloodthirstTimer;
@@ -118,7 +117,7 @@ class boss_taldaram : public CreatureScript
{
if (instance)
instance->SetData(DATA_PRINCE_TALDARAM_EVENT, IN_PROGRESS);
- DoScriptText(SAY_AGGRO, me);
+ Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -180,7 +179,8 @@ class boss_taldaram : public CreatureScript
break;
case VANISHED:
if (Unit* pEmbraceTarget = GetEmbraceTarget())
- DoCast(pEmbraceTarget, SPELL_EMBRACE_OF_THE_VAMPYR);
+ DoCast(pEmbraceTarget, DUNGEON_MODE(SPELL_EMBRACE_OF_THE_VAMPYR, H_SPELL_EMBRACE_OF_THE_VAMPYR));
+ Talk(SAY_FEED);
me->GetMotionMaster()->Clear();
me->SetSpeed(MOVE_WALK, 1.0f, true);
me->GetMotionMaster()->MoveChase(me->getVictim());
@@ -202,7 +202,7 @@ class boss_taldaram : public CreatureScript
if (uiFlamesphereTimer <= diff)
{
// because TARGET_UNIT_TARGET_ENEMY we need a target selected to cast
- DoCast(me->getVictim(), SPELL_CONJURE_FLAME_SPHERE);
+ DoCastVictim(SPELL_CONJURE_FLAME_SPHERE);
Phase = CASTING_FLAME_SPHERES;
uiPhaseTimer = 3*IN_MILLISECONDS + diff;
uiFlamesphereTimer = 15*IN_MILLISECONDS;
@@ -225,7 +225,7 @@ class boss_taldaram : public CreatureScript
//He only vanishes if there are 3 or more alive players
if (target_list.size() > 2)
{
- DoScriptText(RAND(SAY_VANISH_1, SAY_VANISH_2), me);
+ Talk(SAY_VANISH);
DoCast(me, SPELL_VANISH);
Phase = JUST_VANISHED;
uiPhaseTimer = 500;
@@ -261,7 +261,7 @@ class boss_taldaram : public CreatureScript
void JustDied(Unit* /*killer*/)
{
- DoScriptText(SAY_DEATH, me);
+ Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_PRINCE_TALDARAM_EVENT, DONE);
@@ -279,7 +279,7 @@ class boss_taldaram : public CreatureScript
uiPhaseTimer = 0;
uiEmbraceTarget = 0;
}
- DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
+ Talk(SAY_SLAY);
}
bool CheckSpheres()
@@ -315,12 +315,13 @@ class boss_taldaram : public CreatureScript
{
if (!instance)
return;
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->RemoveAurasDueToSpell(SPELL_BEAM_VISUAL);
- me->SetUnitMovementFlags(MOVEMENTFLAG_WALKING);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), DATA_GROUND_POSITION_Z, me->GetOrientation());
+ DoCast(SPELL_HOVER_FALL);
+ me->SetDisableGravity(false);
+ me->GetMotionMaster()->MovePoint(0, me->GetHomePosition());
+ Talk(SAY_WARNING);
uint64 prison_GUID = instance->GetData64(DATA_PRINCE_TALDARAM_PLATFORM);
instance->HandleGameObject(prison_GUID, true);
}
@@ -405,10 +406,12 @@ class prince_taldaram_sphere : public GameObjectScript
{
case GO_SPHERE1:
instance->SetData(DATA_SPHERE1_EVENT, IN_PROGRESS);
+ pPrinceTaldaram->AI()->Talk(SAY_1);
break;
case GO_SPHERE2:
instance->SetData(DATA_SPHERE2_EVENT, IN_PROGRESS);
+ pPrinceTaldaram->AI()->Talk(SAY_1);
break;
}

0 comments on commit dae8211

Please sign in to comment.