npc
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -20,6 +21,48 @@ public class CECNPCMan : IMsgHandler
|
||||
|
||||
private void OnMsgNPCInfo(ECMSG msg)
|
||||
{
|
||||
|
||||
switch (msg.dwParam2)
|
||||
{
|
||||
case CommandID.NPC_INFO_LIST:
|
||||
{
|
||||
/* cmd_npc_info_list* pCmd = (cmd_npc_info_list*)Msg.dwParam1;
|
||||
BYTE* pDataBuf = &pCmd->placeholder;
|
||||
|
||||
for (int i = 0; i < pCmd->count; i++)
|
||||
{
|
||||
const info_npc&Info = *(const info_npc*)pDataBuf;
|
||||
|
||||
// Calculate npc info data size and skip it
|
||||
int iSize = sizeof(info_npc);
|
||||
if (Info.state & GP_STATE_EXTEND_PROPERTY)
|
||||
iSize += sizeof(DWORD) * OBJECT_EXT_STATE_COUNT;
|
||||
|
||||
if (Info.state & GP_STATE_NPC_PET)
|
||||
iSize += sizeof(int);
|
||||
|
||||
if (Info.state & GP_STATE_NPC_NAME)
|
||||
{
|
||||
BYTE len = *(BYTE*)(pDataBuf + iSize);
|
||||
iSize += sizeof(BYTE) + len;
|
||||
}
|
||||
if (Info.state & GP_STATE_MULTIOBJ_EFFECT)
|
||||
{
|
||||
int count = *(int*)(pDataBuf + iSize);
|
||||
iSize += sizeof(int);
|
||||
iSize += count * (sizeof(int) + sizeof(char));
|
||||
}
|
||||
if (Info.state & GP_STATE_NPC_MAFIA)
|
||||
{
|
||||
iSize += sizeof(int);
|
||||
}
|
||||
|
||||
a_LogOutput(1, "HoangDev: NPC_INFO_LIST, nid: %d, tid: %d, vis_tid: %d, pos: %f %f %f", Info.nid, Info.tid, Info.vis_tid, Info.pos.x, Info.pos.y, Info.pos.z);
|
||||
|
||||
NPCEnter(Info, false);
|
||||
pDataBuf += iSize;*/
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.boxqkrtm.ide.cursor": "https://github.com/boxqkrtm/com.unity.ide.cursor.git",
|
||||
"com.github-glitchenzo.nugetforunity": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
|
||||
"com.unity.ai.navigation": "2.0.8",
|
||||
"com.unity.collab-proxy": "2.9.1",
|
||||
"com.unity.ide.rider": "3.0.36",
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
},
|
||||
"hash": "38fecf55e4fd94ccfe58a92ed8ad1a529ba1694e"
|
||||
},
|
||||
"com.github-glitchenzo.nugetforunity": {
|
||||
"version": "https://github.com/GlitchEnzo/NuGetForUnity.git?path=/src/NuGetForUnity",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "a7c6b49a0141a5bff9b1983e38137522ef61977d"
|
||||
},
|
||||
"com.unity.ai.navigation": {
|
||||
"version": "2.0.8",
|
||||
"depth": 0,
|
||||
|
||||
Reference in New Issue
Block a user