AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_julianne::boss_julianneAI Struct Reference
Inheritance diagram for boss_julianne::boss_julianneAI:
ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_julianneAI (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *who) override
 
void MoveInLineOfSight (Unit *who) override
 
void JustReachedHome () override
 
void SpellHit (Unit *, SpellInfo const *Spell) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 
void EnterEvadeMode (EvadeReason reason) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
virtual bool CheckEvadeIfOutOfCombatArea () const
 
bool IsHeroic () const
 
Difficulty GetDifficulty () const
 
bool Is25ManRaid () const
 
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
 
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Public Attributes

InstanceScriptinstance
 
uint32 EntryYellTimer
 
uint32 AggroYellTimer
 
ObjectGuid RomuloGUID
 
uint32 Phase
 
uint32 BlindingPassionTimer
 
uint32 DevotionTimer
 
uint32 EternalAffectionTimer
 
uint32 PowerfulAttractionTimer
 
uint32 SummonRomuloTimer
 
uint32 ResurrectTimer
 
uint32 DrinkPoisonTimer
 
uint32 ResurrectSelfTimer
 
bool IsFakingDeath
 
bool SummonedRomulo
 
bool RomuloDead
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_julianneAI()

boss_julianne::boss_julianneAI::boss_julianneAI ( Creature creature)
inline
1068 : ScriptedAI(creature)
1069 {
1070 instance = creature->GetInstanceScript();
1071 EntryYellTimer = 1000;
1072 AggroYellTimer = 10000;
1073 IsFakingDeath = false;
1074 }
Definition: ScriptedCreature.h:192
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
bool IsFakingDeath
Definition: bosses_opera.cpp:1094
uint32 AggroYellTimer
Definition: bosses_opera.cpp:1079
uint32 EntryYellTimer
Definition: bosses_opera.cpp:1078
InstanceScript * instance
Definition: bosses_opera.cpp:1076

References WorldObject::GetInstanceScript().

Member Function Documentation

◆ AttackStart()

void boss_julianne::boss_julianneAI::AttackStart ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1127 {
1129 return;
1130
1132 }
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:206
Creature * me
Definition: ScriptedCreature.h:282
bool HasUnitFlag(UnitFlags flags) const
Definition: Unit.h:1480

References ScriptedAI::AttackStart(), and UNIT_FLAG_NON_ATTACKABLE.

◆ DamageTaken()

void boss_julianne::boss_julianneAI::DamageTaken ( Unit ,
uint32 damage,
DamageEffectType  ,
SpellSchoolMask   
)
overridevirtual

Reimplemented from ScriptedAI.

1541{
1542 if (damage < me->GetHealth())
1543 return;
1544
1545 //anything below only used if incoming damage will kill
1546
1547 if (Phase == PHASE_JULIANNE)
1548 {
1549 damage = 0;
1550
1551 //this means already drinking, so return
1552 if (IsFakingDeath)
1553 return;
1554
1557
1558 IsFakingDeath = true;
1559 //IS THIS USEFULL? Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
1560 return;
1561 }
1562
1563 if (Phase == PHASE_ROMULO)
1564 {
1565 //LOG_ERROR("scripts", "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
1566 damage = 0;
1567 return;
1568 }
1569
1570 if (Phase == PHASE_BOTH)
1571 {
1572 //if this is true then we have to kill romulo too
1573 if (RomuloDead)
1574 {
1576 {
1577 Romulo->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
1578 Romulo->GetMotionMaster()->Clear();
1579 Romulo->setDeathState(JUST_DIED);
1580 Romulo->CombatStop(true);
1581 Romulo->GetThreatMgr().ClearAllThreat();
1582 Romulo->ReplaceAllDynamicFlags(UNIT_DYNFLAG_LOOTABLE);
1583 }
1584
1585 return;
1586 }
1587
1588 //if not already returned, then romulo is alive and we can pretend die
1590 {
1592 IsFakingDeath = true;
1593 CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->ResurrectTimer = 10000;
1594 CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->JulianneDead = true;
1595 damage = 0;
1596 return;
1597 }
1598 }
1599 //LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen.");
1600}
#define CAST_AI(a, b)
Definition: ScriptedCreature.h:28
@ JUST_DIED
Definition: Unit.h:317
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
@ SPELL_DRINK_POISON
Definition: bosses_opera.cpp:1008
@ PHASE_BOTH
Definition: bosses_opera.cpp:1027
@ PHASE_JULIANNE
Definition: bosses_opera.cpp:1025
@ PHASE_ROMULO
Definition: bosses_opera.cpp:1026
void PretendToDie(Creature *creature)
Definition: bosses_opera.cpp:1030
Phase
Definition: boss_zuljin.cpp:84
@ UNIT_DYNFLAG_LOOTABLE
Definition: SharedDefines.h:3093
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:178
Definition: Creature.h:46
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069
bool RomuloDead
Definition: bosses_opera.cpp:1096
ObjectGuid RomuloGUID
Definition: bosses_opera.cpp:1081
Definition: bosses_opera.cpp:1193

References CAST_AI, ObjectAccessor::GetCreature(), JUST_DIED, PHASE_BOTH, PHASE_JULIANNE, PHASE_ROMULO, PretendToDie(), SPELL_DRINK_POISON, UNIT_DYNFLAG_LOOTABLE, and UNIT_FLAG_NOT_SELECTABLE.

◆ EnterEvadeMode()

void boss_julianne::boss_julianneAI::EnterEvadeMode ( EvadeReason  reason)
inlineoverridevirtual

Reimplemented from CreatureAI.

1160 {
1162
1164 }
@ FAIL
Definition: InstanceScript.h:58
@ DATA_OPERA_PERFORMANCE
Definition: karazhan.h:34
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:317

References DATA_OPERA_PERFORMANCE, CreatureAI::EnterEvadeMode(), FAIL, and InstanceScript::SetBossState().

◆ JustDied()

void boss_julianne::boss_julianneAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1167 {
1169
1171 }
@ DONE
Definition: InstanceScript.h:59
@ SAY_JULIANNE_DEATH02
Definition: bosses_opera.cpp:994
Talk
Definition: boss_fathomlord_karathress.cpp:23

References DATA_OPERA_PERFORMANCE, DONE, SAY_JULIANNE_DEATH02, and InstanceScript::SetBossState().

◆ JustEngagedWith()

void boss_julianne::boss_julianneAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

1122 {
1124 }
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95

◆ JustReachedHome()

void boss_julianne::boss_julianneAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

1144 {
1146 }
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2108

◆ KilledUnit()

void boss_julianne::boss_julianneAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1174 {
1176 }
@ SAY_JULIANNE_SLAY
Definition: bosses_opera.cpp:996

References SAY_JULIANNE_SLAY.

◆ MoveInLineOfSight()

void boss_julianne::boss_julianneAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

1136 {
1138 return;
1139
1141 }
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:158

References CreatureAI::MoveInLineOfSight(), and UNIT_FLAG_NON_ATTACKABLE.

◆ Reset()

void boss_julianne::boss_julianneAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

1099 {
1100 RomuloGUID.Clear();
1102
1103 BlindingPassionTimer = 30000;
1104 DevotionTimer = 15000;
1105 EternalAffectionTimer = 25000;
1107 SummonRomuloTimer = 10000;
1108 DrinkPoisonTimer = 0;
1110
1111 if (IsFakingDeath)
1112 {
1113 Resurrect(me);
1114 IsFakingDeath = false;
1115 }
1116
1117 SummonedRomulo = false;
1118 RomuloDead = false;
1119 }
void Resurrect(Creature *target)
Definition: bosses_opera.cpp:1041
void Clear()
Definition: ObjectGuid.h:140
uint32 PowerfulAttractionTimer
Definition: bosses_opera.cpp:1088
uint32 BlindingPassionTimer
Definition: bosses_opera.cpp:1085
uint32 ResurrectSelfTimer
Definition: bosses_opera.cpp:1092
uint32 SummonRomuloTimer
Definition: bosses_opera.cpp:1089
uint32 EternalAffectionTimer
Definition: bosses_opera.cpp:1087
uint32 DrinkPoisonTimer
Definition: bosses_opera.cpp:1091
bool SummonedRomulo
Definition: bosses_opera.cpp:1095
uint32 DevotionTimer
Definition: bosses_opera.cpp:1086

References ObjectGuid::Clear(), PHASE_JULIANNE, and Resurrect().

◆ SpellHit()

void boss_julianne::boss_julianneAI::SpellHit ( Unit ,
SpellInfo const *  Spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

1149 {
1150 if (Spell->Id == SPELL_DRINK_POISON)
1151 {
1153 DrinkPoisonTimer = 2500;
1154 }
1155 }
@ SAY_JULIANNE_DEATH01
Definition: bosses_opera.cpp:993
Definition: Spell.h:284

References SAY_JULIANNE_DEATH01, and SPELL_DRINK_POISON.

◆ UpdateAI()

void boss_julianne::boss_julianneAI::UpdateAI ( uint32  diff)
overridevirtual

Reimplemented from ScriptedAI.

1400{
1401 if (EntryYellTimer)
1402 {
1403 if (EntryYellTimer <= diff)
1404 {
1406 EntryYellTimer = 0;
1407 }
1408 else
1409 EntryYellTimer -= diff;
1410 }
1411
1412 if (AggroYellTimer)
1413 {
1414 if (AggroYellTimer <= diff)
1415 {
1419 AggroYellTimer = 0;
1420 }
1421 else
1422 AggroYellTimer -= diff;
1423 }
1424
1425 if (DrinkPoisonTimer)
1426 {
1427 //will do this 2secs after spell hit. this is time to display visual as expected
1428 if (DrinkPoisonTimer <= diff)
1429 {
1432 SummonRomuloTimer = 10000;
1433 DrinkPoisonTimer = 0;
1434 }
1435 else
1436 DrinkPoisonTimer -= diff;
1437 }
1438
1440 {
1441 if (SummonRomuloTimer <= diff)
1442 {
1444 {
1445 RomuloGUID = pRomulo->GetGUID();
1446 CAST_AI(boss_romulo::boss_romuloAI, pRomulo->AI())->JulianneGUID = me->GetGUID();
1447 CAST_AI(boss_romulo::boss_romuloAI, pRomulo->AI())->Phase = PHASE_ROMULO;
1448 DoZoneInCombat(pRomulo);
1449
1450 pRomulo->SetFaction(FACTION_MONSTER_2);
1451 }
1452 SummonedRomulo = true;
1453 }
1454 else
1455 SummonRomuloTimer -= diff;
1456 }
1457
1459 {
1460 if (ResurrectSelfTimer <= diff)
1461 {
1462 Resurrect(me);
1463 Phase = PHASE_BOTH;
1464 IsFakingDeath = false;
1465
1466 if (me->GetVictim())
1468
1470 ResurrectTimer = 1000;
1471 }
1472 else
1473 ResurrectSelfTimer -= diff;
1474 }
1475
1476 if (!UpdateVictim() || IsFakingDeath)
1477 return;
1478
1479 if (RomuloDead)
1480 {
1481 if (ResurrectTimer <= diff)
1482 {
1484 if (Romulo && CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath)
1485 {
1487 Resurrect(Romulo);
1488 CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
1489 RomuloDead = false;
1490 ResurrectTimer = 10000;
1491 }
1492 }
1493 else
1494 ResurrectTimer -= diff;
1495 }
1496
1497 if (BlindingPassionTimer <= diff)
1498 {
1499 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 100, true))
1501 BlindingPassionTimer = urand(30000, 45000);
1502 }
1503 else
1504 BlindingPassionTimer -= diff;
1505
1506 if (DevotionTimer <= diff)
1507 {
1509 DevotionTimer = urand(15000, 45000);
1510 }
1511 else
1512 DevotionTimer -= diff;
1513
1514 if (PowerfulAttractionTimer <= diff)
1515 {
1516 DoCast(SelectTarget(SelectTargetMethod::Random, 0), SPELL_POWERFUL_ATTRACTION);
1517 PowerfulAttractionTimer = urand(5000, 30000);
1518 }
1519 else
1521
1522 if (EternalAffectionTimer <= diff)
1523 {
1524 if (urand(0, 1) && SummonedRomulo)
1525 {
1527 if (Romulo && Romulo->IsAlive() && !RomuloDead)
1529 }
1531
1532 EternalAffectionTimer = urand(45000, 60000);
1533 }
1534 else
1535 EternalAffectionTimer -= diff;
1536
1538}
constexpr auto IN_MILLISECONDS
Definition: Common.h:62
constexpr auto HOUR
Definition: Common.h:57
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: Object.h:42
@ CREATURE_ROMULO
Definition: bosses_opera.cpp:1018
@ SPELL_ETERNAL_AFFECTION
Definition: bosses_opera.cpp:1006
@ ROMULO_Y
Definition: bosses_opera.cpp:1020
@ SAY_JULIANNE_ENTER
Definition: bosses_opera.cpp:992
@ SPELL_BLINDING_PASSION
Definition: bosses_opera.cpp:1004
@ SAY_JULIANNE_RESURRECT
Definition: bosses_opera.cpp:995
@ SPELL_POWERFUL_ATTRACTION
Definition: bosses_opera.cpp:1007
@ SAY_JULIANNE_AGGRO
Definition: bosses_opera.cpp:991
@ ROMULO_X
Definition: bosses_opera.cpp:1019
@ SPELL_DEVOTION
Definition: bosses_opera.cpp:1005
@ FACTION_MONSTER_2
Definition: SharedDefines.h:168
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
bool UpdateVictim()
Definition: CreatureAI.cpp:269
CreatureAI * AI() const
Definition: Creature.h:135
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2318
float GetPositionZ() const
Definition: Position.h:119
Definition: Unit.h:1290
void SetFaction(uint32 faction)
Definition: Unit.cpp:10029
bool IsAlive() const
Definition: Unit.h:1808
Unit * GetVictim() const
Definition: Unit.h:1386
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482
void AttackStart(Unit *who) override
Definition: bosses_opera.cpp:1126
uint32 ResurrectTimer
Definition: bosses_opera.cpp:1090

References Creature::AI(), CAST_AI, CREATURE_ROMULO, FACTION_MONSTER_2, ObjectAccessor::GetCreature(), HOUR, IN_MILLISECONDS, Unit::IsAlive(), PHASE_BOTH, PHASE_ROMULO, PretendToDie(), Resurrect(), ROMULO_X, ROMULO_Y, SAY_JULIANNE_AGGRO, SAY_JULIANNE_ENTER, SAY_JULIANNE_RESURRECT, SPELL_BLINDING_PASSION, SPELL_DEVOTION, SPELL_ETERNAL_AFFECTION, SPELL_POWERFUL_ATTRACTION, WorldObject::SummonCreature(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, UNIT_FLAG_NON_ATTACKABLE, and urand().

Member Data Documentation

◆ AggroYellTimer

uint32 boss_julianne::boss_julianneAI::AggroYellTimer

◆ BlindingPassionTimer

uint32 boss_julianne::boss_julianneAI::BlindingPassionTimer

◆ DevotionTimer

uint32 boss_julianne::boss_julianneAI::DevotionTimer

◆ DrinkPoisonTimer

uint32 boss_julianne::boss_julianneAI::DrinkPoisonTimer

◆ EntryYellTimer

uint32 boss_julianne::boss_julianneAI::EntryYellTimer

◆ EternalAffectionTimer

uint32 boss_julianne::boss_julianneAI::EternalAffectionTimer

◆ instance

InstanceScript* boss_julianne::boss_julianneAI::instance

◆ IsFakingDeath

bool boss_julianne::boss_julianneAI::IsFakingDeath

◆ Phase

uint32 boss_julianne::boss_julianneAI::Phase

◆ PowerfulAttractionTimer

uint32 boss_julianne::boss_julianneAI::PowerfulAttractionTimer

◆ ResurrectSelfTimer

uint32 boss_julianne::boss_julianneAI::ResurrectSelfTimer

◆ ResurrectTimer

uint32 boss_julianne::boss_julianneAI::ResurrectTimer

◆ RomuloDead

bool boss_julianne::boss_julianneAI::RomuloDead

◆ RomuloGUID

ObjectGuid boss_julianne::boss_julianneAI::RomuloGUID

◆ SummonedRomulo

bool boss_julianne::boss_julianneAI::SummonedRomulo

◆ SummonRomuloTimer

uint32 boss_julianne::boss_julianneAI::SummonRomuloTimer