AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_cos_chromie_middle Class Reference
Inheritance diagram for npc_cos_chromie_middle:
CreatureScript ScriptObject UpdatableScript< Creature >

Public Member Functions

 npc_cos_chromie_middle ()
 
bool OnQuestAccept (Player *, Creature *creature, const Quest *pQuest) override
 
bool OnGossipSelect (Player *player, Creature *creature, uint32, uint32) override
 
bool OnGossipHello (Player *player, Creature *creature) override
 
- Public Member Functions inherited from CreatureScript
bool IsDatabaseBound () const override
 
virtual bool OnGossipHello (Player *, Creature *)
 
virtual bool OnGossipSelect (Player *, Creature *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, Creature *, uint32, uint32, const char *)
 
virtual bool OnQuestAccept (Player *, Creature *, Quest const *)
 
virtual bool OnQuestSelect (Player *, Creature *, Quest const *)
 
virtual bool OnQuestComplete (Player *, Creature *, Quest const *)
 
virtual bool OnQuestReward (Player *, Creature *, Quest const *, uint32)
 
virtual uint32 GetDialogStatus (Player *, Creature *)
 
virtual CreatureAIGetAI (Creature *) const
 
virtual void OnFfaPvpStateUpdate (Creature *, bool)
 
- Public Member Functions inherited from ScriptObject
virtual bool IsDatabaseBound () const
 
virtual bool isAfterLoadScript () const
 
virtual void checkValidity ()
 
const std::string & GetName () const
 
uint16 GetTotalAvailableHooks ()
 
- Public Member Functions inherited from UpdatableScript< Creature >
virtual void OnUpdate (Creature *, uint32)
 

Additional Inherited Members

- Protected Member Functions inherited from CreatureScript
 CreatureScript (const char *name)
 
- Protected Member Functions inherited from ScriptObject
 ScriptObject (const char *name, uint16 totalAvailableHooks=0)
 
virtual ~ScriptObject ()=default
 
- Protected Member Functions inherited from UpdatableScript< Creature >
 UpdatableScript ()=default
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_cos_chromie_middle()

npc_cos_chromie_middle::npc_cos_chromie_middle ( )
inline
1473: CreatureScript("npc_cos_chromie_middle") { }
Definition: CreatureScript.h:25

Member Function Documentation

◆ OnGossipHello()

bool npc_cos_chromie_middle::OnGossipHello ( Player player,
Creature creature 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

1498 {
1499 if (creature->IsQuestGiver())
1500 {
1501 player->PrepareQuestMenu(creature->GetGUID());
1502 player->SendPreparedQuest(creature->GetGUID());
1503 }
1504
1506 return true;
1507
1508 return false;
1509 }
@ COS_PROGRESS_CRATES_FOUND
Definition: culling_of_stratholme.h:126
@ DATA_ARTHAS_EVENT
Definition: culling_of_stratholme.h:28
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:112
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1203
void SendPreparedQuest(ObjectGuid guid)
Definition: PlayerQuest.cpp:115
void PrepareQuestMenu(ObjectGuid guid)
Definition: PlayerQuest.cpp:39
bool IsQuestGiver() const
Definition: Unit.h:762
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51

References COS_PROGRESS_CRATES_FOUND, DATA_ARTHAS_EVENT, ZoneScript::GetData(), Object::GetGUID(), WorldObject::GetInstanceScript(), Unit::IsQuestGiver(), Player::PrepareQuestMenu(), and Player::SendPreparedQuest().

◆ OnGossipSelect()

bool npc_cos_chromie_middle::OnGossipSelect ( Player player,
Creature creature,
uint32  ,
uint32   
)
inlineoverridevirtual

Reimplemented from CreatureScript.

1486 {
1488 return true;
1489
1490 // We can start event:)
1491 if (player->PlayerTalkClass->GetGossipMenu().GetMenuId() == 9612)
1493
1494 return false;
1495 }
@ COS_PROGRESS_START_INTRO
Definition: culling_of_stratholme.h:127
uint32 GetMenuId() const
Definition: GossipDef.h:172
GossipMenu & GetGossipMenu()
Definition: GossipDef.h:264
PlayerMenu * PlayerTalkClass
Definition: Player.h:2239
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52

References COS_PROGRESS_CRATES_FOUND, COS_PROGRESS_START_INTRO, DATA_ARTHAS_EVENT, ZoneScript::GetData(), PlayerMenu::GetGossipMenu(), WorldObject::GetInstanceScript(), GossipMenu::GetMenuId(), Player::PlayerTalkClass, and ZoneScript::SetData().

◆ OnQuestAccept()

bool npc_cos_chromie_middle::OnQuestAccept ( Player ,
Creature creature,
const Quest pQuest 
)
inlineoverridevirtual

Reimplemented from CreatureScript.

1476 {
1477 if (pQuest->GetQuestId() == QUEST_A_ROYAL_ESCORT)
1478 if (InstanceScript* pInstance = creature->GetInstanceScript())
1479 if (pInstance->GetData(DATA_ARTHAS_EVENT) == COS_PROGRESS_CRATES_FOUND)
1480 pInstance->SetData(DATA_ARTHAS_EVENT, COS_PROGRESS_START_INTRO);
1481
1482 return true;
1483 }
@ QUEST_A_ROYAL_ESCORT
Definition: culling_of_stratholme.cpp:1408
Definition: InstanceScript.h:142
uint32 GetQuestId() const
Definition: QuestDef.h:228

References COS_PROGRESS_CRATES_FOUND, COS_PROGRESS_START_INTRO, DATA_ARTHAS_EVENT, WorldObject::GetInstanceScript(), Quest::GetQuestId(), and QUEST_A_ROYAL_ESCORT.