Code:
/// <summary>
/// : ushort
/// </summary>
public enum SkillAddActionType : ushort
{
/// <summary>
/// adds and existing skill, Requires Id, Exp, Level, Index and Flags
/// </summary>
AddExsisting = 0,
/// <summary>
/// adds a new skill, Requires Id, Exp, Level only.
/// </summary>
AddNew = 1,
/// <summary>
/// Sent to Server only.
/// </summary>
Unknown2 = 2,
/// <summary>
/// Set selected name index
/// </summary>
SetSelectedName = 3,
/// <summary>
/// Set flags and index
/// </summary>
SetFlags = 4,
/// <summary>
/// Sent to Server only.
/// </summary>
RemoveName = 5,
/// <summary>
/// replaces the flags and index
/// </summary>
ReplaceFlags = 6,
}
Code:
[Packet(PacketType.Skill)]
public partial class SkillPacket
{
public uint TimeStamp { get; set; } = UnsafeNativeMethods.Time.GetTicks();
public uint EXP { get; set; }
public uint Id { get; set; }
public ushort Level { get; set; }
[PacketSubtype]
public SkillAddActionType ActionType { get; set; }
/// <summary>
/// Sets the selected name in the window.
/// </summary>
public ushort SelectedNameIndex { get; set; }
//TODO: Find out what this is. Maybe has something to do with Jiang level.
public ushort Unknown2 { get; set; }
/// <summary>
/// Determines if the Name is going to show in the window based on the flags.
/// <![CDATA[ (1 + (1 << 1 | 1 << 2 | 1 << 3 | 1 << 4)) this will enable 4 names. Adding more flags enables more if they exsist in the MagicEffect.ini(Name1, Name2, Etc)]]>
/// </summary>
public uint EnabledFlags { get; set; }
/// <summary>
/// Same as <see cref="EnabledFlags"/> only it will show a remove button if the flag is present.
/// <![CDATA[ (1 + (1 << 1 | 1 << 2 | 1 << 3 | 1 << 4))]]>
/// </summary>
public uint RemovableFlags { get; set; }
}
It's been a long time since I touched this shit but I think this is for client version 6622.
I think what you need is to send the AddExsisting instead of AddNew.
Edit: Btw these (1 + (1 << 1 | 1 << 2 | 1 << 3 | 1 << 4)) are enum flags, I just never had the chance to convert them to proper enums.
so some shit like:
enum Bar
{
1 << 1,
1 << 2 ,
1 << 3,
1 << 4
}