Hi elitepvpers,
With an lot of thanks from Alfredico i have created an new system.
However there is something i still cant wrap my head arround.
What i want to do is when an player has been moved to the map that its creating an Mover.
Before you asking well is the mover existing
Yes it is existing
Cause i test it like this
So when i enter the world i can see in debug modes that the mover is inside __RIFT_MONSTER.
I checked multiple snippets from other .cpp files and tested them out.
But for some reason it isn't spawning the mob.
With an lot of thanks from Alfredico i have created an new system.
However there is something i still cant wrap my head arround.
What i want to do is when an player has been moved to the map that its creating an Mover.
Code:
pMatch->CreateMover();
Code:
void CRiftMatch::CreateMover()
{
vector<__RIFT_WORLD> vecWorld = CRiftMng::GetInstance()->m_vecRiftWorld;
for (DWORD i = 0; i < vecWorld.size(); i++)
{
CWorld* pWorld = g_WorldMng.GetWorld(vecWorld.at(i).dwWorldID);
if (!pWorld)
continue;
vector<__RIFT_MONSTER>::iterator it = CRiftMng::GetInstance()->m_vecMonster.begin();
MoverProp* pMoverProp = prj.GetMoverPropEx((*it).dwId);
if (pMoverProp && pMoverProp->dwID != 0)
{
CObj* pObj = CreateObj(D3DDEVICE, OT_MOVER, pMoverProp->dwID);
if (NULL == pObj)
{
OUTPUTDEBUGSTRING("\nPobj is NULL");
return;
}
pObj->SetPos((*it).vPos);
pObj->InitMotion(MTI_STAND);
pObj->UpdateLocalMatrix();
((CMover*)pObj)->m_bActiveAttack = (*it).bRed;
pWorld->ADDOBJ(pObj, TRUE, nDefaultLayer);
}
OUTPUTDEBUGSTRING("\nGetting WorldID and MoverID: WorldID = %d MoverID = %d\n", vecWorld.at(i).dwWorldID, (*it).dwId);
}
}
Yes it is existing
Cause i test it like this
Code:
void CRiftMatch::GetMover()
{
vector<__RIFT_MONSTER> vecMon = CRiftMng::GetInstance()->m_vecMonster;
for (int i = 0; i < vecMon.size(); i++)
{
OUTPUTDEBUGSTRING("\nGetMover: MoverId = %d nState = %d bRed = %d vPos = %d\n", vecMon.at(i).dwId, vecMon.at(i).nState, vecMon.at(i).bRed, vecMon.at(i).vPos);
}
}
I checked multiple snippets from other .cpp files and tested them out.
But for some reason it isn't spawning the mob.