@@ -280,6 +280,13 @@ ZEND_ARG_INFO(0, attributeid)
280
280
ZEND_ARG_INFO (1 , out )
281
281
ZEND_END_ARG_INFO ()
282
282
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
+
283
290
ZEND_BEGIN_ARG_INFO (arginfo_get_character_attribute , 0 )
284
291
ZEND_ARG_INFO (0 , context )
285
292
ZEND_ARG_INFO (0 , attributeid )
@@ -473,6 +480,7 @@ const zend_function_entry dogma_functions[] = {
473
480
DEF_DOGMA_FE (set_squad_booster )
474
481
475
482
DEF_DOGMA_FE (get_location_attribute )
483
+ DEF_DOGMA_FE (get_area_beacon_attribute )
476
484
DEF_DOGMA_FE (get_character_attribute )
477
485
DEF_DOGMA_FE (get_implant_attribute )
478
486
DEF_DOGMA_FE (get_skill_attribute )
@@ -571,6 +579,16 @@ static inline int dogma_get_location_from_zval(zval* zloc, dogma_location_t* loc
571
579
}
572
580
}
573
581
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
+
574
592
if (zend_hash_find (Z_ARRVAL_P (zloc ), "skill_typeid" ,
575
593
sizeof ("skill_typeid" ), (void * * )& val ) == SUCCESS ) {
576
594
if (Z_TYPE_PP (val ) == IS_LONG ) {
@@ -622,6 +640,7 @@ PHP_MINIT_FUNCTION(dogma) {
622
640
DEF_DOGMA_CONSTANT (DOGMA_LOC_Module );
623
641
DEF_DOGMA_CONSTANT (DOGMA_LOC_Charge );
624
642
DEF_DOGMA_CONSTANT (DOGMA_LOC_Drone );
643
+ DEF_DOGMA_CONSTANT (DOGMA_LOC_Area_Beacon );
625
644
626
645
DEF_DOGMA_CONSTANT (DOGMA_STATE_Unplugged );
627
646
DEF_DOGMA_CONSTANT (DOGMA_STATE_Offline );
@@ -1305,6 +1324,26 @@ ZEND_FUNCTION(dogma_get_location_attribute) {
1305
1324
RETURN_LONG (ret );
1306
1325
}
1307
1326
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
+
1308
1347
ZEND_FUNCTION (dogma_get_character_attribute ) {
1309
1348
zval * zctx ;
1310
1349
dogma_context_t * ctx ;
0 commit comments