MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | // MorgenGrauen MUDlib |
| 2 | // |
| 3 | |
| 4 | #ifndef __PLAYER_FAO_H__ |
| 5 | #define __PLAYER_FAO_H__ |
| 6 | |
| 7 | #define FAO_MASTER "/d/ebene/miril/fraternitas/secure/faomaster" // die zentrale stelle des fao |
| 8 | |
| 9 | // die Liste der verfügbaren Portale fuer das erste portalgeschenk |
| 10 | #define FAO_PORTALS1_LIST ({2,3,4,5,6,7,8,9,10,13,14,15,16,19,20,21,25,29,33}) |
| 11 | // die Liste der verfügbaren Portale fuer das zweite portalgeschenk |
| 12 | #define FAO_PORTALS2_LIST FAO_PORTALS1_LIST+({1,11,12,17,18,24,26,27,28,31,34,36,37,38}) |
| 13 | // die anzahl der zu waehlenden portale fuer das erste portalgeschenk |
| 14 | #define FAO_PORTALS1_NUM 5 |
| 15 | // die anzahl der zu waehlenden portale fuer das zweite portalgeschenk |
| 16 | #define FAO_PORTALS2_NUM 5 |
| 17 | |
| 18 | // properties |
| 19 | #define P_FAO "fraternitasdonoarchmagorum" // enthaelt die doni |
| 20 | #define P_FAO_PORTALS P_FAO+"PORTALS" // enthaelt die dem spieler uebergebenen portale |
| 21 | |
| 22 | // bitmasks |
| 23 | #define FAO_TITLE 0x01 |
| 24 | #define FAO_PORTALS1 0x02 |
| 25 | #define FAO_PORTALS2 0x04 |
| 26 | #define FAO_SEER_PORTAL 0x08 |
| 27 | #define FAO_MEMBER 0x10 |
| 28 | |
| 29 | // hilfreiche makros |
| 30 | #define FAO_HAS_TITLE_GIFT(x) (x!=0 && query_once_interactive(x) \ |
| 31 | && ((int)x->QueryProp(P_FAO)&FAO_TITLE)!=0) |
| 32 | #define FAO_HAS_PORTALS1_GIFT(x) (x!=0 && query_once_interactive(x) \ |
| 33 | && ((int)x->QueryProp(P_FAO)&FAO_PORTALS1)!=0) |
| 34 | #define FAO_HAS_PORTALS2_GIFT(x) (x!=0 && query_once_interactive(x) \ |
| 35 | && ((int)x->QueryProp(P_FAO)&FAO_PORTALS2)!=0) |
| 36 | #define FAO_HAS_PORTALS_GIFT(x) (FAO_HAS_PORTALS1_GIFT(x) || FAO_HAS_PORTALS2_GIFT(x)) |
| 37 | #define FAO_MAY_USE_PORTAL(x,p) (intp(p) && ((FAO_HAS_PORTALS1_GIFT(x) && \ |
| 38 | member(FAO_PORTALS1_LIST,p)!=-1 )||(FAO_HAS_PORTALS2_GIFT(x) && \ |
| 39 | member(FAO_PORTALS2_LIST,p)!=-1) ) && \ |
| 40 | (pointerp((int*)x->QueryProp(P_FAO_PORTALS)) \ |
| 41 | && member((int*)x->QueryProp(P_FAO_PORTALS),p)!=-1) ) |
| 42 | #define FAO_HAS_SEER_PORTAL_GIFT(x) (x!=0 && query_once_interactive(x) \ |
| 43 | && ((int)x->QueryProp(P_FAO)&FAO_SEER_PORTAL)!=0) |
| 44 | #define FAO_IS_MEMBER(x) (x!=0 && query_once_interactive(x) \ |
| 45 | && ((int)x->QueryProp(P_FAO)&FAO_MEMBER)!=0) |
| 46 | #endif // __PLAYER_FAO_H__ |
| 47 | |