*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
This commit is contained in:
1 parent
f21f47005d
commit
26b5e033ff
2257 files changed
+750
-103852
No files matched your search
@@ -15,36 +15,27 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "Common.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "Log.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
|
||||
void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
|
||||
|
||||
time_t cur_time = time(NULL);
|
||||
|
||||
WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR,4+4*0+4+4*0+4+4);
|
||||
|
||||
// TODO: calendar invite event output
|
||||
data << (uint32) 0; //invite node count
|
||||
// TODO: calendar event output
|
||||
data << (uint32) 0; //event count
|
||||
|
||||
data << (uint32) 0; //wtf??
|
||||
data << (uint32) secsToTimeBitFields(cur_time); // current time
|
||||
|
||||
uint32 counter = 0;
|
||||
size_t p_counter = data.wpos();
|
||||
data << uint32(counter); // instance save count
|
||||
|
||||
for(int i = 0; i < TOTAL_DIFFICULTIES; ++i)
|
||||
{
|
||||
for (Player::BoundInstancesMap::const_iterator itr = _player->m_boundInstances[i].begin(); itr != _player->m_boundInstances[i].end(); ++itr)
|
||||
@@ -61,7 +52,6 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
|
||||
}
|
||||
}
|
||||
data.put<uint32>(p_counter,counter);
|
||||
|
||||
data << (uint32) 1135753200; //wtf?? (28.12.2005 12:00)
|
||||
data << (uint32) 0; // unk counter 4
|
||||
data << (uint32) 0; // unk counter 5
|
||||
@@ -69,14 +59,12 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
|
||||
//data.hexlike();
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_EVENT");
|
||||
recv_data.hexlike();
|
||||
recv_data.read_skip<uint64>(); // unk
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER");
|
||||
@@ -85,24 +73,20 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
|
||||
recv_data.read_skip<uint32>(); // unk2
|
||||
recv_data.read_skip<uint32>(); // unk3
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM");
|
||||
recv_data.hexlike();
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_ADD_EVENT");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//std::string unk1, unk2;
|
||||
//recv_data >> (std::string)unk1;
|
||||
//recv_data >> (std::string)unk2;
|
||||
|
||||
//uint8 unk3, unk4;
|
||||
//uint32 unk5, unk6, unk7, unk8, unk9, count = 0;
|
||||
//recv_data >> (uint8)unk3;
|
||||
@@ -128,13 +112,11 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> std::string
|
||||
@@ -147,110 +129,88 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
|
||||
//recv_data >> uint32
|
||||
//recv_data >> uint32
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint32
|
||||
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint32
|
||||
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> std::string
|
||||
//recv_data >> uint8
|
||||
//recv_data >> uint8
|
||||
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint32
|
||||
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data.readPackGUID(guid)
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data.readPackGUID(guid)
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint32
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data.readPackGUID(guid)
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint32
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_COMPLAIN");
|
||||
recv_data.hexlike();
|
||||
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
|
||||
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
//recv_data >> uint64
|
||||
}
|
||||
|
||||
void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
|
||||
|
||||
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
|
||||
data << uint32(0); // 0 - no pending invites, 1 - some pending invites
|
||||
SendPacket(&data);
|
||||
|
||||
Reference in new issue
Block a user