AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
anonymous_namespace{BattlegroundSpamProtect.cpp} Namespace Reference

Functions

void AddTime (ObjectGuid guid)
 
uint32 GetTime (ObjectGuid guid)
 
bool IsCorrectDelay (ObjectGuid guid)
 

Variables

std::unordered_map< ObjectGuid, uint32_players
 

Function Documentation

◆ AddTime()

void anonymous_namespace{BattlegroundSpamProtect.cpp}::AddTime ( ObjectGuid  guid)
30 {
31 _players.insert_or_assign(guid, GameTime::GetGameTime().count());
32 }
std::unordered_map< ObjectGuid, uint32 > _players
Definition: BattlegroundSpamProtect.cpp:27
Seconds GetGameTime()
Definition: GameTime.cpp:38

References _players, and GameTime::GetGameTime().

◆ GetTime()

uint32 anonymous_namespace{BattlegroundSpamProtect.cpp}::GetTime ( ObjectGuid  guid)
35 {
36 auto const& itr = _players.find(guid);
37 if (itr != _players.end())
38 {
39 return itr->second;
40 }
41
42 return 0;
43 }

References _players.

Referenced by IsCorrectDelay().

◆ IsCorrectDelay()

bool anonymous_namespace{BattlegroundSpamProtect.cpp}::IsCorrectDelay ( ObjectGuid  guid)
46 {
47 // Skip if spam time < 30 secs (default)
49 }
@ CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_SPAM_DELAY
Definition: IWorld.h:309
#define sWorld
Definition: World.h:443
uint32 GetTime(ObjectGuid guid)
Definition: BattlegroundSpamProtect.cpp:34

References CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_SPAM_DELAY, GameTime::GetGameTime(), GetTime(), and sWorld.

Variable Documentation

◆ _players

std::unordered_map<ObjectGuid , uint32 > anonymous_namespace{BattlegroundSpamProtect.cpp}::_players

Referenced by AddTime(), and GetTime().