*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184418 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184419 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184420 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184421 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184422 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184423 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184424 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184425 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184426 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184427 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184428 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184429 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184430 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184431 LIMIT 1;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 38528;
|
||||||
|
|
||||||
|
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||||
|
( 38528,-31984, 2, 'Protection of Elune - Finger of Death'),
|
||||||
|
( 38528,-32111, 2, 'Protection of Elune - Finger of Death');
|
||||||
@@ -25,6 +25,20 @@ UPDATE `gameobject_template` SET `ScriptName`='go_crystal_prison' WHERE `entry`=
|
|||||||
UPDATE `gameobject_template` SET `ScriptName`='go_legion_obelisk' WHERE `entry` IN (185193,185195,185196,185197,185198);
|
UPDATE `gameobject_template` SET `ScriptName`='go_legion_obelisk' WHERE `entry` IN (185193,185195,185196,185197,185198);
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_jump_a_tron' WHERE `entry`=183146;
|
UPDATE `gameobject_template` SET `ScriptName`='go_jump_a_tron' WHERE `entry`=183146;
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_ethereum_prison' WHERE `entry`=184421;
|
UPDATE `gameobject_template` SET `ScriptName`='go_ethereum_prison' WHERE `entry`=184421;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184418 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184419 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184420 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184421 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184422 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184423 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184424 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184425 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184426 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184427 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184428 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184429 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184430 LIMIT 1;
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = 'go_ethereum_prison' WHERE `entry` = 184431 LIMIT 1;
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_sacred_fire_of_life' WHERE `entry`=175944;
|
UPDATE `gameobject_template` SET `ScriptName`='go_sacred_fire_of_life' WHERE `entry`=175944;
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_skull_pile' WHERE `entry`=185913;
|
UPDATE `gameobject_template` SET `ScriptName`='go_skull_pile' WHERE `entry`=185913;
|
||||||
UPDATE `gameobject_template` SET `ScriptName`='go_tele_to_dalaran_crystal' WHERE entry=191230;
|
UPDATE `gameobject_template` SET `ScriptName`='go_tele_to_dalaran_crystal' WHERE entry=191230;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
-- up to TC2 2987 TC1 1434
|
-- up to TC2 3019 TC1 1434
|
||||||
|
|
||||||
-- --------
|
-- --------
|
||||||
-- LINKED
|
-- LINKED
|
||||||
@@ -104,6 +104,9 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
|||||||
( 40604, 40616, 1, 'Fel Rage Aura'),
|
( 40604, 40616, 1, 'Fel Rage Aura'),
|
||||||
( 40616, 41625, 1, 'Fel Rage Aura'),
|
( 40616, 41625, 1, 'Fel Rage Aura'),
|
||||||
( 41292, 42017, 2, 'Aura of Suffering'),
|
( 41292, 42017, 2, 'Aura of Suffering'),
|
||||||
|
-- hyjal mount
|
||||||
|
( 38528,-31984, 2, 'Protection of Elune - Finger of Death'),
|
||||||
|
( 38528,-32111, 2, 'Protection of Elune - Finger of Death'),
|
||||||
-- sunwell
|
-- sunwell
|
||||||
( 44869, 44866, 1, 'Spectral Blast Portal'),
|
( 44869, 44866, 1, 'Spectral Blast Portal'),
|
||||||
# (44869, 46648, 1, 'Spectral Blast Visual'), cause severe lag seems should be casted by go
|
# (44869, 46648, 1, 'Spectral Blast Visual'), cause severe lag seems should be casted by go
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ void FillSpellSummary()
|
|||||||
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA ||
|
if ( TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT ||
|
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER ||
|
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED )
|
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1);
|
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_AOE_ENEMY-1);
|
||||||
|
|
||||||
//Spell targets an enemy
|
//Spell targets an enemy
|
||||||
@@ -573,7 +573,7 @@ void FillSpellSummary()
|
|||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA ||
|
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT ||
|
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_INSTANT ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER ||
|
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_CASTER ||
|
||||||
TempSpell->EffectImplicitTargetA[j] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED )
|
TempSpell->EffectImplicitTargetA[j] == TARGET_DEST_DYNOBJ_ENEMY )
|
||||||
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1);
|
SpellSummary[i].Targets |= 1 << (SELECT_TARGET_ANY_ENEMY-1);
|
||||||
|
|
||||||
//Spell targets a single friend(or self)
|
//Spell targets a single friend(or self)
|
||||||
|
|||||||
@@ -79,6 +79,9 @@ struct TRINITY_DLL_DECL boss_taerarAI : public ScriptedAI
|
|||||||
|
|
||||||
void SummonShades(Unit* victim)
|
void SummonShades(Unit* victim)
|
||||||
{
|
{
|
||||||
|
if(!victim)
|
||||||
|
return;
|
||||||
|
|
||||||
Rand = rand()%15;
|
Rand = rand()%15;
|
||||||
switch (rand()%2)
|
switch (rand()%2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ struct TRINITY_DLL_DECL boss_ysondreAI : public ScriptedAI
|
|||||||
|
|
||||||
void SummonDruids(Unit* victim)
|
void SummonDruids(Unit* victim)
|
||||||
{
|
{
|
||||||
|
if(!victim)
|
||||||
|
return;
|
||||||
|
|
||||||
Rand = rand()%10;
|
Rand = rand()%10;
|
||||||
switch (rand()%2)
|
switch (rand()%2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL npc_testAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
m_creature->Say("Wild Felboar attack!", LANG_UNIVERSAL, 0);
|
m_creature->Say("Wild Felboar attack!", LANG_UNIVERSAL, 0);
|
||||||
Creature* temp = m_creature->SummonCreature(21878, m_creature->GetPositionX()+5, m_creature->GetPositionY()+7, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
|
Creature* temp = m_creature->SummonCreature(21878, m_creature->GetPositionX()+5, m_creature->GetPositionY()+7, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 3000);
|
||||||
|
if(temp)
|
||||||
temp->AI()->AttackStart(m_creature);
|
temp->AI()->AttackStart(m_creature);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -73,8 +73,10 @@ struct TRINITY_DLL_DECL npc_chicken_cluckAI : public ScriptedAI
|
|||||||
if(m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
if(m_creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
||||||
{
|
{
|
||||||
if(ResetFlagTimer < diff)
|
if(ResetFlagTimer < diff)
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
else ResetFlagTimer -= diff;
|
return;
|
||||||
|
}else ResetFlagTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UpdateVictim())
|
if(UpdateVictim())
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ struct TRINITY_DLL_DECL npc_ravenholdtAI : public ScriptedAI
|
|||||||
|
|
||||||
void EnterCombat(Unit* who) { }
|
void EnterCombat(Unit* who) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_npc_ravenholdt(Creature *_Creature)
|
CreatureAI* GetAI_npc_ravenholdt(Creature *_Creature)
|
||||||
{
|
{
|
||||||
return new npc_ravenholdtAI (_Creature);
|
return new npc_ravenholdtAI (_Creature);
|
||||||
|
|||||||
@@ -261,7 +261,10 @@ struct TRINITY_DLL_DECL mob_ethereal_beaconAI : public ScriptedAI
|
|||||||
}else Apprentice_Timer -= diff;
|
}else Apprentice_Timer -= diff;
|
||||||
|
|
||||||
if( CanEvade )
|
if( CanEvade )
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -154,7 +154,8 @@ struct TRINITY_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
//second top aggro target in normal, random target in heroic correct?
|
//second top aggro target in normal, random target in heroic correct?
|
||||||
Unit *target = NULL;
|
Unit *target = NULL;
|
||||||
if (HeroicMode ? target = SelectUnit(SELECT_TARGET_RANDOM,0) : target = SelectUnit(SELECT_TARGET_TOPAGGRO,1))
|
target = HeroicMode ? SelectUnit(SELECT_TARGET_RANDOM,0) : SelectUnit(SELECT_TARGET_TOPAGGRO,1);
|
||||||
|
if (target)
|
||||||
DoCast(target,HeroicMode ? H_SPELL_POLYMORPH : SPELL_POLYMORPH);
|
DoCast(target,HeroicMode ? H_SPELL_POLYMORPH : SPELL_POLYMORPH);
|
||||||
Sheep_Timer = 15000+rand()%2500;
|
Sheep_Timer = 15000+rand()%2500;
|
||||||
}else Sheep_Timer -= diff;
|
}else Sheep_Timer -= diff;
|
||||||
|
|||||||
-1
@@ -77,7 +77,6 @@ struct TRINITY_DLL_DECL boss_ambassador_hellmawAI : public ScriptedAI
|
|||||||
IsBanished = true;
|
IsBanished = true;
|
||||||
}
|
}
|
||||||
else pInstance->SetData(TYPE_HELLMAW,FAIL);
|
else pInstance->SetData(TYPE_HELLMAW,FAIL);
|
||||||
|
|
||||||
if (pInstance->GetData(TYPE_OVERSEER) == DONE)
|
if (pInstance->GetData(TYPE_OVERSEER) == DONE)
|
||||||
{
|
{
|
||||||
if (m_creature->HasAura(SPELL_BANISH))
|
if (m_creature->HasAura(SPELL_BANISH))
|
||||||
|
|||||||
+6
-1
@@ -150,6 +150,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
banish_Timer = 17000;
|
banish_Timer = 17000;
|
||||||
HelpYell = false;
|
HelpYell = false;
|
||||||
destroyPortals();
|
destroyPortals();
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
@@ -162,9 +163,12 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Creature *Portal = NULL;
|
Creature *Portal = NULL;
|
||||||
Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
|
Portal = m_creature->SummonCreature(MOB_VOID_PORTAL,VoidPortalCoords[i][0],VoidPortalCoords[i][1],VoidPortalCoords[i][2],0,TEMPSUMMON_CORPSE_DESPAWN,3000000);
|
||||||
|
if(Portal)
|
||||||
|
{
|
||||||
PortalsGuid[i] = Portal->GetGUID();
|
PortalsGuid[i] = Portal->GetGUID();
|
||||||
Portal->CastSpell(Portal,SPELL_VOID_PORTAL_VISUAL,false);
|
Portal->CastSpell(Portal,SPELL_VOID_PORTAL_VISUAL,false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sumportals = true;
|
sumportals = true;
|
||||||
summonTraveler_Timer = 5000;
|
summonTraveler_Timer = 5000;
|
||||||
}
|
}
|
||||||
@@ -215,6 +219,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
destroyPortals();
|
destroyPortals();
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
|
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, DONE);
|
||||||
}
|
}
|
||||||
@@ -228,6 +233,7 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||||
}
|
}
|
||||||
summonPortals();
|
summonPortals();
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_GRANDMASTERVORPILEVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
@@ -245,7 +251,6 @@ struct TRINITY_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ struct TRINITY_DLL_DECL mobs_spitelashesAI : public ScriptedAI
|
|||||||
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
m_creature->RemoveCorpse(); //you don't see any corpse on off.
|
m_creature->RemoveCorpse(); //you don't see any corpse on off.
|
||||||
EnterEvadeMode(); //spellhit will be set to false
|
EnterEvadeMode(); //spellhit will be set to false
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// walk 5 seconds before summoning
|
// walk 5 seconds before summoning
|
||||||
if( spellhit && morphtimer<5000 )
|
if( spellhit && morphtimer<5000 )
|
||||||
|
|||||||
@@ -467,11 +467,14 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
|||||||
Step = 1;
|
Step = 1;
|
||||||
EventStarted = true;
|
EventStarted = true;
|
||||||
Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
|
Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000);
|
||||||
|
if(Spark)
|
||||||
|
{
|
||||||
SparkGUID = Spark->GetGUID();
|
SparkGUID = Spark->GetGUID();
|
||||||
Spark->setActive(true);
|
Spark->setActive(true);
|
||||||
Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71);
|
|
||||||
Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56);
|
Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56);
|
||||||
|
}
|
||||||
|
m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71);
|
||||||
SayTimer = 23000;
|
SayTimer = 23000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -488,8 +491,11 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
|||||||
return 1000;
|
return 1000;
|
||||||
case 2:
|
case 2:
|
||||||
DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
|
DoScriptText(GEEZLE_SAY_1, m_creature, Spark);
|
||||||
|
if(Spark)
|
||||||
|
{
|
||||||
Spark->SetInFront(m_creature);
|
Spark->SetInFront(m_creature);
|
||||||
m_creature->SetInFront(Spark);
|
m_creature->SetInFront(Spark);
|
||||||
|
}
|
||||||
return 5000;
|
return 5000;
|
||||||
case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
|
case 3: DoScriptText(SPARK_SAY_2, Spark); return 7000;
|
||||||
case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
|
case 4: DoScriptText(SPARK_SAY_3, Spark); return 8000;
|
||||||
@@ -499,9 +505,11 @@ struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI
|
|||||||
case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
|
case 8: DoScriptText(GEEZLE_SAY_7, m_creature, Spark); return 2000;
|
||||||
case 9:
|
case 9:
|
||||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||||
|
if(Spark)
|
||||||
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
|
Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97);
|
||||||
return 20000;
|
return 20000;
|
||||||
case 10:
|
case 10:
|
||||||
|
if(Spark)
|
||||||
Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
//DespawnNagaFlag(false);
|
//DespawnNagaFlag(false);
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ struct TRINITY_DLL_DECL npc_taskmaster_fizzuleAI : public ScriptedAI
|
|||||||
if (Reset_Timer < diff)
|
if (Reset_Timer < diff)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
} else Reset_Timer -= diff;
|
} else Reset_Timer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1073,6 +1073,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
|||||||
|
|
||||||
void BeginTalk()
|
void BeginTalk()
|
||||||
{
|
{
|
||||||
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_ILLIDANSTORMRAGEEVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_ILLIDANSTORMRAGEEVENT, IN_PROGRESS);
|
||||||
|
|
||||||
for(uint8 i = 0; i < 2; i++)
|
for(uint8 i = 0; i < 2; i++)
|
||||||
@@ -1676,6 +1677,7 @@ bool GOHello_cage_trap(Player* plr, GameObject* go)
|
|||||||
CellLock<GridReadGuard> cell_lock(cell, pair);
|
CellLock<GridReadGuard> cell_lock(cell, pair);
|
||||||
cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap()));
|
cell_lock->Visit(cell_lock, cSearcher, *(plr->GetMap()));
|
||||||
|
|
||||||
|
if(trigger)
|
||||||
((cage_trap_triggerAI*)trigger->AI())->Active = true;
|
((cage_trap_triggerAI*)trigger->AI())->Active = true;
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
go->SetGoState(GO_STATE_ACTIVE);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ struct TRINITY_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI
|
|||||||
targets.sort(TargetDistanceOrder(m_creature)); // Sort players by distance.
|
targets.sort(TargetDistanceOrder(m_creature)); // Sort players by distance.
|
||||||
targets.resize(1); // Only need closest target.
|
targets.resize(1); // Only need closest target.
|
||||||
Unit* target = targets.front(); // Get the first target.
|
Unit* target = targets.front(); // Get the first target.
|
||||||
|
if(target)
|
||||||
target->CastSpell(m_creature, SPELL_FIXATE_TAUNT, true);
|
target->CastSpell(m_creature, SPELL_FIXATE_TAUNT, true);
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
m_creature->AddThreat(target,1000000);
|
m_creature->AddThreat(target,1000000);
|
||||||
|
|||||||
@@ -474,8 +474,10 @@ struct TRINITY_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI
|
|||||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||||
}
|
}
|
||||||
if(ResetTimer < diff)
|
if(ResetTimer < diff)
|
||||||
|
{
|
||||||
EnterEvadeMode();// Reset a little while after killing Akama, evade and respawn Akama
|
EnterEvadeMode();// Reset a little while after killing Akama, evade and respawn Akama
|
||||||
else ResetTimer -= diff;
|
return;
|
||||||
|
}else ResetTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ struct TRINITY_DLL_DECL npc_volcanoAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff) {}
|
void UpdateAI(const uint32 diff) {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI_boss_supremus(Creature *_Creature)
|
CreatureAI* GetAI_boss_supremus(Creature *_Creature)
|
||||||
|
|||||||
@@ -382,8 +382,12 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
|
|||||||
AttackStart(pUnit);
|
AttackStart(pUnit);
|
||||||
|
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
}else EnterEvadeMode();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}else AggroTimer -= diff;
|
}else AggroTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ struct TRINITY_DLL_DECL boss_illidari_councilAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
error_log(ERROR_INST_DATA);
|
error_log(ERROR_INST_DATA);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
DoZoneInCombat();
|
DoZoneInCombat();
|
||||||
// Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world-
|
// Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world-
|
||||||
|
|||||||
@@ -561,8 +561,11 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
|
|||||||
{
|
{
|
||||||
case GOSSIP_ACTION_INFO_DEF+1:
|
case GOSSIP_ACTION_INFO_DEF+1:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
|
if(pInstance)
|
||||||
|
{
|
||||||
pInstance->SetData(TYPE_THRALL_EVENT,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_EVENT,IN_PROGRESS);
|
||||||
pInstance->SetData(TYPE_THRALL_PART1,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_PART1,IN_PROGRESS);
|
||||||
|
}
|
||||||
|
|
||||||
DoScriptText(SAY_TH_START_EVENT_PART1, _Creature);
|
DoScriptText(SAY_TH_START_EVENT_PART1, _Creature);
|
||||||
|
|
||||||
@@ -580,6 +583,7 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
|
|||||||
case GOSSIP_ACTION_INFO_DEF+20:
|
case GOSSIP_ACTION_INFO_DEF+20:
|
||||||
player->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC3, _Creature->GetGUID());
|
player->SEND_GOSSIP_MENU(GOSSIP_ID_SKARLOC3, _Creature->GetGUID());
|
||||||
_Creature->SummonCreature(SKARLOC_MOUNT,2038.81,270.26,63.20,5.41,TEMPSUMMON_TIMED_DESPAWN,12000);
|
_Creature->SummonCreature(SKARLOC_MOUNT,2038.81,270.26,63.20,5.41,TEMPSUMMON_TIMED_DESPAWN,12000);
|
||||||
|
if(pInstance)
|
||||||
pInstance->SetData(TYPE_THRALL_PART2,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_PART2,IN_PROGRESS);
|
||||||
|
|
||||||
DoScriptText(SAY_TH_START_EVENT_PART2, _Creature);
|
DoScriptText(SAY_TH_START_EVENT_PART2, _Creature);
|
||||||
@@ -589,6 +593,7 @@ bool GossipSelect_npc_thrall_old_hillsbrad(Player *player, Creature *_Creature,
|
|||||||
|
|
||||||
case GOSSIP_ACTION_INFO_DEF+3:
|
case GOSSIP_ACTION_INFO_DEF+3:
|
||||||
player->CLOSE_GOSSIP_MENU();
|
player->CLOSE_GOSSIP_MENU();
|
||||||
|
if(pInstance)
|
||||||
pInstance->SetData(TYPE_THRALL_PART3,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_PART3,IN_PROGRESS);
|
||||||
((npc_thrall_old_hillsbradAI*)_Creature->AI())->StartWP();
|
((npc_thrall_old_hillsbradAI*)_Creature->AI())->StartWP();
|
||||||
break;
|
break;
|
||||||
@@ -668,6 +673,7 @@ bool GossipSelect_npc_taretha(Player *player, Creature *_Creature, uint32 sender
|
|||||||
|
|
||||||
if( pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS )
|
if( pInstance->GetData(TYPE_THRALL_EVENT) == IN_PROGRESS )
|
||||||
{
|
{
|
||||||
|
if(pInstance)
|
||||||
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
pInstance->SetData(TYPE_THRALL_PART4,IN_PROGRESS);
|
||||||
if(pInstance->GetData64(DATA_EPOCH) == 0)
|
if(pInstance->GetData64(DATA_EPOCH) == 0)
|
||||||
_Creature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
_Creature->SummonCreature(ENTRY_EPOCH,2639.13,698.55,65.43,4.59,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
|
||||||
|
|||||||
-1
@@ -131,7 +131,6 @@ struct TRINITY_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI
|
|||||||
Creature* pAdvisor = NULL;
|
Creature* pAdvisor = NULL;
|
||||||
for( int i=0; i<3; i++ )
|
for( int i=0; i<3; i++ )
|
||||||
|
|
||||||
|
|
||||||
if(RAdvisors[i])
|
if(RAdvisors[i])
|
||||||
{
|
{
|
||||||
pAdvisor = (Unit::GetCreature((*m_creature), RAdvisors[i]));
|
pAdvisor = (Unit::GetCreature((*m_creature), RAdvisors[i]));
|
||||||
|
|||||||
+4
-2
@@ -76,7 +76,8 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
{
|
{
|
||||||
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
boss_the_lurker_belowAI(Creature *c) : Scripted_NoMovementAI(c), Summons(m_creature)
|
||||||
{
|
{
|
||||||
pInstance = ((ScriptedInstance*)c->GetInstanceData()); SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SPOUT_ANIM);
|
pInstance = ((ScriptedInstance*)c->GetInstanceData());
|
||||||
|
SpellEntry *TempSpell = (SpellEntry*)GetSpellStore()->LookupEntry(SPELL_SPOUT_ANIM);
|
||||||
if(TempSpell)
|
if(TempSpell)
|
||||||
{
|
{
|
||||||
TempSpell->Effect[0] = 0;//remove all spell effect, only anim is needed
|
TempSpell->Effect[0] = 0;//remove all spell effect, only anim is needed
|
||||||
@@ -227,7 +228,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||||
{
|
{
|
||||||
Player *target = i->getSource();
|
Player *target = i->getSource();
|
||||||
if(target->isAlive() && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,target) && m_creature->GetDistance(target) <= SPOUT_DIST && !target->IsInWater())
|
if(target && target->isAlive() && m_creature->HasInArc((double)diff/20000*(double)M_PI*2,target) && m_creature->GetDistance(target) <= SPOUT_DIST && !target->IsInWater())
|
||||||
DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water
|
DoCast(target,SPELL_SPOUT,true);//only knock back palyers in arc, in 100yards, not in water
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -370,6 +371,7 @@ struct TRINITY_DLL_DECL boss_the_lurker_belowAI : public Scripted_NoMovementAI
|
|||||||
Summoned = m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Summoned = m_creature->SummonCreature(MOB_COILFANG_AMBUSHER,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
else Summoned = m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
else Summoned = m_creature->SummonCreature(MOB_COILFANG_GUARDIAN,AddPos[i][0],AddPos[i][1],AddPos[i][2], 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
|
||||||
|
if(Summoned)
|
||||||
Summons.Summon(Summoned);
|
Summons.Summon(Summoned);
|
||||||
Spawned = true;
|
Spawned = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -206,6 +206,7 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
Creature* Murloc = m_creature->SummonCreature(MurlocCords[i][0],MurlocCords[i][1],MurlocCords[i][2],MurlocCords[i][3],MurlocCords[i][4], TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
|
||||||
|
if(target && Murloc)
|
||||||
Murloc->AI()->AttackStart(target);
|
Murloc->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
DoScriptText(EMOTE_EARTHQUAKE, m_creature);
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
|
|||||||
|
|
||||||
virtual void Update(uint32 diff)
|
virtual void Update(uint32 diff)
|
||||||
{
|
{
|
||||||
|
if(!IronCladDoor || !DefiasCannon || !DoorLever)
|
||||||
|
return;
|
||||||
|
|
||||||
switch(State)
|
switch(State)
|
||||||
{
|
{
|
||||||
case CANNON_GUNPOWDER_USED:
|
case CANNON_GUNPOWDER_USED:
|
||||||
@@ -107,6 +110,9 @@ struct TRINITY_DLL_DECL instance_deadmines : public ScriptedInstance
|
|||||||
|
|
||||||
void MoveCreaturesInside()
|
void MoveCreaturesInside()
|
||||||
{
|
{
|
||||||
|
if(!DefiasPirate1 || !DefiasPirate2 || !DefiasCompanion)
|
||||||
|
return;
|
||||||
|
|
||||||
MoveCreatureInside(DefiasPirate1);
|
MoveCreatureInside(DefiasPirate1);
|
||||||
MoveCreatureInside(DefiasPirate2);
|
MoveCreatureInside(DefiasPirate2);
|
||||||
MoveCreatureInside(DefiasCompanion);
|
MoveCreatureInside(DefiasCompanion);
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ struct TRINITY_DLL_DECL npc_narm_faulkAI : public ScriptedAI
|
|||||||
if (m_creature->IsStandState())
|
if (m_creature->IsStandState())
|
||||||
{
|
{
|
||||||
if(lifeTimer < diff)
|
if(lifeTimer < diff)
|
||||||
m_creature->AI()->EnterEvadeMode();
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
lifeTimer -= diff;
|
lifeTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ struct TRINITY_DLL_DECL npc_henze_faulkAI : public ScriptedAI
|
|||||||
if (m_creature->IsStandState())
|
if (m_creature->IsStandState())
|
||||||
{
|
{
|
||||||
if(lifeTimer < diff)
|
if(lifeTimer < diff)
|
||||||
m_creature->AI()->EnterEvadeMode();
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
lifeTimer -= diff;
|
lifeTimer -= diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,8 +186,11 @@ struct TRINITY_DLL_DECL npc_ranger_lilathaAI : public npc_escortAI
|
|||||||
DoScriptText(SAY_PROGRESS3, m_creature, player);
|
DoScriptText(SAY_PROGRESS3, m_creature, player);
|
||||||
Creature* Summ1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0);
|
Creature* Summ1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||||
Creature* Summ2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0);
|
Creature* Summ2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||||
|
if(Summ1 && Summ2)
|
||||||
|
{
|
||||||
Summ1->Attack(m_creature, true);
|
Summ1->Attack(m_creature, true);
|
||||||
Summ2->Attack(player, true);
|
Summ2->Attack(player, true);
|
||||||
|
}
|
||||||
m_creature->AI()->AttackStart(Summ1);
|
m_creature->AI()->AttackStart(Summ1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,9 +280,10 @@ struct TRINITY_DLL_DECL boss_high_king_maulgarAI : public ScriptedAI
|
|||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
if (target)
|
if (target)
|
||||||
|
{
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
DoCast(target, SPELL_BERSERKER_C);
|
DoCast(target, SPELL_BERSERKER_C);
|
||||||
|
}
|
||||||
Charging_Timer = 20000;
|
Charging_Timer = 20000;
|
||||||
}else Charging_Timer -= diff;
|
}else Charging_Timer -= diff;
|
||||||
|
|
||||||
|
|||||||
+3
@@ -308,8 +308,10 @@ struct TRINITY_DLL_DECL boss_vazruden_the_heraldAI : public ScriptedAI
|
|||||||
if(!summoned)
|
if(!summoned)
|
||||||
{
|
{
|
||||||
Creature* Vazruden = m_creature->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
|
Creature* Vazruden = m_creature->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
|
||||||
|
if(Vazruden)
|
||||||
VazrudenGUID = Vazruden->GetGUID();
|
VazrudenGUID = Vazruden->GetGUID();
|
||||||
Creature* Nazan = m_creature->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
|
Creature* Nazan = m_creature->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000);
|
||||||
|
if(Nazan)
|
||||||
NazanGUID = Nazan->GetGUID();
|
NazanGUID = Nazan->GetGUID();
|
||||||
summoned = true;
|
summoned = true;
|
||||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||||
@@ -391,6 +393,7 @@ struct TRINITY_DLL_DECL boss_vazruden_the_heraldAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
UnsummonAdds();
|
UnsummonAdds();
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
|
|||||||
+1
@@ -280,6 +280,7 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
|
|||||||
if (tempx > 255 || tempx < 205)
|
if (tempx > 255 || tempx < 205)
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
resetcheck_timer = 5000;
|
resetcheck_timer = 5000;
|
||||||
}else resetcheck_timer -= diff;
|
}else resetcheck_timer -= diff;
|
||||||
|
|||||||
@@ -104,9 +104,6 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
|||||||
|
|
||||||
void StartEvent()
|
void StartEvent()
|
||||||
{
|
{
|
||||||
if(!pInstance)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_MOROES_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_MOROES_EVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
@@ -266,7 +263,10 @@ struct TRINITY_DLL_DECL boss_moroesAI : public ScriptedAI
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(pInstance && !pInstance->GetData(DATA_MOROES_EVENT))
|
if(pInstance && !pInstance->GetData(DATA_MOROES_EVENT))
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(!Enrage && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30)
|
if(!Enrage && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 30)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -117,7 +117,12 @@ struct TRINITY_DLL_DECL boss_nightbaneAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
m_creature->RemoveCorpse();
|
m_creature->RemoveCorpse();
|
||||||
}else pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(pInstance)
|
||||||
|
pInstance->SetData(DATA_NIGHTBANE_EVENT, NOT_STARTED);
|
||||||
|
}
|
||||||
|
|
||||||
HandleTerraceDoors(true);
|
HandleTerraceDoors(true);
|
||||||
|
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ struct TRINITY_DLL_DECL npc_barnesAI : public npc_escortAI
|
|||||||
{
|
{
|
||||||
RaidWiped = true;
|
RaidWiped = true;
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WipeTimer = 15000;
|
WipeTimer = 15000;
|
||||||
@@ -533,6 +534,8 @@ struct TRINITY_DLL_DECL npc_image_of_medivhAI : public ScriptedAI
|
|||||||
Step = 1;
|
Step = 1;
|
||||||
EventStarted = true;
|
EventStarted = true;
|
||||||
Creature* Arcanagos = m_creature->SummonCreature(MOB_ARCANAGOS,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
|
Creature* Arcanagos = m_creature->SummonCreature(MOB_ARCANAGOS,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000);
|
||||||
|
if(!Arcanagos)
|
||||||
|
return;
|
||||||
ArcanagosGUID = Arcanagos->GetGUID();
|
ArcanagosGUID = Arcanagos->GetGUID();
|
||||||
Arcanagos->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
Arcanagos->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||||
(*Arcanagos).GetMotionMaster()->MovePoint(0,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2]);
|
(*Arcanagos).GetMotionMaster()->MovePoint(0,ArcanagosPos[0],ArcanagosPos[1],ArcanagosPos[2]);
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
|
|||||||
if (ArcaneShockTimer < diff)
|
if (ArcaneShockTimer < diff)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_ARCANE_SHOCK);
|
DoCast(target, SPELL_ARCANE_SHOCK);
|
||||||
|
|
||||||
ArcaneShockTimer = 8000;
|
ArcaneShockTimer = 8000;
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ struct TRINITY_DLL_DECL boss_golemaggAI : public ScriptedAI
|
|||||||
|
|
||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_GOLEMAGG_DEATH, 0);
|
pInstance->SetData(DATA_GOLEMAGG_DEATH, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
|
|||||||
@@ -224,10 +224,13 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
|||||||
for(int i = 0; i < 9;i++)
|
for(int i = 0; i < 9;i++)
|
||||||
{
|
{
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(target)
|
||||||
|
{
|
||||||
Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000);
|
Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000);
|
||||||
if(Summoned)
|
if(Summoned)
|
||||||
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HasSubmergedOnce = true;
|
HasSubmergedOnce = true;
|
||||||
WasBanished = true;
|
WasBanished = true;
|
||||||
@@ -242,10 +245,13 @@ struct TRINITY_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI
|
|||||||
for(int i = 0; i < 9;i++)
|
for(int i = 0; i < 9;i++)
|
||||||
{
|
{
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(target)
|
||||||
|
{
|
||||||
Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000);
|
Summoned = m_creature->SummonCreature(12143,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,900000);
|
||||||
if(Summoned)
|
if(Summoned)
|
||||||
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WasBanished = true;
|
WasBanished = true;
|
||||||
DoCast(m_creature,SPELL_RAGSUBMERGE);
|
DoCast(m_creature,SPELL_RAGSUBMERGE);
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ struct TRINITY_DLL_DECL mob_lumpAI : public ScriptedAI
|
|||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
bReset = false;
|
bReset = false;
|
||||||
m_creature->setFaction(1711); //hostile
|
m_creature->setFaction(1711); //hostile
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else Reset_Timer -= diff;
|
else Reset_Timer -= diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,65 +78,6 @@ I also don't know the emotes
|
|||||||
//common needed defines
|
//common needed defines
|
||||||
#define NAXXRAMAS_MAP 533
|
#define NAXXRAMAS_MAP 533
|
||||||
//Positional defines
|
//Positional defines
|
||||||
#define ADDX_LEFT_FAR 3783.272705
|
|
||||||
#define ADDY_LEFT_FAR -5062.697266
|
|
||||||
#define ADDZ_LEFT_FAR 143.711203
|
|
||||||
#define ADDO_LEFT_FAR 3.617599
|
|
||||||
|
|
||||||
#define ADDX_LEFT_MIDDLE 3730.291260
|
|
||||||
#define ADDY_LEFT_MIDDLE -5027.239258
|
|
||||||
#define ADDZ_LEFT_MIDDLE 143.956909
|
|
||||||
#define ADDO_LEFT_MIDDLE 4.461900
|
|
||||||
|
|
||||||
#define ADDX_LEFT_NEAR 3683.868652
|
|
||||||
#define ADDY_LEFT_NEAR -5057.281250
|
|
||||||
#define ADDZ_LEFT_NEAR 143.183884
|
|
||||||
#define ADDO_LEFT_NEAR 5.237086
|
|
||||||
|
|
||||||
#define ADDX_RIGHT_FAR 3759.355225
|
|
||||||
#define ADDY_RIGHT_FAR -5174.128418
|
|
||||||
#define ADDZ_RIGHT_FAR 143.802383
|
|
||||||
#define ADDO_RIGHT_FAR 2.170104
|
|
||||||
|
|
||||||
#define ADDX_RIGHT_MIDDLE 370.724365
|
|
||||||
#define ADDY_RIGHT_MIDDLE -5185.123047
|
|
||||||
#define ADDZ_RIGHT_MIDDLE 143.928024
|
|
||||||
#define ADDO_RIGHT_MIDDLE 1.309310
|
|
||||||
|
|
||||||
#define ADDX_RIGHT_NEAR 3665.121094
|
|
||||||
#define ADDY_RIGHT_NEAR -5138.679199
|
|
||||||
#define ADDZ_RIGHT_NEAR 143.183212
|
|
||||||
#define ADDO_RIGHT_NEAR 0.604023
|
|
||||||
|
|
||||||
#define WALKX_LEFT_FAR 3754.431396
|
|
||||||
#define WALKY_LEFT_FAR -5080.727734
|
|
||||||
#define WALKZ_LEFT_FAR 142.036316
|
|
||||||
#define WALKO_LEFT_FAR 3.736189
|
|
||||||
|
|
||||||
#define WALKX_LEFT_MIDDLE 3724.396484
|
|
||||||
#define WALKY_LEFT_MIDDLE -5061.330566
|
|
||||||
#define WALKZ_LEFT_MIDDLE 142.032700
|
|
||||||
#define WALKO_LEFT_MIDDLE 4.564785
|
|
||||||
|
|
||||||
#define WALKX_LEFT_NEAR 3687.158424
|
|
||||||
#define WALKY_LEFT_NEAR -5076.834473
|
|
||||||
#define WALKZ_LEFT_NEAR 142.017319
|
|
||||||
#define WALKO_LEFT_NEAR 5.237086
|
|
||||||
|
|
||||||
#define WALKX_RIGHT_FAR 3687.571777
|
|
||||||
#define WALKY_RIGHT_FAR -5126.831055
|
|
||||||
#define WALKZ_RIGHT_FAR 142.017807
|
|
||||||
#define WALKO_RIGHT_FAR 0.604023
|
|
||||||
|
|
||||||
#define WALKX_RIGHT_MIDDLE 3707.990733
|
|
||||||
#define WALKY_RIGHT_MIDDLE -5151.450195
|
|
||||||
#define WALKZ_RIGHT_MIDDLE 142.032562
|
|
||||||
#define WALKO_RIGHT_MIDDLE 1.376855
|
|
||||||
|
|
||||||
#define WALKX_RIGHT_NEAR 3739.500000
|
|
||||||
#define WALKY_RIGHT_NEAR -5141.883989
|
|
||||||
#define WALKZ_RIGHT_NEAR 142.0141130
|
|
||||||
#define WALKO_RIGHT_NEAR 2.121412
|
|
||||||
|
|
||||||
//spells to be casted
|
//spells to be casted
|
||||||
#define SPELL_FROST_BOLT 28478
|
#define SPELL_FROST_BOLT 28478
|
||||||
@@ -149,6 +90,31 @@ I also don't know the emotes
|
|||||||
#define SPELL_SHADOW_FISURE 27810
|
#define SPELL_SHADOW_FISURE 27810
|
||||||
#define SPELL_FROST_BLAST 27808
|
#define SPELL_FROST_BLAST 27808
|
||||||
|
|
||||||
|
#define NORMAL_RAID 10
|
||||||
|
|
||||||
|
//creature needed summoned
|
||||||
|
#define MOB_SUMMON_WASTE 16427 //Soldiers of the Frozen Wastes
|
||||||
|
#define MOB_SUMMON_ABOMINATION 16428 //Unstoppable Abominations
|
||||||
|
#define MOB_SUMMON_WEAVER 16429//Soul Weavers
|
||||||
|
#define MOB_SUMMON_FISSURE 16129 // Shadow Fissure
|
||||||
|
#define MOB_SUMMON_ICECROWN 16441// Guardians of Icecrown
|
||||||
|
|
||||||
|
float Pos[12][4] =
|
||||||
|
{
|
||||||
|
{3783.272705, -5062.697266, 143.711203,3.617599},//LEFT_FAR
|
||||||
|
{3730.291260, -5027.239258,143.956909,4.461900},//LEFT_MIDDLE
|
||||||
|
{3683.868652,-5057.281250,143.183884,5.237086},//LEFT_NEAR
|
||||||
|
{3759.355225,-5174.128418,143.802383,2.170104},//RIGHT_FAR
|
||||||
|
{370.724365,-5185.123047,143.928024,1.309310},//RIGHT_MIDDLE
|
||||||
|
{3665.121094,-5138.679199,143.183212,0.604023},//RIGHT_NEAR
|
||||||
|
{3754.431396,-5080.727734,142.036316,3.736189},//LEFT_FAR
|
||||||
|
{3724.396484, -5061.330566,142.032700, 4.564785},//LEFT_MIDDLE
|
||||||
|
{3687.158424,-5076.834473,142.017319,5.237086},//LEFT_NEAR
|
||||||
|
{3687.571777,-5126.831055,142.017807,0.604023},//RIGHT_FAR
|
||||||
|
{3707.990733,-5151.450195,142.032562,1.376855},//RIGHT_MIDDLE
|
||||||
|
{3739.500000,-5141.883989,142.0141130, 2.121412}//RIGHT_NEAR
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_kelthuzadAI(Creature* c) : ScriptedAI(c)
|
boss_kelthuzadAI(Creature* c) : ScriptedAI(c)
|
||||||
@@ -164,20 +130,30 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
uint64 GuardiansOfIcecrown[5];
|
uint64 GuardiansOfIcecrown[5];
|
||||||
uint32 GuardiansOfIcecrown_Count;
|
uint32 GuardiansOfIcecrown_Count;
|
||||||
uint32 GuardiansOfIcecrown_Timer;
|
uint32 GuardiansOfIcecrown_Timer;
|
||||||
|
|
||||||
|
//phase==1 summon_timer
|
||||||
|
uint32 SummonWasters_Timer;
|
||||||
|
uint32 SummonAbominations_Timer;
|
||||||
|
uint32 SummonAWeavers_Timer;
|
||||||
|
|
||||||
|
//phase==2,spell_timer
|
||||||
uint32 FrostBolt_Timer;
|
uint32 FrostBolt_Timer;
|
||||||
uint32 FrostBoltNova_Timer;
|
uint32 FrostBoltNova_Timer;
|
||||||
uint32 ChainsOfKelthuzad_Timer;
|
uint32 ChainsOfKelthuzad_Timer;
|
||||||
uint32 ManaDetonation_Timer;
|
uint32 ManaDetonation_Timer;
|
||||||
uint32 ShadowFisure_Timer;
|
uint32 ShadowFisure_Timer;
|
||||||
uint32 FrostBlast_Timer;
|
uint32 FrostBlast_Timer;
|
||||||
uint32 ChainsOfKelthuzad_Targets;
|
|
||||||
uint32 Phase1_Timer;
|
uint32 Phase1_Timer;
|
||||||
bool Phase2;
|
uint32 Phase;
|
||||||
bool Phase3;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
FrostBolt_Timer = (rand()%60)*1000; //It won't be more than a minute without cast it
|
SummonWasters_Timer=3000; // 3s summon waster
|
||||||
|
SummonAbominations_Timer=25000; //25s summon abomination
|
||||||
|
SummonAWeavers_Timer=20000; //20s summon Weavers
|
||||||
|
|
||||||
|
FrostBolt_Timer = 2000; //2s CD
|
||||||
FrostBoltNova_Timer = 15000; //Cast every 15 seconds
|
FrostBoltNova_Timer = 15000; //Cast every 15 seconds
|
||||||
ChainsOfKelthuzad_Timer = (rand()%30+30)*1000; //Cast no sooner than once every 30 seconds
|
ChainsOfKelthuzad_Timer = (rand()%30+30)*1000; //Cast no sooner than once every 30 seconds
|
||||||
ManaDetonation_Timer = 20000; //Seems to cast about every 20 seconds
|
ManaDetonation_Timer = 20000; //Seems to cast about every 20 seconds
|
||||||
@@ -197,9 +173,8 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Phase1_Timer = 310000; //Phase 1 lasts 5 minutes and 10 seconds
|
Phase1_Timer = 228000; //Phase 1 lasts 3 minutes and 48 seconds
|
||||||
Phase2 = false;
|
Phase=0;
|
||||||
Phase3 = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KilledUnit()
|
void KilledUnit()
|
||||||
@@ -213,52 +188,7 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
void JustDied(Unit* Killer)
|
void JustDied(Unit* Killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
DoScriptText(SAY_DEATH, m_creature);
|
||||||
for(int i=0; i<5; i++)
|
|
||||||
if(GuardiansOfIcecrown[i])
|
|
||||||
{
|
|
||||||
Unit* pUnit = Unit::GetUnit((*m_creature), GuardiansOfIcecrown[i]);
|
|
||||||
if (!pUnit || !pUnit->isAlive())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
pUnit->CombatStop();
|
|
||||||
float Walk_Pos_X;
|
|
||||||
float Walk_Pos_Y;
|
|
||||||
float Walk_Pos_Z;
|
|
||||||
switch(rand()%6)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
Walk_Pos_X = ADDX_LEFT_FAR;
|
|
||||||
Walk_Pos_Y = ADDY_LEFT_FAR;
|
|
||||||
Walk_Pos_Z = ADDZ_LEFT_FAR;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
Walk_Pos_X = ADDX_LEFT_MIDDLE;
|
|
||||||
Walk_Pos_Y = ADDY_LEFT_MIDDLE;
|
|
||||||
Walk_Pos_Z = ADDZ_LEFT_MIDDLE;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
Walk_Pos_X = ADDX_LEFT_NEAR;
|
|
||||||
Walk_Pos_Y = ADDY_LEFT_NEAR;
|
|
||||||
Walk_Pos_Z = ADDZ_LEFT_NEAR;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
Walk_Pos_X = ADDX_RIGHT_FAR;
|
|
||||||
Walk_Pos_Y = ADDY_RIGHT_FAR;
|
|
||||||
Walk_Pos_Z = ADDZ_RIGHT_FAR;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
Walk_Pos_X = ADDX_RIGHT_MIDDLE;
|
|
||||||
Walk_Pos_Y = ADDY_RIGHT_MIDDLE;
|
|
||||||
Walk_Pos_Z = ADDZ_RIGHT_MIDDLE;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
Walk_Pos_X = ADDX_RIGHT_NEAR;
|
|
||||||
Walk_Pos_Y = ADDY_RIGHT_NEAR;
|
|
||||||
Walk_Pos_Z = ADDZ_RIGHT_NEAR;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X, Walk_Pos_Y, Walk_Pos_Z);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
@@ -269,21 +199,103 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
case 1: DoScriptText(SAY_AGGRO2, m_creature); break;
|
||||||
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
case 2: DoScriptText(SAY_AGGRO3, m_creature); break;
|
||||||
}
|
}
|
||||||
|
Phase=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
if (Phase1_Timer<diff && Phase==1)
|
||||||
if(m_creature->getVictim() && m_creature->isAlive())
|
|
||||||
{
|
{
|
||||||
|
Phase=2;
|
||||||
|
}else Phase1_Timer-=diff;
|
||||||
|
|
||||||
|
if(Phase == 1)
|
||||||
|
{
|
||||||
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
|
EnterEvadeMode();
|
||||||
|
//SummonWasters_Timer at far positon
|
||||||
|
if ( SummonWasters_Timer< diff)
|
||||||
|
{
|
||||||
|
|
||||||
|
Creature *Waster = NULL;
|
||||||
|
switch(rand()%4)
|
||||||
|
{
|
||||||
|
case 0: Waster = m_creature->SummonCreature(MOB_SUMMON_WASTE,Pos[0][0], Pos[0][1], Pos[0][2], Pos[0][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 1: Waster = m_creature->SummonCreature(MOB_SUMMON_WASTE,Pos[3][0], Pos[3][1], Pos[3][2], Pos[3][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 2: Waster = m_creature->SummonCreature(MOB_SUMMON_WASTE,Pos[6][0], Pos[6][1], Pos[6][2], Pos[6][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 3: Waster = m_creature->SummonCreature(MOB_SUMMON_WASTE,Pos[9][0], Pos[9][1], Pos[9][2], Pos[9][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Waster)
|
||||||
|
{
|
||||||
|
Unit *target = NULL;
|
||||||
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
|
Waster->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
|
SummonWasters_Timer=3000;
|
||||||
|
}else SummonWasters_Timer-=diff;
|
||||||
|
|
||||||
|
//MOB_SUMMON_ABOMINATION at middle positon
|
||||||
|
if ( SummonAbominations_Timer< diff)
|
||||||
|
{
|
||||||
|
|
||||||
|
Creature *Abominations = NULL;
|
||||||
|
switch(rand()%4)
|
||||||
|
{
|
||||||
|
case 0: Abominations = m_creature->SummonCreature(MOB_SUMMON_ABOMINATION,Pos[1][0], Pos[1][1], Pos[1][2], Pos[1][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 1: Abominations = m_creature->SummonCreature(MOB_SUMMON_ABOMINATION,Pos[4][0], Pos[4][1], Pos[4][2], Pos[4][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 2: Abominations = m_creature->SummonCreature(MOB_SUMMON_ABOMINATION,Pos[7][0], Pos[7][1], Pos[7][2], Pos[7][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 3: Abominations = m_creature->SummonCreature(MOB_SUMMON_ABOMINATION,Pos[10][0], Pos[10][1], Pos[10][2], Pos[10][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Abominations)
|
||||||
|
{
|
||||||
|
Unit *target = NULL;
|
||||||
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
|
Abominations->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
|
SummonAbominations_Timer=25000;
|
||||||
|
}else SummonAbominations_Timer-=diff;
|
||||||
|
|
||||||
|
//SummonAWeavers_Timer at far positon
|
||||||
|
if ( SummonAWeavers_Timer< diff)
|
||||||
|
{
|
||||||
|
|
||||||
|
Creature *Weavers = NULL;
|
||||||
|
switch(rand()%4)
|
||||||
|
{
|
||||||
|
case 0: Weavers = m_creature->SummonCreature(MOB_SUMMON_WEAVER,Pos[0][0], Pos[0][1], Pos[0][2], Pos[0][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 1: Weavers = m_creature->SummonCreature(MOB_SUMMON_WEAVER,Pos[3][0], Pos[3][1], Pos[3][2], Pos[3][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 2: Weavers = m_creature->SummonCreature(MOB_SUMMON_WEAVER,Pos[6][0], Pos[6][1], Pos[6][2], Pos[6][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
case 3: Weavers = m_creature->SummonCreature(MOB_SUMMON_WEAVER,Pos[9][0], Pos[9][1], Pos[9][2], Pos[9][3], TEMPSUMMON_CORPSE_DESPAWN, 0); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Weavers)
|
||||||
|
{
|
||||||
|
Unit *target = NULL;
|
||||||
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
|
Weavers->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
|
SummonAWeavers_Timer=30000;
|
||||||
|
}else SummonAWeavers_Timer-=diff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if( Phase!=1 && m_creature->getVictim() && m_creature->isAlive())
|
||||||
|
{
|
||||||
|
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||||
|
|
||||||
//Check for Frost Bolt
|
//Check for Frost Bolt
|
||||||
if(FrostBolt_Timer < diff)
|
if(FrostBolt_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(),SPELL_FROST_BOLT);
|
DoCast(m_creature->getVictim(),SPELL_FROST_BOLT);
|
||||||
//Cast again on time
|
//Cast again on time
|
||||||
FrostBolt_Timer = (rand()%60)*1000;
|
FrostBolt_Timer = 2000;
|
||||||
}else FrostBolt_Timer -= diff;
|
}else FrostBolt_Timer -= diff;
|
||||||
|
|
||||||
//Check for Frost Bolt Nova
|
//Check for Frost Bolt Nova
|
||||||
@@ -293,7 +305,8 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
FrostBoltNova_Timer = 15000;
|
FrostBoltNova_Timer = 15000;
|
||||||
}else FrostBoltNova_Timer -= diff;
|
}else FrostBoltNova_Timer -= diff;
|
||||||
|
|
||||||
//Check for Chains Of Kelthuzad
|
//Cast Chains Of Kelthuzad only on the Heroic instance
|
||||||
|
/*
|
||||||
if(ChainsOfKelthuzad_Timer < diff)
|
if(ChainsOfKelthuzad_Timer < diff)
|
||||||
{
|
{
|
||||||
//DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD);
|
//DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD);
|
||||||
@@ -304,111 +317,110 @@ struct TRINITY_DLL_DECL boss_kelthuzadAI : public ScriptedAI
|
|||||||
//DoScriptText(SAY_CHAIN2, m_creature);
|
//DoScriptText(SAY_CHAIN2, m_creature);
|
||||||
ChainsOfKelthuzad_Timer = (rand()%30+30)*1000;
|
ChainsOfKelthuzad_Timer = (rand()%30+30)*1000;
|
||||||
}else ChainsOfKelthuzad_Timer -= diff;
|
}else ChainsOfKelthuzad_Timer -= diff;
|
||||||
|
*/
|
||||||
|
|
||||||
//Check for Mana Detonation
|
//Check for Mana Detonation
|
||||||
if(ManaDetonation_Timer < diff)
|
if(ManaDetonation_Timer < diff)
|
||||||
{
|
{
|
||||||
//time to cast
|
Unit* target;
|
||||||
|
//select a manaplayer during 10 raid ,how to make sure we can succed in finding a manaplayer or it's safty if there is no manaplayer in raid
|
||||||
|
for(uint8 i = 0; i <NORMAL_RAID; i++)
|
||||||
|
{
|
||||||
|
if (target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
{
|
||||||
|
//check if the target is a manaplayer
|
||||||
|
if ( ((Player*)target)->getPowerType()==POWER_MANA )
|
||||||
|
{
|
||||||
|
// if yes cast the SPELL_MANA_DETONATION
|
||||||
DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION);
|
DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION);
|
||||||
|
//Obviously the damage of this spell would be invalidation
|
||||||
|
break;
|
||||||
|
//exit the circle
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (rand()%2)
|
if (rand()%2)
|
||||||
DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature);
|
DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature);
|
||||||
ManaDetonation_Timer = 20000;
|
ManaDetonation_Timer = 20000;
|
||||||
}else ManaDetonation_Timer -= diff;
|
}else ManaDetonation_Timer -= diff;
|
||||||
|
|
||||||
//Check for Shadow Fissure
|
//Summons a Shadow Fissure underneath a random player.
|
||||||
|
//The fissure will stay inactive for about 3 seconds, after which it will become a beam of purple energy,
|
||||||
|
//instantly killing the player if they remain in it.
|
||||||
|
|
||||||
if(ShadowFisure_Timer < diff)
|
if(ShadowFisure_Timer < diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE);
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
{
|
||||||
|
//get the position of the target x,y,z,ang.
|
||||||
|
float x,y,z,ang;
|
||||||
|
x=target->GetPositionX();
|
||||||
|
y=target->GetPositionY();
|
||||||
|
z=target->GetPositionZ();
|
||||||
|
ang=target->GetOrientation();
|
||||||
|
//summon the MOB_SUMMON_FISSURE at this positon
|
||||||
|
Creature *Fissure= m_creature->SummonCreature(MOB_SUMMON_FISSURE,x,y,z,ang, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
if(Fissure)
|
||||||
|
{
|
||||||
|
DoCast(target,SPELL_SHADOW_FISURE);
|
||||||
|
Fissure->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (rand()%2)
|
if (rand()%2)
|
||||||
DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature);
|
DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature);
|
||||||
ShadowFisure_Timer = 25000;
|
ShadowFisure_Timer = 25000;
|
||||||
}else ShadowFisure_Timer -= diff;
|
}else ShadowFisure_Timer -= diff;
|
||||||
|
|
||||||
//Check for Frost Blast
|
//cast Frost Blast to a random player
|
||||||
if(FrostBlast_Timer < diff)
|
if(FrostBlast_Timer < diff)
|
||||||
{
|
{
|
||||||
//time to cast
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
DoCast(m_creature->getVictim(),SPELL_FROST_BLAST);
|
{
|
||||||
|
DoCast(target,SPELL_FROST_BLAST);
|
||||||
|
//obviously the spell doesn't work like the description
|
||||||
|
//So, we need script this spell?
|
||||||
|
}
|
||||||
if(rand()%2 == 0)
|
if(rand()%2 == 0)
|
||||||
DoScriptText(SAY_FROST_BLAST, m_creature);
|
DoScriptText(SAY_FROST_BLAST, m_creature);
|
||||||
FrostBlast_Timer = (rand()%30+30)*1000;
|
FrostBlast_Timer = (rand()%30+30)*1000;
|
||||||
}else FrostBlast_Timer -= diff;
|
}else FrostBlast_Timer -= diff;
|
||||||
|
|
||||||
//start phase 3 when we are 40% health
|
//start phase 3 when we are 40% health
|
||||||
if(!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40)
|
if( Phase!=3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40)
|
||||||
{
|
{
|
||||||
Phase3 = true;
|
Phase = 3 ;
|
||||||
DoScriptText(SAY_REQUEST_AID, m_creature);
|
DoScriptText(SAY_REQUEST_AID, m_creature);
|
||||||
//here Lich King should respond to KelThuzad but I don't know which creature to make talk
|
//here Lich King should respond to KelThuzad but I don't know which creature to make talk
|
||||||
//so for now just make Kelthuzad says it.
|
//so for now just make Kelthuzad says it.
|
||||||
DoScriptText(SAY_ANSWER_REQUEST, m_creature);
|
DoScriptText(SAY_ANSWER_REQUEST, m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Phase3 && (GuardiansOfIcecrown_Count < 5))
|
if(Phase==3 && (GuardiansOfIcecrown_Count < 2)) //in normal raid ,only two Icecrown
|
||||||
if(GuardiansOfIcecrown_Timer < diff)
|
if(GuardiansOfIcecrown_Timer < diff)
|
||||||
{
|
{
|
||||||
//Summon a Guardian of Icecrown in a random alcove (Creature # 16441)
|
//Summon a Guardian of Icecrown in a random alcove
|
||||||
//uint32 TimeToWalk;
|
TempSummon* pUnit = NULL;
|
||||||
Unit* pUnit = NULL;
|
switch(rand()%3)
|
||||||
float Walk_Pos_X;
|
|
||||||
float Walk_Pos_Y;
|
|
||||||
float Walk_Pos_Z;
|
|
||||||
switch(rand()%6)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_LEFT_FAR,ADDY_LEFT_FAR,ADDZ_LEFT_FAR,ADDO_LEFT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
pUnit = m_creature->SummonCreature(MOB_SUMMON_ICECROWN,Pos[2][0],Pos[2][1],Pos[2][2],Pos[2][3],TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
||||||
//Setting walk position
|
|
||||||
Walk_Pos_X = WALKX_LEFT_FAR;
|
|
||||||
Walk_Pos_Y = WALKY_LEFT_FAR;
|
|
||||||
Walk_Pos_Z = WALKZ_LEFT_FAR;
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_LEFT_MIDDLE,ADDY_LEFT_MIDDLE,ADDZ_LEFT_MIDDLE,ADDO_LEFT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
pUnit = m_creature->SummonCreature(MOB_SUMMON_ICECROWN,Pos[5][0],Pos[5][1],Pos[5][2],Pos[5][3],TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
||||||
//Start moving guardian towards the center of the room
|
|
||||||
Walk_Pos_X = WALKX_LEFT_MIDDLE;
|
|
||||||
Walk_Pos_Y = WALKY_LEFT_MIDDLE;
|
|
||||||
Walk_Pos_Z = WALKZ_LEFT_MIDDLE;
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_LEFT_NEAR,ADDY_LEFT_NEAR,ADDZ_LEFT_NEAR,ADDO_LEFT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
pUnit = m_creature->SummonCreature(MOB_SUMMON_ICECROWN,Pos[8][0],Pos[8][1],Pos[8][2],Pos[8][3],TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
||||||
//Start moving guardian towards the center of the room
|
|
||||||
Walk_Pos_X = WALKX_LEFT_NEAR;
|
|
||||||
Walk_Pos_Y = WALKY_LEFT_NEAR;
|
|
||||||
Walk_Pos_Z = WALKZ_LEFT_NEAR;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
|
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_RIGHT_FAR,ADDY_RIGHT_FAR,ADDZ_RIGHT_FAR,ADDO_RIGHT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
|
||||||
//Start moving guardian towards the center of the room
|
|
||||||
Walk_Pos_X = WALKX_RIGHT_FAR;
|
|
||||||
Walk_Pos_Y = WALKY_RIGHT_FAR;
|
|
||||||
Walk_Pos_Z = WALKZ_RIGHT_FAR;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_RIGHT_MIDDLE,ADDY_RIGHT_MIDDLE,ADDZ_RIGHT_MIDDLE,ADDO_RIGHT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
|
||||||
//Start moving guardian towards the center of the room
|
|
||||||
Walk_Pos_X = WALKX_RIGHT_MIDDLE;
|
|
||||||
Walk_Pos_Y = WALKY_RIGHT_MIDDLE;
|
|
||||||
Walk_Pos_Z = WALKZ_RIGHT_MIDDLE;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
pUnit = m_creature->SummonCreature(16441,ADDX_RIGHT_NEAR,ADDY_RIGHT_NEAR,ADDZ_RIGHT_NEAR,ADDO_RIGHT_NEAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);
|
|
||||||
//Start moving guardian towards the center of the room
|
|
||||||
Walk_Pos_X = WALKX_RIGHT_NEAR;
|
|
||||||
Walk_Pos_Y = WALKY_RIGHT_NEAR;
|
|
||||||
Walk_Pos_Z = WALKZ_RIGHT_NEAR;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pUnit)
|
if (pUnit)
|
||||||
{
|
{
|
||||||
//if we find no one to figth walk to the center
|
|
||||||
if(!pUnit->isInCombat())
|
|
||||||
pUnit->SendMonsterMoveWithSpeed(Walk_Pos_X,Walk_Pos_Y,Walk_Pos_Z);
|
|
||||||
|
|
||||||
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
{
|
||||||
|
pUnit->AI()->AttackStart(target);
|
||||||
|
}
|
||||||
//Safe storing of creatures
|
//Safe storing of creatures
|
||||||
GuardiansOfIcecrown[GuardiansOfIcecrown_Count] = pUnit->GetGUID();
|
GuardiansOfIcecrown[GuardiansOfIcecrown_Count] = pUnit->GetGUID();
|
||||||
|
|
||||||
@@ -433,11 +445,9 @@ CreatureAI* GetAI_boss_kelthuzadAI(Creature *_Creature)
|
|||||||
|
|
||||||
void AddSC_boss_kelthuzad()
|
void AddSC_boss_kelthuzad()
|
||||||
{
|
{
|
||||||
|
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
newscript = new Script;
|
newscript = new Script;
|
||||||
newscript->Name="boss_kelthuzad";
|
newscript->Name="boss_kelthuzad";
|
||||||
newscript->GetAI = &GetAI_boss_kelthuzadAI;
|
newscript->GetAI = &GetAI_boss_kelthuzadAI;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ struct TRINITY_DLL_DECL mob_webwrapAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* victim = NULL;
|
Unit* victim = NULL;
|
||||||
victim = Unit::GetUnit((*m_creature), victimGUID);
|
victim = Unit::GetUnit((*m_creature), victimGUID);
|
||||||
|
if(victim)
|
||||||
victim->RemoveAurasDueToSpell(SPELL_WEBTRAP);
|
victim->RemoveAurasDueToSpell(SPELL_WEBTRAP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,8 +30,12 @@ EndScriptData */
|
|||||||
#define SPELL_FROST_BREATH 29318
|
#define SPELL_FROST_BREATH 29318
|
||||||
#define SPELL_FROST_AURA 28531
|
#define SPELL_FROST_AURA 28531
|
||||||
#define SPELL_LIFE_DRAIN 28542
|
#define SPELL_LIFE_DRAIN 28542
|
||||||
|
//#define SPELL_CHILL 28560
|
||||||
#define SPELL_BLIZZARD 28547
|
#define SPELL_BLIZZARD 28547
|
||||||
#define SPELL_BESERK 26662
|
#define SPELL_BESERK 26662
|
||||||
|
#define SPELL_CLEAVE 19983
|
||||||
|
#define SPELL_TAIL_SWEEP 55697
|
||||||
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
@@ -43,6 +47,8 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
|||||||
uint32 FrostAura_Timer;
|
uint32 FrostAura_Timer;
|
||||||
uint32 LifeDrain_Timer;
|
uint32 LifeDrain_Timer;
|
||||||
uint32 Blizzard_Timer;
|
uint32 Blizzard_Timer;
|
||||||
|
uint32 Tail_Sweep_Timer;
|
||||||
|
uint32 Cleave_Timer;
|
||||||
uint32 Fly_Timer;
|
uint32 Fly_Timer;
|
||||||
uint32 Fly2_Timer;
|
uint32 Fly2_Timer;
|
||||||
uint32 Beserk_Timer;
|
uint32 Beserk_Timer;
|
||||||
@@ -55,6 +61,8 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
|||||||
FrostAura_Timer = 2000;
|
FrostAura_Timer = 2000;
|
||||||
LifeDrain_Timer = 24000;
|
LifeDrain_Timer = 24000;
|
||||||
Blizzard_Timer = 20000;
|
Blizzard_Timer = 20000;
|
||||||
|
Tail_Sweep_Timer=(rand()%2+9)*1000;
|
||||||
|
Cleave_Timer=10000;
|
||||||
Fly_Timer = 45000;
|
Fly_Timer = 45000;
|
||||||
Icebolt_Timer = 4000;
|
Icebolt_Timer = 4000;
|
||||||
land_Timer = 0;
|
land_Timer = 0;
|
||||||
@@ -87,16 +95,36 @@ struct TRINITY_DLL_DECL boss_sapphironAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
DoCast(target,SPELL_LIFE_DRAIN);
|
DoCast(target,SPELL_LIFE_DRAIN);
|
||||||
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
DoCast(target,SPELL_LIFE_DRAIN);
|
||||||
|
|
||||||
LifeDrain_Timer = 24000;
|
LifeDrain_Timer = 24000;
|
||||||
}else LifeDrain_Timer -= diff;
|
}else LifeDrain_Timer -= diff;
|
||||||
|
|
||||||
if(Blizzard_Timer < diff)
|
if(Blizzard_Timer < diff)
|
||||||
{
|
{
|
||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
|
||||||
|
{
|
||||||
DoCast(target,SPELL_BLIZZARD);
|
DoCast(target,SPELL_BLIZZARD);
|
||||||
|
//It seems NO damage?
|
||||||
|
}
|
||||||
Blizzard_Timer = 20000;
|
Blizzard_Timer = 20000;
|
||||||
}else Blizzard_Timer -= diff;
|
}else Blizzard_Timer -= diff;
|
||||||
|
|
||||||
|
//SPELL_CLEAVE
|
||||||
|
if(Cleave_Timer < diff)
|
||||||
|
{
|
||||||
|
DoCast(m_creature->getVictim(),SPELL_CLEAVE);
|
||||||
|
Cleave_Timer = 10000;
|
||||||
|
}else Cleave_Timer -= diff;
|
||||||
|
|
||||||
|
//Tail Sweep_Timer,
|
||||||
|
if(Tail_Sweep_Timer < diff)
|
||||||
|
{
|
||||||
|
DoCast(m_creature,SPELL_TAIL_SWEEP);
|
||||||
|
Tail_Sweep_Timer=(rand()%2+9)*1000;
|
||||||
|
}else Tail_Sweep_Timer -= diff;
|
||||||
|
|
||||||
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10)
|
if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 10)
|
||||||
{
|
{
|
||||||
if(Fly_Timer < diff)
|
if(Fly_Timer < diff)
|
||||||
@@ -178,4 +206,3 @@ void AddSC_boss_sapphiron()
|
|||||||
newscript->GetAI = &GetAI_boss_sapphiron;
|
newscript->GetAI = &GetAI_boss_sapphiron;
|
||||||
newscript->RegisterSelf();
|
newscript->RegisterSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ struct TRINITY_DLL_DECL mob_headAI : public ScriptedAI
|
|||||||
DoScriptText(textEntry, m_creature, target);
|
DoScriptText(textEntry, m_creature, target);
|
||||||
//DoCast(m_creature,SPELL_HEAD_SPEAKS,true);
|
//DoCast(m_creature,SPELL_HEAD_SPEAKS,true);
|
||||||
Creature *speaker = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1000);
|
Creature *speaker = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1000);
|
||||||
|
if(speaker)
|
||||||
speaker->CastSpell(speaker,SPELL_HEAD_SPEAKS,false);
|
speaker->CastSpell(speaker,SPELL_HEAD_SPEAKS,false);
|
||||||
laugh += 3000;
|
laugh += 3000;
|
||||||
}
|
}
|
||||||
@@ -295,6 +296,7 @@ struct TRINITY_DLL_DECL mob_headAI : public ScriptedAI
|
|||||||
DoPlaySoundToSet(m_creature, RandomLaught[rand()%3]);
|
DoPlaySoundToSet(m_creature, RandomLaught[rand()%3]);
|
||||||
//DoCast(m_creature,SPELL_HEAD_SPEAKS,true); //this spell remove buff "head"
|
//DoCast(m_creature,SPELL_HEAD_SPEAKS,true); //this spell remove buff "head"
|
||||||
Creature *speaker = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1000);
|
Creature *speaker = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1000);
|
||||||
|
if(speaker)
|
||||||
speaker->CastSpell(speaker,SPELL_HEAD_SPEAKS,false);
|
speaker->CastSpell(speaker,SPELL_HEAD_SPEAKS,false);
|
||||||
DoTextEmote("laughts",NULL);
|
DoTextEmote("laughts",NULL);
|
||||||
} else laugh -= diff;
|
} else laugh -= diff;
|
||||||
@@ -421,6 +423,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
m_creature->SetVisibility(VISIBILITY_ON);break;
|
m_creature->SetVisibility(VISIBILITY_ON);break;
|
||||||
case 1: {
|
case 1: {
|
||||||
Creature *smoke = m_creature->SummonCreature(HELPER,Spawn[1].x,Spawn[1].y,Spawn[1].z,0,TEMPSUMMON_TIMED_DESPAWN,20000);
|
Creature *smoke = m_creature->SummonCreature(HELPER,Spawn[1].x,Spawn[1].y,Spawn[1].z,0,TEMPSUMMON_TIMED_DESPAWN,20000);
|
||||||
|
if(smoke)
|
||||||
((mob_wisp_invisAI*)smoke->AI())->SetType(3);
|
((mob_wisp_invisAI*)smoke->AI())->SetType(3);
|
||||||
DoCast(m_creature,SPELL_RHYME_BIG);
|
DoCast(m_creature,SPELL_RHYME_BIG);
|
||||||
break;}
|
break;}
|
||||||
@@ -515,8 +518,10 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
//m_creature->GetMotionMaster()->MoveIdle(); test
|
//m_creature->GetMotionMaster()->MoveIdle(); test
|
||||||
SaySound(SAY_DEATH);
|
SaySound(SAY_DEATH);
|
||||||
Creature *flame = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
Creature *flame = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
||||||
|
if(flame)
|
||||||
flame->CastSpell(flame,SPELL_BODY_FLAME,false);
|
flame->CastSpell(flame,SPELL_BODY_FLAME,false);
|
||||||
Creature *wisp = DoSpawnCreature(WISP_INVIS,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
Creature *wisp = DoSpawnCreature(WISP_INVIS,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,60000);
|
||||||
|
if(wisp)
|
||||||
((mob_wisp_invisAI*)wisp->AI())->SetType(4);
|
((mob_wisp_invisAI*)wisp->AI())->SetType(4);
|
||||||
if(pInstance)
|
if(pInstance)
|
||||||
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
pInstance->SetData(DATA_HORSEMAN_EVENT, DONE);
|
||||||
@@ -592,11 +597,15 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
say_timer = 3000;
|
say_timer = 3000;
|
||||||
Player *plr = SelectRandomPlayer(100.0f,false);
|
Player *plr = SelectRandomPlayer(100.0f,false);
|
||||||
if (count < 3)
|
if (count < 3)
|
||||||
|
if(plr)
|
||||||
plr->Say(Text[count].text,0);
|
plr->Say(Text[count].text,0);
|
||||||
else {
|
else {
|
||||||
DoCast(m_creature,SPELL_RHYME_BIG);
|
DoCast(m_creature,SPELL_RHYME_BIG);
|
||||||
|
if(plr)
|
||||||
|
{
|
||||||
plr->Say(Text[count].text,0);
|
plr->Say(Text[count].text,0);
|
||||||
plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
|
plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
|
||||||
|
}
|
||||||
wp_reached = true;
|
wp_reached = true;
|
||||||
IsFlying = true;
|
IsFlying = true;
|
||||||
count = 0;
|
count = 0;
|
||||||
@@ -618,6 +627,7 @@ struct TRINITY_DLL_DECL boss_headless_horsemanAI : public ScriptedAI
|
|||||||
if(burn < diff)
|
if(burn < diff)
|
||||||
{
|
{
|
||||||
Creature *flame = m_creature->SummonCreature(HELPER,Spawn[0].x,Spawn[0].y,Spawn[0].z,0,TEMPSUMMON_TIMED_DESPAWN,17000);
|
Creature *flame = m_creature->SummonCreature(HELPER,Spawn[0].x,Spawn[0].y,Spawn[0].z,0,TEMPSUMMON_TIMED_DESPAWN,17000);
|
||||||
|
if(flame)
|
||||||
((mob_wisp_invisAI*)flame->AI())->SetType(2);
|
((mob_wisp_invisAI*)flame->AI())->SetType(2);
|
||||||
burned = true;
|
burned = true;
|
||||||
}else burn -= diff;
|
}else burn -= diff;
|
||||||
@@ -727,10 +737,13 @@ struct TRINITY_DLL_DECL mob_pulsing_pumpkinAI : public ScriptedAI
|
|||||||
m_creature->Relocate(x,y,z + 0.35f);
|
m_creature->Relocate(x,y,z + 0.35f);
|
||||||
Despawn();
|
Despawn();
|
||||||
Creature *debuff = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,14500);
|
Creature *debuff = DoSpawnCreature(HELPER,0,0,0,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,14500);
|
||||||
|
if(debuff)
|
||||||
|
{
|
||||||
debuff->SetDisplayId(m_creature->GetDisplayId());
|
debuff->SetDisplayId(m_creature->GetDisplayId());
|
||||||
debuff->CastSpell(debuff,SPELL_PUMPKIN_AURA_GREEN,false);
|
debuff->CastSpell(debuff,SPELL_PUMPKIN_AURA_GREEN,false);
|
||||||
((mob_wisp_invisAI*)debuff->AI())->SetType(1);
|
((mob_wisp_invisAI*)debuff->AI())->SetType(1);
|
||||||
debuffGUID = debuff->GetGUID();
|
debuffGUID = debuff->GetGUID();
|
||||||
|
}
|
||||||
sprouted = false;
|
sprouted = false;
|
||||||
DoCast(m_creature,SPELL_PUMPKIN_AURA,true);
|
DoCast(m_creature,SPELL_PUMPKIN_AURA,true);
|
||||||
DoCast(m_creature,SPELL_SPROUTING);
|
DoCast(m_creature,SPELL_SPROUTING);
|
||||||
@@ -792,8 +805,11 @@ bool GOHello_go_loosely_turned_soil(Player *plr, GameObject* soil)
|
|||||||
{ */
|
{ */
|
||||||
plr->AreaExploredOrEventHappens(11405);
|
plr->AreaExploredOrEventHappens(11405);
|
||||||
Creature *horseman = soil->SummonCreature(HH_MOUNTED,FlightPoint[20].x,FlightPoint[20].y,FlightPoint[20].z,0,TEMPSUMMON_MANUAL_DESPAWN,0);
|
Creature *horseman = soil->SummonCreature(HH_MOUNTED,FlightPoint[20].x,FlightPoint[20].y,FlightPoint[20].z,0,TEMPSUMMON_MANUAL_DESPAWN,0);
|
||||||
|
if(horseman)
|
||||||
|
{
|
||||||
((boss_headless_horsemanAI*)horseman->AI())->playerGUID = plr->GetGUID();
|
((boss_headless_horsemanAI*)horseman->AI())->playerGUID = plr->GetGUID();
|
||||||
((boss_headless_horsemanAI*)horseman->AI())->FlyMode();
|
((boss_headless_horsemanAI*)horseman->AI())->FlyMode();
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
|
|||||||
for(int i = 0; i < 10;i++)
|
for(int i = 0; i < 10;i++)
|
||||||
{
|
{
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(target)
|
||||||
SummonIllusions(target);
|
SummonIllusions(target);
|
||||||
}
|
}
|
||||||
Invisible = true;
|
Invisible = true;
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ struct TRINITY_DLL_DECL boss_kormokAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
Rand1 = 0;
|
Rand1 = 0;
|
||||||
SummonedMinions = DoSpawnCreature(16119, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
SummonedMinions = DoSpawnCreature(16119, Rand1X, Rand1Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||||
|
if(SummonedMinions)
|
||||||
((CreatureAI*)SummonedMinions->AI())->AttackStart(victim);
|
((CreatureAI*)SummonedMinions->AI())->AttackStart(victim);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +95,7 @@ struct TRINITY_DLL_DECL boss_kormokAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
Rand2 = 0;
|
Rand2 = 0;
|
||||||
SummonedMages = DoSpawnCreature(16120, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
SummonedMages = DoSpawnCreature(16120, Rand2X, Rand2Y, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000);
|
||||||
|
if(SummonedMages)
|
||||||
((CreatureAI*)SummonedMages->AI())->AttackStart(victim);
|
((CreatureAI*)SummonedMages->AI())->AttackStart(victim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,8 +141,10 @@ struct TRINITY_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI
|
|||||||
|
|
||||||
if(Evade)
|
if(Evade)
|
||||||
if(ResetTimer < diff)
|
if(ResetTimer < diff)
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
else ResetTimer -= diff;
|
return;
|
||||||
|
}else ResetTimer -= diff;
|
||||||
|
|
||||||
if(!UpdateVictim())
|
if(!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
@@ -697,11 +699,15 @@ struct TRINITY_DLL_DECL npc_overlord_morghorAI : public ScriptedAI
|
|||||||
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
m_creature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
|
||||||
Unit* Illidan = m_creature->SummonCreature(C_ILLIDAN, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Unit* Illidan = m_creature->SummonCreature(C_ILLIDAN, -5107.83, 602.584, 85.2393, 4.92598, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
if(Illidan)
|
||||||
|
{
|
||||||
IllidanGUID = Illidan->GetGUID();
|
IllidanGUID = Illidan->GetGUID();
|
||||||
Illidan->SetVisibility(VISIBILITY_OFF);
|
Illidan->SetVisibility(VISIBILITY_OFF);
|
||||||
|
}
|
||||||
if(PlayerGUID)
|
if(PlayerGUID)
|
||||||
{
|
{
|
||||||
Player* player = Unit::GetPlayer(PlayerGUID);
|
Player* player = Unit::GetPlayer(PlayerGUID);
|
||||||
|
if(player)
|
||||||
DoScriptText(OVERLORD_SAY_1, m_creature, player);
|
DoScriptText(OVERLORD_SAY_1, m_creature, player);
|
||||||
}
|
}
|
||||||
ConversationTimer = 4200;
|
ConversationTimer = 4200;
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ struct TRINITY_DLL_DECL mob_yennikuAI : public ScriptedAI
|
|||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
bReset = false;
|
bReset = false;
|
||||||
m_creature->setFaction(28); //troll, bloodscalp
|
m_creature->setFaction(28); //troll, bloodscalp
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else Reset_Timer -= diff;
|
else Reset_Timer -= diff;
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ CreatureAI* GetAI_boss_baron_rivendare(Creature *_Creature)
|
|||||||
return new boss_baron_rivendareAI (_Creature);
|
return new boss_baron_rivendareAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_baron_rivendare()
|
void AddSC_boss_baron_rivendare()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ CreatureAI* GetAI_boss_baroness_anastari(Creature *_Creature)
|
|||||||
return new boss_baroness_anastariAI (_Creature);
|
return new boss_baroness_anastariAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_baroness_anastari()
|
void AddSC_boss_baroness_anastari()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ CreatureAI* GetAI_boss_cannon_master_willey(Creature *_Creature)
|
|||||||
return new boss_cannon_master_willeyAI (_Creature);
|
return new boss_cannon_master_willeyAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_cannon_master_willey()
|
void AddSC_boss_cannon_master_willey()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ CreatureAI* GetAI_boss_magistrate_barthilas(Creature *_Creature)
|
|||||||
return new boss_magistrate_barthilasAI (_Creature);
|
return new boss_magistrate_barthilasAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_magistrate_barthilas()
|
void AddSC_boss_magistrate_barthilas()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ CreatureAI* GetAI_boss_maleki_the_pallid(Creature *_Creature)
|
|||||||
return new boss_maleki_the_pallidAI (_Creature);
|
return new boss_maleki_the_pallidAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_maleki_the_pallid()
|
void AddSC_boss_maleki_the_pallid()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -94,9 +94,7 @@ struct TRINITY_DLL_DECL boss_nerubenkanAI : public ScriptedAI
|
|||||||
//EncasingWebs
|
//EncasingWebs
|
||||||
if (EncasingWebs_Timer < diff)
|
if (EncasingWebs_Timer < diff)
|
||||||
{
|
{
|
||||||
|
|
||||||
DoCast(m_creature->getVictim(),SPELL_ENCASINGWEBS);
|
DoCast(m_creature->getVictim(),SPELL_ENCASINGWEBS);
|
||||||
|
|
||||||
EncasingWebs_Timer = 30000;
|
EncasingWebs_Timer = 30000;
|
||||||
}else EncasingWebs_Timer -= diff;
|
}else EncasingWebs_Timer -= diff;
|
||||||
|
|
||||||
@@ -105,7 +103,6 @@ struct TRINITY_DLL_DECL boss_nerubenkanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
if (rand()%100 < 75)
|
if (rand()%100 < 75)
|
||||||
DoCast(m_creature->getVictim(),SPELL_PIERCEARMOR);
|
DoCast(m_creature->getVictim(),SPELL_PIERCEARMOR);
|
||||||
|
|
||||||
PierceArmor_Timer = 35000;
|
PierceArmor_Timer = 35000;
|
||||||
}else PierceArmor_Timer -= diff;
|
}else PierceArmor_Timer -= diff;
|
||||||
|
|
||||||
@@ -131,7 +128,6 @@ CreatureAI* GetAI_boss_nerubenkan(Creature *_Creature)
|
|||||||
return new boss_nerubenkanAI (_Creature);
|
return new boss_nerubenkanAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_nerubenkan()
|
void AddSC_boss_nerubenkan()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -145,10 +145,6 @@ CreatureAI* GetAI_boss_silver_hand_bossesAI(Creature *_Creature)
|
|||||||
return new boss_silver_hand_bossesAI (_Creature);
|
return new boss_silver_hand_bossesAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#####
|
|
||||||
#
|
|
||||||
#####*/
|
|
||||||
|
|
||||||
void AddSC_boss_order_of_silver_hand()
|
void AddSC_boss_order_of_silver_hand()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ CreatureAI* GetAI_boss_postmaster_malown(Creature *_Creature)
|
|||||||
return new boss_postmaster_malownAI (_Creature);
|
return new boss_postmaster_malownAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_postmaster_malown()
|
void AddSC_boss_postmaster_malown()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ CreatureAI* GetAI_boss_ramstein_the_gorger(Creature *_Creature)
|
|||||||
return new boss_ramstein_the_gorgerAI (_Creature);
|
return new boss_ramstein_the_gorgerAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_ramstein_the_gorger()
|
void AddSC_boss_ramstein_the_gorger()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ CreatureAI* GetAI_boss_timmy_the_cruel(Creature *_Creature)
|
|||||||
return new boss_timmy_the_cruelAI (_Creature);
|
return new boss_timmy_the_cruelAI (_Creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AddSC_boss_timmy_the_cruel()
|
void AddSC_boss_timmy_the_cruel()
|
||||||
{
|
{
|
||||||
Script *newscript;
|
Script *newscript;
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
|||||||
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
|
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_CONFLAGRATION);
|
DoCast(target, SPELL_CONFLAGRATION);
|
||||||
ConflagrationTimer = 30000+(rand()%5000);
|
ConflagrationTimer = 30000+(rand()%5000);
|
||||||
}
|
}
|
||||||
@@ -275,10 +276,12 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_SHADOW_NOVA);
|
DoCast(target, SPELL_SHADOW_NOVA);
|
||||||
|
|
||||||
if(!SisterDeath)
|
if(!SisterDeath)
|
||||||
{
|
{
|
||||||
|
if(target)
|
||||||
DoScriptText(EMOTE_SHADOW_NOVA, m_creature, target);
|
DoScriptText(EMOTE_SHADOW_NOVA, m_creature, target);
|
||||||
DoScriptText(YELL_SHADOW_NOVA, m_creature);
|
DoScriptText(YELL_SHADOW_NOVA, m_creature);
|
||||||
}
|
}
|
||||||
@@ -293,6 +296,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_CONFOUNDING_BLOW);
|
DoCast(target, SPELL_CONFOUNDING_BLOW);
|
||||||
ConfoundingblowTimer = 20000 + (rand()%5000);
|
ConfoundingblowTimer = 20000 + (rand()%5000);
|
||||||
}
|
}
|
||||||
@@ -306,6 +310,7 @@ struct TRINITY_DLL_DECL boss_sacrolashAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
|
temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
|
||||||
|
if(temp && target)
|
||||||
temp->AI()->AttackStart(target);
|
temp->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
ShadowimageTimer = 20000;
|
ShadowimageTimer = 20000;
|
||||||
@@ -593,6 +598,7 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
|
|||||||
{
|
{
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_SHADOW_NOVA);
|
DoCast(target, SPELL_SHADOW_NOVA);
|
||||||
ShadownovaTimer= 30000+(rand()%5000);
|
ShadownovaTimer= 30000+(rand()%5000);
|
||||||
}
|
}
|
||||||
@@ -607,11 +613,13 @@ struct TRINITY_DLL_DECL boss_alythessAI : public Scripted_NoMovementAI
|
|||||||
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
|
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_CONFLAGRATION);
|
DoCast(target, SPELL_CONFLAGRATION);
|
||||||
ConflagrationTimer = 30000+(rand()%5000);
|
ConflagrationTimer = 30000+(rand()%5000);
|
||||||
|
|
||||||
if(!SisterDeath)
|
if(!SisterDeath)
|
||||||
{
|
{
|
||||||
|
if(target)
|
||||||
DoScriptText(EMOTE_CONFLAGRATION, m_creature, target);
|
DoScriptText(EMOTE_CONFLAGRATION, m_creature, target);
|
||||||
DoScriptText(YELL_CANFLAGRATION, m_creature);
|
DoScriptText(YELL_CANFLAGRATION, m_creature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -318,7 +318,12 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||||
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
||||||
}
|
}
|
||||||
}else EnterEvadeMode();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
|
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
|
||||||
break;}
|
break;}
|
||||||
case 3: {
|
case 3: {
|
||||||
@@ -339,7 +344,12 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
m_creature->CastSpell(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||||
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
||||||
}
|
}
|
||||||
}else EnterEvadeMode();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
|
Timer[EVENT_FLIGHT_SEQUENCE] = 10000;
|
||||||
break;}
|
break;}
|
||||||
case 4:
|
case 4:
|
||||||
@@ -357,7 +367,11 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
float x, y, z;
|
float x, y, z;
|
||||||
target->GetContactPoint(m_creature, x, y, z, 70);
|
target->GetContactPoint(m_creature, x, y, z, 70);
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
|
m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10);
|
||||||
}else EnterEvadeMode();
|
}else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
|
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
|
||||||
break;}
|
break;}
|
||||||
case 6:
|
case 6:
|
||||||
@@ -391,7 +405,12 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
|||||||
float x, y, z;
|
float x, y, z;
|
||||||
target->GetContactPoint(m_creature, x, y, z);
|
target->GetContactPoint(m_creature, x, y, z);
|
||||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||||
}else EnterEvadeMode();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
|
Timer[EVENT_FLIGHT_SEQUENCE] = 0;
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
|
|||||||
@@ -396,6 +396,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoTextEmote("is unable to find Kalecgos", NULL);
|
DoTextEmote("is unable to find Kalecgos", NULL);
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckTimer = 1000;
|
CheckTimer = 1000;
|
||||||
@@ -594,6 +595,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
|
|||||||
{
|
{
|
||||||
error_log("TSCR: Didn't find Shathrowar. Kalecgos event reseted.");
|
error_log("TSCR: Didn't find Shathrowar. Kalecgos event reseted.");
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CheckTimer = 1000;
|
CheckTimer = 1000;
|
||||||
@@ -627,7 +629,7 @@ void boss_kalecgosAI::UpdateAI(const uint32 diff)
|
|||||||
{
|
{
|
||||||
//this is a hack. we need to find a victim without aura in core
|
//this is a hack. we need to find a victim without aura in core
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
if( ( target != m_creature->getVictim() ) && target->isAlive() && !(target->HasAura(AURA_SPECTRAL_EXHAUSTION)) )
|
if( target && target != m_creature->getVictim() && target->isAlive() && !target->HasAura(AURA_SPECTRAL_EXHAUSTION) )
|
||||||
{
|
{
|
||||||
DoCast(target, SPELL_SPECTRAL_BLAST);
|
DoCast(target, SPELL_SPECTRAL_BLAST);
|
||||||
SpectralBlastTimer = 20000+(rand()%5000);
|
SpectralBlastTimer = 20000+(rand()%5000);
|
||||||
|
|||||||
@@ -545,6 +545,7 @@ struct TRINITY_DLL_DECL boss_kiljaedenAI : public Scripted_NoMovementAI
|
|||||||
}
|
}
|
||||||
target->GetPosition(x,y,z);
|
target->GetPosition(x,y,z);
|
||||||
Creature* SinisterReflection = m_creature->SummonCreature(CREATURE_SINISTER_REFLECTION, x,y,z,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
Creature* SinisterReflection = m_creature->SummonCreature(CREATURE_SINISTER_REFLECTION, x,y,z,0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||||
|
if(SinisterReflection)
|
||||||
SinisterReflection->AI()->AttackStart(target);
|
SinisterReflection->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,8 +276,12 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
|
|||||||
m_creature->Relocate(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
m_creature->Relocate(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||||
m_creature->StopMoving();
|
m_creature->StopMoving();
|
||||||
WaitEvent = WE_LAND;
|
WaitEvent = WE_LAND;
|
||||||
}else EnterEvadeMode();
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
case WE_LAND:
|
case WE_LAND:
|
||||||
WaitEvent = WE_SUMMON;
|
WaitEvent = WE_SUMMON;
|
||||||
WaitTimer = 2000;
|
WaitTimer = 2000;
|
||||||
@@ -349,6 +353,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
|
|||||||
if(Charge_Timer < diff)
|
if(Charge_Timer < diff)
|
||||||
{
|
{
|
||||||
Unit *target= SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_CHARGE), true);
|
Unit *target= SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_CHARGE), true);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_CHARGE);
|
DoCast(target, SPELL_CHARGE);
|
||||||
Charge_Timer = 30000;
|
Charge_Timer = 30000;
|
||||||
}else Charge_Timer -= diff;
|
}else Charge_Timer -= diff;
|
||||||
@@ -405,7 +410,7 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Unit *target = NULL;
|
Unit *target = NULL;
|
||||||
if(Phase1 && (target = m_creature->SelectNearestTarget(5)))
|
if(Phase1 && target && (target = m_creature->SelectNearestTarget(5)))
|
||||||
m_creature->AI()->AttackStart(target);
|
m_creature->AI()->AttackStart(target);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -384,6 +384,7 @@ struct TRINITY_DLL_DECL boss_high_astromancer_solarianAI : public ScriptedAI
|
|||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_VOIDWALKER);
|
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID, MODEL_VOIDWALKER);
|
||||||
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
|
m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize*2.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -258,6 +258,8 @@ struct TRINITY_DLL_DECL advisorbase_ai : public ScriptedAI
|
|||||||
if (!Target)
|
if (!Target)
|
||||||
Target = m_creature->getVictim();
|
Target = m_creature->getVictim();
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
|
if(!Target)
|
||||||
|
return;
|
||||||
AttackStart(Target);
|
AttackStart(Target);
|
||||||
m_creature->GetMotionMaster()->Clear();
|
m_creature->GetMotionMaster()->Clear();
|
||||||
m_creature->GetMotionMaster()->MoveChase(Target);
|
m_creature->GetMotionMaster()->MoveChase(Target);
|
||||||
@@ -436,6 +438,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
summoned->setFaction(m_creature->getFaction());
|
summoned->setFaction(m_creature->getFaction());
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(target)
|
||||||
summoned->AI()->AttackStart(target);
|
summoned->AI()->AttackStart(target);
|
||||||
}
|
}
|
||||||
summons.Summon(summoned);
|
summons.Summon(summoned);
|
||||||
@@ -730,7 +733,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[i]));
|
Advisor = (Unit::GetCreature((*m_creature), AdvisorGuid[i]));
|
||||||
if (!Advisor)
|
if (!Advisor)
|
||||||
error_log("TSCR: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
error_log("TSCR: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
||||||
else ((advisorbase_ai*)Advisor->AI())->Revive(Target);
|
else if(Target)
|
||||||
|
((advisorbase_ai*)Advisor->AI())->Revive(Target);
|
||||||
}
|
}
|
||||||
|
|
||||||
PhaseSubphase = 1;
|
PhaseSubphase = 1;
|
||||||
@@ -815,6 +819,7 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
Unit* target =SelectUnit(SELECT_TARGET_RANDOM, 1, 70, true);
|
Unit* target =SelectUnit(SELECT_TARGET_RANDOM, 1, 70, true);
|
||||||
if(!target) target = m_creature->getVictim();
|
if(!target) target = m_creature->getVictim();
|
||||||
debug_log("TSCR: Kael'Thas mind control not supported.");
|
debug_log("TSCR: Kael'Thas mind control not supported.");
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_MIND_CONTROL);
|
DoCast(target, SPELL_MIND_CONTROL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1078,8 +1083,11 @@ struct TRINITY_DLL_DECL boss_thaladred_the_darkenerAI : public advisorbase_ai
|
|||||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true))
|
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
{
|
{
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
|
if(target)
|
||||||
|
{
|
||||||
m_creature->AddThreat(target, 5000000.0f);
|
m_creature->AddThreat(target, 5000000.0f);
|
||||||
DoScriptText(EMOTE_THALADRED_GAZE, m_creature, target);
|
DoScriptText(EMOTE_THALADRED_GAZE, m_creature, target);
|
||||||
|
}
|
||||||
Gaze_Timer = 8500;
|
Gaze_Timer = 8500;
|
||||||
}
|
}
|
||||||
}else Gaze_Timer -= diff;
|
}else Gaze_Timer -= diff;
|
||||||
|
|||||||
-2
@@ -100,7 +100,6 @@ struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim() )
|
if (!UpdateVictim() )
|
||||||
return;
|
return;
|
||||||
@@ -151,7 +150,6 @@ struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI
|
|||||||
}else solarburn_Timer -= diff;
|
}else solarburn_Timer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
-2
@@ -216,7 +216,6 @@ struct TRINITY_DLL_DECL mob_nether_wraithAI : public ScriptedAI
|
|||||||
DoCast(m_creature,SPELL_DETONATION);
|
DoCast(m_creature,SPELL_DETONATION);
|
||||||
Detonation = true;
|
Detonation = true;
|
||||||
}else Detonation_Timer -= diff;
|
}else Detonation_Timer -= diff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Detonation)
|
if (Detonation)
|
||||||
@@ -228,7 +227,6 @@ struct TRINITY_DLL_DECL mob_nether_wraithAI : public ScriptedAI
|
|||||||
}else Die_Timer -= diff;
|
}else Die_Timer -= diff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,7 @@ struct TRINITY_DLL_DECL boss_yaujAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
Creature* Summoned = m_creature->SummonCreature(15621,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,90000);
|
Creature* Summoned = m_creature->SummonCreature(15621,m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,90000);
|
||||||
if(Summoned)
|
if(Summoned && target)
|
||||||
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
((CreatureAI*)Summoned->AI())->AttackStart(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ struct TRINITY_DLL_DECL boss_fankrissAI : public ScriptedAI
|
|||||||
|
|
||||||
void SummonSpawn(Unit* victim)
|
void SummonSpawn(Unit* victim)
|
||||||
{
|
{
|
||||||
|
if(!victim)
|
||||||
|
return;
|
||||||
|
|
||||||
Rand = 10 + (rand()%10);
|
Rand = 10 + (rand()%10);
|
||||||
switch (rand()%2)
|
switch (rand()%2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ struct TRINITY_DLL_DECL boss_ouroAI : public ScriptedAI
|
|||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
|
||||||
|
if(target)
|
||||||
DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
DoTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||||
|
|
||||||
ChangeTarget_Timer = 10000 + rand()%10000;
|
ChangeTarget_Timer = 10000 + rand()%10000;
|
||||||
|
|||||||
@@ -169,7 +169,6 @@ struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI
|
struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_sartura_royal_guardAI(Creature *c) : ScriptedAI(c) {}
|
mob_sartura_royal_guardAI(Creature *c) : ScriptedAI(c) {}
|
||||||
@@ -195,7 +194,6 @@ struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI
|
|||||||
|
|
||||||
WhirlWind = false;
|
WhirlWind = false;
|
||||||
AggroReset = false;
|
AggroReset = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who)
|
void EnterCombat(Unit *who)
|
||||||
|
|||||||
@@ -265,8 +265,11 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
m_creature->clearUnitState(UNIT_STAT_STUNNED);
|
m_creature->clearUnitState(UNIT_STAT_STUNNED);
|
||||||
Unit *nearu = m_creature->SelectNearestTarget(100);
|
Unit *nearu = m_creature->SelectNearestTarget(100);
|
||||||
//DoYell(nearu->GetName(), LANG_UNIVERSAL, 0);
|
//DoYell(nearu->GetName(), LANG_UNIVERSAL, 0);
|
||||||
|
if(nearu)
|
||||||
|
{
|
||||||
AttackStart(nearu);
|
AttackStart(nearu);
|
||||||
m_creature->getThreatManager().addThreat(nearu, 10000);
|
m_creature->getThreatManager().addThreat(nearu, 10000);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -345,7 +348,7 @@ struct TRINITY_DLL_DECL boss_twinemperorsAI : public ScriptedAI
|
|||||||
for(std::list<Creature*>::iterator iter = unitList.begin(); iter != unitList.end(); ++iter)
|
for(std::list<Creature*>::iterator iter = unitList.begin(); iter != unitList.end(); ++iter)
|
||||||
{
|
{
|
||||||
Creature *c = (Creature *)(*iter);
|
Creature *c = (Creature *)(*iter);
|
||||||
if (c->isDead())
|
if (c && c->isDead())
|
||||||
{
|
{
|
||||||
c->Respawn();
|
c->Respawn();
|
||||||
c->setFaction(7);
|
c->setFaction(7);
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ struct TRINITY_DLL_DECL mob_unkor_the_ruthlessAI : public ScriptedAI
|
|||||||
if( UnkorUnfriendly_Timer < diff )
|
if( UnkorUnfriendly_Timer < diff )
|
||||||
{
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
}else UnkorUnfriendly_Timer -= diff;
|
}else UnkorUnfriendly_Timer -= diff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
|||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
if(!pInstance)
|
||||||
|
return;
|
||||||
// we're still doing awaken animation
|
// we're still doing awaken animation
|
||||||
if (wakingUp && Awaken_Timer >= 0) {
|
if (wakingUp && Awaken_Timer >= 0) {
|
||||||
Awaken_Timer -= diff;
|
Awaken_Timer -= diff;
|
||||||
@@ -180,9 +182,12 @@ struct TRINITY_DLL_DECL boss_archaedasAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
void JustDied (Unit *killer) {
|
void JustDied (Unit *killer) {
|
||||||
|
if(pInstance)
|
||||||
|
{
|
||||||
pInstance->SetData(NULL,3); // open the vault door
|
pInstance->SetData(NULL,3); // open the vault door
|
||||||
pInstance->SetData(NULL,4); // deactivate his minions
|
pInstance->SetData(NULL,4); // deactivate his minions
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -389,6 +394,7 @@ struct TRINITY_DLL_DECL mob_stonekeepersAI : public ScriptedAI
|
|||||||
void DamageTaken (Unit *attacker, uint32 &damage) {
|
void DamageTaken (Unit *attacker, uint32 &damage) {
|
||||||
if (damage > m_creature->GetHealth()) {
|
if (damage > m_creature->GetHealth()) {
|
||||||
DoCast (m_creature, SPELL_SELF_DESTRUCT,true);
|
DoCast (m_creature, SPELL_SELF_DESTRUCT,true);
|
||||||
|
if(pInstance)
|
||||||
pInstance->SetData(NULL, 1); // activate next stonekeeper
|
pInstance->SetData(NULL, 1); // activate next stonekeeper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,10 @@ struct TRINITY_DLL_DECL boss_hexlord_addAI : public ScriptedAI
|
|||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
if(pInstance && pInstance->GetData(DATA_HEXLORDEVENT) != IN_PROGRESS)
|
if(pInstance && pInstance->GetData(DATA_HEXLORDEVENT) != IN_PROGRESS)
|
||||||
|
{
|
||||||
EnterEvadeMode();
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
@@ -382,7 +385,11 @@ struct TRINITY_DLL_DECL boss_hex_lord_malacrassAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 70, true);
|
||||||
Unit *trigger = DoSpawnCreature(MOB_TEMP_TRIGGER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
Unit *trigger = DoSpawnCreature(MOB_TEMP_TRIGGER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 30000);
|
||||||
if(!target || !trigger) EnterEvadeMode();
|
if(!target || !trigger)
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
trigger->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
trigger->SetUInt32Value(UNIT_FIELD_DISPLAYID, 11686);
|
||||||
|
|||||||
@@ -407,6 +407,7 @@ struct TRINITY_DLL_DECL boss_nalorakkAI : public ScriptedAI
|
|||||||
DoYell(YELL_SURGE, LANG_UNIVERSAL, NULL);
|
DoYell(YELL_SURGE, LANG_UNIVERSAL, NULL);
|
||||||
DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE);
|
DoPlaySoundToSet(m_creature, SOUND_YELL_SURGE);
|
||||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_SURGE), true);
|
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 1, GetSpellMaxRangeForHostile(SPELL_SURGE), true);
|
||||||
|
if(target)
|
||||||
DoCast(target, SPELL_SURGE);
|
DoCast(target, SPELL_SURGE);
|
||||||
Surge_Timer = 15000 + rand()%5000;
|
Surge_Timer = 15000 + rand()%5000;
|
||||||
}else Surge_Timer -= diff;
|
}else Surge_Timer -= diff;
|
||||||
|
|||||||
@@ -487,7 +487,12 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
|||||||
else
|
else
|
||||||
Claw_Loop_Timer = 500;
|
Claw_Loop_Timer = 500;
|
||||||
}
|
}
|
||||||
}else EnterEvadeMode(); // if(target)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode(); // if(target)
|
||||||
|
return;
|
||||||
|
}
|
||||||
}else Claw_Loop_Timer -= diff;
|
}else Claw_Loop_Timer -= diff;
|
||||||
} //if(TankGUID)
|
} //if(TankGUID)
|
||||||
}else Claw_Rage_Timer -= diff;
|
}else Claw_Rage_Timer -= diff;
|
||||||
@@ -529,7 +534,12 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
|||||||
else
|
else
|
||||||
AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
|
||||||
}
|
}
|
||||||
}else EnterEvadeMode(); // if(target)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EnterEvadeMode(); // if(target)
|
||||||
|
return;
|
||||||
|
}
|
||||||
} //if(TankGUID)
|
} //if(TankGUID)
|
||||||
}else Lynx_Rush_Timer -= diff;
|
}else Lynx_Rush_Timer -= diff;
|
||||||
|
|
||||||
|
|||||||
@@ -125,13 +125,13 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_FEAST_PANTHER, m_creature, markedTarget);
|
DoScriptText(SAY_FEAST_PANTHER, m_creature, markedTarget);
|
||||||
Panther ->AI()->AttackStart(markedTarget);
|
Panther ->AI()->AttackStart(markedTarget);
|
||||||
}else Panther ->AI()->AttackStart(target);
|
}else if(Panther && target) Panther ->AI()->AttackStart(target);
|
||||||
|
|
||||||
Panther = m_creature->SummonCreature(15101,-11532.9970,-1606.4840,41.2979,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Panther = m_creature->SummonCreature(15101,-11532.9970,-1606.4840,41.2979,0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
|
|
||||||
if(markedTarget && Panther )
|
if(markedTarget && Panther )
|
||||||
Panther ->AI()->AttackStart(markedTarget);
|
Panther ->AI()->AttackStart(markedTarget);
|
||||||
else
|
else if(Panther && target)
|
||||||
Panther ->AI()->AttackStart(target);
|
Panther ->AI()->AttackStart(target);
|
||||||
|
|
||||||
Counter++;
|
Counter++;
|
||||||
@@ -164,6 +164,7 @@ struct TRINITY_DLL_DECL boss_arlokkAI : public ScriptedAI
|
|||||||
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 35)));
|
||||||
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 35)));
|
||||||
m_creature->UpdateDamagePhysical(BASE_ATTACK);
|
m_creature->UpdateDamagePhysical(BASE_ATTACK);
|
||||||
|
if(target)
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
//The Panther Model
|
//The Panther Model
|
||||||
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15215);
|
m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,15215);
|
||||||
|
|||||||
@@ -75,7 +75,11 @@ struct TRINITY_DLL_DECL boss_hazzarahAI : public ScriptedAI
|
|||||||
for(int i = 0; i < 3;i++)
|
for(int i = 0; i < 3;i++)
|
||||||
{
|
{
|
||||||
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(!target)
|
||||||
|
return;
|
||||||
|
|
||||||
Illusion = m_creature->SummonCreature(15163,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
Illusion = m_creature->SummonCreature(15163,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,30000);
|
||||||
|
if(Illusion)
|
||||||
((CreatureAI*)Illusion->AI())->AttackStart(target);
|
((CreatureAI*)Illusion->AI())->AttackStart(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,13 +184,12 @@ struct TRINITY_DLL_DECL boss_jeklikAI : public ScriptedAI
|
|||||||
if(SpawnFlyingBats_Timer < diff)
|
if(SpawnFlyingBats_Timer < diff)
|
||||||
{
|
{
|
||||||
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||||
|
if(!target)
|
||||||
|
return;
|
||||||
|
|
||||||
Creature* FlyingBat = m_creature->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Creature* FlyingBat = m_creature->SummonCreature(14965, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ()+15, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if(FlyingBat)
|
if(FlyingBat)
|
||||||
{
|
|
||||||
if(target)
|
|
||||||
FlyingBat->AI()->AttackStart(target);
|
FlyingBat->AI()->AttackStart(target);
|
||||||
}
|
|
||||||
|
|
||||||
SpawnFlyingBats_Timer = 10000 + rand()%5000;
|
SpawnFlyingBats_Timer = 10000 + rand()%5000;
|
||||||
}else SpawnFlyingBats_Timer -=diff;
|
}else SpawnFlyingBats_Timer -=diff;
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ struct TRINITY_DLL_DECL mob_healing_wardAI : public ScriptedAI
|
|||||||
if(pInstance)
|
if(pInstance)
|
||||||
{
|
{
|
||||||
Unit *pJindo = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_JINDO));
|
Unit *pJindo = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_JINDO));
|
||||||
|
if(pJindo)
|
||||||
DoCast(pJindo, SPELL_HEAL);
|
DoCast(pJindo, SPELL_HEAL);
|
||||||
}
|
}
|
||||||
Heal_Timer = 3000;
|
Heal_Timer = 3000;
|
||||||
|
|||||||
@@ -112,15 +112,21 @@ struct TRINITY_DLL_DECL boss_marliAI : public ScriptedAI
|
|||||||
DoScriptText(SAY_SPIDER_SPAWN, m_creature);
|
DoScriptText(SAY_SPIDER_SPAWN, m_creature);
|
||||||
|
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(!target)
|
||||||
|
return;
|
||||||
|
|
||||||
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if(target && Spider ) Spider ->AI()->AttackStart(target);
|
if(Spider)
|
||||||
|
Spider->AI()->AttackStart(target);
|
||||||
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if(target && Spider ) Spider ->AI()->AttackStart(target);
|
if(Spider)
|
||||||
|
Spider->AI()->AttackStart(target);
|
||||||
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if(target && Spider ) Spider ->AI()->AttackStart(target);
|
if(Spider)
|
||||||
|
Spider->AI()->AttackStart(target);
|
||||||
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if(target && Spider ) Spider ->AI()->AttackStart(target);
|
if(Spider)
|
||||||
|
Spider->AI()->AttackStart(target);
|
||||||
|
|
||||||
Spawned = true;
|
Spawned = true;
|
||||||
}else SpawnStartSpiders_Timer -= diff;
|
}else SpawnStartSpiders_Timer -= diff;
|
||||||
@@ -128,9 +134,11 @@ struct TRINITY_DLL_DECL boss_marliAI : public ScriptedAI
|
|||||||
if (SpawnSpider_Timer < diff)
|
if (SpawnSpider_Timer < diff)
|
||||||
{
|
{
|
||||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0);
|
||||||
|
if(!target)
|
||||||
|
return;
|
||||||
|
|
||||||
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
Spider = m_creature->SummonCreature(15041,target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(),0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||||
if (target && Spider )
|
if(Spider)
|
||||||
Spider->AI()->AttackStart(target);
|
Spider->AI()->AttackStart(target);
|
||||||
SpawnSpider_Timer = 12000 + rand()%5000;
|
SpawnSpider_Timer = 12000 + rand()%5000;
|
||||||
}else SpawnSpider_Timer -= diff;
|
}else SpawnSpider_Timer -= diff;
|
||||||
|
|||||||
@@ -118,22 +118,28 @@ struct TRINITY_DLL_DECL boss_thekalAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
//Resurrect LorKhan
|
//Resurrect LorKhan
|
||||||
Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN));
|
Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN));
|
||||||
pLorKhan->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pLorKhan)
|
||||||
|
{
|
||||||
|
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pLorKhan->setFaction(14);
|
pLorKhan->setFaction(14);
|
||||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0));
|
pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(pInstance->GetData(DATA_ZATHISDEAD))
|
if(pInstance->GetData(DATA_ZATHISDEAD))
|
||||||
{
|
{
|
||||||
//Resurrect Zath
|
//Resurrect Zath
|
||||||
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
||||||
pZath->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pZath)
|
||||||
|
{
|
||||||
|
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pZath->setFaction(14);
|
pZath->setFaction(14);
|
||||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pZath->SetHealth(int(pZath->GetMaxHealth()*1.0));
|
pZath->SetHealth(int(pZath->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
}else Check_Timer -= diff;
|
}else Check_Timer -= diff;
|
||||||
@@ -296,6 +302,9 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI
|
|||||||
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
||||||
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
||||||
|
|
||||||
|
if(!pThekal || !pZath)
|
||||||
|
return;
|
||||||
|
|
||||||
switch(rand()%2)
|
switch(rand()%2)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -328,22 +337,28 @@ struct TRINITY_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
//Resurrect Thekal
|
//Resurrect Thekal
|
||||||
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
||||||
pThekal->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pThekal)
|
||||||
|
{
|
||||||
|
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pThekal->setFaction(14);
|
pThekal->setFaction(14);
|
||||||
pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0));
|
pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(pInstance->GetData(DATA_ZATHISDEAD))
|
if(pInstance->GetData(DATA_ZATHISDEAD))
|
||||||
{
|
{
|
||||||
//Resurrect Zath
|
//Resurrect Zath
|
||||||
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
Unit *pZath = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_ZATH));
|
||||||
pZath->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pZath)
|
||||||
|
{
|
||||||
|
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pZath->setFaction(14);
|
pZath->setFaction(14);
|
||||||
pZath->SetHealth(int(pZath->GetMaxHealth()*1.0));
|
pZath->SetHealth(int(pZath->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
}else Check_Timer -= diff;
|
}else Check_Timer -= diff;
|
||||||
@@ -459,22 +474,28 @@ struct TRINITY_DLL_DECL mob_zealot_zathAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
//Resurrect LorKhan
|
//Resurrect LorKhan
|
||||||
Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN));
|
Unit *pLorKhan = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_LORKHAN));
|
||||||
pLorKhan->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pLorKhan)
|
||||||
|
{
|
||||||
|
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pLorKhan->setFaction(14);
|
pLorKhan->setFaction(14);
|
||||||
pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0));
|
pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(pInstance->GetData(DATA_THEKALISFAKEDEAD))
|
if(pInstance->GetData(DATA_THEKALISFAKEDEAD))
|
||||||
{
|
{
|
||||||
//Resurrect Thekal
|
//Resurrect Thekal
|
||||||
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
Unit *pThekal = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_THEKAL));
|
||||||
pThekal->SetStandState(UNIT_STAND_STATE_STAND);
|
if(pThekal)
|
||||||
|
{
|
||||||
|
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
|
||||||
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
pThekal->setFaction(14);
|
pThekal->setFaction(14);
|
||||||
pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0));
|
pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Check_Timer = 5000;
|
Check_Timer = 5000;
|
||||||
}else Check_Timer -= diff;
|
}else Check_Timer -= diff;
|
||||||
|
|||||||
@@ -503,14 +503,25 @@ static void addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *config, World
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32 bids = config->GetBidsPerInterval();
|
||||||
|
for (uint32 count = 1;count <= bids;count++)
|
||||||
|
{
|
||||||
|
|
||||||
// Do we have anything to bid? If not, stop here.
|
// Do we have anything to bid? If not, stop here.
|
||||||
if(possibleBids.empty())
|
if(possibleBids.empty())
|
||||||
{
|
{
|
||||||
|
count = bids + 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Choose random auction from possible auctions
|
// Choose random auction from possible auctions
|
||||||
uint32 auctionID = possibleBids[urand(0, possibleBids.size() - 1)];
|
uint32 vectorPos = urand(0, possibleBids.size() - 1);
|
||||||
|
uint32 auctionID = possibleBids[vectorPos];
|
||||||
|
|
||||||
|
// Erase the auction from the vector to prevent bidding on item in next itteration.
|
||||||
|
vector<uint32>::iterator iter = possibleBids.begin();
|
||||||
|
advance(iter, vectorPos);
|
||||||
|
possibleBids.erase(iter);
|
||||||
|
|
||||||
// from auctionhousehandler.cpp, creates auction pointer & player pointer
|
// from auctionhousehandler.cpp, creates auction pointer & player pointer
|
||||||
AuctionEntry* auction = auctionHouse->GetAuction(auctionID);
|
AuctionEntry* auction = auctionHouse->GetAuction(auctionID);
|
||||||
@@ -758,7 +769,7 @@ static void addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *config, World
|
|||||||
auctionHouse->RemoveAuction(auction->Id);
|
auctionHouse->RemoveAuction(auction->Id);
|
||||||
// Remove from database
|
// Remove from database
|
||||||
auction->DeleteFromDB();
|
auction->DeleteFromDB();
|
||||||
|
}
|
||||||
delete auction;
|
delete auction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -780,35 +791,23 @@ void AuctionHouseBot()
|
|||||||
{
|
{
|
||||||
addNewAuctions(&_AHBplayer, &AllianceConfig);
|
addNewAuctions(&_AHBplayer, &AllianceConfig);
|
||||||
if (((_newrun - _lastrun_a) > (AllianceConfig.GetBiddingInterval() * 60)) && (AllianceConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_a) > (AllianceConfig.GetBiddingInterval() * 60)) && (AllianceConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
|
||||||
uint32 bids = AllianceConfig.GetBidsPerInterval();
|
|
||||||
for (uint32 count = 1;count <= bids;count++)
|
|
||||||
{
|
{
|
||||||
addNewAuctionBuyerBotBid(&_AHBplayer, &AllianceConfig, &_session);
|
addNewAuctionBuyerBotBid(&_AHBplayer, &AllianceConfig, &_session);
|
||||||
_lastrun_a = _newrun;
|
_lastrun_a = _newrun;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
addNewAuctions(&_AHBplayer, &HordeConfig);
|
addNewAuctions(&_AHBplayer, &HordeConfig);
|
||||||
if (((_newrun - _lastrun_h) > (HordeConfig.GetBiddingInterval() *60)) && (HordeConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_h) > (HordeConfig.GetBiddingInterval() *60)) && (HordeConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
|
||||||
uint32 bids = HordeConfig.GetBidsPerInterval();
|
|
||||||
for (uint32 count = 1;count <= bids;count++)
|
|
||||||
{
|
{
|
||||||
addNewAuctionBuyerBotBid(&_AHBplayer, &HordeConfig, &_session);
|
addNewAuctionBuyerBotBid(&_AHBplayer, &HordeConfig, &_session);
|
||||||
_lastrun_h = _newrun;
|
_lastrun_h = _newrun;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
addNewAuctions(&_AHBplayer, &NeutralConfig);
|
addNewAuctions(&_AHBplayer, &NeutralConfig);
|
||||||
if (((_newrun - _lastrun_n) > (NeutralConfig.GetBiddingInterval() * 60)) && (NeutralConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_n) > (NeutralConfig.GetBiddingInterval() * 60)) && (NeutralConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
|
||||||
uint32 bids = NeutralConfig.GetBidsPerInterval();
|
|
||||||
for (uint32 count = 1;count <= bids;count++)
|
|
||||||
{
|
{
|
||||||
addNewAuctionBuyerBotBid(&_AHBplayer, &NeutralConfig, &_session);
|
addNewAuctionBuyerBotBid(&_AHBplayer, &NeutralConfig, &_session);
|
||||||
_lastrun_n = _newrun;
|
_lastrun_n = _newrun;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ObjectAccessor::Instance().RemoveObject(&_AHBplayer);
|
ObjectAccessor::Instance().RemoveObject(&_AHBplayer);
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void WorldSession::HandleAttackSwingOpcode( WorldPacket & recv_data )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_player->IsFriendlyTo(pEnemy) || pEnemy->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))
|
if(!_player->canAttack(pEnemy))
|
||||||
{
|
{
|
||||||
sLog.outError( "WORLD: Enemy %s %u is friendly",(IS_PLAYER_GUID(guid) ? "player" : "creature"),GUID_LOPART(guid));
|
sLog.outError( "WORLD: Enemy %s %u is friendly",(IS_PLAYER_GUID(guid) ? "player" : "creature"),GUID_LOPART(guid));
|
||||||
|
|
||||||
@@ -58,14 +58,6 @@ void WorldSession::HandleAttackSwingOpcode( WorldPacket & recv_data )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pEnemy->isAlive())
|
|
||||||
{
|
|
||||||
// client can generate swing to known dead target if autoswitch between autoshot and autohit is enabled in client options
|
|
||||||
// stop attack state at client
|
|
||||||
SendAttackStop(pEnemy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_player->Attack(pEnemy,true);
|
_player->Attack(pEnemy,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+25
-15
@@ -71,26 +71,36 @@ void CreatureAI::OnCharmed(bool apply)
|
|||||||
me->IsAIEnabled = false;
|
me->IsAIEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreatureAI::DoZoneInCombat(Creature* pUnit)
|
void CreatureAI::DoZoneInCombat(Creature* creature)
|
||||||
{
|
{
|
||||||
if (!pUnit)
|
if (!creature)
|
||||||
pUnit = me;
|
creature = me;
|
||||||
|
|
||||||
Map *map = pUnit->GetMap();
|
|
||||||
|
|
||||||
|
Map *map = creature->GetMap();
|
||||||
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
|
if (!map->IsDungeon()) //use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
|
||||||
{
|
{
|
||||||
sLog.outError("DoZoneInCombat call for map that isn't an instance (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0);
|
sLog.outError("DoZoneInCombat call for map that isn't an instance (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? ((Creature*)creature)->GetEntry() : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!pUnit->getVictim())
|
if(!creature->getVictim())
|
||||||
if(Unit *target = pUnit->SelectNearestTarget())
|
|
||||||
AttackStart(target);
|
|
||||||
|
|
||||||
if (!pUnit->CanHaveThreatList() || pUnit->getThreatManager().isThreatListEmpty())
|
|
||||||
{
|
{
|
||||||
sLog.outError("DoZoneInCombat called for creature that either cannot have threat list or has empty threat list (pUnit entry = %d)", pUnit->GetTypeId() == TYPEID_UNIT ? ((Creature*)pUnit)->GetEntry() : 0);
|
if(Unit *target = creature->SelectNearestTarget())
|
||||||
|
AttackStart(target);
|
||||||
|
else if(creature->isSummon())
|
||||||
|
{
|
||||||
|
if(Unit *summoner = ((TempSummon*)creature)->GetSummoner())
|
||||||
|
{
|
||||||
|
if(summoner->getVictim()
|
||||||
|
&& (creature->IsFriendlyTo(summoner) || creature->IsHostileTo(summoner->getVictim())))
|
||||||
|
AttackStart(summoner->getVictim());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!creature->CanHaveThreatList() || creature->getThreatManager().isThreatListEmpty())
|
||||||
|
{
|
||||||
|
sLog.outError("DoZoneInCombat called for creature that either cannot have threat list or has empty threat list (creature entry = %d)", creature->GetTypeId() == TYPEID_UNIT ? ((Creature*)creature)->GetEntry() : 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,9 +110,9 @@ void CreatureAI::DoZoneInCombat(Creature* pUnit)
|
|||||||
if (Player* i_pl = i->getSource())
|
if (Player* i_pl = i->getSource())
|
||||||
if (i_pl->isAlive())
|
if (i_pl->isAlive())
|
||||||
{
|
{
|
||||||
pUnit->SetInCombatWith(i_pl);
|
creature->SetInCombatWith(i_pl);
|
||||||
i_pl->SetInCombatWith(pUnit);
|
i_pl->SetInCombatWith(creature);
|
||||||
pUnit->AddThreat(i_pl, 0.0f);
|
creature->AddThreat(i_pl, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ bool DynamicObject::Create( uint32 guidlow, Unit *caster, uint32 spellId, uint32
|
|||||||
SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() );
|
SetUInt64Value( DYNAMICOBJECT_CASTER, caster->GetGUID() );
|
||||||
SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 );
|
SetUInt32Value( DYNAMICOBJECT_BYTES, 0x00000001 );
|
||||||
SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId );
|
SetUInt32Value( DYNAMICOBJECT_SPELLID, spellId );
|
||||||
SetFloatValue( DYNAMICOBJECT_RADIUS, radius * 2); //diameter?
|
SetFloatValue( DYNAMICOBJECT_RADIUS, radius);
|
||||||
SetFloatValue( DYNAMICOBJECT_POS_X, x );
|
SetFloatValue( DYNAMICOBJECT_POS_X, x );
|
||||||
SetFloatValue( DYNAMICOBJECT_POS_Y, y );
|
SetFloatValue( DYNAMICOBJECT_POS_Y, y );
|
||||||
SetFloatValue( DYNAMICOBJECT_POS_Z, z );
|
SetFloatValue( DYNAMICOBJECT_POS_Z, z );
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||||||
|
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||||
uint32 eff_index = i_dynobject.GetEffIndex();
|
uint32 eff_index = i_dynobject.GetEffIndex();
|
||||||
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_CHANNEL
|
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_DEST_DYNOBJ_ALLY
|
||||||
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
|
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
|
||||||
{
|
{
|
||||||
if(!i_check->IsFriendlyTo(target))
|
if(!i_check->IsFriendlyTo(target))
|
||||||
|
|||||||
+10
-7
@@ -157,6 +157,7 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
|
|||||||
|
|
||||||
// reputation discount
|
// reputation discount
|
||||||
float fDiscountMod = _player->GetReputationPriceDiscount(unit);
|
float fDiscountMod = _player->GetReputationPriceDiscount(unit);
|
||||||
|
bool can_learn_primary_prof = GetPlayer()->GetFreePrimaryProffesionPoints() > 0;
|
||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
|
for(TrainerSpellMap::const_iterator itr = trainer_spells->spellList.begin(); itr != trainer_spells->spellList.end(); ++itr)
|
||||||
@@ -166,25 +167,27 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
|
|||||||
if(!_player->IsSpellFitByClassAndRace(tSpell->learnedSpell))
|
if(!_player->IsSpellFitByClassAndRace(tSpell->learnedSpell))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
++count;
|
|
||||||
|
|
||||||
bool primary_prof_first_rank = spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell);
|
bool primary_prof_first_rank = spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell);
|
||||||
|
|
||||||
SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->learnedSpell);
|
SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->learnedSpell);
|
||||||
uint32 req_spell = spellmgr.GetSpellRequired(tSpell->spell);
|
uint32 req_spell = spellmgr.GetSpellRequired(tSpell->spell);
|
||||||
|
TrainerSpellState state = _player->GetTrainerSpellState(tSpell);
|
||||||
|
|
||||||
data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case)
|
data << uint32(tSpell->spell); // learned spell (or cast-spell in profession case)
|
||||||
data << uint8(_player->GetTrainerSpellState(tSpell));
|
data << uint8(state==TRAINER_SPELL_GREEN_DISABLED ? TRAINER_SPELL_GREEN : state);
|
||||||
data << uint32(floor(tSpell->spellCost * fDiscountMod));
|
data << uint32(floor(tSpell->spellCost * fDiscountMod));
|
||||||
|
|
||||||
data << uint32(primary_prof_first_rank ? 1 : 0); // primary prof. learn confirmation dialog
|
data << uint32(primary_prof_first_rank && can_learn_primary_prof ? 1 : 0);
|
||||||
|
// primary prof. learn confirmation dialog
|
||||||
data << uint32(primary_prof_first_rank ? 1 : 0); // must be equal prev. field to have learn button in enabled state
|
data << uint32(primary_prof_first_rank ? 1 : 0); // must be equal prev. field to have learn button in enabled state
|
||||||
data << uint8(tSpell->reqLevel);
|
data << uint8(tSpell->reqLevel);
|
||||||
data << uint32(tSpell->reqSkill);
|
data << uint32(tSpell->reqSkill);
|
||||||
data << uint32(tSpell->reqSkillValue);
|
data << uint32(tSpell->reqSkillValue);
|
||||||
data << uint32(chain_node && chain_node->prev ? chain_node->prev : req_spell);
|
//prev + req or req + 0
|
||||||
data << uint32(chain_node && chain_node->prev ? req_spell : 0);
|
data << uint32(!tSpell->IsCastable() && chain_node && chain_node->prev ? chain_node->prev : req_spell);
|
||||||
|
data << uint32(!tSpell->IsCastable() && chain_node && chain_node->prev ? req_spell : 0);
|
||||||
data << uint32(0);
|
data << uint32(0);
|
||||||
|
|
||||||
|
++count;
|
||||||
}
|
}
|
||||||
|
|
||||||
data << strTitle;
|
data << strTitle;
|
||||||
|
|||||||
@@ -116,20 +116,20 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
|||||||
//TODO: Send proper error message to client
|
//TODO: Send proper error message to client
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// only place where pet can be player
|
// only place where pet can be player
|
||||||
pet->clearUnitState(UNIT_STAT_FOLLOW);
|
Unit *TargetUnit = ObjectAccessor::GetUnit(*_player, guid2);
|
||||||
const uint64& selguid = _player->GetSelection();
|
|
||||||
Unit *TargetUnit = ObjectAccessor::GetUnit(*_player, selguid);
|
|
||||||
if(!TargetUnit)
|
if(!TargetUnit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// not let attack friendly units.
|
if(!pet->canAttack(TargetUnit))
|
||||||
if(GetPlayer()->IsFriendlyTo(TargetUnit))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Not let attack through obstructions
|
// Not let attack through obstructions
|
||||||
//if(!pet->IsWithinLOSInMap(TargetUnit))
|
//if(!pet->IsWithinLOSInMap(TargetUnit))
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
|
pet->clearUnitState(UNIT_STAT_FOLLOW);
|
||||||
// This is true if pet has no target or has target but targets differs.
|
// This is true if pet has no target or has target but targets differs.
|
||||||
if(pet->getVictim() != TargetUnit)
|
if(pet->getVictim() != TargetUnit)
|
||||||
{
|
{
|
||||||
@@ -209,7 +209,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
|||||||
|
|
||||||
for(uint32 i = 0; i < 3;++i)
|
for(uint32 i = 0; i < 3;++i)
|
||||||
{
|
{
|
||||||
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED)
|
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_DYNOBJ_ENEMY)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -3785,7 +3785,7 @@ TrainerSpellState Player::GetTrainerSpellState(TrainerSpell const* trainer_spell
|
|||||||
|
|
||||||
// check primary prof. limit
|
// check primary prof. limit
|
||||||
if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProffesionPoints() == 0)
|
if(spellmgr.IsPrimaryProfessionFirstRankSpell(spell->Id) && GetFreePrimaryProffesionPoints() == 0)
|
||||||
return TRAINER_SPELL_RED;
|
return TRAINER_SPELL_GREEN_DISABLED;
|
||||||
|
|
||||||
return TRAINER_SPELL_GREEN;
|
return TRAINER_SPELL_GREEN;
|
||||||
}
|
}
|
||||||
@@ -11721,6 +11721,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!item->IsBroken())
|
if (!item->IsBroken())
|
||||||
|
{
|
||||||
for (int s=0; s<3; s++)
|
for (int s=0; s<3; s++)
|
||||||
{
|
{
|
||||||
uint32 enchant_display_type = pEnchant->type[s];
|
uint32 enchant_display_type = pEnchant->type[s];
|
||||||
@@ -12016,6 +12017,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
|||||||
break;
|
break;
|
||||||
} /*switch(enchant_display_type)*/
|
} /*switch(enchant_display_type)*/
|
||||||
} /*for*/
|
} /*for*/
|
||||||
|
}
|
||||||
|
|
||||||
// visualize enchantment at player and equipped items
|
// visualize enchantment at player and equipped items
|
||||||
if(slot < MAX_INSPECTED_ENCHANTMENT_SLOT)
|
if(slot < MAX_INSPECTED_ENCHANTMENT_SLOT)
|
||||||
|
|||||||
+2
-1
@@ -122,7 +122,8 @@ enum TrainerSpellState
|
|||||||
{
|
{
|
||||||
TRAINER_SPELL_GREEN = 0,
|
TRAINER_SPELL_GREEN = 0,
|
||||||
TRAINER_SPELL_RED = 1,
|
TRAINER_SPELL_RED = 1,
|
||||||
TRAINER_SPELL_GRAY = 2
|
TRAINER_SPELL_GRAY = 2,
|
||||||
|
TRAINER_SPELL_GREEN_DISABLED = 10 // custom value, not send to client: formally green but learn not allowed
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ActionButtonUpdateState
|
enum ActionButtonUpdateState
|
||||||
|
|||||||
@@ -1032,9 +1032,8 @@ enum Targets
|
|||||||
TARGET_GAMEOBJECT_ITEM = 26,
|
TARGET_GAMEOBJECT_ITEM = 26,
|
||||||
//TARGET_OBJECT_ITEM_PICKLOCK
|
//TARGET_OBJECT_ITEM_PICKLOCK
|
||||||
TARGET_UNIT_MASTER = 27,
|
TARGET_UNIT_MASTER = 27,
|
||||||
TARGET_ALL_ENEMY_IN_AREA_CHANNELED = 28,
|
TARGET_DEST_DYNOBJ_ENEMY = 28,
|
||||||
TARGET_UNIT_AREA_ENEMY_CHANNEL = 28,
|
TARGET_DEST_DYNOBJ_ALLY = 29, // only for effect 27
|
||||||
TARGET_UNIT_AREA_ALLY_CHANNEL = 29, // 28,29 only used for effect 27, if interrupt channel, pstAA cancel
|
|
||||||
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
|
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
|
||||||
TARGET_UNIT_AREA_ALLY = 30,
|
TARGET_UNIT_AREA_ALLY = 30,
|
||||||
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
|
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
|
||||||
|
|||||||
+28
-24
@@ -925,7 +925,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||||||
spellHitTarget = m_caster;
|
spellHitTarget = m_caster;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSpellHitOnUnit(spellHitTarget, mask);
|
if(spellHitTarget)
|
||||||
|
{
|
||||||
|
SpellMissInfo missInfo = DoSpellHitOnUnit(spellHitTarget, mask);
|
||||||
|
if(missInfo != SPELL_MISS_NONE)
|
||||||
|
{
|
||||||
|
m_caster->SendSpellMiss(unit, m_spellInfo->Id, missInfo);
|
||||||
|
m_damage = 0;
|
||||||
|
spellHitTarget = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Do not take combo points on dodge
|
// Do not take combo points on dodge
|
||||||
if (m_needComboPoints && m_targets.getUnitTargetGUID() == target->targetGUID)
|
if (m_needComboPoints && m_targets.getUnitTargetGUID() == target->targetGUID)
|
||||||
@@ -1034,19 +1043,17 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||||
{
|
{
|
||||||
if(!unit || !effectMask)
|
if(!unit || !effectMask)
|
||||||
return;
|
return SPELL_MISS_EVADE;
|
||||||
|
|
||||||
// Recheck immune (only for delayed spells)
|
// Recheck immune (only for delayed spells)
|
||||||
if( m_spellInfo->speed &&
|
if( m_spellInfo->speed &&
|
||||||
(unit->IsImmunedToDamage(m_spellInfo) ||
|
(unit->IsImmunedToDamage(m_spellInfo) ||
|
||||||
unit->IsImmunedToSpell(m_spellInfo)))
|
unit->IsImmunedToSpell(m_spellInfo)))
|
||||||
{
|
{
|
||||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
|
return SPELL_MISS_IMMUNE;
|
||||||
m_damage = 0;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit->GetTypeId() == TYPEID_PLAYER)
|
if (unit->GetTypeId() == TYPEID_PLAYER)
|
||||||
@@ -1067,9 +1074,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE) &&
|
unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE) &&
|
||||||
unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
|
unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
|
||||||
{
|
{
|
||||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
return SPELL_MISS_EVADE;
|
||||||
m_damage = 0;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_caster->IsFriendlyTo(unit) )
|
if( !m_caster->IsFriendlyTo(unit) )
|
||||||
@@ -1077,9 +1082,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
// for delayed spells ignore not visible explicit target
|
// for delayed spells ignore not visible explicit target
|
||||||
if(m_spellInfo->speed > 0.0f && unit==m_targets.getUnitTarget() && !unit->isVisibleForOrDetect(m_caster,false))
|
if(m_spellInfo->speed > 0.0f && unit==m_targets.getUnitTarget() && !unit->isVisibleForOrDetect(m_caster,false))
|
||||||
{
|
{
|
||||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
return SPELL_MISS_EVADE;
|
||||||
m_damage = 0;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
|
unit->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_HITBYSPELL);
|
||||||
@@ -1092,9 +1095,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
// TODO: this cause soul transfer bugged
|
// TODO: this cause soul transfer bugged
|
||||||
if(m_spellInfo->speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !IsPositiveSpell(m_spellInfo->Id))
|
if(m_spellInfo->speed > 0.0f && unit->GetTypeId() == TYPEID_PLAYER && !IsPositiveSpell(m_spellInfo->Id))
|
||||||
{
|
{
|
||||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
return SPELL_MISS_EVADE;
|
||||||
m_damage = 0;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// assisting case, healing and resurrection
|
// assisting case, healing and resurrection
|
||||||
@@ -1165,6 +1166,8 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||||||
if (unit->AddAura(Aur))
|
if (unit->AddAura(Aur))
|
||||||
m_spellAura = Aur;
|
m_spellAura = Aur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return SPELL_MISS_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::DoTriggersOnSpellHit(Unit *unit)
|
void Spell::DoTriggersOnSpellHit(Unit *unit)
|
||||||
@@ -1988,17 +1991,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cur == TARGET_DEST_DEST)
|
float angle;
|
||||||
break;
|
|
||||||
|
|
||||||
float x, y, z, angle, dist;
|
|
||||||
|
|
||||||
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
|
||||||
if (cur == TARGET_DEST_DEST_RANDOM)
|
|
||||||
dist *= rand_norm();
|
|
||||||
|
|
||||||
switch(cur)
|
switch(cur)
|
||||||
{
|
{
|
||||||
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
|
case TARGET_DEST_DYNOBJ_ALLY:
|
||||||
|
case TARGET_DEST_DEST:
|
||||||
|
return;
|
||||||
case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
|
case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
|
||||||
case TARGET_DEST_DEST_BACK: angle = M_PI; break;
|
case TARGET_DEST_DEST_BACK: angle = M_PI; break;
|
||||||
case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break;
|
case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break;
|
||||||
@@ -2010,6 +2009,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||||||
default: angle = rand_norm()*2*M_PI; break;
|
default: angle = rand_norm()*2*M_PI; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float dist, x, y, z;
|
||||||
|
dist = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
||||||
|
if (cur == TARGET_DEST_DEST_RANDOM)
|
||||||
|
dist *= rand_norm();
|
||||||
|
|
||||||
x = m_targets.m_destX;
|
x = m_targets.m_destX;
|
||||||
y = m_targets.m_destY;
|
y = m_targets.m_destY;
|
||||||
z = m_targets.m_destZ;
|
z = m_targets.m_destZ;
|
||||||
|
|||||||
+1
-1
@@ -588,7 +588,7 @@ class Spell
|
|||||||
void AddGOTarget(uint64 goGUID, uint32 effIndex);
|
void AddGOTarget(uint64 goGUID, uint32 effIndex);
|
||||||
void AddItemTarget(Item* target, uint32 effIndex);
|
void AddItemTarget(Item* target, uint32 effIndex);
|
||||||
void DoAllEffectOnTarget(TargetInfo *target);
|
void DoAllEffectOnTarget(TargetInfo *target);
|
||||||
void DoSpellHitOnUnit(Unit *unit, uint32 effectMask);
|
SpellMissInfo DoSpellHitOnUnit(Unit *unit, uint32 effectMask);
|
||||||
void DoTriggersOnSpellHit(Unit *unit);
|
void DoTriggersOnSpellHit(Unit *unit);
|
||||||
void DoAllEffectOnTarget(GOTargetInfo *target);
|
void DoAllEffectOnTarget(GOTargetInfo *target);
|
||||||
void DoAllEffectOnTarget(ItemTargetInfo *target);
|
void DoAllEffectOnTarget(ItemTargetInfo *target);
|
||||||
|
|||||||
@@ -372,7 +372,12 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
|||||||
if(!radius) return;
|
if(!radius) return;
|
||||||
float distance = m_caster->GetDistance2d(unitTarget);
|
float distance = m_caster->GetDistance2d(unitTarget);
|
||||||
damage = (distance > radius ) ? 0 : (int32)(m_spellInfo->EffectBasePoints[0]*((radius - distance)/radius));
|
damage = (distance > radius ) ? 0 : (int32)(m_spellInfo->EffectBasePoints[0]*((radius - distance)/radius));
|
||||||
}break;
|
break;
|
||||||
|
}
|
||||||
|
// Cataclysmic Bolt
|
||||||
|
case 38441:
|
||||||
|
damage = unitTarget->GetMaxHealth() / 2;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2753,7 +2758,6 @@ void Spell::EffectPersistentAA(uint32 i)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
|
dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65);
|
||||||
dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003);
|
|
||||||
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
|
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee);
|
||||||
caster->AddDynObject(dynObj);
|
caster->AddDynObject(dynObj);
|
||||||
dynObj->GetMap()->Add(dynObj);
|
dynObj->GetMap()->Add(dynObj);
|
||||||
|
|||||||
@@ -347,12 +347,8 @@ void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket)
|
|||||||
recvPacket >> counter;
|
recvPacket >> counter;
|
||||||
recvPacket >> spellId;
|
recvPacket >> spellId;
|
||||||
|
|
||||||
//FIXME: hack, ignore unexpected client cancel Deadly Throw cast
|
|
||||||
if(spellId==26679)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(_player->IsNonMeleeSpellCasted(false))
|
if(_player->IsNonMeleeSpellCasted(false))
|
||||||
_player->InterruptNonMeleeSpells(false,spellId);
|
_player->InterruptNonMeleeSpells(false,spellId,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
||||||
|
|||||||
@@ -119,8 +119,6 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_AREA_ENTRY:
|
case TARGET_UNIT_AREA_ENTRY:
|
||||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||||
case TARGET_UNIT_AREA_PARTY:
|
case TARGET_UNIT_AREA_PARTY:
|
||||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
|
||||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
|
||||||
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
|
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
|
||||||
break;
|
break;
|
||||||
case TARGET_DEST_TARGET_ENEMY:
|
case TARGET_DEST_TARGET_ENEMY:
|
||||||
@@ -153,6 +151,8 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_DEST_CASTER_RADIUS:
|
case TARGET_DEST_CASTER_RADIUS:
|
||||||
SpellTargetType[i] = TARGET_TYPE_DEST_CASTER;
|
SpellTargetType[i] = TARGET_TYPE_DEST_CASTER;
|
||||||
break;
|
break;
|
||||||
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
|
case TARGET_DEST_DYNOBJ_ALLY:
|
||||||
case TARGET_DEST_DEST:
|
case TARGET_DEST_DEST:
|
||||||
case TARGET_DEST_DEST_FRONT_LEFT:
|
case TARGET_DEST_DEST_FRONT_LEFT:
|
||||||
case TARGET_DEST_DEST_BACK_LEFT:
|
case TARGET_DEST_DEST_BACK_LEFT:
|
||||||
@@ -182,9 +182,6 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_AREA_ENTRY:
|
case TARGET_UNIT_AREA_ENTRY:
|
||||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||||
case TARGET_UNIT_AREA_PARTY:
|
case TARGET_UNIT_AREA_PARTY:
|
||||||
//Check persistant aura seperately
|
|
||||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
|
||||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
|
||||||
case TARGET_UNIT_PARTY_TARGET:
|
case TARGET_UNIT_PARTY_TARGET:
|
||||||
case TARGET_UNIT_PARTY_CASTER:
|
case TARGET_UNIT_PARTY_CASTER:
|
||||||
case TARGET_UNIT_CONE_ENEMY:
|
case TARGET_UNIT_CONE_ENEMY:
|
||||||
@@ -501,7 +498,7 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB)
|
|||||||
case TARGET_ALL_ENEMY_IN_AREA:
|
case TARGET_ALL_ENEMY_IN_AREA:
|
||||||
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
|
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
|
||||||
case TARGET_IN_FRONT_OF_CASTER:
|
case TARGET_IN_FRONT_OF_CASTER:
|
||||||
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
case TARGET_CURRENT_ENEMY_COORDINATES:
|
case TARGET_CURRENT_ENEMY_COORDINATES:
|
||||||
case TARGET_UNIT_CHANNEL:
|
case TARGET_UNIT_CHANNEL:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+29
-25
@@ -3394,12 +3394,14 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
|
|||||||
pSpell->SetReferencedFromCurrent(true);
|
pSpell->SetReferencedFromCurrent(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::InterruptSpell(uint32 spellType, bool withDelayed)
|
void Unit::InterruptSpell(uint32 spellType, bool withDelayed, bool withInstant)
|
||||||
{
|
{
|
||||||
assert(spellType < CURRENT_MAX_SPELL);
|
assert(spellType < CURRENT_MAX_SPELL);
|
||||||
|
|
||||||
Spell *spell = m_currentSpells[spellType];
|
Spell *spell = m_currentSpells[spellType];
|
||||||
if(spell && (withDelayed || spell->getState() != SPELL_STATE_DELAYED) )
|
if(spell
|
||||||
|
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
|
||||||
|
&& (withInstant || spell->GetCastTime() > 0))
|
||||||
{
|
{
|
||||||
// for example, do not let self-stun aura interrupt itself
|
// for example, do not let self-stun aura interrupt itself
|
||||||
if(!spell->IsInterruptable())
|
if(!spell->IsInterruptable())
|
||||||
@@ -3443,19 +3445,19 @@ bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skip
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::InterruptNonMeleeSpells(bool withDelayed, uint32 spell_id)
|
void Unit::InterruptNonMeleeSpells(bool withDelayed, uint32 spell_id, bool withInstant)
|
||||||
{
|
{
|
||||||
// generic spells are interrupted if they are not finished or delayed
|
// generic spells are interrupted if they are not finished or delayed
|
||||||
if (m_currentSpells[CURRENT_GENERIC_SPELL] && (!spell_id || m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id==spell_id))
|
if (m_currentSpells[CURRENT_GENERIC_SPELL] && (!spell_id || m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->Id==spell_id))
|
||||||
InterruptSpell(CURRENT_GENERIC_SPELL,withDelayed);
|
InterruptSpell(CURRENT_GENERIC_SPELL,withDelayed,withInstant);
|
||||||
|
|
||||||
// autorepeat spells are interrupted if they are not finished or delayed
|
// autorepeat spells are interrupted if they are not finished or delayed
|
||||||
if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && (!spell_id || m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id==spell_id))
|
if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL] && (!spell_id || m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id==spell_id))
|
||||||
InterruptSpell(CURRENT_AUTOREPEAT_SPELL,withDelayed);
|
InterruptSpell(CURRENT_AUTOREPEAT_SPELL,withDelayed,withInstant);
|
||||||
|
|
||||||
// channeled spells are interrupted if they are not finished, even if they are delayed
|
// channeled spells are interrupted if they are not finished, even if they are delayed
|
||||||
if (m_currentSpells[CURRENT_CHANNELED_SPELL] && (!spell_id || m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->Id==spell_id))
|
if (m_currentSpells[CURRENT_CHANNELED_SPELL] && (!spell_id || m_currentSpells[CURRENT_CHANNELED_SPELL]->m_spellInfo->Id==spell_id))
|
||||||
InterruptSpell(CURRENT_CHANNELED_SPELL,true);
|
InterruptSpell(CURRENT_CHANNELED_SPELL,true,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Spell* Unit::FindCurrentSpellBySpellId(uint32 spell_id) const
|
Spell* Unit::FindCurrentSpellBySpellId(uint32 spell_id) const
|
||||||
@@ -3484,10 +3486,9 @@ bool Unit::isInBack(Unit const* target, float distance, float arc) const
|
|||||||
bool Unit::isInLine(Unit const* target, float distance) const
|
bool Unit::isInLine(Unit const* target, float distance) const
|
||||||
{
|
{
|
||||||
if(!HasInArc(M_PI, target) || !IsWithinDistInMap(target, distance)) return false;
|
if(!HasInArc(M_PI, target) || !IsWithinDistInMap(target, distance)) return false;
|
||||||
float width = (GetObjectSize() / 2 + target->GetObjectSize()) / 2;
|
float width = GetObjectSize() + target->GetObjectSize() * 0.5f;
|
||||||
float angle = GetAngle(target);
|
float angle = GetAngle(target) - GetOrientation();
|
||||||
angle -= GetOrientation();
|
return abs(sin(angle)) * GetExactDistance2d(target->GetPositionX(), target->GetPositionY()) < width;
|
||||||
return abs(sin(angle)) * distance < width;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||||
@@ -9336,10 +9337,13 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask)
|
|||||||
|
|
||||||
bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
|
bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
|
if(spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
||||||
|
return false;
|
||||||
|
|
||||||
uint32 shoolMask = GetSpellSchoolMask(spellInfo);
|
uint32 shoolMask = GetSpellSchoolMask(spellInfo);
|
||||||
if( !(spellInfo->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) && // unaffected by school immunity
|
if(!(spellInfo->AttributesEx &
|
||||||
!(spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY) // can remove immune (by dispell or immune it)
|
(SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE | SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)) // can remove immune (by dispell or immune it)
|
||||||
&& (spellInfo->Id != 42292))
|
&& spellInfo->Id != 42292)
|
||||||
{
|
{
|
||||||
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
@@ -9362,14 +9366,23 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
|
|||||||
if (!spellInfo)
|
if (!spellInfo)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Single spell immunity.
|
||||||
|
SpellImmuneList const& idList = m_spellImmune[IMMUNITY_ID];
|
||||||
|
for(SpellImmuneList::const_iterator itr = idList.begin(); itr != idList.end(); ++itr)
|
||||||
|
if(itr->type == spellInfo->Id)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
||||||
|
return false;
|
||||||
|
|
||||||
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
||||||
for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
||||||
if(itr->type == spellInfo->Dispel)
|
if(itr->type == spellInfo->Dispel)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if( !(spellInfo->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE) && // unaffected by school immunity
|
if(!(spellInfo->AttributesEx &
|
||||||
!(spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY) // can remove immune (by dispell or immune it)
|
(SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE | SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)) // can remove immune (by dispell or immune it)
|
||||||
&& (spellInfo->Id != 42292))
|
&& spellInfo->Id != 42292)
|
||||||
{
|
{
|
||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
||||||
@@ -9390,15 +9403,6 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellImmuneList const& idList = m_spellImmune[IMMUNITY_ID];
|
|
||||||
for(SpellImmuneList::const_iterator itr = idList.begin(); itr != idList.end(); ++itr)
|
|
||||||
{
|
|
||||||
if(itr->type == spellInfo->Id)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user