Hi elitepvpers,
I am working on something so that if you enter an dungeon that it randomize the dungeons.
So what i did was this
And
The problem is when i am willing to enter the dungeon its crashing.
On Debugging its telling me that its crashing on
return dwWorldTest; @[Only registered and activated users can see links. Click Here To Register...]stMng::GetRandomWorld()
When i enable the error logging. Then the error is saying the correct ID. for each time i try to enter. So i know that SetRandomWorld is functional.
Any tips?
With kind regards.
I am working on something so that if you enter an dungeon that it randomize the dungeons.
So what i did was this
Code:
TestMng::SetRandomWorld()
{
int x = rand() % 2;
switch (x)
{
case 0:
{
dwWorldTest = WI_INSTANCE_CONTAMINTRAILS;
}
break;
case 1:
{
dwWorldTest = WI_INSTANCE_BEHAMAH;
}
break;
}
}
Code:
int TestMng::GetRandomWorld()
{
//if (dwWorldTest != NULL_ID)
// Error("dwWorldTest %d", dwWorldTest);
return dwWorldTest;
}
Code:
CWorld* pWorld = g_WorldMng.GetWorld(pTestMng->GetRandomWorld()); if (pWorld && pWorld->m_linkMap.GetLinkMap(static_cast<int>(dwPlayerID))) pWorld->Invalidate(dwPlayerID);
Code:
CWorld* pWorld = g_WorldMng.GetWorld(pTestMng->GetRandomWorld());
ASSERT(pWorld);
if (IsValidObj(pUser))
{
if (pWorld->m_linkMap.GetLinkMap(static_cast<int>(dwPlayerID)))
{
//pUser->REPLACE(g_uIdofMulti, WI_INSTANCE_CONTAMINTRAILS, D3DXVECTOR3(1413.187f, 100.487f, 1261.361f), REPLACE_NORMAL, static_cast<int>(dwPlayerID));
pUser->REPLACE(g_uIdofMulti, pTestMng->GetRandomWorld(), D3DXVECTOR3(1413.187f, 100.487f, 1261.361f), REPLACE_NORMAL, static_cast<int>(dwPlayerID));
}
}
On Debugging its telling me that its crashing on
return dwWorldTest; @[Only registered and activated users can see links. Click Here To Register...]stMng::GetRandomWorld()
When i enable the error logging. Then the error is saying the correct ID. for each time i try to enter. So i know that SetRandomWorld is functional.
Any tips?
With kind regards.