Hello guys,
Its still me with a new problem !
I'm trying to add a temporary region, but it doesnt works, maybe you know why ?
Here is my code :
#ifdef __WORLDSERVER
CGuildQuestProcessor* pProcessor = CGuildQuestProcessor::GetInstance();
CRect* pRect = pProcessor->GetQuestRect( QUEST_WARMON_LV1 );
int x1, y1, x2, y2;
if( pRect )
{
x1 = 5000;
x2 = 5000;
y1 = 5000;
y2 = 5000;
OutputDebugString( "fightregion" );
memset( &fightregion, 0, sizeof(REGIONELEM) );
fightregion.m_uItemId = 0xffffffff;
fightregion.m_uiItemCount = 0xffffffff;
fightregion.m_uiMinLevel = 0xffffffff;
fightregion.m_uiMaxLevel = 0xffffffff;
fightregion.m_iQuest = 0xffffffff;
fightregion.m_iQuestFlag = 0xffffffff;
fightregion.m_iJob = 0xffffffff;
fightregion.m_iGender = 0xffffffff;
fightregion.m_dwAttribute = RA_DANGER | RA_FIGHT;
fightregion.m_dwIdMusic = 121;
fightregion.m_bDirectMusic = TRUE;
fightregion.m_dwIdTeleWorld = 0;
fightregion.m_vPos = D3DXVECTOR3( 3080.388672F, 47.924984F, 3671.386230F );
fightregion.m_rect.SetRect( x1, y2, x2, y1 );
lstrcpy(fightregion.m_szTitle, "Duel Zone" );
//CWorld* pWorld = g_WorldMng.GetWorld( WI_WORLD_MADRIGAL );
if( pWorld )
{
LPREGIONELEM ptr = pWorld->m_aRegion.GetAt( pWorld->m_aRegion.GetSize() - 1 );
if( ptr->m_dwAttribute != ( RA_DANGER | RA_FIGHT ) )
pWorld->m_aRegion.AddTail( &fightregion );
// pUser->AddText( "Region add" );
g_UserMng.AddAddRegion( WI_WORLD_MADRIGAL, fightregion );
Error("Region add");
}
}
#endif