Skip to content

Commit

Permalink
Fix type of last dword in MSG_QUERY_NEXT_MAIL_TIME
Browse files Browse the repository at this point in the history
also remove gameobject as sender for now.
  • Loading branch information
cyberium committed Feb 6, 2024
1 parent a3186b3 commit c5179f2
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/game/Mails/MailHandler.cpp
Expand Up @@ -824,34 +824,24 @@ void WorldSession::HandleQueryNextMailTime(WorldPacket& /**recv_data*/)
if (now < m->deliver_time)
continue;

HighGuid guidType = HIGHGUID_PLAYER;

switch (m->messageType)
{
case MAIL_CREATURE:
guidType = HIGHGUID_UNIT;
break;
case MAIL_GAMEOBJECT:
guidType = HIGHGUID_GAMEOBJECT;
break;
}
HighGuid guidType = m->messageType == MAIL_CREATURE ? HIGHGUID_UNIT : HIGHGUID_PLAYER;

data << ObjectGuid(guidType, m->sender); // sender guid
data << static_cast<uint32>(m->sender); // sender id
data << static_cast<uint32>(m->messageType); // message type

data << uint32(m->stationery);
data << uint32(0xC6000000); // float unk, time or something
data << float(0); // delay hiding the sender (hide sender when hovering mail icon)

++count;
if (count == 2) // do not display more than 2 mails
if (count == 2) // do not display more than 2 mails
break;
}
data.put<uint32>(4, count);
}
else
{
data << uint32(0xC7A8C000);
data << float(-86400);
data << uint32(0x00000000);
}
SendPacket(data);
Expand Down

0 comments on commit c5179f2

Please sign in to comment.