Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Core/Protocol: correct SMSG_CALENDAR_RAID_LOCKOUT_UPDATED struct (and…

… SMSG_CALENDAR_SEND_CALENDAR if no invite was found)
  • Loading branch information...
commit 037f37ac653f1c2aa26068f6a03b4e01e7a544c3 1 parent 23641d8
@kaelima kaelima authored
Showing with 32 additions and 24 deletions.
  1. +32 −24 src/server/game/Handlers/CalendarHandler.cpp
View
56 src/server/game/Handlers/CalendarHandler.cpp
@@ -20,7 +20,7 @@
----- Opcodes Not Used yet -----
SMSG_CALENDAR_CLEAR_PENDING_ACTION SendCalendarClearPendingAction()
-SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save) <--- Structure unknown, using LOCKOUT_ADDED
+SMSG_CALENDAR_RAID_LOCKOUT_UPDATED SendCalendarRaidLockoutUpdated(InstanceSave const* save)
----- Opcodes without Sniffs -----
SMSG_CALENDAR_FILTER_GUILD [ for (... uint32(count) { packguid(???), uint8(???) } ]
@@ -74,7 +74,11 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
else
{
sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Invite found with id [" UI64FMTD "]", *it);
- data << uint64(0) << uint64(0) << uint8(0) << uint8(0);
+ data << uint64(0);
+ data << uint64(0);
+ data << uint8(0);
+ data << uint8(0);
+ data << uint8(0);
data.appendPackGUID(0);
}
}
@@ -96,8 +100,12 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
else
{
sLog->outError("SMSG_CALENDAR_SEND_CALENDAR: No Event found with id [" UI64FMTD "]", *it);
- data << uint64(0) << uint8(0) << uint32(0)
- << uint32(0) << uint32(0) << uint32(0);
+ data << uint64(0);
+ data << uint8(0);
+ data << uint32(0);
+ data << uint32(0);
+ data << uint32(0);
+ data << uint32(0);
data.appendPackGUID(0);
}
}
@@ -835,26 +843,6 @@ void WorldSession::SendCalendarClearPendingAction()
SendPacket(&data);
}
-void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
-{
- if (!save)
- return;
-
- uint64 guid = _player->GetGUID();
- sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
- "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
-
- time_t cur_time = time_t(time(NULL));
-
- WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
- data << secsToTimeBitFields(cur_time);
- data << uint32(save->GetMapId());
- data << uint32(save->GetDifficulty());
- data << uint32(save->GetResetTime() - cur_time);
- data << uint64(save->GetInstanceId());
- SendPacket(&data);
-}
-
void WorldSession::SendCalendarCommandResult(CalendarError err, char const* param /*= NULL*/)
{
uint64 guid = _player->GetGUID();
@@ -898,3 +886,23 @@ void WorldSession::SendCalendarRaidLockout(InstanceSave const* save, bool add)
data << uint64(save->GetInstanceId());
SendPacket(&data);
}
+
+void WorldSession::SendCalendarRaidLockoutUpdated(InstanceSave const* save)
+{
+ if (!save)
+ return;
+
+ uint64 guid = _player->GetGUID();
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_CALENDAR_RAID_LOCKOUT_UPDATED [" UI64FMTD
+ "] Map: %u, Difficulty %u", guid, save->GetMapId(), save->GetDifficulty());
+
+ time_t cur_time = time_t(time(NULL));
+
+ WorldPacket data(SMSG_CALENDAR_RAID_LOCKOUT_UPDATED, 4 + 4 + 4 + 4 + 8);
@stfx
stfx added a note

where are the 8 bytes sent?

@kaelima
kaelima added a note

amagad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ data << secsToTimeBitFields(cur_time);
+ data << uint32(save->GetMapId());
+ data << uint32(save->GetDifficulty());
+ data << uint32(0); // Amount of seconds that has changed to the reset time
+ data << uint32(save->GetResetTime() - cur_time);
+ SendPacket(&data);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.