public string guild; //var_89; public TowerInitMessage(Reader reader) { this._version = reader.ReadShort(); this._version = 65535 & ((65535 & this._version) >> 3 | (65535 & this._version) << 13); this._version = this._version > 32767 ? (int)(this._version - 65536) : (int)(this._version); reader.ReadShort(); this.targetAction = new EntityTargetAction(reader); this.position = new PositionStub(0, 0); this.position.X = reader.ReadShort(); this.position.X = 65535 & ((65535 & this.position.X) >> 3 | (65535 & this.position.X) << 13); this.position.X = this.position.X > 32767 ? (int)(this.position.X - 65536) : (int)(this.position.X); this.position.Y = reader.ReadShort(); this.position.Y = 65535 & ((65535 & this.position.Y) << 8 | (65535 & this.position.Y) >> 8); this.position.Y = this.position.Y > 32767 ? (int)(this.position.Y - 65536) : (int)(this.position.Y); reader.ReadShort(); this.pointsMax = new ShipPointsStub(reader); this.entityInfo = new EntityInfo(0, 0); this.entityInfo.projectId = reader.ReadShort(); this.entityInfo.projectId = 65535 & ((65535 & this.entityInfo.projectId) >> 12 | (65535 & this.entityInfo.projectId) << 4); this.entityInfo.projectId = this.entityInfo.projectId > 32767 ? (int)(this.entityInfo.projectId - 65536) : (int)(this.entityInfo.projectId); this.entityInfo.entityId = reader.ReadDouble(); this.designID = reader.ReadShort(); this.designID = 65535 & ((65535 & this.designID) >> 15 | (65535 & this.designID) << 1); this.designID = this.designID > 32767 ? (int)(this.designID - 65536) : (int)(this.designID); reader.ReadShort(); this.pointsCurrent = new ShipPointsStub(reader); this.name_28 = reader.ReadInt(); this.name_28 = this.name_28 >> 15 | this.name_28 << 27; this.guild = reader.ReadString(); this.towerId = reader.ReadByte(); this.towerId = 255 & ((255 & this.towerId) << 2 | (255 & this.towerId) >> 6); this.towerId = this.towerId > 127 ? (int)(this.towerId - 256) : (int)(this.towerId); }
public ShipInitMessage(double entityId, int projectId, int nameId, int hp, int maxHp, PositionStub position, List <PositionStub> route) { this.entityInfo = new EntityInfo(entityId, projectId); this.nameId = nameId; if (Bot.NPCs.ContainsKey(nameId)) { this.name = Bot.NPCs[nameId]; } this.pointsCurrent = new ShipPointsStub(hp, 0); this.pointsMax = new ShipPointsStub(maxHp, 0); this.position = position; this.route = route; }
public UserInitMessage(Reader reader) { this._version = reader.ReadShort(); this._version = (int)(65535u & ((uint)(65535 & this._version) >> 7 | (uint)((uint)(65535 & this._version) << 9))); this._version = ((this._version > 32767) ? (this._version - 65536) : this._version); this.var_53 = reader.ReadByte(); this.var_53 = (int)(255u & ((uint)(255 & this.var_53) >> 0 | (uint)((uint)(255 & this.var_53) << 8))); this.var_53 = ((this.var_53 > 127) ? (this.var_53 - 256) : this.var_53); this.entityInfo = new EntityInfo(0, 0); this.entityInfo.projectId = reader.ReadShort(); this.entityInfo.projectId = (65535 & ((65535 & this.entityInfo.projectId) << 7 | (int)((uint)(65535 & this.entityInfo.projectId) >> 9))); this.entityInfo.projectId = ((this.entityInfo.projectId > 32767) ? (this.entityInfo.projectId - 65536) : this.entityInfo.projectId); this.entityInfo.entityId = reader.ReadDouble(); this.bp = reader.ReadInt(); this.bp = (int)((uint)this.bp << 3 | (uint)((uint)this.bp >> 29)); this.position = new PositionStub(0, 0); this.position.X = reader.ReadShort(); this.position.X = (65535 & ((65535 & this.position.X) << 13 | (int)((uint)(65535 & this.position.X) >> 3))); this.position.X = ((this.position.X > 32767) ? (this.position.X - 65536) : this.position.X); this.position.Y = reader.ReadShort(); this.position.Y = (int)(65535u & ((uint)(65535 & this.position.Y) >> 9 | (uint)((uint)(65535 & this.position.Y) << 7))); this.position.Y = ((this.position.Y > 32767) ? (this.position.Y - 65536) : this.position.Y); this.level = reader.ReadByte(); this.level = (255 & ((255 & this.level) << 0 | (int)((uint)(255 & this.level) >> 8))); this.level = ((this.level > 127) ? (this.level - 256) : this.level); this.designId = reader.ReadShort(); this.designId = (int)(65535u & ((uint)(65535 & this.designId) << 11 | (uint)((uint)(65535 & this.designId) >> 5))); this.designId = ((this.designId > 32767) ? (this.designId - 65536) : this.designId); this.carpenterType = reader.ReadByte(); this.carpenterType = (255 & ((255 & this.carpenterType) << 5 | (int)((uint)(255 & this.carpenterType) >> 3))); this.carpenterType = ((this.carpenterType > 127) ? (this.carpenterType - 256) : this.carpenterType); this.xp = reader.ReadDouble(); this.hasTreasureHunter = reader.ReadBool(); reader.ReadShort(); this.currentHealth = new ShipPointsStub(reader); this.guild = reader.ReadString(); this.username = reader.ReadString(); this.maxXp = reader.ReadDouble(); this.maxBp = reader.ReadInt(); this.maxBp = (int)((uint)this.maxBp << 14 | (uint)((uint)this.maxBp >> 18)); this.hasPremium = reader.ReadBool(); this.medallionId = reader.ReadByte(); this.medallionId = (255 & ((255 & this.medallionId) >> 6 | (int)((uint)(255 & this.medallionId) << 2))); this.medallionId = ((this.medallionId > 127) ? (this.medallionId - 256) : this.medallionId); reader.ReadShort(); //ID this.targetAction = new EntityTargetAction(reader); this.var_30 = reader.ReadByte(); this.var_30 = (255 & ((255 & this.var_30) >> 2 | (int)((uint)(255 & this.var_30) << 6))); this.var_30 = ((this.var_30 > 127) ? (this.var_30 - 256) : this.var_30); this.isRepairing = reader.ReadBool(); }
public DisplayHitMessage(Reader reader) { this._version = reader.ReadShort(); this._version = 65535 & ((65535 & this._version) >> 8 | (65535 & this._version) << 8); this._version = this._version > 32767 ? (int)(this._version - 65536) : (int)(this._version); this.attacker = new EntityInfo(0.0, 0); this.attacker.projectId = reader.ReadShort(); this.attacker.projectId = 65535 & ((65535 & this.attacker.projectId) << 5 | (65535 & this.attacker.projectId) >> 11); this.attacker.projectId = this.attacker.projectId > 32767 ? (int)(this.attacker.projectId - 65536) : (int)(this.attacker.projectId); this.attacker.entityId = reader.ReadDouble(); this.defender = new EntityInfo(0.0, 0); this.defender.projectId = reader.ReadShort(); this.defender.projectId = 65535 & ((65535 & this.defender.projectId) << 5 | (65535 & this.defender.projectId) >> 11); this.defender.projectId = this.defender.projectId > 32767 ? (int)(this.defender.projectId - 65536) : (int)(this.defender.projectId); this.defender.entityId = reader.ReadDouble(); this.effectId = reader.ReadShort(); this.criticalhit = reader.ReadBool(); this.animationId = reader.ReadShort(); reader.ReadShort(); this.damage = new ShipPointsStub(reader); }
public ShipInitMessage(Reader reader) { this._version = reader.ReadShort(); this._version = (int)(65535u & ((uint)(65535 & this._version) >> 4 | (uint)((uint)(65535 & this._version) << 12))); this._version = ((this._version > 32767) ? (this._version - 65536) : this._version); this.var_167 = new List <int>(); var i = 0; var num = reader.ReadByte(); while (i < num) { var_167.Add(reader.ReadShort()); i++; } this.name_28 = reader.ReadByte(); this.name_28 = (int)(255u & ((uint)(255 & this.name_28) << 1 | (uint)((uint)(255 & this.name_28) >> 7))); this.name_28 = ((this.name_28 > 127) ? (this.name_28 - 256) : this.name_28); this.var_53 = reader.ReadShort(); this.route = new List <PositionStub>(); i = 0; num = reader.ReadShort(); while (i < num) { reader.ReadShort(); route.Add(new PositionStub(reader)); i++; } this.var_737 = reader.ReadShort(); this.position = new PositionStub(0, 0); this.position.X = reader.ReadShort(); this.position.X = (int)(65535u & ((uint)(65535 & this.position.X) << 11 | (uint)((uint)(65535 & this.position.X) >> 5))); this.position.X = ((this.position.X > 32767) ? (this.position.X - 65536) : this.position.X); this.position.Y = reader.ReadShort(); this.position.Y = (65535 & ((65535 & this.position.Y) << 15 | (int)((uint)(65535 & this.position.Y) >> 1))); this.position.Y = ((this.position.Y > 32767) ? (this.position.Y - 65536) : this.position.Y); reader.ReadShort(); //ID this.pointsCurrent = new ShipPointsStub(reader); this.usePlates = reader.ReadBool(); this.entityInfo = new EntityInfo(0, 0); this.entityInfo.projectId = reader.ReadShort(); this.entityInfo.projectId = (65535 & ((65535 & this.entityInfo.projectId) >> 15 | (int)((uint)(65535 & this.entityInfo.projectId) << 1))); this.entityInfo.projectId = ((this.entityInfo.projectId > 32767) ? (this.entityInfo.projectId - 65536) : this.entityInfo.projectId); this.entityInfo.entityId = reader.ReadDouble(); this.taggingEntity = new EntityInfo(0, 0); this.taggingEntity.projectId = reader.ReadShort(); this.taggingEntity.projectId = (65535 & ((65535 & this.taggingEntity.projectId) >> 15 | (int)((uint)(65535 & this.taggingEntity.projectId) << 1))); this.taggingEntity.projectId = ((this.taggingEntity.projectId > 32767) ? (this.taggingEntity.projectId - 65536) : this.taggingEntity.projectId); this.taggingEntity.entityId = reader.ReadDouble(); this.usePowder = reader.ReadBool(); this.designId = reader.ReadShort(); this.designId = (65535 & ((65535 & this.designId) >> 11 | (int)((uint)(65535 & this.designId) << 5))); this.designId = ((this.designId > 32767) ? (this.designId - 65536) : this.designId); this.var_865 = reader.ReadShort(); this.var_906 = reader.ReadShort(); this.name_32 = new List <ShipEntityInfoType>(); i = 0; num = reader.ReadByte(); while (i < num) { reader.ReadShort(); name_32.Add(new ShipEntityInfoType(reader)); i++; } this.name = reader.ReadString(); reader.ReadShort(); //ID this.pointsMax = new ShipPointsStub(reader); this.nameId = reader.ReadShort(); this.nameId = (int)(65535u & ((uint)(65535 & this.nameId) << 4 | (uint)((uint)(65535 & this.nameId) >> 12))); this.nameId = ((this.nameId > 32767) ? (this.nameId - 65536) : this.nameId); this.useBoard = reader.ReadBool(); this.var_30 = reader.ReadByte(); this.var_30 = (int)(255u & ((uint)(255 & this.var_30) >> 3 | (uint)((uint)(255 & this.var_30) << 5))); this.var_30 = ((this.var_30 > 127) ? (this.var_30 - 256) : this.var_30); this.var_496 = reader.ReadShort(); this.var_496 = (int)(65535u & ((uint)(65535 & this.var_496) << 0 | (uint)((uint)(65535 & this.var_496) >> 16))); this.var_496 = ((this.var_496 > 32767) ? (this.var_496 - 65536) : this.var_496); this.var_184 = reader.ReadShort(); }