forked from Nisalon/IntWars
-
Notifications
You must be signed in to change notification settings - Fork 44
PacketAnnouncement
Intline9 edited this page Jul 19, 2012
·
3 revisions
At the beginning of a new match there is a voice that gives you some standard announcements e.g. “Welcome to summoner’s rift”.
Example:
S -> C, Length: 18, Description: Channel: 3, Flag: 1)
4C 00 00 00 00 5A 00 00 00 00 00 00 00 00 01 00 00 00
Type | Offset | Name | Description |
PacketHeader | 0 | Header | Header |
uint8 | 5 | AnnouncementId | There are different annoucements look at the table below |
uint64 | 6 | Zero | Zero byte padding |
uint32 | 14 | MapId | Looks like an identifier for the map |
MapId | Time | AnnouncementId | Announcement |
01 | 00:30 | 59 | Welcome to Summoner’s Rift! |
01 | 01:00 | 5A | Thirty seconds until minions spawn! |
04 | 00:30 | 59 | Welcome to The Twisted Treeline! |
04 | 01:00 | 5A | Thirty seconds until minions spawn! |
03 | 00:30 | 59 | Thirty seconds until minions spawn! |
08 | 00:30 | 5B | Welcome to The Crystal Scar! |
08 | 00:50 | 59 | Battle in 30 seconds! |
The function that gets the msg number from the byte is this function. I think that all those static sizes are sizeof(class). Its for client version 0.0.0.142 and will probably change for every version.
__int32 __usercall parseMsgNo<eax>(int msgNo<eax>, unknown *a2<esi>) { __int32 result; // eax@1 ldiv_t div; // qax@1 div = ldiv(*(_DWORD *)msgNo ^ 0xDEADBEEFu, 0x1F31Du); result = (0x41A7 * div.rem - 0xB14 * div.quot + ((char)-(0x41A7 * div.rem - 0xB14 * div.quot < 0) & 0x7FFFFFFF)) & a2->dword20; if ( a2->dword24 <= (unsigned int)result ) result += -1 - (a2->dword20 >> 1); return result; }