TrinityCore
QuestObjectiveCriteriaMgr Class Reference

#include <QuestObjectiveCriteriaMgr.h>

+ Inheritance diagram for QuestObjectiveCriteriaMgr:

Public Member Functions

 QuestObjectiveCriteriaMgr (Player *owner)
 
 ~QuestObjectiveCriteriaMgr ()
 
void CheckAllQuestObjectiveCriteria (Player *referencePlayer)
 
void Reset () override
 
void LoadFromDB (PreparedQueryResult objectiveResult, PreparedQueryResult criteriaResult)
 
void SaveToDB (CharacterDatabaseTransaction trans)
 
void ResetCriteriaTree (uint32 criteriaTreeId)
 
void SendAllData (Player const *receiver) const override
 
void CompletedObjective (QuestObjective const *questObjective, Player *referencePlayer)
 
bool HasCompletedObjective (QuestObjective const *questObjective) const
 
- Public Member Functions inherited from CriteriaHandler
 CriteriaHandler ()
 
virtual ~CriteriaHandler ()
 
 CriteriaHandler (CriteriaHandler const &right)=delete
 
 CriteriaHandler (CriteriaHandler &&right)=delete
 
CriteriaHandleroperator= (CriteriaHandler const &right)=delete
 
CriteriaHandleroperator= (CriteriaHandler &&right)=delete
 
virtual void Reset ()
 
void UpdateCriteria (CriteriaType type, uint64 miscValue1=0, uint64 miscValue2=0, uint64 miscValue3=0, WorldObject const *ref=nullptr, Player *referencePlayer=nullptr)
 
virtual void SendAllData (Player const *receiver) const =0
 
void UpdateTimedCriteria (Milliseconds timeDiff)
 
void StartCriteria (CriteriaStartEvent startEvent, uint32 entry, Milliseconds timeLost=Milliseconds::zero())
 
virtual void FailCriteria (CriteriaFailEvent failEvent, uint32 asset)
 

Static Public Member Functions

static void DeleteFromDB (ObjectGuid const &guid)
 

Protected Member Functions

void SendCriteriaUpdate (Criteria const *entry, CriteriaProgress const *progress, Seconds timeElapsed, bool timedCompleted) const override
 
void SendCriteriaProgressRemoved (uint32 criteriaId) override
 
bool CanUpdateCriteriaTree (Criteria const *criteria, CriteriaTree const *tree, Player *referencePlayer) const override
 
bool CanCompleteCriteriaTree (CriteriaTree const *tree) override
 
void CompletedCriteriaTree (CriteriaTree const *tree, Player *referencePlayer) override
 
void SendPacket (WorldPacket const *data) const override
 
std::string GetOwnerInfo () const override
 
CriteriaList const & GetCriteriaByType (CriteriaType type, uint32 asset) const override
 
bool RequiredAchievementSatisfied (uint32 achievementId) const override
 
- Protected Member Functions inherited from CriteriaHandler
virtual void SendCriteriaUpdate (Criteria const *criteria, CriteriaProgress const *progress, Seconds timeElapsed, bool timedCompleted) const =0
 
CriteriaProgressGetCriteriaProgress (Criteria const *entry)
 
void SetCriteriaProgress (Criteria const *criteria, uint64 changeValue, Player *referencePlayer, ProgressType progressType=PROGRESS_SET)
 
void RemoveCriteriaProgress (Criteria const *criteria)
 
virtual void SendCriteriaProgressRemoved (uint32 criteriaId)=0
 
bool IsCompletedCriteriaTree (CriteriaTree const *tree)
 
virtual bool CanUpdateCriteriaTree (Criteria const *criteria, CriteriaTree const *tree, Player *referencePlayer) const
 
virtual bool CanCompleteCriteriaTree (CriteriaTree const *tree)
 
virtual void CompletedCriteriaTree (CriteriaTree const *tree, Player *referencePlayer)=0
 
virtual void AfterCriteriaTreeUpdate (CriteriaTree const *, Player *)
 
bool IsCompletedCriteria (Criteria const *criteria, uint64 requiredAmount)
 
bool CanUpdateCriteria (Criteria const *criteria, CriteriaTreeList const *trees, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, WorldObject const *ref, Player *referencePlayer)
 
virtual void SendPacket (WorldPacket const *data) const =0
 
bool ConditionsSatisfied (Criteria const *criteria, Player *referencePlayer) const
 
bool RequirementsSatisfied (Criteria const *criteria, uint64 miscValue1, uint64 miscValue2, uint64 miscValue3, WorldObject const *ref, Player *referencePlayer) const
 
virtual bool RequiredAchievementSatisfied (uint32) const
 
bool ModifierTreeSatisfied (ModifierTreeNode const *parent, uint64 miscValue1, uint64 miscValue2, WorldObject const *ref, Player *referencePlayer) const
 
bool ModifierSatisfied (ModifierTreeEntry const *modifier, uint64 miscValue1, uint64 miscValue2, WorldObject const *ref, Player *referencePlayer) const
 
virtual std::string GetOwnerInfo () const =0
 
virtual CriteriaList const & GetCriteriaByType (CriteriaType type, uint32 asset) const =0
 

Private Attributes

Player_owner
 
std::unordered_set< uint32_completedObjectives
 

Additional Inherited Members

- Protected Attributes inherited from CriteriaHandler
CriteriaProgressMap _criteriaProgress
 
std::unordered_map< uint32, Milliseconds_startedCriteria
 

Detailed Description

Definition at line 24 of file QuestObjectiveCriteriaMgr.h.

Constructor & Destructor Documentation

◆ QuestObjectiveCriteriaMgr()

QuestObjectiveCriteriaMgr::QuestObjectiveCriteriaMgr ( Player owner)
explicit

Definition at line 30 of file QuestObjectiveCriteriaMgr.cpp.

◆ ~QuestObjectiveCriteriaMgr()

QuestObjectiveCriteriaMgr::~QuestObjectiveCriteriaMgr ( )

Definition at line 34 of file QuestObjectiveCriteriaMgr.cpp.

Member Function Documentation

◆ CanCompleteCriteriaTree()

bool QuestObjectiveCriteriaMgr::CanCompleteCriteriaTree ( CriteriaTree const *  tree)
overrideprotectedvirtual

Reimplemented from CriteriaHandler.

Definition at line 281 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ CanUpdateCriteriaTree()

bool QuestObjectiveCriteriaMgr::CanUpdateCriteriaTree ( Criteria const *  criteria,
CriteriaTree const *  tree,
Player referencePlayer 
) const
overrideprotectedvirtual

Reimplemented from CriteriaHandler.

Definition at line 242 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ CheckAllQuestObjectiveCriteria()

void QuestObjectiveCriteriaMgr::CheckAllQuestObjectiveCriteria ( Player referencePlayer)

Definition at line 38 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CompletedCriteriaTree()

void QuestObjectiveCriteriaMgr::CompletedCriteriaTree ( CriteriaTree const *  tree,
Player referencePlayer 
)
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 290 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ CompletedObjective()

void QuestObjectiveCriteriaMgr::CompletedObjective ( QuestObjective const *  questObjective,
Player referencePlayer 
)

Definition at line 199 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DeleteFromDB()

void QuestObjectiveCriteriaMgr::DeleteFromDB ( ObjectGuid const &  guid)
static

Definition at line 58 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCriteriaByType()

CriteriaList const & QuestObjectiveCriteriaMgr::GetCriteriaByType ( CriteriaType  type,
uint32  asset 
) const
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 309 of file QuestObjectiveCriteriaMgr.cpp.

◆ GetOwnerInfo()

std::string QuestObjectiveCriteriaMgr::GetOwnerInfo ( ) const
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 304 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasCompletedObjective()

bool QuestObjectiveCriteriaMgr::HasCompletedObjective ( QuestObjective const *  questObjective) const

Definition at line 211 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the caller graph for this function:

◆ LoadFromDB()

void QuestObjectiveCriteriaMgr::LoadFromDB ( PreparedQueryResult  objectiveResult,
PreparedQueryResult  criteriaResult 
)

Definition at line 73 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ RequiredAchievementSatisfied()

bool QuestObjectiveCriteriaMgr::RequiredAchievementSatisfied ( uint32  achievementId) const
overrideprotectedvirtual

Reimplemented from CriteriaHandler.

Definition at line 314 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ Reset()

void QuestObjectiveCriteriaMgr::Reset ( )
overridevirtual

Reimplemented from CriteriaHandler.

Definition at line 45 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ ResetCriteriaTree()

void QuestObjectiveCriteriaMgr::ResetCriteriaTree ( uint32  criteriaTreeId)

Definition at line 168 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ SaveToDB()

void QuestObjectiveCriteriaMgr::SaveToDB ( CharacterDatabaseTransaction  trans)

Definition at line 124 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ SendAllData()

void QuestObjectiveCriteriaMgr::SendAllData ( Player const *  receiver) const
overridevirtual

Implements CriteriaHandler.

Definition at line 180 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ SendCriteriaProgressRemoved()

void QuestObjectiveCriteriaMgr::SendCriteriaProgressRemoved ( uint32  criteriaId)
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 235 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendCriteriaUpdate()

void QuestObjectiveCriteriaMgr::SendCriteriaUpdate ( Criteria const *  entry,
CriteriaProgress const *  progress,
Seconds  timeElapsed,
bool  timedCompleted 
) const
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 216 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:

◆ SendPacket()

void QuestObjectiveCriteriaMgr::SendPacket ( WorldPacket const *  data) const
overrideprotectedvirtual

Implements CriteriaHandler.

Definition at line 299 of file QuestObjectiveCriteriaMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _completedObjectives

std::unordered_set<uint32> QuestObjectiveCriteriaMgr::_completedObjectives
private

Definition at line 63 of file QuestObjectiveCriteriaMgr.h.

◆ _owner

Player* QuestObjectiveCriteriaMgr::_owner
private

Definition at line 62 of file QuestObjectiveCriteriaMgr.h.


The documentation for this class was generated from the following files: