Violet Hold: Azure Saboteour animation on boss encounters, by DenissRassman
From issue #2180 --HG-- branch : trunk
This commit is contained in:
@@ -32,6 +32,12 @@ enum GameObjects
|
||||
GO_ACTIVATION_CRYSTAL = 193611
|
||||
};
|
||||
|
||||
enum AzureSaboteurSpells
|
||||
{
|
||||
SABOTEUR_SHIELD_DISRUPTION = 58291,
|
||||
SABOTEUR_SHIELD_EFFECT = 45775
|
||||
};
|
||||
|
||||
const Position PortalLocation[] =
|
||||
{
|
||||
{1877.51, 850.104, 44.6599, 4.7822 }, // WP 1
|
||||
@@ -53,6 +59,7 @@ const Position BossStartMove6 = {1928.207031, 852.864441, 47.200813};
|
||||
|
||||
const Position CyanigosasSpawnLocation = {1930.281250, 804.407715, 52.410946, 3.139621};
|
||||
const Position MiddleRoomLocation = {1892.291260, 805.696838, 38.438862, 3.139621};
|
||||
const Position MiddleRoomPortalSaboLocation = {1896.622925, 804.854126, 38.504772, 3.139621};
|
||||
|
||||
//Cyanigosa's prefight event data
|
||||
enum Yells
|
||||
@@ -89,6 +96,7 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
uint64 uiZuramatCell;
|
||||
uint64 uiMainDoor;
|
||||
uint64 uiTeleportationPortal;
|
||||
uint64 uiSaboteurPortal;
|
||||
|
||||
uint64 uiActivationCrystal[3];
|
||||
|
||||
@@ -139,6 +147,7 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
uiZuramatCell = 0;
|
||||
uiMainDoor = 0;
|
||||
uiTeleportationPortal = 0;
|
||||
uiSaboteurPortal = 0;
|
||||
|
||||
uiRemoveNpc = 0;
|
||||
|
||||
@@ -316,6 +325,17 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
}
|
||||
uiMainDoorState = data;
|
||||
break;
|
||||
case DATA_START_BOSS_ENCOUNTER:
|
||||
switch(uiWaveCount)
|
||||
{
|
||||
case 6:
|
||||
StartBossEncounter(uiFirstBoss);
|
||||
break;
|
||||
case 12:
|
||||
StartBossEncounter(uiSecondBoss);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,6 +352,8 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
case DATA_DOOR_INTEGRITY: return uiDoorIntegrity;
|
||||
case DATA_NPC_PRESENCE_AT_DOOR: return NpcAtDoorCastingList.size();
|
||||
case DATA_MAIN_DOOR: return uiMainDoorState;
|
||||
case DATA_FIRST_BOSS: return uiFirstBoss;
|
||||
case DATA_SECOND_BOSS: return uiSecondBoss;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -361,6 +383,7 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
case DATA_MAIN_DOOR: return uiMainDoor;
|
||||
case DATA_SINCLARI: return uiSinclari;
|
||||
case DATA_TELEPORTATION_PORTAL: return uiTeleportationPortal;
|
||||
case DATA_SABOTEUR_PORTAL: return uiSaboteurPortal;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -470,7 +493,13 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
case 6:
|
||||
if (uiFirstBoss == 0)
|
||||
uiFirstBoss = urand(1,6);
|
||||
StartBossEncounter(uiFirstBoss);
|
||||
if (Creature *pSinclari = instance->GetCreature(uiSinclari))
|
||||
{
|
||||
if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
uiSaboteurPortal = pPortal->GetGUID();
|
||||
if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN))
|
||||
pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false);
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
if (uiSecondBoss == 0)
|
||||
@@ -478,7 +507,13 @@ struct instance_violet_hold : public ScriptedInstance
|
||||
{
|
||||
uiSecondBoss = urand(1,6);
|
||||
} while (uiSecondBoss == uiFirstBoss);
|
||||
StartBossEncounter(uiSecondBoss);
|
||||
if (Creature *pSinclari = instance->GetCreature(uiSinclari))
|
||||
{
|
||||
if(Creature *pPortal = pSinclari->SummonCreature(CREATURE_TELEPORTATION_PORTAL, MiddleRoomPortalSaboLocation, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
uiSaboteurPortal = pPortal->GetGUID();
|
||||
if (Creature *pAzureSaboteur = pSinclari->SummonCreature(CREATURE_SABOTEOUR, MiddleRoomLocation, TEMPSUMMON_DEAD_DESPAWN))
|
||||
pAzureSaboteur->CastSpell(pAzureSaboteur, SABOTEUR_SHIELD_EFFECT, false);
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
{
|
||||
|
||||
@@ -85,6 +85,12 @@ enum AzureStalkerSpells
|
||||
SPELL_TACTICAL_BLINK = 58470
|
||||
};
|
||||
|
||||
enum AzureSaboteurSpells
|
||||
{
|
||||
SABOTEUR_SHIELD_DISRUPTION = 58291,
|
||||
SABOTEUR_SHIELD_EFFECT = 45775
|
||||
};
|
||||
|
||||
enum TrashDoorSpell
|
||||
{
|
||||
SPELL_DESTROY_DOOR_SEAL = 58040
|
||||
@@ -186,6 +192,40 @@ float SixthPoralWPs [4][3] =
|
||||
//{1826.889648, 803.929993, 44.363239}
|
||||
};
|
||||
|
||||
const float SaboteurFinalPos1[3][3] =
|
||||
{
|
||||
{1892.502319, 777.410767, 38.630402},
|
||||
{1891.165161, 762.969421, 47.666920},
|
||||
{1893.168091, 740.919189, 47.666920}
|
||||
};
|
||||
const float SaboteurFinalPos2[3][3] =
|
||||
{
|
||||
{1882.242676, 834.818726, 38.646786},
|
||||
{1879.220825, 842.224854, 43.333641},
|
||||
{1873.842896, 863.892456, 43.333641}
|
||||
};
|
||||
const float SaboteurFinalPos3[2][3] =
|
||||
{
|
||||
{1904.298340, 792.400391, 38.646782},
|
||||
{1935.716919, 758.437073, 30.627895}
|
||||
};
|
||||
const float SaboteurFinalPos4[3] =
|
||||
{
|
||||
1855.006104, 760.641724, 38.655266
|
||||
};
|
||||
const float SaboteurFinalPos5[3] =
|
||||
{
|
||||
1906.667358, 841.705566, 38.637894
|
||||
};
|
||||
const float SaboteurFinalPos6[5][3] =
|
||||
{
|
||||
{1911.437012, 821.289246, 38.684128},
|
||||
{1920.734009, 822.978027, 41.525414},
|
||||
{1928.262939, 830.836609, 44.668266},
|
||||
{1929.338989, 837.593933, 47.137596},
|
||||
{1931.063354, 848.468445, 47.190434}
|
||||
};
|
||||
|
||||
const Position MovePosition = { 1806.955566, 803.851807, 44.363323};
|
||||
|
||||
struct npc_sinclariAI : public ScriptedAI
|
||||
@@ -309,6 +349,120 @@ CreatureAI* GetAI_npc_sinclari(Creature* pCreature)
|
||||
return new npc_sinclariAI(pCreature);
|
||||
}
|
||||
|
||||
struct mob_azure_saboteurAI : public npc_escortAI
|
||||
{
|
||||
mob_azure_saboteurAI(Creature *c):npc_escortAI(c)
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
bHasGotMovingPoints = false;
|
||||
uiBoss = 0;
|
||||
Reset();
|
||||
}
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
bool bHasGotMovingPoints;
|
||||
uint32 uiBoss;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance && !uiBoss)
|
||||
uiBoss = pInstance->GetData(DATA_WAVE_COUNT) == 6 ? pInstance->GetData(DATA_FIRST_BOSS) : pInstance->GetData(DATA_SECOND_BOSS);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 uiWPointId)
|
||||
{
|
||||
switch(uiBoss)
|
||||
{
|
||||
case 1:
|
||||
if(uiWPointId == 2)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 2:
|
||||
if(uiWPointId == 2)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 3:
|
||||
if(uiWPointId == 1)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 4:
|
||||
if(uiWPointId == 0)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 5:
|
||||
if(uiWPointId == 0)
|
||||
FinishPointReached();
|
||||
break;
|
||||
case 6:
|
||||
if(uiWPointId == 4)
|
||||
FinishPointReached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
if(pInstance->GetData(DATA_MAIN_DOOR) != GO_STATE_READY)
|
||||
me->CastStop();
|
||||
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
|
||||
if(!bHasGotMovingPoints)
|
||||
{
|
||||
bHasGotMovingPoints = true;
|
||||
switch(uiBoss)
|
||||
{
|
||||
case 1:
|
||||
for(int i=0;i<3;i++)
|
||||
AddWaypoint(i,SaboteurFinalPos1[i][0],SaboteurFinalPos1[i][1],SaboteurFinalPos1[i][2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos1[2][0],SaboteurFinalPos1[2][1],SaboteurFinalPos1[2][2],4.762346);
|
||||
break;
|
||||
case 2:
|
||||
for(int i=0;i<3;i++)
|
||||
AddWaypoint(i,SaboteurFinalPos2[i][0],SaboteurFinalPos2[i][1],SaboteurFinalPos2[i][2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos2[2][0],SaboteurFinalPos2[2][1],SaboteurFinalPos2[2][2],1.862674);
|
||||
break;
|
||||
case 3:
|
||||
for(int i=0;i<2;i++)
|
||||
AddWaypoint(i,SaboteurFinalPos3[i][0],SaboteurFinalPos3[i][1],SaboteurFinalPos3[i][2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos3[1][0],SaboteurFinalPos3[1][1],SaboteurFinalPos3[1][2],5.500638);
|
||||
break;
|
||||
case 4:
|
||||
AddWaypoint(0,SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos4[0],SaboteurFinalPos4[1],SaboteurFinalPos4[2],3.991108);
|
||||
break;
|
||||
case 5:
|
||||
AddWaypoint(0,SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos5[0],SaboteurFinalPos5[1],SaboteurFinalPos5[2],1.100841);
|
||||
break;
|
||||
case 6:
|
||||
for(int i=0;i<5;i++)
|
||||
AddWaypoint(i,SaboteurFinalPos6[i][0],SaboteurFinalPos6[i][1],SaboteurFinalPos6[i][2],0);
|
||||
me->SetHomePosition(SaboteurFinalPos6[4][0],SaboteurFinalPos6[4][1],SaboteurFinalPos6[4][2],0.983031);
|
||||
break;
|
||||
}
|
||||
|
||||
SetDespawnAtEnd(false);
|
||||
Start(true,true);
|
||||
}
|
||||
}
|
||||
|
||||
void FinishPointReached()
|
||||
{
|
||||
me->CastSpell(me, SABOTEUR_SHIELD_DISRUPTION, false);
|
||||
me->DisappearAndDie();
|
||||
Creature* pSaboPort = Unit::GetCreature((*me),pInstance->GetData64(DATA_SABOTEUR_PORTAL));
|
||||
if (pSaboPort)
|
||||
pSaboPort->DisappearAndDie();
|
||||
pInstance->SetData(DATA_START_BOSS_ENCOUNTER, 1);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_mob_azure_saboteur(Creature* pCreature)
|
||||
{
|
||||
return new mob_azure_saboteurAI (pCreature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_sinclari(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
ScriptedInstance* pInstance = pCreature->GetInstanceData();
|
||||
@@ -373,6 +527,10 @@ struct npc_teleportation_portalAI : public ScriptedAI
|
||||
pInstance->SetData(DATA_REMOVE_NPC, 0);
|
||||
}
|
||||
|
||||
uint8 uiWaveCount = pInstance->GetData(DATA_WAVE_COUNT);
|
||||
if ((uiWaveCount == 6) || (uiWaveCount == 12)) //Don't spawn mobs on boss encounters
|
||||
return;
|
||||
|
||||
switch(uiTypeOfMobsPortal)
|
||||
{
|
||||
// spawn elite mobs and then set portals visibility to make it look like it dissapeard
|
||||
@@ -382,7 +540,7 @@ struct npc_teleportation_portalAI : public ScriptedAI
|
||||
if (uiSpawnTimer <= diff)
|
||||
{
|
||||
bPortalGuardianOrKeeperOrEliteSpawn = true;
|
||||
uint8 k = pInstance->GetData(DATA_WAVE_COUNT) < 12 ? 2 : 3;
|
||||
uint8 k = uiWaveCount < 12 ? 2 : 3;
|
||||
for (uint8 i = 0; i < k; ++i)
|
||||
{
|
||||
uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR);
|
||||
@@ -1100,4 +1258,9 @@ void AddSC_violet_hold()
|
||||
newscript->Name = "mob_azure_stalker";
|
||||
newscript->GetAI = &GetAI_mob_azure_stalker;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "mob_azure_saboteur";
|
||||
newscript->GetAI = &GetAI_mob_azure_saboteur;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ enum Creatures
|
||||
CREATURE_MORAGG = 29316,
|
||||
CREATURE_CYANIGOSA = 31134,
|
||||
CREATURE_SINCLARI = 30658,
|
||||
CREATURE_SABOTEOUR = 31079,
|
||||
NPC_VIOLET_HOLD_GUARD = 30659
|
||||
};
|
||||
|
||||
@@ -29,7 +30,10 @@ enum Data
|
||||
DATA_DOOR_INTEGRITY,
|
||||
DATA_NPC_PRESENCE_AT_DOOR,
|
||||
DATA_NPC_PRESENCE_AT_DOOR_ADD,
|
||||
DATA_NPC_PRESENCE_AT_DOOR_REMOVE
|
||||
DATA_NPC_PRESENCE_AT_DOOR_REMOVE,
|
||||
DATA_START_BOSS_ENCOUNTER,
|
||||
DATA_FIRST_BOSS,
|
||||
DATA_SECOND_BOSS
|
||||
};
|
||||
|
||||
enum Data64
|
||||
@@ -53,7 +57,8 @@ enum Data64
|
||||
DATA_ZURAMAT_CELL,
|
||||
DATA_MAIN_DOOR,
|
||||
DATA_SINCLARI,
|
||||
DATA_TELEPORTATION_PORTAL
|
||||
DATA_TELEPORTATION_PORTAL,
|
||||
DATA_SABOTEUR_PORTAL
|
||||
};
|
||||
|
||||
enum Bosses
|
||||
|
||||
Reference in New Issue
Block a user