Significant tidy-up. Update msg_template and add new ObjectAnimation message. Tidy up imports. Added buffer overrun check to the packet decoders since the message template doesn't seem to always correspond with what we receive (Specifically, MapBlockReply's new Size parameter)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
// This file has been automatically generated by writeMessageClasses.js
|
||||
|
||||
import Long = require('long');
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {MessageBase} from '../MessageBase';
|
||||
import {Message} from '../../enums/Message';
|
||||
import * as Long from 'long';
|
||||
import { MessageFlags } from '../../enums/MessageFlags';
|
||||
import { MessageBase } from '../MessageBase';
|
||||
import { Message } from '../../enums/Message';
|
||||
|
||||
export class SimStatsMessage implements MessageBase
|
||||
{
|
||||
@@ -91,6 +91,10 @@ export class SimStatsMessage implements MessageBase
|
||||
newObjRegion['ObjectCapacity'] = buf.readUInt32LE(pos);
|
||||
pos += 4;
|
||||
this.Region = newObjRegion;
|
||||
if (pos >= buf.length)
|
||||
{
|
||||
return pos - startPos;
|
||||
}
|
||||
let count = buf.readUInt8(pos++);
|
||||
this.Stat = [];
|
||||
for (let i = 0; i < count; i++)
|
||||
@@ -116,6 +120,10 @@ export class SimStatsMessage implements MessageBase
|
||||
newObjPidStat['PID'] = buf.readInt32LE(pos);
|
||||
pos += 4;
|
||||
this.PidStat = newObjPidStat;
|
||||
if (pos >= buf.length)
|
||||
{
|
||||
return pos - startPos;
|
||||
}
|
||||
count = buf.readUInt8(pos++);
|
||||
this.RegionInfo = [];
|
||||
for (let i = 0; i < count; i++)
|
||||
|
||||
Reference in New Issue
Block a user