fix: Update show elseplayer.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace PerfectWorld.Scripts.Managers
|
||||
{
|
||||
@@ -9,9 +12,53 @@ namespace PerfectWorld.Scripts.Managers
|
||||
public int HandlerId => MANAGER_INDEX.MAN_PLAYER;
|
||||
public bool ProcessMessage(ECMSG Msg)
|
||||
{
|
||||
|
||||
if (Msg.iSubID == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else if (Msg.iSubID < 0)
|
||||
{
|
||||
switch ((int)Msg.dwMsg)
|
||||
{
|
||||
case int value when value == EC_MsgDef.MSG_PM_PLAYERINFO:
|
||||
{
|
||||
OnMsgPlayerInfo(Msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnMsgPlayerInfo(ECMSG Msg)
|
||||
{
|
||||
int iHostID = (int)Msg.dwParam3;
|
||||
int lenghtByte = Marshal.SizeOf<int>();
|
||||
byte[] byteArray = new byte[lenghtByte];
|
||||
byte[] data = (byte[])Msg.dwParam1;
|
||||
for (int i = 0; i < lenghtByte; i++)
|
||||
{
|
||||
byteArray[i] = data[i];
|
||||
}
|
||||
int cid = BitConverter.ToInt32(byteArray);
|
||||
switch (Msg.dwParam2)
|
||||
{
|
||||
case CommandID.PLAYER_INFO_1:
|
||||
case CommandID.PLAYER_ENTER_WORLD:
|
||||
case CommandID.PLAYER_ENTER_SLICE:
|
||||
{
|
||||
if (cid != iHostID)
|
||||
{
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user