160 if (player->GetZoneId() ==
ZONE_DALARAN && !player->IsFlying() && !player->IsMounted() && !player->IsGameMaster())
166 if (PlayerInDalaranList.empty())
190 std::vector<Player*> PlayerInDalaranList;
194 if (PlayerInDalaranList.empty() ||
urand(1, 100) > PlayerInDalaranList.size())
203 float dist =
frand(10.0f, 30.0f);
204 float angle =
frand(0.0f, 1.0f) *
M_PI * 2.0f;
205 player->MovePositionToFirstCollision(pos, dist, angle);
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
std::chrono::seconds Seconds
Seconds shorthand typedef.
float frand(float min, float max)
int32 irand(int32 min, int32 max)
uint32 urand(uint32 min, uint32 max)
#define RegisterCreatureAI(ai_name)
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
@ EMOTE_ONESHOT_LAUGH_NO_SHEATHE
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void push_back(LinkedListElement *pElem)
void SendMailTo(CharacterDatabaseTransaction trans, MailReceiver const &receiver, MailSender const &sender, MailCheckMask checked=MAIL_CHECK_MASK_NONE, uint32 deliver_delay=0)
Player * GetPlayer(ObjectGuid const &guid)
PlayerList const & GetPlayers() const
void MoveRandom(float wanderDistance=0.0f, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::ForceWalk, MovementSlot slot=MOTION_SLOT_DEFAULT, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
bool IsGameMaster() const
bool IsBeingTeleported() const
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
bool isInBackInMap(Unit const *target, float distance, float arc=float(M_PI)) const
MotionMaster * GetMotionMaster()
void NearTeleportTo(TeleportLocation const &target, bool casting=false)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
void setActive(bool isActiveObject)
void AddObjectToRemoveList()
Player * GetCharmerOrOwnerPlayerOrPlayerItself() const
bool IsWithinDist(WorldObject const *obj, float dist2compare, bool is3D=true, bool incOwnRadius=true, bool incTargetRadius=true) const
auto SelectRandomContainerElement(C const &container) -> std::add_const_t< decltype(*std::ranges::begin(container))> &
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetOrientation() const
constexpr float GetPositionZ() const
npc_mageguard_dalaran(Creature *creature)
void JustEngagedWith(Unit *) override
void UpdateAI(uint32) override
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void MoveInLineOfSight(Unit *who) override
void SendMailToPlayer(Player *player) const
static Player * SelectTargetInDalaran(std::vector< Player * > &PlayerInDalaranList)
void GetPlayersInDalaran(std::vector< Player * > &playerList) const
npc_minigob_manabonk(Creature *creature)
void UpdateAI(uint32 diff) override
@ SPELL_SUNREAVER_DISGUISE_MALE
@ SPELL_SILVER_COVENANT_DISGUISE_FEMALE
@ SPELL_SILVER_COVENANT_DISGUISE_MALE
@ SPELL_SUNREAVER_DISGUISE_FEMALE
@ NPC_SILVER_COVENANT_GUARDIAN_MAGE
@ NPC_SUNREAVER_GUARDIAN_MAGE