void __SetQuest( DWORD dwIdMover, int nQuest ) { QuestProp* pQuestProp = prj.m_aPropQuest.GetAt( nQuest ); CUser* pUser = prj.GetUser( dwIdMover ); if( pQuestProp ) pUser->AddDefinedText( TID_EVE_STARTQUEST, "\"%s\"", pQuestProp->m_szTitle ); QUEST quest; if( pUser->SetQuest( nQuest, 0, &quest ) ) pUser->AddSetQuest( &quest ); g_dpDBClient.CalluspLoggingQuest( pUser->m_idPlayer, nQuest, 10 ); }
int __SetQuestState( DWORD dwIdMover, int nQuest, int nState ) { CUser* pUser = prj.GetUser( dwIdMover ); if( nState == QS_END ) { QuestProp* pQuestProp = prj.m_aPropQuest.GetAt( nQuest ); if( pQuestProp ) { if( nQuest != QUEST_CREGUILD ) pUser->AddDefinedText( TID_EVE_ENDQUEST, "\"%s\"", pQuestProp->m_szTitle ); } g_dpDBClient.CalluspLoggingQuest( pUser->m_idPlayer, nQuest, 20 ); } else if( nState == QS_BEGIN ) { g_dpDBClient.CalluspLoggingQuest( pUser->m_idPlayer, nQuest, 10 ); } QUEST quest; if( pUser->SetQuest( nQuest, nState, &quest ) ) pUser->AddSetQuest( &quest ); return 1; }