#include <properties.h>#include <living/combat.h>
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
| #define | NEED_PROTOTYPES |
| #define | ME this_object() |
Funktionen | |
| void | SetChats (int chance, mixed strs) |
| void | SetAttackChats (int chance, mixed strs) |
| void | DoAttackChat () |
| void | DoChat () |
| protected void | heart_beat () |
| void DoAttackChat | ( | ) |
Definiert in Zeile 41 der Datei chat.c.
Benutzt c, ME, P_ACHAT_CHANCE, P_ACHATS, P_DISABLE_ATTACK, process_string() und QueryProp().
Wird benutzt von heart_beat().
00041 { 00042 string* c; 00043 if (!ME || !environment(ME)) 00044 return; 00045 if (QueryProp(P_DISABLE_ATTACK)>0)return ; 00046 if (random(100) < QueryProp(P_ACHAT_CHANCE)) 00047 if ((c = QueryProp(P_ACHATS)) && sizeof(c)) 00048 tell_room(environment(ME), 00049 process_string(c[random(sizeof(c))])); 00050 }


| void DoChat | ( | ) |
Definiert in Zeile 52 der Datei chat.c.
Benutzt c, ME, P_CHAT_CHANCE, P_CHATS, process_string() und QueryProp().
Wird benutzt von heart_beat().
00052 { 00053 string *c; 00054 if (!ME || !environment(ME)) 00055 return; 00056 if (random(100) < QueryProp(P_CHAT_CHANCE)) 00057 if ((c = QueryProp(P_CHATS)) && sizeof(c)) 00058 tell_room(environment(ME), 00059 process_string(c[random(sizeof(c))])); 00060 }


| protected void heart_beat | ( | ) |
Definiert in Zeile 62 der Datei chat.c.
Benutzt DoAttackChat(), DoChat() und InFight().
00063 { 00064 if( InFight() ) DoAttackChat(); 00065 else DoChat(); 00066 }

| void SetAttackChats | ( | int | chance, | |
| mixed | strs | |||
| ) |
Definiert in Zeile 34 der Datei chat.c.
Benutzt P_ACHAT_CHANCE, P_ACHATS und SetProp().
00034 { 00035 if (!pointerp(strs)) 00036 return; 00037 SetProp(P_ACHAT_CHANCE,chance); 00038 SetProp(P_ACHATS,strs); 00039 }

| void SetChats | ( | int | chance, | |
| mixed | strs | |||
| ) |
Definiert in Zeile 27 der Datei chat.c.
Benutzt P_CHAT_CHANCE, P_CHATS und SetProp().
00027 { 00028 if (!pointerp(strs)) 00029 return; 00030 SetProp(P_CHAT_CHANCE,chance); 00031 SetProp(P_CHATS,strs); 00032 }

1.6.3