Skip to content

Commit

Permalink
minor fixes to MoP
Browse files Browse the repository at this point in the history
  • Loading branch information
barncastle committed Aug 10, 2020
1 parent 5ab95c7 commit c0e9176
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Common/Constants/CharacterData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public static class CharacterData
public const uint COMMON_SPELL_ID = 668;
public const uint ORCISH_SKILL_ID = 109;
public const uint ORCISH_SPELL_ID = 669;
public const uint PANDAREN_SKILL_ID = 905;
public const uint PANDAREN_SPELL_ID = 108127;

public static readonly Dictionary<Races, uint[]> DisplayIds = new Dictionary<Races, uint[]>()
{
Expand Down
1 change: 1 addition & 0 deletions Plugins/MoP_15464/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public override IPacketWriter BuildUpdate()
// send language skills so we can type commands
SetField(Fields.PLAYER_FIELD_SKILL, CharacterData.COMMON_SKILL_ID);
SetField(Fields.PLAYER_FIELD_SKILL + 1, CharacterData.ORCISH_SKILL_ID);
SetField(Fields.PLAYER_FIELD_SKILL + 2, CharacterData.PANDAREN_SKILL_ID);

// misc
SetField(Fields.PLAYER_FIELD_CHARACTERPOINTS, 0);
Expand Down
4 changes: 4 additions & 0 deletions Plugins/MoP_15464/Handlers/CharHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ public void HandleCharCreate(ref IPacketReader packet, ref IWorldManager manager
FacialHair = packet.ReadByte()
};

// HACK neutral panda faction template doesn't work
if (cha.Race == (byte)Races.PANDAREN_NEUTRAL)
cha.Race = (byte)Races.PANDAREN_ALLI;

var result = manager.Account.Characters.Where(x => x.Build == Sandbox.Instance.Build);
PacketWriter writer = new PacketWriter(Sandbox.Instance.Opcodes[global::Opcodes.SMSG_CHAR_CREATE], "SMSG_CHAR_CREATE");

Expand Down
4 changes: 3 additions & 1 deletion Plugins/MoP_15464/Handlers/WorldHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ public void HandlePlayerLogin(ref IPacketReader packet, ref IWorldManager manage
// send language spells so we can type commands
PacketWriter spells = new PacketWriter(Sandbox.Instance.Opcodes[global::Opcodes.SMSG_INITIAL_SPELLS], "SMSG_INITIAL_SPELLS");
spells.WriteUInt8(0);
spells.WriteUInt16(2); // spell count
spells.WriteUInt16(3); // spell count
spells.WriteUInt32(CharacterData.COMMON_SPELL_ID);
spells.WriteUInt16(0);
spells.WriteUInt32(CharacterData.ORCISH_SPELL_ID);
spells.WriteUInt16(0);
spells.WriteUInt32(CharacterData.PANDAREN_SPELL_ID);
spells.WriteUInt16(0);
spells.WriteUInt16(0); // cooldown count
manager.Send(spells);

Expand Down
1 change: 1 addition & 0 deletions Plugins/MoP_15464/Opcodes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class Opcodes : IOpcodes
{ global::Opcodes.SMSG_MOVE_UNSET_CAN_FLY, 0x5626 },
{ global::Opcodes.SMSG_FORCE_SPEED_CHANGE, 0x9642 },
{ global::Opcodes.MSG_MOVE_WORLDPORT_ACK, 0xD20A },
{ global::Opcodes.MSG_MOVE_TELEPORT_ACK, 0xD65A },

{ global::Opcodes.CMSG_LOGOUT_REQUEST, 0x1424 },
{ global::Opcodes.SMSG_LOGOUT_COMPLETE, 0xD270 },
Expand Down

0 comments on commit c0e9176

Please sign in to comment.