Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Resolve #11, Progress #12 -- Merge pull request #13 from microsoftv/u…
Browse files Browse the repository at this point in the history
…nk_fix1

Fix Some Unknowns & Unused
  • Loading branch information
lzardy authored Feb 7, 2022
2 parents f51efaf + 2f117c1 commit ddaae07
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 52 deletions.
3 changes: 1 addition & 2 deletions LeaguePackets/Game/055_CHAR_SpawnPet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class CHAR_SpawnPet : GamePacket // 0x37
public uint CloneID { get; set; }
public bool CloneInventory { get; set; }
public bool ShowMinimapIconIfClone { get; set; }
//FIXME: figure those out:
public bool Unknown4 { get; set; }
public bool DisallowPlayerControl { get; set; }
public bool DoFade { get; set; }
string AIscript { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/076_S2C_CreateHero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class S2C_CreateHero : GamePacket // 0x4C
public float TimeSinceDeath { get; set; }

public CreateHeroDeath CreateHeroDeath { get; set; }
// FIXME: fix those unknowns
// FIXME: fix these unknowns
public bool Unknown1 { get; set; } // something with scripts
public bool Unknown2 { get; set; } // something with spawn

Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/145_SPM_AddListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace LeaguePackets.Game
{
public class SPM_AddListener : GamePacket, IUnusedPacket // 0x91
public class SPM_AddListener : GamePacket // 0x91
{
public override GamePacketID ID => GamePacketID.SPM_AddListener;

Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/173_Cheat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace LeaguePackets.Game
{
public class Cheat : GamePacket, IUnusedPacket // 0xAD
public class Cheat : GamePacket // 0xAD
{
public override GamePacketID ID => GamePacketID.Cheat;

Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/182_SPM_HierarchicalBBProfileUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace LeaguePackets.Game
{
public class SPM_HierarchicalBBProfileUpdate : GamePacket, IUnusedPacket // 0xB6
public class SPM_HierarchicalBBProfileUpdate : GamePacket // 0xB6
{
public override GamePacketID ID => GamePacketID.SPM_HierarchicalBBProfileUpdate;

Expand Down
3 changes: 2 additions & 1 deletion LeaguePackets/Game/186_OnEnterVisibilityClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class OnEnterVisibilityClient : GamePacket, IGamePacketsList // 0xBA
public byte LookAtType { get; set; }
public Vector3 LookAtPosition { get; set; }
public List<KeyValuePair<byte, int>> BuffCount { get; set; } = new List<KeyValuePair<byte, int>>();
public bool UnknownIsHero { get; set; }
// Function unknown.
public bool IsHero { get; set; }
public MovementData MovementData { get; set; } = new MovementDataNone();

protected override void ReadBody(ByteReader reader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

namespace LeaguePackets.Game
{
public class Unused223 : GamePacket, IUnusedPacket // 0xDF
public class UNK_0xDF : GamePacket // 0xDF
{
public override GamePacketID ID => GamePacketID.Unused223;
public override GamePacketID ID => GamePacketID.Unknown_223;

protected override void ReadBody(ByteReader reader)
{
Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/226_S2C_FX_OnEnterTeamVisibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace LeaguePackets.Game
{
public class S2C_FX_OnEnterTeamVisibility : GamePacket, IUnusedPacket // 0xE2
public class S2C_FX_OnEnterTeamVisibility : GamePacket // 0xE2
{
public override GamePacketID ID => GamePacketID.S2C_FX_OnEnterTeamVisibility;
public uint NetID { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion LeaguePackets/Game/232_S2C_SetDebugHidden.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace LeaguePackets.Game
{
public class S2C_SetDebugHidden : GamePacket, IUnusedPacket // 0xE8
public class S2C_SetDebugHidden : GamePacket // 0xE8
{
public override GamePacketID ID => GamePacketID.S2C_SetDebugHidden;
public int ObjectID { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions LeaguePackets/Game/297_S2C_StartSpellTargeter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ public class S2C_StartSpellTargeter : GamePacket // 0x129
{
public override GamePacketID ID => GamePacketID.S2C_StartSpellTargeter;
public byte Slot { get; set; }
public float Unknonw1 { get; set; }
// Amount of time to check for target.
public float TargetTime { get; set; }

protected override void ReadBody(ByteReader reader)
{

Slot = (byte)reader.ReadUInt32();
Unknonw1 = reader.ReadFloat();
TargetTime = reader.ReadFloat();
}
protected override void WriteBody(ByteWriter writer)
{
writer.WriteUInt32((uint)Slot);
writer.WriteFloat(Unknonw1);
writer.WriteFloat(TargetTime);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,33 @@

namespace LeaguePackets.Game
{
public class UNK_0x12C : GamePacket // 0x12C
public class S2C_TeamUpdateDragonBuffCount : GamePacket // 0x12C
{
public override GamePacketID ID => GamePacketID.UNK_0x12C;
// This could be "IsMyTeam" or "IsOrder" or something else
public bool Unknown1 { get; set; }
public override GamePacketID ID => GamePacketID.S2C_TeamUpdateDragonBuffCount;
public bool TeamIsOrder { get; set; }
// If this is not 0 the rest doesn't get processed
public uint Unknown2 { get; set; }
// This value gets stored
public uint Unknown3 { get; set; }
// Dragon kills/buff count
public uint Count { get; set; }

protected override void ReadBody(ByteReader reader)
{

byte bitfield = reader.ReadByte();
Unknown1 = (bitfield & 0x01) != 0;
TeamIsOrder = (bitfield & 0x01) != 0;

Unknown2 = reader.ReadUInt32();
Unknown3 = reader.ReadUInt32();
Count = reader.ReadUInt32();
}
protected override void WriteBody(ByteWriter writer)
{
byte bitfield = 0;
if (Unknown1)
if (TeamIsOrder)
bitfield |= 0x01;
writer.WriteByte(bitfield);

writer.WriteUInt32(Unknown2);
writer.WriteUInt32(Unknown3);
writer.WriteUInt32(Count);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

namespace LeaguePackets.Game
{
public class UNK_0x12E_AddRegion : GamePacket // 0x12E
public class AddConeRegion : GamePacket // 0x12E
{
public override GamePacketID ID => GamePacketID.UNK_0x12E_AddRegion;
public override GamePacketID ID => GamePacketID.AddConeRegion;
public uint TeamID { get; set; }
public int RegionType { get; set; }
public int ClientID { get; set; }
Expand All @@ -31,8 +31,8 @@ public class UNK_0x12E_AddRegion : GamePacket // 0x12E

public float BaseRadius { get; set; }

// FIXME: unknowns
public float Unknown1 { get; set; }
public float ConeAngle { get; set; }
// FIXME: unknowns
public float Unknown2 { get; set; }
public float Unknown3 { get; set; }

Expand All @@ -59,7 +59,7 @@ protected override void ReadBody(ByteReader reader)

this.BaseRadius = reader.ReadFloat();

this.Unknown1 = reader.ReadFloat();
this.ConeAngle = reader.ReadFloat();
this.Unknown2 = reader.ReadFloat();
this.Unknown3 = reader.ReadFloat();
}
Expand Down Expand Up @@ -95,7 +95,7 @@ protected override void WriteBody(ByteWriter writer)

writer.WriteFloat(BaseRadius);

writer.WriteFloat(Unknown1);
writer.WriteFloat(ConeAngle);
writer.WriteFloat(Unknown2);
writer.WriteFloat(Unknown3);
}
Expand Down
38 changes: 19 additions & 19 deletions LeaguePackets/GamePacketID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace LeaguePackets
{
public enum GamePacketID : uint
{
Dummy = 0x0, //DONE!
Dummy = 0x0, //DONE
SPM_HierarchicalProfilerUpdate = 0x1, //Unused
S2C_DisplayLocalizedTutorialChatText = 0x2, //DONE!
S2C_DisplayLocalizedTutorialChatText = 0x2, //DONE
Barrack_SpawnUnit = 0x3, //DONE?
S2C_SwitchNexusesToOnIdleParticles = 0x4, //DONE?
C2S_TutorialAudioEventFinished = 0x5, //DONE?
Expand All @@ -24,7 +24,7 @@ public enum GamePacketID : uint
S2C_ReplaceObjectiveText = 0xD, //DONE?
S2C_CloseShop = 0xE, //DONE?
S2C_Reconnect = 0xF, //DONE?
UnitAddEXP = 0x10, //DONE!
UnitAddEXP = 0x10, //DONE
S2C_EndSpawn = 0x11, //DONE?
SetFrequency = 0x12, //DONE?
S2C_BotAI = 0x13, //DONE?
Expand Down Expand Up @@ -53,7 +53,7 @@ public enum GamePacketID : uint
AvatarInfo_Server = 0x2A, //DONE?
DampenerSwitchStates = 0x2B, //DONE?
World_SendCamera_Server_Acknologment = 0x2C, //DONE?
S2C_ModifyDebugCircleRadius = 0x2D, //unused
S2C_ModifyDebugCircleRadius = 0x2D, //Unused
World_SendCamera_Server = 0x2E, //DONE?
HeroReincarnateAlive = 0x2F, //DONE?
NPC_BuffReplace = 0x30, //DONE?
Expand Down Expand Up @@ -84,7 +84,7 @@ public enum GamePacketID : uint
C2S_PlayVOCommand = 0x49, //DONE?
HeroReincarnate = 0x4A, //DONE?
C2S_OnScoreBoardOpened = 0x4B, //DONE?
S2C_CreateHero = 0x4C, //TODO: unknowns
S2C_CreateHero = 0x4C, //TODO: Unknowns
SPM_AddMemoryListener = 0x4D, //Unused
SPM_HierarchicalMemoryUpdate = 0x4E, //Unused
S2C_ToggleUIHighlight = 0x4F, //DONE?
Expand All @@ -96,7 +96,7 @@ public enum GamePacketID : uint
S2C_HandleTipUpdate = 0x55, //DONE?
C2S_StatsUpdateReq = 0x56, //DONE
C2S_MapPing = 0x57, //DONE?
S2C_RemoveDebugObject = 0x58, //unused
S2C_RemoveDebugObject = 0x58, //Unused
S2C_CreateUnitHighlight = 0x59, //DONE?
S2C_DestroyClientMissile = 0x5A, //DONE?
S2C_SetSpellLevel = 0x5B, //DONE?
Expand Down Expand Up @@ -142,7 +142,7 @@ public enum GamePacketID : uint
WaypointListHeroWithSpeed = 0x83, //DONE?
S2C_SetInputLockFlag = 0x84, //DONE?
CHAR_SetCooldown = 0x85, //DONE?
CHAR_CancelTargetingReticle = 0x86, //TODO: unknowns
CHAR_CancelTargetingReticle = 0x86, //TODO: Unknowns in ExtraBytes
FX_Create_Group = 0x87, //DONE?
S2C_QueryStatusAns = 0x88, //DONE?
Building_Die = 0x89, //DONE?
Expand All @@ -158,9 +158,9 @@ public enum GamePacketID : uint
SetPARState = 0x93, //DONE?
NPC_BuffRemoveGroup = 0x94, //DONE?
S2C_Ping_Load_Info = 0x95, //DONE?
S2C_ChangeCharacterVoice = 0x96, //TODO: unknowns
S2C_ChangeCharacterVoice = 0x96, //TODO: Unknowns
S2C_ChangeCharacterData = 0x97, //DONE?
S2C_Exit = 0x98, //TODO: unknowns
S2C_Exit = 0x98, //TODO: Unknowns
SPM_RemoveBBProfileListener = 0x99, //Unused
NPC_CastSpellReq = 0x9A, //DONE?
S2C_ToggleInputLockFlag = 0x9B, //DONE?
Expand Down Expand Up @@ -189,13 +189,13 @@ public enum GamePacketID : uint
SetFadeOut_Push = 0xB2, //DONE?
S2C_OpenTutorialPopup = 0xB3, //DONE?
S2C_RemoveUnitHighlight = 0xB4, //DONE?
NPC_CastSpellAns = 0xB5, //TODO: unknowns
NPC_CastSpellAns = 0xB5, //TODO: Unknowns
SPM_HierarchicalBBProfileUpdate = 0xB6, //Unused
NPC_BuffAdd2 = 0xB7, //DONE?
S2C_OpenAFKWarningMessage = 0xB8, //DONE
WaypointList = 0xB9, //DONE?
OnEnterVisibilityClient = 0xBA, //DONE?
S2C_AddDebugObject = 0xBB, //unused
S2C_AddDebugObject = 0xBB, //Unused
S2C_DisableHUDForEndOfGame = 0xBC, //DONE?
SynchVersionC2S = 0xBD, //DONE?
C2S_CharSelected = 0xBE, //DONE?
Expand Down Expand Up @@ -231,23 +231,23 @@ public enum GamePacketID : uint
S2C_InteractiveMusicCommand = 0xDC, //DONE?
Unused221 = 0xDD, //Unused
Unused222 = 0xDE, //Unused
Unused223 = 0xDF, //Unused
Unknown_223 = 0xDF, //TODO: Unknowns in ExtraBytes
S2C_OnEnterTeamVisibility = 0xE0, //DONE?
S2C_OnLeaveTeamVisibility = 0xE1, //DONE?
S2C_FX_OnEnterTeamVisibility = 0xE2, //Unused?
S2C_FX_OnLeaveTeamVisibility = 0xE3, //DONE?
ReplayOnly_GoldEarned = 0xE4, //DONE?
S2C_CloseClient = 0xE5, //DONE?
C2S_SpellChargeUpdateReq = 0xE6, //DONE?
S2C_ModifyDebugText = 0xE7, //unused
S2C_SetDebugHidden = 0xE8, //unused
S2C_ModifyDebugText = 0xE7, //Unused
S2C_SetDebugHidden = 0xE8, //Unused
S2C_ActivateMinionCamp = 0xE9, //DONE?
C2S_SpectatorDataReq = 0xEA, //DONE?
S2C_SpectatorMetaData = 0xEB, //DONE?
S2C_SpectatorDataChunkInfo = 0xEC, //DONE?
S2C_SpectatorDataChunk = 0xED, //DONE?
S2C_ChangeMissileTarget = 0xEE, //DONE?
S2C_MarkOrSweepForSoftReconnect = 0xEF, //TODO: unknowns
S2C_MarkOrSweepForSoftReconnect = 0xEF, //TODO: Unknowns
S2C_SetShopEnabled = 0xF0, //DONE
S2C_CreateFollowerObject = 0xF1, //DONE?
S2C_ReattachFollowerObject = 0xF2, //DONE?
Expand Down Expand Up @@ -276,7 +276,7 @@ public enum GamePacketID : uint
NPC_BuffUpdateNumCounter = 0x109, //DONE?
C2S_UndoItemReq = 0x10A, //DONE?
S2C_SetUndoEnabled = 0x10B, //DONE?
S2C_SetInventory_Broadcast = 0x10C, //DONE?
S2C_SetInventory_Broadcast = 0x10C, //DONE?
S2C_ChangeMissileSpeed = 0x10D, //DONE?
S2C_SetCanSurrender = 0x10E, //DONE?
S2C_UnitSetLookAt = 0x10F, //DONE?
Expand All @@ -291,7 +291,7 @@ public enum GamePacketID : uint
S2C_UpdateSpellToggle = 0x118, //DONE?
S2C_UpdateBounceMissile = 0x119, //DONE?
S2C_DebugLogGoldSources = 0x11A, //DONE?
C2S_CheatLogGoldSources = 0x11B, //unused
C2S_CheatLogGoldSources = 0x11B, //Unused
S2C_ShopItemSubstitutionSet = 0x11C, //DONE?
S2C_ShopItemSubstitutionClear = 0x11D, //DONE?
S2C_ResetClient = 0x11E, //Unused
Expand All @@ -308,9 +308,9 @@ public enum GamePacketID : uint
S2C_StartSpellTargeter = 0x129, //4.18+
S2C_StopSpellTargeter = 0x12A, //4.18+
S2C_CameraLock = 0x12B, //4.18+
UNK_0x12C = 0x12C, //4.18+
S2C_TeamUpdateDragonBuffCount = 0x12C, //4.18+
S2C_SetFadeOut = 0x12D, //4.18+
UNK_0x12E_AddRegion = 0x12E, //4.18+
AddConeRegion = 0x12E, //4.18+
S2C_UnlockAnimation = 0x12F, //4.18+
}
}
4 changes: 2 additions & 2 deletions LeaguePacketsSender/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ public static class Commands
{
public static string LeaveVision(LeagueServer server, int client, string args)
{
var packet = new OnLeaveVisiblityClient();
var packet = new OnLeaveVisibilityClient();
packet.SenderNetID = 0x40000001;
server.SendEncrypted(client, ChannelID.Broadcast, packet);
return "LeaveVision?";
}

public static string EnterVision(LeagueServer server, int client, string args)
{
var packet = new OnEnterVisiblityClient();
var packet = new OnEnterVisibilityClient();
packet.SenderNetID = 0x40000001;
packet.MovementData = new MovementDataStop
{
Expand Down

0 comments on commit ddaae07

Please sign in to comment.