I want to set the npc's on the world but Im kinda stucked...
I dont know what I should do now.. I cant set the npc x/y/z location etc..
currently I have:
the function is called at UG_ENTER_WORLD
I dont know what I should do now.. I cant set the npc x/y/z location etc..
currently I have:
Code:
void CClientSession::SendNpcCreate(CNtlPacket * pPacket, CGameServer * app)
{
printf("--- CREATE NPCS --- \n");
CNtlPacket packet(sizeof(sGU_OBJECT_CREATE));
sGU_OBJECT_CREATE * res = (sGU_OBJECT_CREATE *)packet.GetPacketData();
CNPCTable * pNPcTable = app->g_pTableContainer->GetNpcTable();
sNPC_TBLDAT *npcTblData = (sNPC_TBLDAT*)pNPcTable;
res->wOpCode = GU_OBJECT_CREATE;
res->handle = this->GetavatarHandle();
res->sObjectInfo.objType = OBJTYPE_NPC;
res->sObjectInfo.npcBrief.tblidx = npcTblData->tblidx;
//res->sObjectInfo.npcState.sCharStateBase.vCurLoc.x =
packet.SetPacketLen( sizeof(sGU_OBJECT_CREATE) );
int rc = g_pApp->Send( this->GetHandle(), &packet );
}