@@ -280,6 +280,13 @@ ZEND_ARG_INFO(0, attributeid)
280280ZEND_ARG_INFO (1 , out )
281281ZEND_END_ARG_INFO ()
282282
283+ ZEND_BEGIN_ARG_INFO (arginfo_get_area_beacon_attribute , 0 )
284+ ZEND_ARG_INFO (0 , context )
285+ ZEND_ARG_INFO (0 , key )
286+ ZEND_ARG_INFO (0 , attributeid )
287+ ZEND_ARG_INFO (1 , out )
288+ ZEND_END_ARG_INFO ()
289+
283290ZEND_BEGIN_ARG_INFO (arginfo_get_character_attribute , 0 )
284291ZEND_ARG_INFO (0 , context )
285292ZEND_ARG_INFO (0 , attributeid )
@@ -473,6 +480,7 @@ const zend_function_entry dogma_functions[] = {
473480 DEF_DOGMA_FE (set_squad_booster )
474481
475482 DEF_DOGMA_FE (get_location_attribute )
483+ DEF_DOGMA_FE (get_area_beacon_attribute )
476484 DEF_DOGMA_FE (get_character_attribute )
477485 DEF_DOGMA_FE (get_implant_attribute )
478486 DEF_DOGMA_FE (get_skill_attribute )
@@ -571,6 +579,16 @@ static inline int dogma_get_location_from_zval(zval* zloc, dogma_location_t* loc
571579 }
572580 }
573581
582+ if (zend_hash_find (Z_ARRVAL_P (zloc ), "area_beacon_index" ,
583+ sizeof ("area_beacon_index" ), (void * * )& val ) == SUCCESS ) {
584+ if (Z_TYPE_PP (val ) == IS_LONG ) {
585+ loc -> area_beacon_index = (dogma_key_t )Z_LVAL_PP (val );
586+ } else {
587+ zend_error (E_WARNING , "area_beacon_index is not an integer" );
588+ success = 0 ;
589+ }
590+ }
591+
574592 if (zend_hash_find (Z_ARRVAL_P (zloc ), "skill_typeid" ,
575593 sizeof ("skill_typeid" ), (void * * )& val ) == SUCCESS ) {
576594 if (Z_TYPE_PP (val ) == IS_LONG ) {
@@ -622,6 +640,7 @@ PHP_MINIT_FUNCTION(dogma) {
622640 DEF_DOGMA_CONSTANT (DOGMA_LOC_Module );
623641 DEF_DOGMA_CONSTANT (DOGMA_LOC_Charge );
624642 DEF_DOGMA_CONSTANT (DOGMA_LOC_Drone );
643+ DEF_DOGMA_CONSTANT (DOGMA_LOC_Area_Beacon );
625644
626645 DEF_DOGMA_CONSTANT (DOGMA_STATE_Unplugged );
627646 DEF_DOGMA_CONSTANT (DOGMA_STATE_Offline );
@@ -1305,6 +1324,26 @@ ZEND_FUNCTION(dogma_get_location_attribute) {
13051324 RETURN_LONG (ret );
13061325}
13071326
1327+ ZEND_FUNCTION (dogma_get_area_beacon_attribute ) {
1328+ zval * zctx ;
1329+ dogma_context_t * ctx ;
1330+ long key ;
1331+ long attribute ;
1332+ zval * zout ;
1333+ double out ;
1334+ int ret ;
1335+
1336+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rllz" , & zctx , & key , & attribute , & zout ) == FAILURE ) {
1337+ RETURN_FALSE ;
1338+ }
1339+ GET_CTX (zctx , ctx );
1340+
1341+ ret = dogma_get_area_beacon_attribute (ctx , (dogma_key_t )key , (dogma_attributeid_t )attribute , & out );
1342+ convert_to_null (zout );
1343+ ZVAL_DOUBLE (zout , out );
1344+ RETURN_LONG (ret );
1345+ }
1346+
13081347ZEND_FUNCTION (dogma_get_character_attribute ) {
13091348 zval * zctx ;
13101349 dogma_context_t * ctx ;
0 commit comments