Core/Players: Allow players to answer gamemaster whispers even if whispers are disabled. Whitelist can be reset by .whispers off
This commit is contained in:
@@ -24663,3 +24663,13 @@ void Player::_SaveInstanceTimeRestrictions(SQLTransaction& trans)
|
||||
trans->Append(stmt);
|
||||
}
|
||||
}
|
||||
|
||||
bool Player::IsInWhipserWhiteList(uint64 guid)
|
||||
{
|
||||
for (WhisperListContainer::const_iterator itr = WhisperList.begin(); itr != WhisperList.end(); ++itr)
|
||||
{
|
||||
if (*itr == guid)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -128,6 +128,8 @@ typedef UNORDERED_MAP<uint32, PlayerTalent*> PlayerTalentMap;
|
||||
typedef UNORDERED_MAP<uint32, PlayerSpell*> PlayerSpellMap;
|
||||
typedef std::list<SpellModifier*> SpellModList;
|
||||
|
||||
typedef std::list<uint64> WhisperListContainer;
|
||||
|
||||
struct SpellCooldown
|
||||
{
|
||||
time_t end;
|
||||
@@ -2467,7 +2469,13 @@ class Player : public Unit, public GridObject<Player>
|
||||
float GetAverageItemLevel();
|
||||
bool isDebugAreaTriggers;
|
||||
|
||||
void ClearWhisperWhiteList() { WhisperList.clear(); }
|
||||
void AddWhisperWhiteList(uint64 guid) { WhisperList.push_back(guid); }
|
||||
bool IsInWhipserWhiteList(uint64 guid);
|
||||
|
||||
protected:
|
||||
// Gamemaster whisper whitelist
|
||||
WhisperListContainer WhisperList;
|
||||
uint32 m_regenTimerCount;
|
||||
float m_powerFraction[MAX_POWERS];
|
||||
uint32 m_contestedPvPTimer;
|
||||
|
||||
Reference in New Issue
Block a user