add equip dat
This commit is contained in:
@@ -622,12 +622,12 @@ namespace PerfectWorld.Scripts.Managers
|
||||
|
||||
switch (Msg.dwMsg)
|
||||
{
|
||||
/*case long value when value == EC_MsgDef.MSG_PM_PLAYEREQUIPDATA:
|
||||
if (msg.dwParam2 == S2C.EQUIP_DATA)
|
||||
cid = ((cmd_equip_data)msg.dwParam1).idPlayer;
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYEREQUIPDATA:
|
||||
if ((int)Msg.dwParam2 == CommandID.EQUIP_DATA)
|
||||
cid = GPDataTypeHelper.FromBytes<cmd_equip_data>((byte[])Msg.dwParam1).idPlayer;
|
||||
else // EQUIP_DATA_CHANGED
|
||||
cid = ((cmd_equip_data_changed)msg.dwParam1).idPlayer;
|
||||
break;*/
|
||||
cid = GPDataTypeHelper.FromBytes<cmd_equip_data_changed>((byte[])Msg.dwParam1).idPlayer;
|
||||
break;
|
||||
|
||||
case long value when value == EC_MsgDef.MSG_PM_PLAYERBASEINFO:
|
||||
cid = (int)((playerbaseinfo_re)Msg.dwParam1).Player.id;
|
||||
|
||||
@@ -695,6 +695,33 @@ namespace CSNetwork.GPDataType
|
||||
public int id;
|
||||
public int idKiller;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_equip_data
|
||||
{
|
||||
public ushort crc;
|
||||
public int idPlayer;
|
||||
public long mask;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
|
||||
public int[] data; //0 ~ 29
|
||||
|
||||
// bool CheckValid(size_t buf_size, size_t& sz) const
|
||||
// {
|
||||
// sz = sizeof(*this) - sizeof(data);
|
||||
|
||||
// if (buf_size < sz)
|
||||
// return false;
|
||||
|
||||
// for (int i = 0; i < 32; i++)
|
||||
// {
|
||||
// if (mask & (1 << i))
|
||||
// sz += sizeof(int);
|
||||
// }
|
||||
|
||||
// return buf_size >= sz;
|
||||
// }
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct cmd_object_atk_result
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user