-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConditions.cpp
55 lines (34 loc) · 1 KB
/
Conditions.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Include StdAfx
#include "StdAfx.h"
//////////////////////////////////////////////////////////////////////////////////
// Conditions
//////////////////////////////////////////////////////////////////////////////////
long ExtObject::cIsValidUser( LPVAL params )
{
return api.AuthUser();
}
long ExtObject::cIsTrophyAchieved( LPVAL params )
{
return api.GetTrophy( params[0].GetInt() ).IsAchieved();
}
long ExtObject::cIsGuestScore( LPVAL params )
{
int index = params[0].GetInt();
if ( index >= m_Scores.size() )
return false;
if ( m_Scores[index].GetGuest() == _T("") )
return true;
return false;
}
long ExtObject::cIsGameStorageItemSet( LPVAL params )
{
if ( api.GetDataStoreItem( DataStoreItem::GAME, CStdString( params[0].GetString() ) ).GetData() != _T("") )
return true;
return false;
}
long ExtObject::cIsUserStorageItemSet( LPVAL params )
{
if ( api.GetDataStoreItem( DataStoreItem::USER, CStdString( params[0].GetString() ) ).GetData() != _T("") )
return true;
return false;
}