public static void Load(ReceivePacket p) { uint UniqueRoomId = p.readUD(); int gen2 = p.readD(); int slot = (int)p.readC(); int num = (int)p.readC(); Room room = RoomsManager.getRoom(UniqueRoomId, gen2); if (room == null) { return; } if (num == 0) { RoomsManager.RemoveRoom(UniqueRoomId); } else { Player player = room.getPlayer(slot, false); if (player != null) { player.ResetAllInfos(); } } }
private static List <HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <HitData> hits = new List <HitData>(); int count = p.readC(); for (int i = 0; i < count; i++) { HitData hit = new HitData { _hitInfo = p.readUD(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), PlayerPos = p.readUHVector() }; if (!OnlyBytes) { hit.WeaponClass = (ClassType)((hit._weaponInfo >> 32) & 63); //Funcional? Antigo = >> 32) & 31 | Novo = >> 32) & 63 hit.WeaponId = (hit._weaponInfo >> 6); } if (genLog) { Printf.warning("[" + i + "] Committed suicide: hitinfo,weaponinfo,weaponslot,camX,camY,camZ (" + hit._hitInfo + ";" + hit._weaponInfo + ";" + hit._weaponSlot + ";" + hit.PlayerPos.X + ";" + hit.PlayerPos.Y + ";" + hit.PlayerPos.Z + ")"); } hits.Add(hit); } return(hits); }
private static List <a200_SuicideDamage.HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <a200_SuicideDamage.HitData> hitDataList = new List <a200_SuicideDamage.HitData>(); int num = (int)p.readC(); for (int index = 0; index < num; ++index) { a200_SuicideDamage.HitData hitData = new a200_SuicideDamage.HitData() { _hitInfo = p.readUD(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), PlayerPos = p.readUHVector() }; if (!OnlyBytes) { hitData.WeaponClass = (ClassType)((int)hitData._weaponInfo & 63); hitData.WeaponId = (int)hitData._weaponInfo >> 6; } if (genLog) { Logger.warning("[" + (object)index + "] Committed suicide: hitinfo,weaponinfo,weaponslot,camX,camY,camZ (" + (object)hitData._hitInfo + ";" + (object)hitData._weaponInfo + ";" + (object)hitData._weaponSlot + ";" + (object)hitData.PlayerPos.X + ";" + (object)hitData.PlayerPos.Y + ";" + (object)hitData.PlayerPos.Z + ")", false); } hitDataList.Add(hitData); } return(hitDataList); }
public static List <HitData> ReadInfo(ReceivePacket p, bool genLog) { List <HitData> hits = new List <HitData>(); int count = p.readC(); for (int k = 0; k < count; k++) { HitData hit = new HitData { _hitInfo = p.readUD(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _unk = p.readUH(), _eixoX = p.readUH(), _eixoY = p.readUH(), _eixoZ = p.readUH() }; if (genLog) { Printf.warning("P: " + hit._eixoX + ";" + hit._eixoY + ";" + hit._eixoZ); Printf.warning("[" + k + "] 16384: " + BitConverter.ToString(p.getBuffer())); } hits.Add(hit); } return(hits); }
public static List <a4000_BotHitData.HitData> ReadInfo(ReceivePacket p, bool genLog) { List <a4000_BotHitData.HitData> hitDataList = new List <a4000_BotHitData.HitData>(); int num = (int)p.readC(); for (int index = 0; index < num; ++index) { a4000_BotHitData.HitData hitData = new a4000_BotHitData.HitData() { _hitInfo = p.readUD(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _unk = p.readUH(), _eixoX = p.readUH(), _eixoY = p.readUH(), _eixoZ = p.readUH() }; if (genLog) { Logger.warning("P: " + (object)hitData._eixoX + ";" + (object)hitData._eixoY + ";" + (object)hitData._eixoZ, false); Logger.warning("[" + (object)index + "] 16384: " + BitConverter.ToString(p.getBuffer()), false); } hitDataList.Add(hitData); } return(hitDataList); }
public static a20_RadioSync.Struct readSyncInfo(ActionModel ac, ReceivePacket p, bool genLog) { a20_RadioSync.Struct @struct = new a20_RadioSync.Struct() { _radioId = p.readC(), _areaId = p.readC() }; if (genLog) { Logger.warning("Slot " + (object)ac._slot + " released a radio chat: radId, areaId [" + (object)@struct._radioId + ";" + (object)@struct._areaId + "]", false); } return(@struct); }
public static a10_unk.Struct readSyncInfo(ActionModel ac, ReceivePacket p, bool genLog) { a10_unk.Struct @struct = new a10_unk.Struct() { _unkV = p.readC(), _unkV2 = p.readC() }; if (genLog) { Logger.warning("Slot " + (object)ac._slot + " action 16: unk (" + (object)@struct._unkV + ";" + (object)@struct._unkV2 + ")", false); } return(@struct); }
public static a80000_SufferingDamage.Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { a80000_SufferingDamage.Struct @struct = new a80000_SufferingDamage.Struct() { _hitEffects = p.readC(), _hitPart = p.readC() }; if (genLog) { Logger.warning("[1] Effect: " + (object)((int)@struct._hitEffects >> 4) + "; By slot: " + (object)((int)@struct._hitEffects & 15), false); Logger.warning("[2] Slot " + (object)ac._slot + " action 524288: " + (object)@struct._hitEffects + ";" + (object)@struct._hitPart, false); } return(@struct); }
public static Struct readSyncInfo(ActionModel ac, ReceivePacket p, bool genLog) { Struct info = new Struct { _radioId = p.readC(), _areaId = p.readC() }; if (genLog) { Printf.warning("Slot " + ac._slot + " released a radio chat: radId, areaId [" + info._radioId + ";" + info._areaId + "]"); } return(info); }
public static Struct readSyncInfo(ActionModel ac, ReceivePacket p, bool genLog) { Struct info = new Struct { _unkV = p.readC(), _unkV2 = p.readC() }; if (genLog) { Printf.warning("Slot " + ac._slot + " action 16: unk (" + info._unkV + ";" + info._unkV2 + ")"); } return(info); }
public static Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { Struct info = new Struct { _hitEffects = p.readC(), //&15 = Qm deu o dano | >>4 = Tipo do dano (CHARA_DEATH) _hitPart = p.readC() //Número do efeito?? }; if (genLog) { Printf.warning("[1] Effect: " + (info._hitEffects >> 4) + "; By slot: " + (info._hitEffects & 15)); Printf.warning("[2] Slot " + ac._slot + " action 524288: " + info._hitEffects + ";" + info._hitPart); } return(info); }
public static code6_ObjectAnim.Struct ReadInfo(ReceivePacket p, bool genLog) { code6_ObjectAnim.Struct @struct = new code6_ObjectAnim.Struct() { _life = p.readUH(), _anim1 = p.readC(), _anim2 = p.readC(), _syncDate = p.readT() }; if (genLog) { Logger.warning("[code6_ObjectAnim] u: " + (object)@struct._life + "; u2: " + (object)@struct._anim1 + "; u3: " + (object)@struct._anim2 + "; u4: " + (object)@struct._syncDate, false); } return(@struct); }
public static a1_unk.Struct ReadInfo(ReceivePacket p, bool genLog) { a1_unk.Struct @struct = new a1_unk.Struct() { _unkV = p.readC(), _unkV2 = p.readC(), _unkV3 = p.readC(), _unkV4 = p.readC() }; if (!genLog) { ; } return(@struct); }
public static code12_StageObjAnim.Struct ReadInfo(ReceivePacket p, bool genLog) { code12_StageObjAnim.Struct @struct = new code12_StageObjAnim.Struct() { _unk = p.readC(), _life = p.readUH(), _syncDate = p.readT(), _anim1 = p.readC(), _anim2 = p.readC() }; if (genLog) { Logger.warning("[code12_StageObjAnim] " + (object)@struct._unk + ";" + (object)@struct._life + ";" + (object)@struct._syncDate + ";" + (object)@struct._anim1 + ";" + (object)@struct._anim2, false); } return(@struct); }
private static code1_GrenadeSync.Struct BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { code1_GrenadeSync.Struct @struct = new code1_GrenadeSync.Struct() { _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _unk = p.readUH(), _objPos_x = p.readUH(), _objPos_y = p.readUH(), _objPos_z = p.readUH(), _unk5 = p.readUH(), _unk6 = p.readUH(), _unk7 = p.readUH(), _grenadesCount = p.readUH() }; @struct._unk8 = p.readB(6); if (!OnlyBytes) { @struct.WeaponNumber = (int)@struct._weaponInfo >> 6; @struct.WeaponClass = (int)@struct._weaponInfo & 47; } if (genLog) { Logger.warning("[code1_GrenadeSync] " + BitConverter.ToString(p.getBuffer()), false); Logger.warning("[code1_GrenadeSync] wInfo: " + (object)@struct._weaponInfo + "; wSlot: " + (object)@struct._weaponSlot + "; u: " + (object)@struct._unk + "; obpX: " + (object)@struct._objPos_x + "; obpY: " + (object)@struct._objPos_y + "; obpZ: " + (object)@struct._objPos_z + "; u5: " + (object)@struct._unk5 + "; u6: " + (object)@struct._unk6 + "; u7: " + (object)@struct._unk7 + "; u8: " + (object)@struct._unk8, false); } return(@struct); }
public static Struct ReadInfo(ReceivePacket p, bool genLog) { Struct info = new Struct { _life = p.readUH(), _anim1 = p.readC(), _anim2 = p.readC(), _syncDate = p.readT() }; if (genLog) { Printf.warning("[code6_ObjectAnim] u: " + info._life + "; u2: " + info._anim1 + "; u3: " + info._anim2 + "; u4: " + info._syncDate); } return(info); }
private static List <a20000_InvalidHitData.HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <a20000_InvalidHitData.HitData> hitDataList = new List <a20000_InvalidHitData.HitData>(); int num = (int)p.readC(); for (int index = 0; index < num; ++index) { a20000_InvalidHitData.HitData hitData = new a20000_InvalidHitData.HitData() { _hitInfo = p.readUH(), FirePos = p.readUHVector(), HitPos = p.readUHVector() }; if (!OnlyBytes) { hitData.HitEnum = (HitType)AllUtils.getHitHelmet((uint)hitData._hitInfo); } if (!genLog) { ; } hitDataList.Add(hitData); } return(hitDataList); }
private static List <HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <HitData> hits = new List <HitData>(); int objsCount = p.readC(); for (int ob = 0; ob < objsCount; ob++) { HitData hit = new HitData { _hitInfo = p.readUH(), FirePos = p.readUHVector(), HitPos = p.readUHVector() }; if (!OnlyBytes) { hit.HitEnum = (HitType)AllUtils.getHitHelmet(hit._hitInfo); } if (genLog) { //Logger.warning("StartBulletAxis: " + hit._startBulletX + ";" + hit._startBulletY + ";" + hit._startBulletZ); //Logger.warning("EndBulletAxis: " + hit._endBulletX + ";" + hit._endBulletY + ";" + hit._endBulletZ); } hits.Add(hit); } return(hits); }
private static Struct BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { Struct info = new Struct { _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _unk = p.readUH(), _objPos_x = p.readUH(), _objPos_y = p.readUH(), _objPos_z = p.readUH(), _unk5 = p.readUH(), _unk6 = p.readUH(), _unk7 = p.readUH(), _grenadesCount = p.readUH() }; //id do item do mapa info._unk8 = p.readB(6); //Null 1.15.37 /* * 1.15.42 - p.readB(6); */ if (!OnlyBytes) { info.WeaponNumber = (info._weaponInfo >> 6); info.WeaponClass = (info._weaponInfo & 47); } if (genLog) { Printf.warning("[code1_GrenadeSync] " + BitConverter.ToString(p.getBuffer())); Printf.warning("[code1_GrenadeSync] wInfo: " + info._weaponInfo + "; wSlot: " + info._weaponSlot + "; u: " + info._unk + "; obpX: " + info._objPos_x + "; obpY: " + info._objPos_y + "; obpZ: " + info._objPos_z + "; u5: " + info._unk5 + "; u6: " + info._unk6 + "; u7: " + info._unk7 + "; u8: " + info._unk8); } return(info); }
private static void LoadPacket(byte[] buffer) { ReceivePacket p = new ReceivePacket(buffer); switch (p.readH()) { case 1: RespawnSync.Load(p); break; case 2: RemovePlayerSync.Load(p); break; case 3: uint UniqueRoomId = p.readUD(); int gen2 = p.readD(); int num = (int)p.readC(); Room room = RoomsManager.getRoom(UniqueRoomId, gen2); if (room != null) { room._serverRound = num; } break; } }
public static Struct ReadInfo(ReceivePacket p, bool genLog) { Struct info = new Struct { _unk = p.readC(), _life = p.readUH(), _syncDate = p.readT(), _anim1 = p.readC(), _anim2 = p.readC() }; if (genLog) { Printf.warning("[code12_StageObjAnim] " + info._unk + ";" + info._life + ";" + info._syncDate + ";" + info._anim1 + ";" + info._anim2); } return(info); }
public static a800_WeaponAmmo.Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { a800_WeaponAmmo.Struct @struct = new a800_WeaponAmmo.Struct() { _weaponFlag = p.readC(), _weaponClass = p.readC(), _weaponId = p.readUH(), _ammoPrin = p.readC(), _ammoDual = p.readC(), _ammoTotal = p.readUH() }; if (genLog) { Logger.warning("Slot " + (object)ac._slot + " sync weapon ammo: wFl,wCl,wId,ammoP,ammoD,ammoT (" + (object)@struct._weaponFlag + ";" + (object)(ClassType)@struct._weaponClass + ";" + (object)@struct._weaponId + ";" + (object)@struct._ammoPrin + ";" + (object)@struct._ammoDual + ";" + (object)@struct._ammoTotal + ")", false); } return(@struct); }
public static a40000_DeathData.Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { a40000_DeathData.Struct @struct = new a40000_DeathData.Struct() { _deathType = p.readC(), _hitPart = p.readC(), _camX = p.readUH(), _camY = p.readUH(), _camZ = p.readUH(), _weaponId = p.readD() }; if (genLog) { Logger.warning(((int)ac._slot).ToString() + " | " + (object)@struct._deathType + ";" + (object)@struct._hitPart + ";" + (object)@struct._camX + ";" + (object)@struct._camY + ";" + (object)@struct._camZ + ";" + (object)@struct._weaponId, false); } return(@struct); }
private static List <HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <HitData> hits = new List <HitData>(); int objsCount = p.readC(); for (int i = 0; i < objsCount; i++) { HitData hit = new HitData { _hitInfo = p.readUD(), _boomInfo = p.readUH(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _deathType = p.readC(), FirePos = p.readUHVector(), HitPos = p.readUHVector(), _grenadesCount = p.readUH() }; if (!OnlyBytes) { hit.HitEnum = (HitType)AllUtils.getHitHelmet(hit._hitInfo); if (hit._boomInfo > 0) { hit.BoomPlayers = new List <int>(); for (int s = 0; s < 16; s++) { int flag = (1 << s); if ((hit._boomInfo & flag) == flag) { hit.BoomPlayers.Add(s); } } } hit.WeaponClass = (ClassType)(hit._weaponInfo & 63); hit.WeaponId = (hit._weaponInfo >> 6); } if (genLog) { Printf.warning("[Player pos] X: " + hit.FirePos.X + "; Y: " + hit.FirePos.Y + "; Z: " + hit.FirePos.Z); Printf.warning("[Object pos] X: " + hit.HitPos.X + "; Y: " + hit.HitPos.Y + "; Z: " + hit.HitPos.Z); //Logger.warning("[" + i + "] Slot " + aM._slot + " explosive BOOM: " + hit._objInfo + ";" + hit._hitInfo + ";" + hit._weaponDamage + ";" + hit._weaponDamageC + ";" + hit._weaponInfo + ";" + hit._weaponSlot + ";" + hit._deathType + ";" + hit._playerPos._x + ";" + hit._playerPos._y + ";" + hit._playerPos._z + ";" + hit._objPos._x + ";" + hit._objPos._y + ";" + hit._objPos._z + ";" + hit._u6); } hits.Add(hit); } return(hits); }
private static List <a10000_BoomHitData.HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <a10000_BoomHitData.HitData> hitDataList = new List <a10000_BoomHitData.HitData>(); int num1 = (int)p.readC(); for (int index1 = 0; index1 < num1; ++index1) { a10000_BoomHitData.HitData hitData = new a10000_BoomHitData.HitData() { _hitInfo = p.readUD(), _boomInfo = p.readUH(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), _deathType = p.readC(), FirePos = p.readUHVector(), HitPos = p.readUHVector(), _grenadesCount = p.readUH() }; if (!OnlyBytes) { hitData.HitEnum = (HitType)AllUtils.getHitHelmet(hitData._hitInfo); if (hitData._boomInfo > (ushort)0) { hitData.BoomPlayers = new List <int>(); for (int index2 = 0; index2 < 16; ++index2) { int num2 = 1 << index2; if (((int)hitData._boomInfo & num2) == num2) { hitData.BoomPlayers.Add(index2); } } } hitData.WeaponClass = (ClassType)((int)hitData._weaponInfo & 63); hitData.WeaponId = (int)hitData._weaponInfo >> 6; } if (genLog) { Logger.warning("[Player pos] X: " + (object)hitData.FirePos.X + "; Y: " + (object)hitData.FirePos.Y + "; Z: " + (object)hitData.FirePos.Z, false); Logger.warning("[Object pos] X: " + (object)hitData.HitPos.X + "; Y: " + (object)hitData.HitPos.Y + "; Z: " + (object)hitData.HitPos.Z, false); } hitDataList.Add(hitData); } return(hitDataList); }
public static Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { Struct info = new Struct { _weaponFlag = p.readC(), _weaponClass = p.readC(), _weaponId = p.readUH(), _ammoPrin = p.readC(), _ammoDual = p.readC(), _ammoTotal = p.readUH() }; if (genLog) { Printf.warning("Slot " + ac._slot + " sync weapon ammo: wFl,wCl,wId,ammoP,ammoD,ammoT (" + info._weaponFlag + ";" + (ClassType)info._weaponClass + ";" + info._weaponId + ";" + info._ammoPrin + ";" + info._ammoDual + ";" + info._ammoTotal + ")"); } return(info); }
public static a1000_DropWeapon.Struct ReadInfo(ReceivePacket p, bool genLog) { a1000_DropWeapon.Struct @struct = new a1000_DropWeapon.Struct() { _weaponFlag = p.readC(), _weaponClass = p.readC(), _weaponId = p.readUH(), _ammoPrin = p.readC(), _ammoDual = p.readC(), _ammoTotal = p.readUH() }; if (genLog) { Logger.warning("[ActionBuffer]: " + BitConverter.ToString(p.getBuffer()), false); Logger.warning("[DropWeapon] Flag: " + (object)@struct._weaponFlag + "; Class: " + (object)(ClassType)@struct._weaponClass + "; Id: " + (object)@struct._weaponId, false); } return(@struct); }
public static Struct ReadInfo(ActionModel ac, ReceivePacket p, bool genLog) { Struct info = new Struct { _deathType = p.readC(), _hitPart = p.readC(), _camX = p.readUH(), _camY = p.readUH(), _camZ = p.readUH(), _weaponId = p.readD() }; if (genLog) { Printf.warning(ac._slot + " | " + info._deathType + ";" + info._hitPart + ";" + info._camX + ";" + info._camY + ";" + info._camZ + ";" + info._weaponId); } return(info); }
public static Struct ReadInfo(ReceivePacket p, bool genLog) { Struct info = new Struct { _weaponFlag = p.readC(), _weaponClass = p.readC(), _weaponId = p.readUH(), _ammoPrin = p.readC(), _ammoDual = p.readC(), _ammoTotal = p.readUH() }; if (genLog) { Printf.warning("[ActionBuffer]: " + BitConverter.ToString(p.getBuffer())); Printf.warning("[DropWeapon] Flag: " + info._weaponFlag + "; Class: " + (ClassType)info._weaponClass + "; Id: " + info._weaponId); } return(info); }
private static List <HitData> BaseReadInfo(ReceivePacket p, bool OnlyBytes, bool genLog) { List <HitData> hits = new List <HitData>(); int objsCount = p.readC(); for (int ob = 0; ob < objsCount; ob++) { HitData hit = new HitData { _hitInfo = p.readUD(), _boomInfo = p.readUH(), _weaponInfo = p.readUH(), _weaponSlot = p.readC(), //EQMIPEMENT_SLOT StartBullet = p.readTVector(), EndBullet = p.readTVector() }; if (!OnlyBytes) { hit.HitEnum = (HitType)AllUtils.getHitHelmet(hit._hitInfo); if (hit._boomInfo > 0) { hit.BoomPlayers = new List <int>(); for (int s = 0; s < 16; s++) { int flag = (1 << s); if ((hit._boomInfo & flag) == flag) { hit.BoomPlayers.Add(s); } } } hit.WeaponClass = (ClassType)(hit._weaponInfo & 63); hit.WeaponId = (hit._weaponInfo >> 6); } if (genLog) { //Logger.warning("StartBulletAxis: " + hit._startBulletX + ";" + hit._startBulletY + ";" + hit._startBulletZ); //Logger.warning("EndBulletAxis: " + hit._endBulletX + ";" + hit._endBulletY + ";" + hit._endBulletZ); } hits.Add(hit); } return(hits); }