diff --git a/src/server/game/Calendar/Calendar.cpp b/src/server/game/Calendar/Calendar.cpp
index a0183886..7daeddaa 100644
--- a/src/server/game/Calendar/Calendar.cpp
+++ b/src/server/game/Calendar/Calendar.cpp
@@ -1,25 +1,103 @@
/*
- * Copyright (C) 2005 - 2012 MaNGOS
*
- * Copyright (C) 2008 - 2012 Trinity
+ * Copyright (C) 2011-2012 ArkCORE2
+ * Copyright (C) 2010-2012 Project SkyFire
*
- * Copyright (C) 2010 - 2012 ProjectSkyfire
+ * Copyright (C) 2008-2012 TrinityCore
+ * Copyright (C) 2005-2012 MaNGOS
*
- * Copyright (C) 2011 - 2012 ArkCORE
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
*/
-
+
#include "gamePCH.h"
+#include "Player.h"
+#include "Calendar.h"
+
+std::string CalendarInvite::GetDebugString() const
+{
+ std::ostringstream data;
+
+ data << "CalendarInvite::"
+ << " inviteId: " << _inviteId
+ << " EventId: " << _eventId
+ << " Status: " << uint32(_status)
+ << " Invitee: " << _invitee
+ << " Sender: " << _senderGUID
+ << " Rank: " << uint32(_rank)
+ << " Text: " << _text;
+
+ return data.str();
+}
+
+void CalendarInvite::Init()
+{
+ _eventId = 0;
+ _invitee = 0;
+ _senderGUID = 0;
+ _statusTime = 0;
+ _status = CALENDAR_STATUS_INVITED; // default (0)?
+ _rank = CALENDAR_RANK_PLAYER;
+ _text = "";
+}
+
+std::string CalendarEvent::GetDebugString() const
+{
+ 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;
+
+ return data.str();
+}
+
+void CalendarEvent::Init()
+{
+ _creatorGUID = 0;
+ _guildId = 0;
+ _type = CALENDAR_TYPE_OTHER;
+ _dungeonId = -1;
+ _maxInvites = 0;
+ _eventTime = 0;
+ _flags = 0;
+ _repeatable = false;
+ _timezoneTime = 0;
+ _title = "";
+ _description = "";
+}
+
+std::string CalendarAction::GetDebugString() const
+{
+ std::ostringstream data;
+
+ data << "CalendarAction::"
+ << " Action: " << GetAction()
+ << " Guid: " << GetPlayer()->GetGUID()
+ << " Invite Id: " << GetInviteId()
+ << " Extra data: " << GetExtraData()
+ << " Event: " << Event.GetDebugString()
+ << " Invite: " << Invite.GetDebugString();
+
+ return data.str();
+}
diff --git a/src/server/game/Calendar/Calendar.h b/src/server/game/Calendar/Calendar.h
index 1324fe85..59fbae6f 100644
--- a/src/server/game/Calendar/Calendar.h
+++ b/src/server/game/Calendar/Calendar.h
@@ -1,31 +1,194 @@
/*
- * Copyright (C) 2005 - 2012 MaNGOS
*
- * Copyright (C) 2008 - 2012 Trinity
+ * Copyright (C) 2011-2012 ArkCORE2
+ * Copyright (C) 2010-2012 Project SkyFire
*
- * Copyright (C) 2010 - 2012 ProjectSkyfire
+ * Copyright (C) 2008-2012 TrinityCore
+ * Copyright (C) 2005-2012 MaNGOS
*
- * Copyright (C) 2011 - 2012 ArkCORE
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 3 of the License, or (at your
+ * option) any later version.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see .
*/
+
#ifndef ARKCORE_CALENDAR_H
#define ARKCORE_CALENDAR_H
-class Calendar
+#include "Errors.h"
+#include "SharedDefines.h"
+#include