AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AchievementCriteriaDataSet Struct Reference

#include "AchievementMgr.h"

Public Types

typedef std::vector< AchievementCriteriaDataStorage
 

Public Member Functions

 AchievementCriteriaDataSet ()=default
 
void Add (AchievementCriteriaData const &data)
 
bool Meets (Player const *source, Unit const *target, uint32 miscvalue=0) const
 
void SetCriteriaId (uint32 id)
 

Private Attributes

uint32 _criteria_id {0}
 
Storage _storage
 

Detailed Description

Member Typedef Documentation

◆ Storage

Constructor & Destructor Documentation

◆ AchievementCriteriaDataSet()

AchievementCriteriaDataSet::AchievementCriteriaDataSet ( )
default

Member Function Documentation

◆ Add()

void AchievementCriteriaDataSet::Add ( AchievementCriteriaData const &  data)
inline
236{ _storage.push_back(data); }
Storage _storage
Definition: AchievementMgr.h:241

References _storage.

Referenced by AchievementGlobalMgr::LoadAchievementCriteriaData().

◆ Meets()

bool AchievementCriteriaDataSet::Meets ( Player const *  source,
Unit const *  target,
uint32  miscvalue = 0 
) const
473{
474 for (Storage::const_iterator itr = _storage.begin(); itr != _storage.end(); ++itr)
475 if (!itr->Meets(_criteria_id, source, target, miscvalue))
476 return false;
477
478 return true;
479}
uint32 _criteria_id
Definition: AchievementMgr.h:240

References _criteria_id, and _storage.

Referenced by AchievementMgr::UpdateAchievementCriteria().

◆ SetCriteriaId()

void AchievementCriteriaDataSet::SetCriteriaId ( uint32  id)
inline

Member Data Documentation

◆ _criteria_id

uint32 AchievementCriteriaDataSet::_criteria_id {0}
private

Referenced by Meets(), and SetCriteriaId().

◆ _storage

Storage AchievementCriteriaDataSet::_storage
private

Referenced by Add(), and Meets().