#include <thing/properties.h>#include <thing/commands.h>#include <thing/description.h>#include <living/clothing.h>#include <living/combat.h>#include <language.h>#include <defines.h>#include <new_skills.h>#include <moving.h>
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
| #define | NEED_PROTOTYPES |
Funktionen | |
| void | create () |
| protected void | msg (string str, mixed fl) |
| varargs void | doWearMessage (int all) |
| void | doUnwearMessage (object worn_by, int all) |
| protected void | InformWear (object pl, int silent, int all) |
| protected void | InformUnwear (object pl, int silent, int all) |
| protected int | _check_wear_restrictions (int silent, int all) |
| protected void | _wear () |
| protected void | _informwear (int silent, int all) |
| varargs int | DoWear (int silent, int all) |
| protected int | _check_unwear_restrictions (object worn_by, int silent, int all) |
| protected void | _unwear (object worn_by) |
| protected void | _informunwear (object worn_by, int silent, int all) |
| varargs int | DoUnwear (int silent, int all) |
| protected int | _do_wear (string str, int silent, int all) |
| varargs int | do_wear (string str, int silent) |
| protected int | _do_unwear (string str, int silent, int all) |
| varargs int | do_unwear (string str, int silent) |
| int | ziehe (string str) |
| static mixed | _set_item_damaged (mixed arg) |
| int | Damage (int new_dam) |
| varargs void | TakeFlaw (mixed dam_types, mapping einfos) |
| mixed * | QueryFlaw () |
| public status | IsClothing () |
Variablen | |
| nosave int | flaw |
| nosave int | ftime |
| protected int _check_unwear_restrictions | ( | object | worn_by, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 322 der Datei wear.c.
Benutzt break_string(), M_NOCHECK, ME, name, Name(), P_CURSED, P_REMOVE_FUNC, QueryPronoun(), QueryProp(), WEN und WER.
00323 { 00324 mixed res; 00325 00326 // Nicht getragene Ruestungen kann man auch nicht ausziehen 00327 if (!objectp(worn_by)) { 00328 return(-2); 00329 } 00330 00331 // Ist eine RemoveFunc gesetzt, wird diese aufgerufen 00332 if (objectp(res=QueryProp(P_REMOVE_FUNC)) && 00333 !(res->RemoveFunc(ME,silent,worn_by))) { 00334 // Eine Meldung muss von der RemoveFunc ausgegeben werden 00335 return(-2); 00336 } 00337 00338 // Eine verfluchte Ruestung kann man natuerlich nicht ausziehen - aber 00339 // auch da gibts Ausnahmefaelle, wie z.B. den Tod eines Spielers 00340 if ((res=QueryProp(P_CURSED)) && !(silent&M_NOCHECK)) { 00341 if (stringp(res)) { 00342 // Stand in P_CURSED ein String? Dann diesen ausgeben 00343 tell_object(worn_by, 00344 (res[<1]=='\n' ? res : break_string(res,78, 00345 (all?(Name(WER)+": "):0)))); 00346 } 00347 else { 00348 // Sonst eine Standard-Meldung ausgeben 00349 tell_object(worn_by,break_string( 00350 "Du kannst " + name(WEN) + " nicht ausziehen, " + QueryPronoun(WER) 00351 + " ist verflucht worden.\n",78,(all?(Name(WER)+": "):0))); 00352 } 00353 return(-2); 00354 } 00355 00356 // Ausziehen moeglich 00357 return(1); 00358 }

| protected int _check_wear_restrictions | ( | int | silent, | |
| int | all | |||
| ) |
Definiert in Zeile 189 der Datei wear.c.
Benutzt armours, break_string(), check_restrictions(), ME, msg(), Name(), name, P_RESTRICTIONS, P_WEAR_FUNC, P_WORN, PL, QueryProp(), WEN und WER.
00189 { 00190 mixed type,res; 00191 object *armours; 00192 00193 // Man kann nur Kram anziehen, die man bei sich traegt 00194 if (environment()!=PL) { 00195 msg(break_string("Du musst "+name(WEN,1)+" erst nehmen!",78, 00196 (all?(Name(WER)+": "):0)), all); 00197 return(-1); 00198 } 00199 00200 // Eine getragene Ruestung kann man nicht nochmal anziehen 00201 if (QueryProp(P_WORN)) { 00202 msg(break_string("Du traegst "+name(WEN,1)+" bereits.",78, 00203 (all?(Name(WER)+": "):0)), all); 00204 return(-1); 00205 } 00206 00207 // Ueber P_RESTRICTIONS kann man einige Restriktionen definieren, ohne 00208 // gleich auf eine WearFunc zurueckgreifen zu muessen. 00209 // Die Auswertung erfolgt ueber den RestrictionChecker 00210 if ((res=QueryProp(P_RESTRICTIONS)) && mappingp(res) && 00211 (res=(string)"/std/restriction_checker"->check_restrictions(PL,res)) 00212 && stringp(res)) { 00213 msg(break_string(res,78,(all?(Name(WER)+": "):0)),all); 00214 return(-1); 00215 } 00216 00217 // Ist eine WearFunc gesetzt, wird diese aufgerufen. 00218 if (objectp(res=QueryProp(P_WEAR_FUNC)) && 00219 !(res->WearFunc(ME, silent, environment()))) { 00220 // Eine Meldung muss von der WearFunc ausgegeben werden 00221 return(-2); 00222 } 00223 00224 // scheinbar darf man das hier anziehen. ;-) 00225 return 0; 00226 }

| protected int _do_unwear | ( | string | str, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 486 der Datei wear.c.
Benutzt break_string(), DoUnwear(), last, name, notify_fail(), P_ARTICLE, P_LAST_WEAR_ACTION, P_WORN, PL, Query(), QueryProp(), WA_WEAR und WEN.
Wird benutzt von do_unwear() und setzen().
00486 { 00487 int * last; 00488 00489 // Ist diese Ruestung ueberhaupt gemeint? Und hat dieser Spieler sie 00490 // auch wirklich an? 00491 if (!stringp(str) || (!all && !id(str))) { 00492 return 0; 00493 } 00494 00495 if (!QueryProp(P_WORN)) { 00496 if (all) { 00497 notify_fail("Alles ausgezogen, was ging.\n"); 00498 return 0; 00499 } 00500 if (!Query(P_ARTICLE)) { 00501 notify_fail( break_string( 00502 "Du traegst k"+name(WEN,0)+".",78) ); 00503 } 00504 else { 00505 notify_fail( break_string( 00506 "Du traegst "+name(WEN,1)+" nicht.",78) ); 00507 } 00508 return 0; 00509 } 00510 00511 // Vielleicht darf der Spieler ja gar nichts mehr ausziehen. 00512 if ((object)PL->InFight()) { 00513 last=(int*)PL->QueryProp(P_LAST_WEAR_ACTION); 00514 if (pointerp(last) && (last[0]==WA_WEAR) && ((time()-last[1])<2)) { 00515 notify_fail("Du hast doch gerade erst etwas angezogen!\n" 00516 "So schnell bist Du nicht!\n"); 00517 return 0; 00518 } 00519 } 00520 // Auf zum eigentlichen Ausziehen 00521 return DoUnwear(silent, all); 00522 }


| protected int _do_wear | ( | string | str, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 448 der Datei wear.c.
Benutzt DoWear(), last, notify_fail(), P_LAST_WEAR_ACTION, PL und WA_UNWEAR.
Wird benutzt von do_wear() und setzen().
00448 { 00449 int *last; 00450 00451 // Standard-Notfiy-Fail setzen. 00452 if (all) 00453 notify_fail("Alles angezogen, was ging.\n"); 00454 00455 // Ist diese Ruestung ueberhaupt gemeint? Bei "trage alles" ist dies 00456 // natuerlich immer der Fall 00457 if (!str || (!all && !id(str))) { 00458 return 0; 00459 } 00460 00461 // Vielleicht darf der Spieler ja gar nix mehr anziehen. 00462 if ((object)PL->InFight()) { 00463 last=(int*)PL->QueryProp(P_LAST_WEAR_ACTION); 00464 if (pointerp(last) && (last[0]==WA_UNWEAR) && ((time()-last[1])<2)) { 00465 notify_fail("Du hast doch gerade erst etwas ausgezogen!\n" 00466 "So schnell bist Du nicht!\n"); 00467 return 0; 00468 } 00469 } 00470 00471 // Auf zum eigentlichen Anziehen 00472 return DoWear(silent, all); 00473 00474 }


| protected void _informunwear | ( | object | worn_by, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 369 der Datei wear.c.
Benutzt doUnwearMessage(), InformUnwear() und M_SILENT.
00369 { 00370 00371 // Inform-Funktion aufrufen 00372 InformUnwear(worn_by, silent, all); 00373 00374 // Meldung ausgeben, wenn das silent-Flag nicht gesetzt ist 00375 if (!(silent&M_SILENT)) { 00376 doUnwearMessage( worn_by, all ); 00377 } 00378 }

| protected void _informwear | ( | int | silent, | |
| int | all | |||
| ) |
Definiert in Zeile 243 der Datei wear.c.
Benutzt doWearMessage(), InformWear() und PL.
00243 { 00244 00245 // Eine Meldung ausgeben, wenn das silent-Flag nicht gesetzt ist 00246 if (!silent) { 00247 doWearMessage(all); 00248 } 00249 00250 // Inform-Funktion aufrufen 00251 InformWear(PL, silent, all); 00252 }

| static mixed _set_item_damaged | ( | mixed | arg | ) | [static] |
| protected void _unwear | ( | object | worn_by | ) |
Definiert in Zeile 361 der Datei wear.c.
Benutzt clothing, ME und P_CLOTHING.
00361 { 00362 // Kleidung beim Spieler austragen 00363 object *clothing; 00364 clothing = (object*)worn_by->QueryProp(P_CLOTHING) - ({ME,0}); 00365 worn_by->SetProp(P_CLOTHING, clothing); 00366 }
| protected void _wear | ( | ) |
Definiert in Zeile 229 der Datei wear.c.
Benutzt clothing, ME, P_CLOTHING und PL.
00229 { 00230 // macht nur das lowlevel Eintragen in P_CLOTHING, damit dieses 00231 // hier in armours sauber ueberschrieben werden kann. 00232 object *clothing=(object*)PL->QueryProp(P_CLOTHING); 00233 if (!pointerp(clothing)) 00234 clothing=({ME}); 00235 else 00236 clothing+=({ME}); 00237 00238 PL->SetProp(P_CLOTHING, clothing); 00239 return; 00240 }
| void create | ( | ) |
Definiert in Zeile 29 der Datei wear.c.
Benutzt AddCmd(), F_MODE, F_MODE_AS, F_VALUE, P_LAST_USE, P_RESTRICTIONS, P_WORN, PROTECTED und Set().
00030 { 00031 // Einige Properties sollten nicht von aussen gesetzt werden koennen 00032 Set(P_WORN, PROTECTED, F_MODE); 00033 Set(P_LAST_USE, PROTECTED, F_MODE_AS); 00034 Set(P_RESTRICTIONS,([]),F_VALUE); 00035 00036 // Bekleidung benoetigt Kommandos, mit denen man sie an- und 00037 // ausziehen kann 00038 AddCmd( ({"zieh","ziehe"}),"ziehe" ); 00039 AddCmd( ({"trag","trage"}),"do_wear" ); 00040 }

| varargs int do_unwear | ( | string | str, | |
| int | silent | |||
| ) |
Definiert in Zeile 525 der Datei wear.c.
Benutzt _do_unwear() und all.
00525 { 00526 int all; 00527 00528 all=(str=="alles" || str=="alle kleidung" || str=="alle bekleidung"); 00529 00530 return(_do_unwear(str,silent,all)); 00531 }

| varargs int do_wear | ( | string | str, | |
| int | silent | |||
| ) |
Definiert in Zeile 477 der Datei wear.c.
Benutzt _do_wear() und all.
00477 { 00478 int all; 00479 00480 // Hat der Spieler "trage alles" eingegeben? 00481 all=(str=="alles" || str=="alle kleidung" || str=="alle bekleidung"); 00482 00483 return(_do_wear(str,silent,all)); 00484 }

| varargs int DoUnwear | ( | int | silent, | |
| int | all | |||
| ) |
Definiert in Zeile 384 der Datei wear.c.
Benutzt _check_unwear_restrictions(), _informunwear(), _unwear(), M_NOCHECK, M_SILENT, ME, notify_fail(), P_ATTACK_BUSY, P_EQUIP_TIME, P_LAST_WEAR_ACTION, P_WEAPON_TYPE, P_WORN, PL, QueryProp(), SetProp() und WA_UNWEAR.
Wird benutzt von _do_unwear(), move() und remove().
00384 { 00385 object worn_by; 00386 int nh; 00387 00388 // Das Flag "silent" wird in der RemoveFunc() etwas anders behandelt 00389 // als ueberall anders. Deshalb wird M_SILENT gesetzt, sofern "silent" 00390 // _irgendeinen_ Wert ausser M_NOCHECK hatte. 00391 if ( silent & ~M_NOCHECK ) 00392 silent |= M_SILENT; 00393 00394 // Standard-Notfiyfail setzen. 00395 if (all) 00396 notify_fail("Alles ausgezogen, was ging.\n"); 00397 00398 // Hat das Objekt Haende "benutzt"? Steht da auch wirklich ein 00399 // Integer-Wert drin? Wenn nicht, mach ich nen raise_error(), das duerfte 00400 // eigentlich gar nicht passieren. Pruefung mal am Anfang machen, bevor 00401 // irgendwas anderes (RemoveFunc()) passiert ist. 00402 if (!intp(nh=QueryProp(P_NR_HANDS))) { 00403 raise_error(sprintf("Invalid P_NR_HANDS in %O",object_name())); 00404 } 00405 00406 worn_by=QueryProp(P_WORN); 00407 // darf ausgezogen werden? Wenn nicht, Ende. 00408 int res = _check_unwear_restrictions(worn_by,silent,all); 00409 if (res < 0) 00410 return(!all); 00411 00412 // OK, alles klar, die Ruestung wird ausgezogen 00413 #if __BOOT_TIME__ < 1234737458 00414 _unwear(worn_by); 00415 #else 00416 worn_by->Unwear(ME); 00417 #endif 00418 00419 // Benutzte Haende wieder freigeben 00420 if (nh>0) { 00421 worn_by->FreeHands(ME); 00422 } 00423 00424 worn_by->SetProp(P_EQUIP_TIME, time()); 00425 SetProp(P_WORN, 0); 00426 00427 // Flag noch setzen, Spieler hat ja was ausgezogen 00428 // Aber nur wenns auch der Spieler selbst ist. 00429 // und wenn das wirklich eine Ruestung und kein SMS o.ae. ist. 00430 if (PL && PL==worn_by && !QueryProp(P_WEAPON_TYPE)) { 00431 //Behinderung beim Wechsel nur fuer Spieler 00432 if (query_once_interactive(PL)) { 00433 PL->SetProp(P_LAST_WEAR_ACTION,({WA_UNWEAR,time()})); 00434 if (PL->InFight()) { 00435 PL->SetProp(P_ATTACK_BUSY,1); 00436 } 00437 } 00438 } 00439 00440 // ok, nun noch andere Objekte informieren. 00441 _informunwear(worn_by,silent,all); 00442 00443 // Fertig mit dem Anziehen. Vorgang beenden bzw. mit anderen 00444 // Ruestungen fortfahren 00445 return !all; 00446 }


| void doUnwearMessage | ( | object | worn_by, | |
| int | all | |||
| ) |
Definiert in Zeile 116 der Datei wear.c.
Benutzt break_string(), BS_LEAVE_MY_LFS, ME, msg(), name, Name(), P_UNWEAR_MSG, QueryProp(), replace_personal(), WEN und WER.
00117 { 00118 string *str,s1; 00119 mixed msg; 00120 00121 if(!objectp(worn_by)) { // Na huch, gar nicht angezogen? Abbruch. 00122 return; 00123 } 00124 00125 if(msg=QueryProp(P_UNWEAR_MSG)) { // Ist eine UnwearMsg gesetzt? 00126 if(closurep(msg)) { // Oho! Gar gleich als Fkt.? 00127 00128 str = funcall(msg, worn_by); 00129 if(interactive(worn_by)) { 00130 tell_object(worn_by,break_string(str[0], 78, 00131 (all?(Name(WER)+": "):0),BS_LEAVE_MY_LFS)); 00132 } 00133 00134 //(Zesstra): say() ist hier bloed, weil es an das Env vom this_player() 00135 //ausgibt, sofern der existiert. So koennen Spieler die meldung kriegen, 00136 //obwohl die laengst woanders sind (z.B. Sequenzen) 00137 //Daher nun Ausgabe an das Env vom Env (wenn das kein Raum sein sollte, 00138 //macht tell_room() nix). 00139 if ( objectp(environment(worn_by)) ) 00140 tell_room(environment(environment()), 00141 break_string(str[1],78, 0, BS_LEAVE_MY_LFS),({ worn_by }) ); 00142 00143 return; 00144 } 00145 else if(interactive(worn_by)) { 00146 s1 = replace_personal(sprintf(msg[0],"@WEN2"), 00147 ({worn_by,ME}), 1); 00148 00149 tell_object(worn_by,break_string(s1,78, 00150 (all?(Name(WER)+": "):0), BS_LEAVE_MY_LFS)); 00151 } 00152 00153 s1 = replace_personal(sprintf(msg[1],"@WER1","@WENU2"), 00154 ({worn_by, ME }), 1); 00155 00156 if ( objectp(environment(worn_by)) ) 00157 tell_room(environment(environment()), 00158 break_string(s1,78, 0, BS_LEAVE_MY_LFS),({ worn_by }) ); 00159 return; 00160 } 00161 /* 00162 * Keine UnwearMsg gesetzt. Ausgabe der Default-Meldungen. 00163 */ 00164 else if(interactive(worn_by)) { 00165 tell_object(worn_by,break_string("Du ziehst " + name(WEN,1) + " aus.",78, 00166 (all?(Name(WER)+": "):0))); 00167 } 00168 if ( objectp(environment(worn_by)) ) 00169 tell_room(environment(environment()), break_string(worn_by->Name(WER) 00170 + " zieht " + name(WEN,0) + " aus.",78), ({ worn_by }) ); 00171 }

| varargs int DoWear | ( | int | silent, | |
| int | all | |||
| ) |
Definiert in Zeile 255 der Datei wear.c.
Benutzt _check_wear_restrictions(), _informwear(), _wear(), break_string(), ME, Name(), P_ATTACK_BUSY, P_EQUIP_TIME, P_LAST_WEAR_ACTION, P_WEAPON_TYPE, P_WORN, PL, QueryProp(), SetProp(), WA_WEAR und WER.
Wird benutzt von _do_wear().
00255 { 00256 int nh; 00257 00258 // Bedingungen pruefen, _check_restrictions() gibt die notwendigen Meldungen 00259 // an den Spieler aus. 00260 int res = _check_wear_restrictions(silent, all); 00261 if (res == -1) 00262 return(0); 00263 else if (res <= -2) 00264 return(!all); 00265 00266 // Der Check auf freie Haende muss nach allen anderen Checks aus Kleidung 00267 // und Ruestung erfolgen und ist im Prinzip identisch fuer beide. Daher wird 00268 // der hier in dieser Funktion gemacht. 00269 // Soll das Objekt Haende "benutzen"? Steht da auch wirklich ein 00270 // Integer-Wert drin? ich mach da jetzt ein raise_error(), das soll 00271 // schliesslich gefixt werden. Ausserdem spart es nen Workaround beim 00272 // Ausziehen. 00273 if (!intp(nh=QueryProp(P_NR_HANDS))) { 00274 raise_error(sprintf("Invalid P_NR_HANDS in %O",object_name())); 00275 } 00276 // Wenn Haende benutzt werden sollen, muss natuerlich auch getestet 00277 // werden, ob das ueberhaupt geht 00278 if (nh>0) { 00279 if (!(PL->UseHands(ME, nh))) { 00280 // Schade, nicht genug Haende frei -> Meldung ausgeben 00281 write(break_string("Du hast keine Hand mehr frei.",78, 00282 (all?(Name(WER)+": "):0))); 00283 return(!all); 00284 } 00285 } 00286 00287 // OK, die Ruestung kann angezogen werden. 00288 // Behinderung beim Wechsel nur fuer Spieler 00289 if (query_once_interactive(PL)) 00290 // Wenn das Ganze ,,wirklich'' eine Kleidung/Ruestung ist und kein SMS 00291 // oder aehnliches... 00292 if (!QueryProp(P_WEAPON_TYPE)) { 00293 // Aktion noch setzen, Spieler hat ja was angezogen 00294 PL->SetProp(P_LAST_WEAR_ACTION,({WA_WEAR,time()})); 00295 // Im Kampf verliert der Spieler durch Kleidungswechsel eine Runde. 00296 if (PL->InFight()) { 00297 PL->SetProp(P_ATTACK_BUSY,1); 00298 } 00299 } 00300 // Eintragen in P_CLOTHING/P_ARMOURS 00301 #if __BOOT_TIME__ < 1234737458 00302 _wear(); 00303 #else 00304 PL->Wear(this_object()); 00305 #endif 00306 00307 PL->SetProp(P_EQUIP_TIME,time()); 00308 SetProp(P_WORN, PL); 00309 SetProp(P_EQUIP_TIME,time()); 00310 00311 // ggf. andere Objekte informieren etc. 00312 _informwear(silent, all); 00313 00314 // Fertig mit dem Anziehen. Vorgang beenden bzw. mit anderen 00315 // Ruestungen fortfahren 00316 return !all; 00317 }


| varargs void doWearMessage | ( | int | all | ) |
Definiert in Zeile 60 der Datei wear.c.
Benutzt break_string(), BS_LEAVE_MY_LFS, ME, name, Name(), P_WEAR_MSG, PL, QueryProp(), replace_personal(), WEN und WER.
00060 { 00061 string *str,s1; 00062 mixed wearmsg; 00063 00064 if(wearmsg=QueryProp(P_WEAR_MSG)) { // Ist eine WearMsg gesetzt? 00065 if(closurep(wearmsg)) { // Evtl. gar als extra Fkt.? 00066 00067 str = funcall(wearmsg, PL); 00068 if(interactive(PL)) { 00069 // Im Falle, dass all gesetzt ist, wird als Indent der Name des 00070 // angezogenen Objektes gesetzt. (trag alles) 00071 write(break_string(str[0],78, 00072 (all?(Name(WER)+": "):0), BS_LEAVE_MY_LFS)); 00073 } 00074 //(Zesstra): say() ist hier bloed, weil es an das Env vom this_player() 00075 //ausgibt, sofern der existiert. So koennen Spieler die meldung kriegen, 00076 //obwohl die laengst woanders sind (z.B. Sequenzen) 00077 //Daher nun Ausgabe an das Env vom Env (wenn das kein Raum sein sollte, 00078 //was durchaus sein koennte, macht tell_room() nix). 00079 if ( objectp(environment()) && objectp(environment(environment())) ) 00080 tell_room(environment(environment()), 00081 break_string(str[1], 78, 0, BS_LEAVE_MY_LFS),({PL}) ); 00082 00083 return; 00084 } 00085 else if(interactive(PL)) { 00086 s1 = replace_personal(sprintf(wearmsg[0],"@WEN2"), ({PL,ME}), 1); 00087 00088 write(break_string(s1,78,(all?(Name(WER)+": "):0), BS_LEAVE_MY_LFS)); 00089 } 00090 00091 s1 = replace_personal(sprintf(wearmsg[1],"@WER1","@WENU2"), 00092 ({PL, ME}), 1); 00093 00094 if ( objectp(environment()) && objectp(environment(environment())) ) 00095 tell_room(environment(environment()), 00096 break_string(s1, 78, 0, BS_LEAVE_MY_LFS),({ PL }) ); 00097 00098 return; 00099 } 00100 /* 00101 * Keine WearMsg gesetzt. Ausgabe der Default-Meldungen. 00102 */ 00103 else if(interactive(PL)) { 00104 write(break_string("Du ziehst " + name(WEN,1) + " an.",78, 00105 (all?(Name(WER)+": "):0))); 00106 } 00107 if ( objectp(environment()) && objectp(environment(environment())) ) 00108 tell_room(environment(environment()),break_string(PL->Name(WER) 00109 + " zieht " + name(WEN,0) +" an.",78), ({PL})); 00110 }

| protected void InformUnwear | ( | object | pl, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 181 der Datei wear.c.
Wird benutzt von _informunwear().

| protected void InformWear | ( | object | pl, | |
| int | silent, | |||
| int | all | |||
| ) |
Definiert in Zeile 175 der Datei wear.c.
Wird benutzt von _informwear().

| protected void msg | ( | string | str, | |
| mixed | fl | |||
| ) |
Definiert in Zeile 44 der Datei wear.c.
Benutzt _notify_fail().
00044 { 00045 if (!stringp(str)) { 00046 return; 00047 } 00048 if (fl) { 00049 write(str); 00050 } 00051 else { 00052 _notify_fail(str); 00053 } 00054 }

| mixed* QueryFlaw | ( | ) |
| varargs void TakeFlaw | ( | mixed | dam_types, | |
| mapping | einfos | |||
| ) |
Definiert in Zeile 578 der Datei wear.c.
Benutzt Damage(), flaw, ftime, P_QUALITY und QueryProp().
00578 { 00579 int quality; 00580 00581 // Ist der Ruestung eine Qualitaet gesetzt worden, so kann es zu einer 00582 // allmaehlichen Beschaedigung der Ruestung kommen. Im if() flaw gleich 00583 // hochzaehlen. 00584 if ((quality=QueryProp(P_QUALITY)) && !((++flaw) % quality)) { 00585 Damage(1); 00586 } 00587 00588 // Zeitpunkt des ersten Aufrufes festhalten 00589 if (!ftime) 00590 ftime=time(); 00591 }

| int ziehe | ( | string | str | ) |
Definiert in Zeile 534 der Datei wear.c.
Benutzt do_unwear(), do_wear() und ob().
00534 { 00535 string ob; 00536 00537 // Uebergebenes Argument pruefen 00538 if (!stringp(str)) { 00539 return 0; 00540 } 00541 00542 // Ist ANziehen gemeint? 00543 if (sscanf(str, "%s an", ob)==1) { 00544 return do_wear(ob ); 00545 } 00546 00547 // Oder ist AUSziehen gemeint? 00548 if (sscanf(str, "%s aus", ob)==1 ) { 00549 return do_unwear(ob); 00550 } 00551 00552 // Ok, es geht wohl weder ums an- noch ums ausziehen 00553 return 0; 00554 }

| nosave int flaw |
Definiert in Zeile 27 der Datei wear.c.
Wird benutzt von create(), QueryFlaw() und TakeFlaw().
| nosave int ftime |
Definiert in Zeile 27 der Datei wear.c.
Wird benutzt von create(), QueryFlaw() und TakeFlaw().
1.6.3