|
| npc_q24545_lich_kingAI (Creature *c) |
|
void | CleanAll (bool fromReset=true) |
|
void | Reset () override |
|
void | SetGUID (ObjectGuid guid, int32) override |
|
void | SetData (uint32 type, uint32 data) override |
|
void | UpdateAI (uint32 diff) override |
|
void | JustSummoned (Creature *summon) override |
|
void | SummonedCreatureDespawn (Creature *summon) override |
|
void | SpellHitTarget (Unit *target, SpellInfo const *spell) override |
|
| NullCreatureAI (Creature *c) |
|
void | MoveInLineOfSight (Unit *) override |
|
void | AttackStart (Unit *) override |
|
void | UpdateAI (uint32) override |
|
void | EnterEvadeMode (EvadeReason) override |
|
void | OnCharmed (bool) override |
|
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 *) |
|
| 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 |
|
Unit * | SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0) |
|
template<class PREDICATE > |
Unit * | SelectTarget (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 |
|
void npc_q24545_lich_king::npc_q24545_lich_kingAI::UpdateAI |
( |
uint32 |
diff | ) |
|
|
inlineoverridevirtual |
Reimplemented from NullCreatureAI.
1163 {
1165 switch (
events.ExecuteEvent())
1166 {
1167 case 0:
1168 break;
1169 case 998:
1171 break;
1172 case 999:
1175 {
1178 }
1179 break;
1180 case 1:
1182 {
1183 bool valid = false;
1185 if (p->IsAlive() && p->GetPhaseMask() & 2 && p->GetExactDistSq(
me) < 100.0f * 100.0f && !p->IsGameMaster())
1186 valid = true;
1187 if (!valid)
1188 {
1190 return;
1191 }
1192 }
1193 events.ScheduleEvent(1, 3s);
1194 break;
1195 case 2:
1197 break;
1198 case 3:
1200 {
1205 path.push_back(G3D::Vector3(4825.35f, -582.99f, 164.83f));
1206 path.push_back(G3D::Vector3(4813.38f, -580.94f, 162.62f));
1208 events.ScheduleEvent(4, 10s);
1209 }
1210 break;
1211 case 4:
1213 events.ScheduleEvent(5, 6s);
1214 break;
1215 case 5:
1217 events.ScheduleEvent(6, 4s);
1218 events.ScheduleEvent(7, 11s);
1219 break;
1220 case 6:
1224
1225 events.ScheduleEvent(65, 3500ms);
1226 break;
1227 case 65:
1229 {
1232 }
1233 break;
1234 case 7:
1236 events.ScheduleEvent(8, 8s);
1237 events.ScheduleEvent(9, 11s + 500ms);
1238 break;
1239 case 8:
1241 break;
1242 case 9:
1244 events.ScheduleEvent(10, 10s);
1245 break;
1246 case 10:
1248 events.ScheduleEvent(11, 4s);
1249 events.ScheduleEvent(12, 5s);
1250 break;
1251 case 11:
1254 break;
1255 case 12:
1259 events.ScheduleEvent(13, 3500ms);
1260 events.ScheduleEvent(14, 6s);
1261 break;
1262 case 13:
1264 break;
1265 case 14:
1269 {
1270 c->AI()->Talk(0);
1272 }
1275 break;
1276 case 15:
1279 {
1282 {
1283 x->SetCanFly(true);
1284 x->SetDisableGravity(true);
1285 x->SetHover(true);
1286 x->NearTeleportTo(4812.09f, -585.55f, 172.03f, 3.75f);
1287 l->EnterVehicle(x, 1);
1288
1291 events.ScheduleEvent(16, 5s);
1292 }
1293 }
1294 break;
1295 case 16:
1300 events.ScheduleEvent(17, 12s);
1301 break;
1302 case 17:
1303 {
1307
1311 {
1313 v->SetDisplayId(11686);
1314 v->DespawnOrUnsummon(1000);
1318 {
1321 pass->ToCreature()->DespawnOrUnsummon(1);
1322 vb->RemoveAllAuras();
1323 vb->ToCreature()->DespawnOrUnsummon(1);
1324 }
1325 c->ToCreature()->DespawnOrUnsummon(1);
1326 }
1327 }
1328 break;
1329 case 18:
1331 break;
1332 }
1333 }
@ TEMPSUMMON_MANUAL_DESPAWN
Definition: Object.h:49
@ SPELL_SAC_VEHICLE_CONTROL_AURA
Definition: zone_dragonblight.cpp:1040
@ NPC_SAC_VEGARD_1
Definition: zone_dragonblight.cpp:1012
@ SPELL_SAC_SUMMON_GHOULS_AURA
Definition: zone_dragonblight.cpp:1021
@ SPELL_SAC_VEGARD_SUMMON_GHOULS_AURA
Definition: zone_dragonblight.cpp:1026
@ SPELL_SAC_SUMMON_VEGARD_SKELETON
Definition: zone_dragonblight.cpp:1034
@ SPELL_SAC_LK_DESPAWN_ANIM
Definition: zone_dragonblight.cpp:1025
@ SPELL_SAC_ZAP_PLAYER
Definition: zone_dragonblight.cpp:1024
@ SPELL_SAC_SUMMON_GO_2
Definition: zone_dragonblight.cpp:1033
@ SPELL_SAC_KILL_VEGARD
Definition: zone_dragonblight.cpp:1032
@ SPELL_SAC_BLUE_EXPLOSION
Definition: zone_dragonblight.cpp:1039
@ SPELL_SAC_HOLY_BOMB_EXPLOSION
Definition: zone_dragonblight.cpp:1029
@ SPELL_SAC_SHIELD_OF_THE_LICH_KING
Definition: zone_dragonblight.cpp:1023
@ SPELL_SAC_STUN
Definition: zone_dragonblight.cpp:1016
@ SPELL_SAC_SUMMON_GO_1
Definition: zone_dragonblight.cpp:1020
@ SPELL_SAC_HOLY_BOMB_VISUAL
Definition: zone_dragonblight.cpp:1028
@ SPELL_SAC_ZAP_GHOULS_AURA
Definition: zone_dragonblight.cpp:1030
Talk
Definition: boss_fathomlord_karathress.cpp:23
std::vector< Vector3 > PointsArray
Definition: MoveSplineInitArgs.h:28
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
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Vehicle * GetVehicleKit() const
Definition: Unit.h:2353
Unit * GetPassenger(int8 seatId) const
Definition: Vehicle.cpp:226
void MoveSplinePath(Movement::PointsArray *path)
Definition: MotionMaster.cpp:409
void Reset() override
Definition: zone_dragonblight.cpp:1095
References Unit::CastSpell(), CleanAll(), WorldObject::FindNearestCreature(), WorldObject::FindNearestGameObject(), Unit::GetMotionMaster(), Vehicle::GetPassenger(), ObjectAccessor::GetPlayer(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVehicleBase(), Unit::GetVehicleKit(), GO_FLAG_NOT_SELECTABLE, GO_SAC_LIGHTS_VENGEANCE_1, CreatureAI::me, MotionMaster::MoveSplinePath(), NPC_SAC_LIGHTS_VENGEANCE, NPC_SAC_LIGHTS_VENGEANCE_BUNNY, NPC_SAC_LIGHTS_VENGEANCE_VEH_1, NPC_SAC_LIGHTS_VENGEANCE_VEH_2, NPC_SAC_VEGARD_1, playerGUID, Unit::RemoveAllAuras(), Reset(), Unit::SetVisible(), SPELL_SAC_BLUE_EXPLOSION, SPELL_SAC_HOLY_BOMB_EXPLOSION, SPELL_SAC_HOLY_BOMB_VISUAL, SPELL_SAC_HOLY_ZONE_AURA, SPELL_SAC_KILL_VEGARD, SPELL_SAC_LK_DESPAWN_ANIM, SPELL_SAC_REPEL_HAMMER, SPELL_SAC_SHIELD_OF_THE_LICH_KING, SPELL_SAC_STUN, SPELL_SAC_SUMMON_GHOULS_AURA, SPELL_SAC_SUMMON_GO_1, SPELL_SAC_SUMMON_GO_2, SPELL_SAC_SUMMON_VEGARD_SKELETON, SPELL_SAC_VEGARD_SUMMON_GHOULS_AURA, SPELL_SAC_VEHICLE_CONTROL_AURA, SPELL_SAC_ZAP_GHOULS_AURA, SPELL_SAC_ZAP_PLAYER, WorldObject::SummonCreature(), TEMPSUMMON_MANUAL_DESPAWN, TYPEID_UNIT, and Cell::VisitGridObjects().