aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Calendar/Calendar.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-02-24 22:04:29 +0100
committerShauren <shauren.trinity@gmail.com>2012-02-24 22:04:29 +0100
commitae5ecb6ac00c859059835525c7e72deee33e7ff6 (patch)
treee3d8e72923f7069b9d1b3bed35241b2b53f49bcb /src/server/game/Calendar/Calendar.cpp
parent32eab3dca794cf0da17153349b9e76f3a49c7a0f (diff)
Core/Calendar: Code refactoring/removed obsolete functions
Diffstat (limited to 'src/server/game/Calendar/Calendar.cpp')
-rwxr-xr-xsrc/server/game/Calendar/Calendar.cpp314
1 files changed, 45 insertions, 269 deletions
diff --git a/src/server/game/Calendar/Calendar.cpp b/src/server/game/Calendar/Calendar.cpp
index 82ba3c1b062..320f49e0ed4 100755
--- a/src/server/game/Calendar/Calendar.cpp
+++ b/src/server/game/Calendar/Calendar.cpp
@@ -18,292 +18,68 @@
#include "Calendar.h"
-CalendarInvite::CalendarInvite(uint64 _inviteId /* = 0 */): inviteId(_inviteId),
-eventId(0), invitee(0), senderGUID(0), statusTime(0), status(0), rank(0)
-{
-}
-
-CalendarInvite::~CalendarInvite()
-{
-}
-
-void CalendarInvite::SetInviteId(uint64 _inviteId)
-{
- inviteId = _inviteId;
-}
-
-uint64 CalendarInvite::GetInviteId() const
-{
- return inviteId;
-}
-
-void CalendarInvite::SetEventId(uint64 _eventId)
-{
- eventId = _eventId;
-}
-
-uint64 CalendarInvite::GetEventId() const
-{
- return eventId;
-}
-
-void CalendarInvite::SetSenderGUID(uint64 _guid)
-{
- senderGUID = _guid;
-}
-
-uint64 CalendarInvite::GetSenderGUID() const
-{
- return senderGUID;
-}
-
-void CalendarInvite::SetInvitee(uint64 _guid)
-{
- invitee = _guid;
-}
-
-uint64 CalendarInvite::GetInvitee() const
-{
- return invitee;
-}
-
-void CalendarInvite::SetStatusTime(uint32 _statusTime)
-{
- statusTime = _statusTime;
-}
-
-uint32 CalendarInvite::GetStatusTime() const
-{
- return statusTime;
-}
-
-void CalendarInvite::SetText(std::string _text)
-{
- text = _text;
-}
-
-std::string CalendarInvite::GetText() const
-{
- return text;
-}
-
-void CalendarInvite::SetStatus(uint8 _status)
-{
- status = _status;
-}
-
-uint8 CalendarInvite::GetStatus() const
-{
- return status;
-}
-
-void CalendarInvite::SetRank(uint8 _rank)
-{
- rank = _rank;
-}
-
-uint8 CalendarInvite::GetRank() const
-{
- return rank;
-}
-
-CalendarEvent::CalendarEvent(uint64 _eventId /* = 0 */) : eventId(_eventId),
-creatorGUID(0), guildId(0), type(CALENDAR_TYPE_OTHER), dungeonId(-1),
-maxInvites(0), eventTime(0), flags(0), repeatable(false), timezoneTime(0),
-title(""), description("")
-{
-}
-
-CalendarEvent::~CalendarEvent()
-{
-}
-
-void CalendarEvent::SetEventId(uint64 _eventId)
-{
- eventId = _eventId;
-}
-
-uint64 CalendarEvent::GetEventId() const
-{
- return eventId;
-}
-
-void CalendarEvent::SetCreatorGUID(uint64 _guid)
-{
- creatorGUID = _guid;
-}
-
-uint64 CalendarEvent::GetCreatorGUID() const
-{
- return creatorGUID;
-}
-
-void CalendarEvent::SetGuildId(uint32 _guildId)
-{
- guildId = _guildId;
-}
-
-uint32 CalendarEvent::GetGuildId() const
-{
- return guildId;
-}
-
-void CalendarEvent::SetTitle(std::string _title)
-{
- title = _title;
-}
-
-std::string CalendarEvent::GetTitle() const
-{
- return title;
-}
-
-void CalendarEvent::SetDescription(std::string _description)
-{
- description = _description;
-}
-
-std::string CalendarEvent::GetDescription() const
-{
- return description;
-}
-
-void CalendarEvent::SetType(uint8 _type)
-{
- type = _type;
-}
-
-uint8 CalendarEvent::GetType() const
-{
- return type;
-}
-
-void CalendarEvent::SetMaxInvites(uint32 max)
-{
- maxInvites = max;
-}
-
-uint32 CalendarEvent::GetMaxInvites() const
-{
- return maxInvites;
-}
-
-void CalendarEvent::SetDungeonId(int32 _dungeonId)
-{
- dungeonId = _dungeonId;
-}
-
-int32 CalendarEvent::GetDungeonId() const
-{
- return dungeonId;
-}
-
-void CalendarEvent::SetTime(uint32 _eventTime)
-{
- eventTime = _eventTime;
-}
-
-uint32 CalendarEvent::GetTime() const
-{
- return eventTime;
-}
-
-void CalendarEvent::SetFlags(uint32 _flags)
-{
- flags = _flags;
-}
-
-uint32 CalendarEvent::GetFlags() const
-{
- return flags;
-}
-
-void CalendarEvent::SetRepeatable(bool _repeatable)
-{
- repeatable = _repeatable;
-}
-
-uint8 CalendarEvent::GetRepeatable() const
-{
- return repeatable;
-}
-
-void CalendarEvent::SetTimeZoneTime(uint32 _timezoneTime)
-{
- timezoneTime = _timezoneTime;
-}
-
-uint32 CalendarEvent::GetTimeZoneTime() const
-{
- return timezoneTime;
-}
-
-void CalendarEvent::AddInvite(uint64 inviteId)
-{
- if (inviteId)
- _invites.insert(inviteId);
-}
-
-void CalendarEvent::RemoveInvite(uint64 inviteId)
-{
- _invites.erase(inviteId);
-}
-
-bool CalendarEvent::HasInvite(uint64 inviteId) const
+std::string CalendarInvite::GetDebugString() const
{
- return _invites.find(inviteId) != _invites.end();
-}
+ std::ostringstream data;
-CalendarinviteIdList const& CalendarEvent::GetInviteIdList() const
-{
- return _invites;
-}
+ data << "CalendarInvite::"
+ << " inviteId: " << _inviteId
+ << " EventId: " << _eventId
+ << " Status: " << uint32(_status)
+ << " Invitee: " << _invitee
+ << " Sender: " << _senderGUID
+ << " Rank: " << uint32(_rank)
+ << " Text: " << _text;
-void CalendarEvent::SetInviteIdList(CalendarinviteIdList const& list)
-{
- _invites = list;
+ return data.str();
}
-void CalendarEvent::ClearInviteIdList()
+void CalendarInvite::Init()
{
- _invites.clear();
+ _eventId = 0;
+ _invitee = 0;
+ _senderGUID = 0;
+ _statusTime = 0;
+ _status = 0;
+ _rank = 0;
+ _text = "";
}
-std::string CalendarInvite::GetDebugString() const
+std::string CalendarEvent::GetDebugString() const
{
std::ostringstream data;
- data << "CalendarInvite::"
- << " inviteId: " << inviteId
- << " EventId: " << eventId
- << " Status: " << uint32(status)
- << " Invitee: " << invitee
- << " Sender: " << senderGUID
- << " Rank: " << uint32(rank)
- << " Text: " << text;
+ data << "CalendarEvent::"
+ << " EventId: " << _eventId
+ << " Title: " << _title
+ << " Description" << _description
+ << " Type: " << uint32(_type)
+ << " Max Invites: " << _maxInvites
+ << " Creator: " << _creatorGUID
+ << " Flags: " << _flags
+ << " Guild: " << _guildId
+ << " Time: " << _eventTime
+ << " Time2: " << _timezoneTime
+ << " Repeatable: " << uint32(_repeatable)
+ << " DungeonId: " << _dungeonId;
return data.str();
}
-std::string CalendarEvent::GetDebugString() const
+void CalendarEvent::Init()
{
- std::ostringstream data;
-
- data << "CalendarEvent::"
- << " EventId: " << eventId
- << " Title: " << title
- << " Description" << description
- << " Type: " << uint32(type)
- << " Max Invites: " << maxInvites
- << " Creator: " << creatorGUID
- << " Flags: " << flags
- << " Guild: " << guildId
- << " Time: " << eventTime
- << " Time2: " << timezoneTime
- << " Repeatable: " << uint32(repeatable)
- << " DungeonId: " << dungeonId;
+ _creatorGUID = 0;
+ _guildId = 0;
+ _type = CALENDAR_TYPE_OTHER;
+ _dungeonId = -1;
+ _maxInvites = 0;
+ _eventTime = 0;
+ _flags = 0;
+ _repeatable = false;
+ _timezoneTime = 0;
+ _title = "";
+ _description = "";
- return data.str();
}
std::string CalendarAction::GetDebugString() const