• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Avatar, and things.

Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
Hey anybody know how i can do this?

I want to remplace pSobAvatar, how i can do this? Or if i want to know the position of my character in game, how i do that?

Thanks.

For somethink like this.

Code:
pSobAvatar->GetSkillContainer();

EDIT:

I think my problem is for i don't have skills in the DB, right? Because of that i can't know what skill i have.


Arnie36 ey, i have one question if you can ask.

If i do the case UG_CHAR_SKILL_REQ:, now the skill gonna work, or i need a db? Because i already have the skills, but i can't use, for that case is my problem?
 
Experienced Elementalist
Joined
Jun 25, 2006
Messages
204
Reaction score
70
Re: [Help] Avatar, and things.

a db has nothing to do with it I think, I have never played the game but maybe the skills need to be charged or something.
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
Re: [Help] Avatar, and things.

Yes, for charge the skills the server need this case.

Code from DBOVirtualServer.cpp

Code:
	sUG_CHAR_SKILL_REQ *pCharSkillReq = (sUG_CHAR_SKILL_REQ*)pPacket;
	
	m_bySkillActiveType = VIRTUAL_SKILL_TYPE_CASTING;
	m_uiTargetSerialId = pCharSkillReq->hTarget;
	m_uiSkillTime = timeGetTime();


	CNtlSobAvatar *pSobAvatar = GetNtlSLGlobal()->GetSobAvatar();


	CNtlSkillContainer *pSkillContainer = pSobAvatar->GetSkillContainer();
	sSKILL_TBLDAT *pSkillTblData = pSkillContainer->GetSkillFromTable(pCharSkillReq->bySlotIndex);
	m_uiSkillTblId = pSkillTblData->tblidx;
	m_uiSkillReqSerialId = pSobAvatar->GetSerialID();
	
	/*
	CNtlSobPet *pSobPet = reinterpret_cast<CNtlSobPet*>(pSobAvatar->m_pSobPet);
	CNtlPetSkillContainer *pPetSkillContainer = pSobPet->GetSkillContainer();
	sSKILL_TBLDAT *pSkillTblData = pPetSkillContainer->GetSkillFromTable(pCharSkillReq->bySlotIndex);
	m_uiSkillReqSerialId = pSobPet->GetSerialID();
	m_uiSkillTblId = pSkillTblData->tblidx;
	*/


	// send
	sGU_CHAR_SKILL_RES sPacket;
	memset(&sPacket, 0, sizeof(sGU_CHAR_SKILL_RES));


	sPacket.wOpCode = GU_CHAR_SKILL_RES;
	sPacket.wResultCode = GAME_SUCCESS;


	SendEvent(sizeof(sPacket), &sPacket);

Well i use that code, but i'm change it to work on GameServer, and the only error i have is this.

Code:
Error	5	error LNK2019: símbolo externo "public: __thiscall RWS::CEventId::CEventId(void)" (??0CEventId@RWS@@QAE@XZ) sin resolver al que se hace referencia en la función "void __cdecl RWS::`dynamic initializer for 'ERROR_NOT_A_VALID_MESSAGE_ID''(void)" (??__EERROR_NOT_A_VALID_MESSAGE_ID@RWS@@YAXXZ)	C:\source\NtlLib\Server\GameServer\GameServer.obj	GameServer
 
Back
Top