version 1.9 | | version 1.10 |
---|
| | |
static f_plug_api cfapiObject_apply_below = NULL; | | static f_plug_api cfapiObject_apply_below = NULL; |
static f_plug_api cfapiArchetype_get_first = NULL; | | static f_plug_api cfapiArchetype_get_first = NULL; |
static f_plug_api cfapiArchetype_get_property = NULL; | | static f_plug_api cfapiArchetype_get_property = NULL; |
| | static f_plug_api cfapiParty_get_property = NULL; |
| | |
#define GET_HOOK( x, y, z ) \ | | #define GET_HOOK( x, y, z ) \ |
{ \ | | { \ |
| | |
GET_HOOK( cfapiObject_apply_below, "cfapi_object_apply_below", z ); | | GET_HOOK( cfapiObject_apply_below, "cfapi_object_apply_below", z ); |
GET_HOOK( cfapiArchetype_get_first, "cfapi_archetype_get_first", z ); | | GET_HOOK( cfapiArchetype_get_first, "cfapi_archetype_get_first", z ); |
GET_HOOK( cfapiArchetype_get_property, "cfapi_archetype_get_property", z ); | | GET_HOOK( cfapiArchetype_get_property, "cfapi_archetype_get_property", z ); |
| | GET_HOOK( cfapiParty_get_property, "cfapi_party_get_property", z ); |
return 1; | | return 1; |
} | | } |
| | |
| | |
int val; | | int val; |
return cfapiObject_get_property(&val, op, CFAPI_PLAYER_PROP_MARKED_ITEM); | | return cfapiObject_get_property(&val, op, CFAPI_PLAYER_PROP_MARKED_ITEM); |
} | | } |
| | void cf_player_set_marked_item(object* op, object* ob) |
| | { |
| | int val; |
| | cfapiObject_set_property(&val, op, CFAPI_PLAYER_PROP_MARKED_ITEM, ob); |
| | } |
| | partylist* cf_player_get_party(object* op) |
| | { |
| | int val; |
| | return cfapiObject_get_property(&val, op, CFAPI_PLAYER_PROP_PARTY); |
| | } |
| | void cf_player_set_party(object* op, partylist* party) |
| | { |
| | int val; |
| | cfapiObject_set_property(&val, op, CFAPI_PLAYER_PROP_PARTY, party); |
| | } |
| | |
mapstruct* cf_map_get_map( char* name ) | | mapstruct* cf_map_get_map( char* name ) |
{ | | { |
int val; | | int val; |
| | |
cfapiObject_set_key(&val, op, keyname, value); | | cfapiObject_set_key(&val, op, keyname, value); |
} | | } |
| | |
| | /* Archetype-related functions */ |
archetype*cf_archetype_get_first() | | archetype*cf_archetype_get_first() |
{ | | { |
int val; | | int val; |
| | |
return cfapiArchetype_get_property(&val, arch, CFAPI_ARCH_PROP_CLONE); | | return cfapiArchetype_get_property(&val, arch, CFAPI_ARCH_PROP_CLONE); |
} | | } |
| | |
| | /* Party-related functions */ |
| | partylist* cf_party_get_first(void) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, NULL, CFAPI_PARTY_PROP_NEXT); |
| | } |
| | |
| | const char* cf_party_get_name(partylist* party) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, party, CFAPI_PARTY_PROP_NAME); |
| | } |
| | |
| | partylist* cf_party_get_next(partylist* party) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, party, CFAPI_PARTY_PROP_NEXT); |
| | } |
| | |
| | const char* cf_party_get_password(partylist* party) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, party, CFAPI_PARTY_PROP_PASSWORD); |
| | } |
| | |
| | player* cf_party_get_first_player(partylist* party) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, party, CFAPI_PARTY_PROP_PLAYER, NULL); |
| | } |
| | |
| | player* cf_party_get_next_player(partylist* party, player* op) |
| | { |
| | int val; |
| | return cfapiParty_get_property(&val, party, CFAPI_PARTY_PROP_PLAYER, op); |
| | } |
| | |
#ifdef WIN32 | | #ifdef WIN32 |
int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) | | int gettimeofday(struct timeval *time_Info, struct timezone *timezone_Info) |
{ | | { |