Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

550 lines
19 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "cbase.h"
  8. #include "quest_objective_manager.h"
  9. #include "gcsdk/gcclient.h"
  10. #include "gc_clientsystem.h"
  11. #include "econ_quests.h"
  12. #include "tf_gamerules.h"
  13. #include "schemainitutils.h"
  14. #include "econ_item_system.h"
  15. #ifdef CLIENT_DLL
  16. #include "quest_log_panel.h"
  17. #endif
  18. // memdbgon must be the last include file in a .cpp file!!!
  19. #include "tier0/memdbgon.h"
  20. #if defined( DEBUG ) || defined( STAGING_ONLY )
  21. ConVar tf_quests_commit_every_point( "tf_quests_commit_every_point", "0", FCVAR_REPLICATED );
  22. ConVar tf_quests_progress_enabled( "tf_quests_progress_enabled", "1", FCVAR_REPLICATED );
  23. #endif
  24. CQuestObjectiveManager *QuestObjectiveManager( void )
  25. {
  26. static CQuestObjectiveManager g_QuestObjectiveManager;
  27. return &g_QuestObjectiveManager;
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose:
  31. //-----------------------------------------------------------------------------
  32. CBaseQuestObjectiveTracker::CBaseQuestObjectiveTracker( const CTFQuestObjectiveDefinition* pObjective, CQuestItemTracker* pParent )
  33. : m_nObjectiveDefIndex( pObjective->GetDefinitionIndex() )
  34. , m_pParent( pParent )
  35. , m_pEvaluator( NULL )
  36. {
  37. KeyValues *pKVConditions = pObjective->GetConditionsKeyValues();
  38. AssertMsg( !m_pEvaluator, "%s", CFmtStr( "Too many input for operator '%s'.", GetConditionName() ).Get() );
  39. const char *pszType = pKVConditions->GetString( "type" );
  40. m_pEvaluator = CreateEvaluatorByName( pszType, this );
  41. AssertMsg( m_pEvaluator != NULL, "%s", CFmtStr( "Failed to create quest condition name '%s' for '%s'", pszType, GetConditionName() ).Get() );
  42. SO_TRACKER_SPEW( CFmtStr( "Creating objective tracker def %d for quest def %d on item %llu for user %s\n",
  43. pObjective->GetDefinitionIndex(),
  44. pParent->GetItem()->GetItemDefinition()->GetDefinitionIndex(),
  45. pParent->GetItem()->GetID(),
  46. pParent->GetOwnerSteamID().Render() ),
  47. SO_TRACKER_SPEW_OBJECTIVE_TRACKER_MANAGEMENT );
  48. if ( !m_pEvaluator->BInitFromKV( pKVConditions, NULL ) )
  49. {
  50. AssertMsg( false, "Failed to init from KeyValues" );
  51. }
  52. }
  53. //-----------------------------------------------------------------------------
  54. // Purpose:
  55. //-----------------------------------------------------------------------------
  56. CBaseQuestObjectiveTracker::~CBaseQuestObjectiveTracker()
  57. {
  58. if ( m_pEvaluator )
  59. {
  60. delete m_pEvaluator;
  61. }
  62. }
  63. //-----------------------------------------------------------------------------
  64. // Purpose:
  65. //-----------------------------------------------------------------------------
  66. bool CBaseQuestObjectiveTracker::IsValidForPlayer( const CTFPlayer *pOwner, InvalidReasonsContainer_t& invalidReasons ) const
  67. {
  68. return m_pEvaluator->IsValidForPlayer( pOwner, invalidReasons );
  69. }
  70. //-----------------------------------------------------------------------------
  71. // Purpose:
  72. //-----------------------------------------------------------------------------
  73. const CTFPlayer *CBaseQuestObjectiveTracker::GetQuestOwner() const
  74. {
  75. return GetTrackedPlayer();
  76. }
  77. //-----------------------------------------------------------------------------
  78. // Purpose:
  79. //-----------------------------------------------------------------------------
  80. void CBaseQuestObjectiveTracker::EvaluateCondition( CTFQuestEvaluator *pSender, int nScore )
  81. {
  82. #ifdef GAME_DLL
  83. // tracker should be the root
  84. Assert( !GetParent() );
  85. IncrementCount( nScore );
  86. ResetCondition();
  87. #endif
  88. }
  89. //-----------------------------------------------------------------------------
  90. // Purpose:
  91. //-----------------------------------------------------------------------------
  92. void CBaseQuestObjectiveTracker::ResetCondition()
  93. {
  94. m_pEvaluator->ResetCondition();
  95. }
  96. //-----------------------------------------------------------------------------
  97. // Purpose:
  98. //-----------------------------------------------------------------------------
  99. bool CBaseQuestObjectiveTracker::UpdateConditions()
  100. {
  101. const CTFQuestObjectiveDefinition *pObjective = (CTFQuestObjectiveDefinition*)ItemSystem()->GetItemSchema()->GetQuestObjectiveByDefIndex( m_nObjectiveDefIndex );
  102. if ( !pObjective )
  103. return false;
  104. // clean up previous evaluator
  105. if ( m_pEvaluator )
  106. {
  107. delete m_pEvaluator;
  108. m_pEvaluator = NULL;
  109. }
  110. CUtlVector< CUtlString > vecErrors;
  111. return BInitFromKV( pObjective->GetConditionsKeyValues(), &vecErrors );
  112. }
  113. //-----------------------------------------------------------------------------
  114. // Purpose:
  115. //-----------------------------------------------------------------------------
  116. const CTFPlayer* CBaseQuestObjectiveTracker::GetTrackedPlayer() const
  117. {
  118. #ifdef CLIENT_DLL
  119. return ToTFPlayer( C_BasePlayer::GetLocalPlayer() );
  120. #else
  121. return m_pParent->GetTrackedPlayer();
  122. #endif
  123. }
  124. //-----------------------------------------------------------------------------
  125. // Purpose:
  126. //-----------------------------------------------------------------------------
  127. void CBaseQuestObjectiveTracker::IncrementCount( int nIncrementValue )
  128. {
  129. const CTFQuestObjectiveDefinition *pObjective = (CTFQuestObjectiveDefinition*)ItemSystem()->GetItemSchema()->GetQuestObjectiveByDefIndex( m_nObjectiveDefIndex );
  130. Assert( pObjective );
  131. if ( !pObjective )
  132. return;
  133. uint32 nPointsToAdd = nIncrementValue * pObjective->GetPoints();
  134. m_pParent->IncrementCount( nPointsToAdd, pObjective );
  135. }
  136. //-----------------------------------------------------------------------------
  137. // Purpose:
  138. //-----------------------------------------------------------------------------
  139. CQuestItemTracker::CQuestItemTracker( const CSharedObject* pItem, CSteamID SteamIDOwner, CSOTrackerManager* pManager )
  140. : CBaseSOTracker( pItem, SteamIDOwner, pManager )
  141. , m_pItem( NULL )
  142. , m_nStandardPoints( 0 )
  143. , m_nBonusPoints( 0 )
  144. #ifdef GAME_DLL
  145. , m_nStartingStandardPoints( 0 )
  146. , m_nStartingBonusPoints( 0 )
  147. #endif
  148. {
  149. m_pItem = assert_cast< const CEconItem* >( pItem );
  150. // Retrieve starting numbers
  151. UpdatePointsFromSOItem();
  152. SO_TRACKER_SPEW( CFmtStr( "Creating tracker for quest %d on item %llu for user %s with %dsp and %dbp\n",
  153. GetItem()->GetItemDefinition()->GetDefinitionIndex(),
  154. GetItem()->GetID(),
  155. GetOwnerSteamID().Render(),
  156. GetEarnedStandardPoints(),
  157. GetEarnedBonusPoints() ),
  158. SO_TRACKER_SPEW_ITEM_TRACKER_MANAGEMENT );
  159. // Create trackers for each objective
  160. QuestObjectiveDefVec_t vecChosenObjectives;
  161. m_pItem->GetItemDefinition()->GetQuestDef()->GetRolledObjectivesForItem( vecChosenObjectives, m_pItem );
  162. FOR_EACH_VEC( vecChosenObjectives, i )
  163. {
  164. if ( !DoesObjectiveNeedToBeTracked( vecChosenObjectives[i] ) )
  165. continue;
  166. CBaseQuestObjectiveTracker* pNewTracker = new CBaseQuestObjectiveTracker( vecChosenObjectives[i], this );
  167. m_vecObjectiveTrackers.AddToTail( pNewTracker );
  168. }
  169. if ( m_vecObjectiveTrackers.IsEmpty() )
  170. {
  171. SO_TRACKER_SPEW( CFmtStr( "Did not create any objective trackers for quest %d on item %llu for user %s with %dsp and %dbp\n",
  172. GetItem()->GetItemDefinition()->GetDefinitionIndex(),
  173. GetItem()->GetID(),
  174. GetOwnerSteamID().Render(),
  175. GetEarnedStandardPoints(),
  176. GetEarnedBonusPoints() ),
  177. SO_TRACKER_SPEW_OBJECTIVE_TRACKER_MANAGEMENT );
  178. }
  179. }
  180. //-----------------------------------------------------------------------------
  181. // Purpose:
  182. //-----------------------------------------------------------------------------
  183. CQuestItemTracker::~CQuestItemTracker()
  184. {
  185. #ifdef CLIENT_DLL
  186. SO_TRACKER_SPEW( CFmtStr( "Deleting tracker for quest %u on item %llu with %usp and %ubp\n",
  187. m_pItem->GetItemDefinition()->GetDefinitionIndex(),
  188. m_pItem->GetItemID(),
  189. m_nStandardPoints,
  190. m_nBonusPoints ),
  191. SO_TRACKER_SPEW_ITEM_TRACKER_MANAGEMENT );
  192. #else
  193. SO_TRACKER_SPEW( CFmtStr( "Deleting tracker for quest %u on item %llu with %usp %ussp %ubp %usbp\n",
  194. m_pItem->GetItemDefinition()->GetDefinitionIndex(),
  195. m_pItem->GetItemID(),
  196. m_nStandardPoints,
  197. m_nStartingStandardPoints,
  198. m_nBonusPoints,
  199. m_nStartingBonusPoints ),
  200. SO_TRACKER_SPEW_ITEM_TRACKER_MANAGEMENT );
  201. #endif
  202. m_vecObjectiveTrackers.PurgeAndDeleteElements();
  203. }
  204. //-----------------------------------------------------------------------------
  205. // Purpose: Take a look at our item and update what we think our points are
  206. // based on the attributes on the item IF they are greater. We NEVER
  207. // want to lose progress for any reason.
  208. //-----------------------------------------------------------------------------
  209. void CQuestItemTracker::UpdatePointsFromSOItem()
  210. {
  211. uint32 nNewPoints = 0;
  212. static CSchemaAttributeDefHandle pAttribDef_EarnedStandardPoints( "quest earned standard points" );
  213. m_pItem->FindAttribute( pAttribDef_EarnedStandardPoints, &nNewPoints );
  214. #ifdef GAME_DLL
  215. m_nStartingStandardPoints = Max( nNewPoints, m_nStartingStandardPoints );
  216. #else
  217. m_nStandardPoints = Max( nNewPoints, m_nStandardPoints );
  218. #endif
  219. nNewPoints = 0;
  220. static CSchemaAttributeDefHandle pAttribDef_EarnedBonusPoints( "quest earned bonus points" );
  221. m_pItem->FindAttribute( pAttribDef_EarnedBonusPoints, &nNewPoints );
  222. #ifdef GAME_DLL
  223. m_nStartingBonusPoints = Max( nNewPoints, m_nStartingBonusPoints );
  224. #else
  225. m_nBonusPoints = Max( nNewPoints, m_nBonusPoints );
  226. #endif
  227. #ifdef GAME_DLL
  228. SendUpdateToClient( NULL );
  229. SO_TRACKER_SPEW( CFmtStr( "Updated points from item. CS:%d S:%d CB:%d B:%d\n", m_nStandardPoints, m_nStartingStandardPoints, m_nBonusPoints, m_nStartingBonusPoints ), SO_TRACKER_SPEW_OBJECTIVES );
  230. #else
  231. SO_TRACKER_SPEW( CFmtStr( "Updated points from item. S:%d B:%d\n", m_nStandardPoints, m_nBonusPoints ), SO_TRACKER_SPEW_OBJECTIVES );
  232. #endif
  233. }
  234. //-----------------------------------------------------------------------------
  235. // Purpose:
  236. //-----------------------------------------------------------------------------
  237. const CBaseQuestObjectiveTracker* CQuestItemTracker::FindTrackerForDefIndex( uint32 nDefIndex ) const
  238. {
  239. FOR_EACH_VEC( m_vecObjectiveTrackers, i )
  240. {
  241. if ( m_vecObjectiveTrackers[ i ]->GetObjectiveDefIndex() == nDefIndex )
  242. {
  243. return m_vecObjectiveTrackers[ i ];
  244. }
  245. }
  246. return NULL;
  247. }
  248. uint32 CQuestItemTracker::GetEarnedStandardPoints() const
  249. {
  250. #ifdef GAME_DLL
  251. return m_nStartingStandardPoints + m_nStandardPoints;
  252. #else
  253. return m_nStandardPoints;
  254. #endif
  255. }
  256. uint32 CQuestItemTracker::GetEarnedBonusPoints() const
  257. {
  258. #ifdef GAME_DLL
  259. return m_nStartingBonusPoints + m_nBonusPoints;
  260. #else
  261. return m_nBonusPoints;
  262. #endif
  263. }
  264. //-----------------------------------------------------------------------------
  265. // Purpose:
  266. //-----------------------------------------------------------------------------
  267. void CQuestItemTracker::IncrementCount( uint32 nIncrementValue, const CQuestObjectiveDefinition* pObjective )
  268. {
  269. #if defined( DEBUG ) || defined( STAGING_ONLY )
  270. if ( !tf_quests_progress_enabled.GetBool() )
  271. return;
  272. #endif
  273. #ifdef GAME_DLL
  274. Assert( pObjective );
  275. Assert( m_pItem );
  276. if ( !pObjective || !m_pItem )
  277. return;
  278. auto pQuestDef = m_pItem->GetItemDefinition()->GetQuestDef();
  279. Assert( pQuestDef );
  280. if ( !pQuestDef )
  281. return;
  282. if ( g_pVGuiLocalize && ( g_nQuestSpewFlags & SO_TRACKER_SPEW_OBJECTIVES ) )
  283. {
  284. locchar_t loc_IntermediateName[ MAX_ITEM_NAME_LENGTH ];
  285. locchar_t locValue[ MAX_ITEM_NAME_LENGTH ];
  286. loc_sprintf_safe( locValue, LOCCHAR( "%d" ), pObjective->GetPoints() );
  287. loc_scpy_safe( loc_IntermediateName, CConstructLocalizedString( g_pVGuiLocalize->Find( pObjective->GetDescriptionToken() ), locValue ) );
  288. char szTempObjectiveName[256];
  289. ::ILocalize::ConvertUnicodeToANSI( loc_IntermediateName, szTempObjectiveName, sizeof( szTempObjectiveName ));
  290. SO_TRACKER_SPEW( CFmtStr( "Increment for quest: %llu Objective: \"%s\" %d->%d (+%d)\n"
  291. , m_pItem->GetItemID()
  292. , szTempObjectiveName
  293. , m_nStandardPoints + m_nBonusPoints
  294. , m_nStandardPoints + m_nBonusPoints + nIncrementValue
  295. , nIncrementValue ), SO_TRACKER_SPEW_OBJECTIVES );
  296. }
  297. // Regardless of standard or bonus, we fill the standard gauge first
  298. uint32 nMaxStandardPoints = pQuestDef->GetMaxStandardPoints() - GetEarnedStandardPoints();
  299. int nAmountToAdd = Min( nMaxStandardPoints, nIncrementValue );
  300. m_nStandardPoints += nAmountToAdd;
  301. nIncrementValue -= nAmountToAdd;
  302. // If any bonus points left, fill in bonus points
  303. if ( pObjective->IsAdvanced() && nIncrementValue > 0 )
  304. {
  305. uint32 nMaxBonusPoints = pQuestDef->GetMaxBonusPoints() + pQuestDef->GetMaxStandardPoints() - GetEarnedStandardPoints() - GetEarnedBonusPoints();
  306. m_nBonusPoints += Min( nMaxBonusPoints, nIncrementValue );
  307. }
  308. bool bShouldCommit = IsQuestItemReadyToTurnIn( m_pItem );
  309. #if defined( DEBUG ) || defined( STAGING_ONLY )
  310. bShouldCommit |= tf_quests_commit_every_point.GetBool();
  311. #endif
  312. // Once we're over the turn-in threshhold, we need to record every point made.
  313. if ( bShouldCommit )
  314. {
  315. CommitChangesToDB();
  316. }
  317. SendUpdateToClient( pObjective );
  318. #endif
  319. }
  320. //-----------------------------------------------------------------------------
  321. // Purpose: Remove and delete any objective trackers that are no longer needed.
  322. // One is considered not needed if it's a tracker for a "standard"
  323. // objective and we're done getting standard points, or if we're at
  324. // full bonus points, then there's no way for us to get points anymore
  325. //-----------------------------------------------------------------------------
  326. void CQuestItemTracker::OnUpdate()
  327. {
  328. FOR_EACH_VEC_BACK( m_vecObjectiveTrackers, i )
  329. {
  330. const CQuestObjectiveDefinition *pObjective = GEconItemSchema().GetQuestObjectiveByDefIndex( m_vecObjectiveTrackers[ i ]->GetObjectiveDefIndex() );
  331. Assert( pObjective );
  332. if ( !pObjective || !DoesObjectiveNeedToBeTracked( pObjective ) )
  333. {
  334. delete m_vecObjectiveTrackers[ i ];
  335. m_vecObjectiveTrackers.Remove( i );
  336. }
  337. }
  338. }
  339. //-----------------------------------------------------------------------------
  340. // Purpose:
  341. //-----------------------------------------------------------------------------
  342. void CQuestItemTracker::OnRemove()
  343. {
  344. #ifdef GAME_DLL
  345. CommitRecord_t* pRecord = m_pManager->GetCommitRecord( m_pItem->GetItemID() );
  346. if ( pRecord )
  347. {
  348. CMsgGCQuestObjective_PointsChange* pProto = assert_cast< CMsgGCQuestObjective_PointsChange* >( pRecord->m_pProtoMsg );
  349. pProto->set_update_base_points( true );
  350. }
  351. #endif
  352. }
  353. void CQuestItemTracker::Spew() const
  354. {
  355. CBaseSOTracker::Spew();
  356. FOR_EACH_VEC( m_vecObjectiveTrackers, i )
  357. {
  358. DevMsg( "Tracking objective: %d\n", m_vecObjectiveTrackers[ i ]->GetObjectiveDefIndex() );
  359. }
  360. }
  361. //-----------------------------------------------------------------------------
  362. // Purpose:
  363. //-----------------------------------------------------------------------------
  364. bool CQuestItemTracker::DoesObjectiveNeedToBeTracked( const CQuestObjectiveDefinition* pObjective ) const
  365. {
  366. auto pQuestDef = m_pItem->GetItemDefinition()->GetQuestDef();
  367. Assert( pObjective );
  368. if ( pObjective && pQuestDef )
  369. {
  370. // If there's standard points to be earned, all objectives need to be tracked
  371. if ( pQuestDef->GetMaxStandardPoints() > 0 && GetEarnedStandardPoints() < pQuestDef->GetMaxStandardPoints() )
  372. {
  373. return true;
  374. }
  375. // If this objective is advanced, only track it if there's bonus points to be earned
  376. if ( pObjective->IsAdvanced() )
  377. {
  378. return pQuestDef->GetMaxBonusPoints() > 0 && GetEarnedBonusPoints() < pQuestDef->GetMaxBonusPoints();
  379. }
  380. }
  381. return false;
  382. }
  383. //-----------------------------------------------------------------------------
  384. // Purpose:
  385. //-----------------------------------------------------------------------------
  386. void CQuestItemTracker::CommitChangesToDB()
  387. {
  388. #ifdef CLIENT_DLL
  389. if ( GetQuestLog() && GetTrackedPlayer() == C_TFPlayer::GetLocalTFPlayer() )
  390. {
  391. GetQuestLog()->MarkQuestsDirty();
  392. }
  393. #else // GAME_DLL
  394. // Nothing to commit? Bail
  395. if ( m_nStandardPoints == 0 && m_nBonusPoints == 0 )
  396. return;
  397. SO_TRACKER_SPEW( CFmtStr( "CommitChangesToDB: %llu S:%d B:%d\n"
  398. , m_pItem->GetItemID()
  399. , GetEarnedStandardPoints()
  400. , GetEarnedBonusPoints() ), 0 );
  401. CSteamID ownerSteamID( m_pItem->GetAccountID(), GetUniverse(), k_EAccountTypeIndividual );
  402. CMsgGCQuestObjective_PointsChange record;
  403. // Cook up our message
  404. record.set_owner_steamid( ownerSteamID.ConvertToUint64() );
  405. record.set_quest_item_id( m_pItem->GetItemID() );
  406. record.set_standard_points( GetEarnedStandardPoints() );
  407. record.set_bonus_points( GetEarnedBonusPoints() ); // Here's the meat
  408. m_pManager->AddCommitRecord( &record, record.quest_item_id(), true );
  409. #endif
  410. }
  411. //-----------------------------------------------------------------------------
  412. // Purpose:
  413. //-----------------------------------------------------------------------------
  414. int CQuestItemTracker::IsValidForPlayer( const CTFPlayer *pOwner, InvalidReasonsContainer_t& invalidReasons ) const
  415. {
  416. int nNumInvalid = 0;
  417. FOR_EACH_VEC( m_vecObjectiveTrackers, i )
  418. {
  419. m_vecObjectiveTrackers[ i ]->IsValidForPlayer( pOwner, invalidReasons );
  420. if ( !invalidReasons.IsValid() )
  421. {
  422. ++nNumInvalid;
  423. }
  424. }
  425. return nNumInvalid;
  426. }
  427. #ifdef CLIENT_DLL
  428. //-----------------------------------------------------------------------------
  429. // Purpose: The server has changed scores. Apply those changes here
  430. //-----------------------------------------------------------------------------
  431. void CQuestItemTracker::UpdateFromServer( uint32 nStandardPoints, uint32 nBonusPoints )
  432. {
  433. SO_TRACKER_SPEW( CFmtStr( "Updating \"%s's\" standard points: %d->%d bonus points: %d->%d\n"
  434. , m_pItem->GetItemDefinition()->GetQuestDef()->GetRolledNameForItem( m_pItem )
  435. , m_nStandardPoints
  436. , nStandardPoints
  437. , m_nBonusPoints
  438. , nBonusPoints )
  439. , SO_TRACKER_SPEW_OBJECTIVES );
  440. m_nStandardPoints = nStandardPoints;
  441. m_nBonusPoints = nBonusPoints;
  442. }
  443. #else
  444. void CQuestItemTracker::SendUpdateToClient( const CQuestObjectiveDefinition* pObjective )
  445. {
  446. const CTFPlayer* pPlayer = GetTrackedPlayer();
  447. // They might've disconnected, so let's check if they're still around
  448. if ( pPlayer )
  449. {
  450. // Update the user on their progress
  451. CSingleUserRecipientFilter filter( GetTrackedPlayer() );
  452. filter.MakeReliable();
  453. UserMessageBegin( filter, "QuestObjectiveCompleted" );
  454. itemid_t nID = m_pItem->GetItemID();
  455. WRITE_BITS( &nID, 64 );
  456. WRITE_WORD( GetEarnedStandardPoints() );
  457. WRITE_WORD( GetEarnedBonusPoints() );
  458. WRITE_WORD( pObjective ? pObjective->GetDefinitionIndex() : (uint32)-1 );
  459. MessageEnd();
  460. }
  461. }
  462. #endif
  463. #if defined( DEBUG ) || defined( STAGING_ONLY )
  464. //-----------------------------------------------------------------------------
  465. // Purpose:
  466. //-----------------------------------------------------------------------------
  467. void CQuestItemTracker::DBG_CompleteQuest()
  468. {
  469. #ifdef GAME_DLL
  470. auto pQuestDef = m_pItem->GetItemDefinition()->GetQuestDef();
  471. uint32 nStandardPointsDelta = pQuestDef->GetMaxStandardPoints() - GetEarnedStandardPoints();
  472. // Cheat!
  473. if ( m_vecObjectiveTrackers.Count() )
  474. {
  475. const_cast< CBaseQuestObjectiveTracker* >( m_vecObjectiveTrackers[0] )->EvaluateCondition( NULL, nStandardPointsDelta );
  476. }
  477. CommitChangesToDB();
  478. #endif
  479. }
  480. #endif