37#include <unordered_map>
105 uint32 talkerEntry = UINT_MAX, line = 0;
149 if (talkerEntry != UINT_MAX)
170 belfast->StopMoving();
171 belfast->SetFacingToObject(invoker);
214 return GetCullingOfStratholmeAI<npc_hearthsinger_forresten_cotAI>(creature);
229 forrest->AI()->SetGUID(player->
GetGUID());
317 bool shouldAddSkipGossip =
true;
321 if (
Player* player = it->GetSource())
327 shouldAddSkipGossip =
false;
332 if (shouldAddSkipGossip)
426 return GetCullingOfStratholmeAI<npc_chromie_startAI>(creature);
494 time_t& whisperedTime =
Whispered[player->GetGUID()];
496 if (!whisperedTime || (now - whisperedTime) > 15)
557 return GetCullingOfStratholmeAI<npc_chromie_middleAI>(creature);
706 return GetCullingOfStratholmeAI<npc_martha_goslinAI>(creature);
742 martha->AI()->DoAction(0);
743 martha->SetFacingToObject(
me,
true);
766 martha->AI()->DoAction(0);
767 martha->SetFacingToObject(
me,
true);
836 return GetCullingOfStratholmeAI<npc_jena_andersonAI>(creature);
946 return GetCullingOfStratholmeAI<npc_bartleby_battsonAI>(creature);
1005 scruffy->GetMotionMaster()->MoveAlongSplineChain(0,
CHAIN_SCRUFFY1,
true);
1103 return GetCullingOfStratholmeAI<npc_malcolm_mooreAI>(creature);
1188 perelli->AI()->Talk(line,
me);
1190 perelli->SetFacingTo(ori);
1259 return GetCullingOfStratholmeAI<npc_sergeant_moriganAI>(creature);
1385 return GetCullingOfStratholmeAI<npc_roger_owensAI>(creature);
1412 if (newDist >= currentDist)
1414 currentDist = newDist;
1415 current = candidate;
1431 crate->SummonGameObject(
GO_PLAGUED_CRATE, *crate, crate->GetWorldRotation(), 1_days);
1435 highlight->Delete();
1439 float closestDist = INFINITY;
1465 return GetCullingOfStratholmeAI<npc_crate_helperAI>(creature);
@ DUNGEON_DIFFICULTY_HEROIC
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::chrono::minutes Minutes
Minutes shorthand typedef.
@ SPLINE_CHAIN_MOTION_TYPE
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
uint32 GetGossipActionFor(Player *player, uint32 gossipListId)
void SendGossipMenuFor(Player *player, uint32 npcTextID, ObjectGuid const &guid)
void AddGossipItemFor(Player *player, GossipOptionIcon icon, std::string const &text, uint32 sender, uint32 action)
void ClearGossipMenuFor(Player *player)
void InitGossipMenuFor(Player *player, uint32 menuId)
void CloseGossipMenuFor(Player *player)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ EMOTE_ONESHOT_EXCLAMATION
@ EMOTE_ONESHOT_CREATURE_SPECIAL
@ EMOTE_STATE_USE_STANDING
#define SpellEffectFn(F, I, N)
constexpr std::underlying_type< E >::type AsUnderlyingType(E enumValue)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void ResumeSplineChain(SplineChainResumeInfo const &info)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
bool HasAchieved(uint32 achievementId) const
bool CanBeGameMaster() const
bool IsGameMaster() const
void PrepareQuestMenu(ObjectGuid guid)
uint32 GetQuestId() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
static void GetResumeInfo(SplineChainResumeInfo &info, Unit const *owner, Optional< uint32 > id={})
virtual void DoAction(int32)
MotionMaster * GetMotionMaster()
bool IsQuestGiver() const
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
void SetEmoteState(Emote emote)
void HandleEmoteCommand(Emote emoteId)
void SetFacingTo(float ori, bool force=true, uint32 movementId=EVENT_FACE)
void SetStandState(UnitStandStateType state)
GameObject * FindNearestGameObject(uint32 entry, float range, bool spawnedOnly=true) const
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
float GetDistance2d(WorldObject const *obj) const
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
virtual void SetGuidData(uint32, ObjectGuid)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnTrigger(Player *player, AreaTriggerEntry const *) override
at_stratholme_inn_stairs_cot()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_hearthsinger_forresten_cot()
CreatureAI * GetAI(Creature *creature) const override
PrepareSpellScript(spell_cos_teleport_to_cot_stratholme_phase_4)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
@ GOSSIP_OPTION_EXPLAIN_2
@ GOSSIP_OFFSET_EXPLAIN_1
@ GOSSIP_OFFSET_OPEN_GM_MENU
@ GOSSIP_OFFSET_EXPLAIN_2
@ GOSSIP_OFFSET_GM_INITIAL
@ GOSSIP_OPTION_EXPLAIN_1
static float const malcolmFacing3
static Position const malcolmSpawn
static float const scruffyFacing4
static Position const scruffySpawn
static float const scruffyFacing2
@ SPELL_ARCANE_DISRUPTION
@ QUEST_DISPELLING_ILLUSIONS
@ SPELL_SUMMON_ARCANE_DISRUPTOR
static Position const scruffyPos3
static float const marthaIdleOrientation2
@ SPELL_TELEPORT_TO_COT_STRATHOLME
void AddSC_culling_of_stratholme()
static float const marthaIdleOrientation1
COSProgressStates GetStableStateFor(COSProgressStates const state)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default TC string format function.
float GetExactDist2dSq(const float x, const float y) const
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 id) override
void DoAction(int32 action) override
void InitializeAI() override
npc_bartleby_battsonAI(Creature *creature)
static Creature * Find(Creature *helper)
CreatureAI * GetAI(Creature *creature) const override
void MoveInLineOfSight(Unit *unit) override
bool OnGossipHello(Player *player) override
npc_chromie_middleAI(Creature *creature)
InstanceScript *const Instance
std::unordered_map< ObjectGuid, time_t > Whispered
void JustAppeared() override
void AdvanceDungeon(Player const *player)
void UpdateAI(uint32 diff) override
bool OnGossipSelect(Player *player, uint32, uint32 listId) override
InstanceScript *const _instance
npc_chromie_startAI(Creature *creature)
bool OnGossipHello(Player *player) override
void OnQuestAccept(Player *, Quest const *quest) override
bool OnGossipSelect(Player *player, uint32, uint32 listId) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
uint32 GetData(uint32 data) const override
npc_crate_helperAI(Creature *creature)
void ReplaceIfCloser(Creature *candidate, Creature *¤t, float ¤tDist) const
InstanceScript const *const _instance
npc_hearthsinger_forresten_cotAI(Creature *creature)
ObjectGuid _triggeringPlayer
void SetGUID(ObjectGuid const &guid, int32) override
void SetData(uint32, uint32) override
void MoveInLineOfSight(Unit *unit) override
void UpdateAI(uint32 diff) override
void InitializeAI() override
void MovementInform(uint32 type, uint32 id) override
npc_jena_andersonAI(Creature *creature)
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
static Creature * Find(Creature *helper)
CreatureAI * GetAI(Creature *creature) const override
void MovementInform(uint32 type, uint32 id) override
void InitializeAI() override
void UpdateAI(uint32 diff) override
npc_malcolm_mooreAI(Creature *creature)
static void Spawn(Map *map)
CreatureAI * GetAI(Creature *creature) const override
void UpdateAI(uint32 diff) override
void JustAppeared() override
void DoAction(int32) override
npc_martha_goslinAI(Creature *creature)
void MovementInform(uint32 type, uint32 id) override
SplineChainResumeInfo ResumeInfo
CreatureAI * GetAI(Creature *creature) const override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
npc_roger_owensAI(Creature *creature)
void MovementInform(uint32 type, uint32 id) override
static Creature * Find(Creature *helper)
CreatureAI * GetAI(Creature *creature) const override
void InitializeAI() override
void DoAction(int32 id) override
void MovementInform(uint32 type, uint32 id) override
void UpdateAI(uint32 diff) override
npc_sergeant_moriganAI(Creature *creature)
void Perelli(uint32 line, float ori=0.0f)
static Creature * Find(Creature *helper)
CreatureAI * GetAI(Creature *creature) const override