mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 19:43:48 +00:00
feat(Core/Time): Implement saparated manager for game time (#8630)
This commit is contained in:
@@ -150,7 +150,6 @@ class Channel
|
||||
{
|
||||
ObjectGuid player;
|
||||
uint8 flags;
|
||||
uint64 lastSpeakTime; // pussywizard
|
||||
Player* plrPtr; // pussywizard
|
||||
|
||||
[[nodiscard]] bool HasFlag(uint8 flag) const { return flags & flag; }
|
||||
@@ -175,16 +174,6 @@ class Channel
|
||||
if (state) flags |= MEMBER_FLAG_MUTED;
|
||||
else flags &= ~MEMBER_FLAG_MUTED;
|
||||
}
|
||||
bool IsAllowedToSpeak(uint64 speakDelay) // pussywizard
|
||||
{
|
||||
if (lastSpeakTime + speakDelay <= static_cast<uint64>(sWorld->GetGameTime()))
|
||||
{
|
||||
lastSpeakTime = sWorld->GetGameTime();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
bool _gmStatus = false;
|
||||
};
|
||||
@@ -234,6 +223,7 @@ public:
|
||||
// pussywizard:
|
||||
void AddWatching(Player* p);
|
||||
void RemoveWatching(Player* p);
|
||||
bool IsAllowedToSpeak(uint32 speakDelay); // pussywizard
|
||||
|
||||
private:
|
||||
// initial packet data (notify type and channel name)
|
||||
@@ -339,6 +329,7 @@ private:
|
||||
uint32 _channelDBId;
|
||||
TeamId _teamId;
|
||||
ObjectGuid _ownerGUID;
|
||||
uint32 _lastSpeakTime;
|
||||
std::string _name;
|
||||
std::string _password;
|
||||
ChannelRights _channelRights;
|
||||
|
||||
Reference in New Issue
Block a user