Skip to content

Commit

Permalink
4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Chameleo committed Nov 30, 2011
1 parent da7a49a commit c12e9ae
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
78 changes: 78 additions & 0 deletions Formulas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,4 +373,82 @@ public override uint CalcAuthFromOpcode(uint opcode)
return ((opcode & 0x8000) >> 13) | ((opcode & 0x80) >> 7) | ((opcode & 0x800) >> 10);
}
}

public class Windows430 : FormulasBase
{
public override string ToString()
{
return "4.3.0.15005 Windows";
}

protected override bool AuthCheck(uint opcode)
{
return (opcode & 0xEBDE) == 770;
}

protected override bool SpecialCheck(uint opcode)
{
return (opcode & 0x9549) == 1032;
}

protected override bool NormalCheck(uint opcode)
{
return (opcode & 0x8159) == 0;
}

public override uint CalcCryptedFromOpcode(uint opcode)
{
return (opcode & 6 | ((opcode & 0x20 | (((opcode & 0x80) | (opcode >> 1) & 0x3F00) >> 1)) >> 2)) >> 1;
}

public override uint CalcSpecialFromOpcode(uint opcode)
{
return (opcode & 6 | ((opcode & 0x30 | (((opcode & 0x80) | ((opcode & 0x200 | ((opcode & 0x800 | (opcode >> 1) & 0x3000) >> 1)) >> 1)) >> 1)) >> 1)) >> 1;
}

public override uint CalcAuthFromOpcode(uint opcode)
{
return opcode & 1 | ((opcode & 0x20 | ((opcode & 0x400 | (opcode >> 1) & 0x800) >> 4)) >> 4);
}
}

public class Mac430 : FormulasBase
{
public override string ToString()
{
return "4.3.0.15005 Mac";
}

protected override uint BaseOffset { get { return 1380; } }

protected override bool AuthCheck(uint opcode)
{
return (opcode & 0xEBDE) == 770;
}

protected override bool SpecialCheck(uint opcode)
{
return (opcode & 0x9549) == 1032;
}

protected override bool NormalCheck(uint opcode)
{
return (opcode & 0x8159) == 0;
}

public override uint CalcCryptedFromOpcode(uint opcode)
{
return ((opcode & 0x7E00u) >> 5) | ((opcode & 0x80u) >> 4) | ((opcode & 6u) >> 1) | ((opcode & 0x20u) >> 3);
}

public override uint CalcSpecialFromOpcode(uint opcode)
{
return ((opcode & 0x6000) >> 6) | ((opcode & 0x800) >> 5) | ((opcode & 0x200) >> 4) | ((opcode & 0x80) >> 3) | ((opcode & 6) >> 1) | ((opcode & 0x30) >> 2);
}

public override uint CalcAuthFromOpcode(uint opcode)
{
return ((opcode & 0x1000) >> 9) | opcode & 1 | ((opcode & 0x400) >> 8) | ((opcode & 0x20) >> 4);
}
}
}
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is a simple form that converts opcodes as server sees them to/from various values used by WoW client.
Don't expect it to magically give you all the opcodes.

Fields exaplanation:
Fields explanation:
Opcode (hex/decimal) - opcode as server sends and receives it.
Special (hex) - value used in NetClient__ProcessSpecialOpcodes / NetClient__JAMClientDispatch.
Auth (dec) - value used in NetClient__HandleAuthOpcodes / NetClient__JAMClientConnectionDispatch.
Expand Down

1 comment on commit c12e9ae

@fredimachado
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.3.2 15211 and 4.2.2 14545 - https://gist.github.com/1717771

Please sign in to comment.