public static BasePacket Create(byte[] data, ChannelID channel) { var result = Construct(data, channel); result.Read(data); return(result); }
public UpdateLevelPropS2C(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.UpdateLevelPropData = reader.ReadUpdateLevelPropData(); this.ExtraBytes = reader.ReadLeft(); }
public StreamDataCommand(ChannelID channel, byte[] payload, bool isAtEndPosition, StreamOffset offset) { this.channel = channel; this.payload = payload; this.offset = offset; this.isAtEndPosition = isAtEndPosition; }
public MissileReplication(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.Position = reader.ReadVector3(); this.CasterPosition = reader.ReadVector3(); this.Direction = reader.ReadVector3(); this.Velocity = reader.ReadVector3(); this.StartPoint = reader.ReadVector3(); this.EndPoint = reader.ReadVector3(); this.UnitPosition = reader.ReadVector3(); this.TimeFromCreation = reader.ReadFloat(); this.Speed = reader.ReadFloat(); this.LifePercentage = reader.ReadFloat(); this.TimedSpeedDelta = reader.ReadFloat(); this.TimedSpeedDeltaTime = reader.ReadFloat(); byte bitfield = reader.ReadByte(); this.Bounced = (bitfield & 1) != 0; this.CastInfo = reader.ReadCastInfo(); //TODO: read pad bytes if any(should be 512 byte buffer)? this.ExtraBytes = reader.ReadLeft(); }
public LeagueBadPacketEventArgs(int clientID, ChannelID channel, byte[] rawData, Exception exception) { ClientID = clientID; ChannelID = channel; RawData = rawData; Exception = exception; }
public override int GetHashCode() { int hash = 1; if (ChannelID != 0UL) { hash ^= ChannelID.GetHashCode(); } if (SteamID.Length != 0) { hash ^= SteamID.GetHashCode(); } if (Duration.Length != 0) { hash ^= Duration.GetHashCode(); } if (Reason.Length != 0) { hash ^= Reason.GetHashCode(); } if (AdminTag.Length != 0) { hash ^= AdminTag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public C2S_OnShopOpened(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public S2C_ResetClient(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public S2C_CreateHero(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.NetID = reader.ReadNetID(); this.PlayerUID = reader.ReadClientID(); this.NetNodeID = reader.ReadNetNodeID(); this.SkillLevel = reader.ReadByte(); this.TeamIsOrder = reader.ReadBool(); this.IsBot = reader.ReadBool(); this.BotRank = reader.ReadByte(); this.SpawnPositionIndex = reader.ReadByte(); this.SkinID = reader.ReadInt32(); this.Name = reader.ReadFixedString(128); this.Skin = reader.ReadFixedString(40); this.DeathDurationRemaining = reader.ReadFloat(); this.TimeSinceDeath = reader.ReadFloat(); byte bitfield = reader.ReadByte(); this.CreateHeroDeath = (CreateHeroDeath)(bitfield & 7); this.Unknown8 = (bitfield & 8) != 0; this.ExtraBytes = reader.ReadLeft(); }
public S2C_CreateNeutral(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.NetID = reader.ReadNetID(); this.NetNodeID = reader.ReadNetNodeID(); this.Position = reader.ReadVector3(); this.GroupPosition = reader.ReadVector3(); this.FaceDirectionPosition = reader.ReadVector3(); this.Name = reader.ReadFixedString(64); this.SkinName = reader.ReadFixedString(64); this.UniqueName = reader.ReadFixedString(64); this.SpawnAnimationName = reader.ReadFixedString(64); this.TeamID = reader.ReadTeamID(); this.DamageBonus = reader.ReadInt32(); this.HealthBonus = reader.ReadInt32(); this.RoamState = reader.ReadMinionRoamState(); this.GroupNumber = reader.ReadInt32(); this.BuffSide = reader.ReadInt32(); this.RevealEvent = reader.ReadInt32(); this.InitialLevel = reader.ReadInt32(); this.SpawnDuration = reader.ReadFloat(); this.SpawnTime = reader.ReadFloat(); this.BehaviorTree = reader.ReadByte(); this.AIscript = reader.ReadFixedStringLast(32); this.ExtraBytes = reader.ReadLeft(); }
public SpawnMinionS2C(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.NetID = reader.ReadNetID(); this.OwnerNetID = reader.ReadNetID(); this.NetNodeID = reader.ReadNetNodeID(); this.Position = reader.ReadVector3(); this.SkinID = reader.ReadInt32(); this.CloneNetID = reader.ReadNetID(); ushort bitfield = reader.ReadUInt16(); this.TeamID = (TeamID)(bitfield & 0x1FF); this.IgnoreCollision = (bitfield & 0x0200) != 0; this.IsWard = (bitfield & 0x0400) != 0; this.IsLaneMinion = (bitfield & 0x0800) != 0; this.IsBot = (bitfield & 0x1000) != 0; this.IsTargetable = (bitfield & 0x2000) != 0; this.IsTargetableToTeam = reader.ReadSpellFlags(); this.VisibilitySize = reader.ReadFloat(); this.Name = reader.ReadFixedString(64); this.SkinName = reader.ReadFixedString(64); this.InitialLevel = reader.ReadUInt16(); this.OnlyVisibleToNetID = reader.ReadNetID(); this.ExtraBytes = reader.ReadLeft(); }
public override int GetHashCode() { int hash = 1; if (ChannelID != 0UL) { hash ^= ChannelID.GetHashCode(); } if (DiscordID != 0UL) { hash ^= DiscordID.GetHashCode(); } if (SteamID != 0UL) { hash ^= SteamID.GetHashCode(); } if (DiscordTag.Length != 0) { hash ^= DiscordTag.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public OnLeaveLocalVisiblityClient(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public CHAR_SpawnPet(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.OwnerNetID = reader.ReadNetID(); this.NetNodeID = reader.ReadNetNodeID(); this.Position = reader.ReadVector3(); this.CastSpellLevelPlusOne = reader.ReadInt32(); this.Duration = reader.ReadFloat(); this.TeamID = reader.ReadTeamID(); this.DamageBonus = reader.ReadInt32(); this.HealthBonus = reader.ReadInt32(); this.Name = reader.ReadFixedString(128); this.Skin = reader.ReadFixedString(32); this.SkinID = reader.ReadInt32(); this.BuffName = reader.ReadFixedString(64); this.CloneID = reader.ReadNetID(); byte bitfield = reader.ReadByte(); this.CloneInventory = (bitfield & 1) != 0; this.ShowMinimapIconIfClone = (bitfield & 2) != 0; this.AIscript = reader.ReadFixedStringLast(32); this.ExtraBytes = reader.ReadLeft(); }
public ReloadScripts(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public static BasePacket ReadPacket(this PacketReader reader, ChannelID channel) { byte rawID = reader.ReadByte(); if (rawID == 0xFF) { return(new BatchPacket(reader, channel)); } switch (channel) { case ChannelID.Default: return(new KeyCheckPacket(reader, channel, rawID)); case ChannelID.ClientToServer: case ChannelID.SynchClock: case ChannelID.Broadcast: case ChannelID.BroadcastUnreliable: return(reader.ReadGamePacket(channel, rawID)); case ChannelID.Chat: return(new Chat(reader, channel)); case ChannelID.QuickChat: return(new QuickChat(reader, channel)); case ChannelID.LoadingScreen: return(reader.ReadPayloadPacket(channel, rawID)); default: return(new UnknownPacket(reader, channel, rawID)); } }
public S2C_DestroyClientMissile(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public SPM_HierarchicalProfilerUpdate(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public RequestJoinTeam(PacketReader reader, ChannelID channelID) { ChannelID = channelID; PlayerID = reader.ReadClientID(); Team = reader.ReadNetTeam(); ExtraBytes = reader.ReadLeft(); }
public C2S_UndoItemReq(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public S2C_HideObjectiveText(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public S2C_PopAllCharacterData(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public string CreateChannel(string className) { //url to query Slack to create a private channel. Slack Token authorizes method and identifies slack workspace. //className is the name of the private channel string slackData = null; ChannelID archived = IsArchived(className); string name = "%"; if (archived != null) { slackData = GetData("groups.unarchive", "&channel=" + archived.id, false); Debug.WriteLine("Archived Name is:" + archived.name); name = archived.name; AddBot(name); } else { slackData = GetData("groups.create", "&name=" + className, false); JObject channel = JObject.Parse(slackData); if (Convert.ToBoolean(channel["ok"].ToString())) { name = channel["group"]["name"].ToString(); AddBot(name); } } return(name); }
public S2C_SwitchNexusesToOnIdleParticles(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public Unused223(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public C2S_CheatLogGoldSources(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public static BasePacket Create(byte[] data, ChannelID channel) { switch (channel) { case ChannelID.Default: return(KeyCheckPacket.Create(data)); case ChannelID.ClientToServer: case ChannelID.SynchClock: case ChannelID.Broadcast: case ChannelID.BroadcastUnreliable: return(GamePacket.Create(data)); case ChannelID.Chat: { var packet = new Chat(); packet.Read(data); return(packet); } case ChannelID.QuickChat: { var packet = new QuickChat(); packet.Read(data); return(packet); } case ChannelID.LoadingScreen: return(LoadScreenPacket.Create(data)); default: throw new IOException("Unknown packet channel."); } }
public C2S_SoftReconnect(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public SPM_RemoveBBProfileListener(PacketReader reader, ChannelID channelID, NetID senderNetID) { this.SenderNetID = senderNetID; this.ChannelID = channelID; this.ExtraBytes = reader.ReadLeft(); }
public QuickChat(PacketReader reader, ChannelID channelID) { ChannelID = channelID; ClientID = reader.ReadClientID(); MessageId = reader.ReadInt16(); ExtraBytes = reader.ReadLeft(); }
/// <summary> /// /// </summary> /// <param name="ID"></param> /// <returns></returns> public double ReadProportion(ChannelID ID) { switch (ID) { case ChannelID.A_In0: { addr0.Write(true); addr1.Write(false); return analogA.ReadProportion(); } case ChannelID.A_In1: { addr0.Write(false); addr1.Write(false); return analogA.ReadProportion(); } case ChannelID.A_In2: { addr0.Write(true); addr1.Write(true); return analogA.ReadProportion(); } case ChannelID.A_In3: { addr0.Write(false); addr1.Write(true); return analogA.ReadProportion(); } case ChannelID.A_In4: { addr0.Write(true); addr1.Write(false); return analogB.ReadProportion(); } case ChannelID.A_In5: { addr0.Write(false); addr1.Write(false); return analogB.ReadProportion(); } case ChannelID.A_In6: { addr0.Write(true); addr1.Write(true); return analogB.ReadProportion(); } case ChannelID.A_In7: { addr0.Write(false); addr1.Write(true); return analogB.ReadProportion(); } default: // cant get here... return 0; } }