Difference between revisions of "317:Initialize Ignore List"
From RuneWiki
Jump to navigationJump to searchLine 10: | Line 10: | ||
The client divides the size of the packet by 8 (since each name is sent in 8-byte hashes ([[QWord]]), then applies it to the ignore list size variable. | The client divides the size of the packet by 8 (since each name is sent in 8-byte hashes ([[QWord]]), then applies it to the ignore list size variable. | ||
+ | ignoreListSize = packetSize / 8; | ||
=== Step Two: Add names === | === Step Two: Add names === | ||
The client loops runs a loop 'ignoreCount' times. Each iteration of the loop will read a [[QWord]] from the buffer and add it to an array. | The client loops runs a loop 'ignoreCount' times. Each iteration of the loop will read a [[QWord]] from the buffer and add it to an array. | ||
− | |||
− | |||
− | |||
for(int i = 0; i < ignoreListSize; i++) | for(int i = 0; i < ignoreListSize; i++) | ||
ignoredPlayerHashes[i] = stream.getLong(); //Note - getLong is more commonly 'readQWord()'. | ignoredPlayerHashes[i] = stream.getLong(); //Note - getLong is more commonly 'readQWord()'. |
Latest revision as of 20:55, 27 February 2010
Initialize Ignore List Sends the hashed version of each of name of the Player's ignore list. | |
Opcode | 214 |
---|---|
Type | VARIABLE_SHORT(?) |
Length | N/A |
Initialize Ignore List
This packet sends the hashed version of all ignored player's names.
Handling
Step One: Set ignore count
The client divides the size of the packet by 8 (since each name is sent in 8-byte hashes (QWord), then applies it to the ignore list size variable.
ignoreListSize = packetSize / 8;
Step Two: Add names
The client loops runs a loop 'ignoreCount' times. Each iteration of the loop will read a QWord from the buffer and add it to an array.
for(int i = 0; i < ignoreListSize; i++) ignoredPlayerHashes[i] = stream.getLong(); //Note - getLong is more commonly 'readQWord()'.