Typecast-Fixes aufgrund von strict_types
Change-Id: I88dbda30bc814607dc771f4e96d78c0e1773ae9d
diff --git a/d/seher/haeuser/virtual_compiler.c b/d/seher/haeuser/virtual_compiler.c
index 7e05245..9a6cab4 100644
--- a/d/seher/haeuser/virtual_compiler.c
+++ b/d/seher/haeuser/virtual_compiler.c
@@ -36,9 +36,9 @@
seteuid(getuid());
// Zeiger auf Cloneliste holen
- if (call_other(MEMORY,"HaveRights")) {
+ if (({int})call_other(MEMORY,"HaveRights")) {
// Objektpointer laden
- objects = call_other(MEMORY,"Load","objects");
+ objects = ({mapping})call_other(MEMORY,"Load","objects");
// Hats geklappt?
if (!mappingp(objects))
diff --git a/items/seil.c b/items/seil.c
index 9b775d8..692186b 100644
--- a/items/seil.c
+++ b/items/seil.c
@@ -115,7 +115,7 @@
if (!ob)
{
- if (call_other(environment(this_player()), "id", t2))
+ if (({int})call_other(environment(this_player()), "id", t2))
ob = environment(this_player());
}
@@ -127,7 +127,7 @@
_notify_fail( "Soetwas findest Du hier nicht.\n" );
if (!ob) return 0;
- if (!(tied_name=call_other(ob, "tie", t2)))
+ if (!(tied_name=({string|int})call_other(ob, "tie", t2)))
{
if(({int})ob->QueryProp(P_INVIS)) return 0;
@@ -209,7 +209,7 @@
return 1;
}
- if (!call_other(tied_to_ob, "untie"))
+ if (!({int})call_other(tied_to_ob, "untie"))
{
write("Das klappt leider nicht.\n");
return 1;
diff --git a/obj/tools/merkzettel/merkzettel.c b/obj/tools/merkzettel/merkzettel.c
index e92c4fc..ed5c180 100644
--- a/obj/tools/merkzettel/merkzettel.c
+++ b/obj/tools/merkzettel/merkzettel.c
@@ -723,25 +723,28 @@
return(0);
ids=filter(m_indices(notizen),#'note_filter,NOTE_ACTIVE);
- tell_object(TI,BS("Du zeigst "+pl->Name(WEM)+" voller Stolz deinen vollen "
- "Merkzettel."));
+ tell_object(TI,BS("Du zeigst "+({string})pl->Name(WEM)+
+ " voller Stolz deinen vollen Merkzettel."));
tell_room(environment(environment()),BS(sprintf(
"%s zeigt %s %s Merkzettel.",
- TI->Name(WER),pl->Name(WEM),TI->QueryPossPronoun(MALE,WEN,SINGULAR))),
+ ({string})TI->Name(WER), ({string})pl->Name(WEM),
+ ({string})TI->QueryPossPronoun(MALE,WEN,SINGULAR))),
({TI,pl}));
switch(sizeof(ids)) {
case 0..10:
tell_object(pl,BS(sprintf("%s zeigt Dir voller Stolz %s Merkzettel. Du "
"wirfst einen schnellen Blick darueber und zaehlst %d "
"Notizen. Na, soviel ist das ja zum Glueck noch nicht.",
- TI->Name(WER),TI->QueryPossPronoun(MALE,WEN,SINGULAR),
+ ({string})TI->Name(WER),
+ ({string})TI->QueryPossPronoun(MALE,WEN,SINGULAR),
sizeof(ids))));
break;
case 11..20:
tell_object(pl,BS(sprintf("%s zeigt Dir voller Stolz %s Merkzettel. Du "
"wirfst einen schnellen Blick darueber und zaehlst %d "
"Notizen. Oh, das ist ja schon so einiges!",
- TI->Name(WER),TI->QueryPossPronoun(MALE,WEN,SINGULAR),
+ ({string})TI->Name(WER),
+ ({string})TI->QueryPossPronoun(MALE,WEN,SINGULAR),
sizeof(ids))));
break;
default:
@@ -749,8 +752,10 @@
"wirfst einen schnellen Blick darueber und zaehlst %d "
"Notizen. Puuuh. %s hat ganz schoen viel zu tun! In "
"Dir regt sich leises Mitleid.",
- TI->Name(WER),TI->QueryPossPronoun(MALE,WEN,SINGULAR),
- sizeof(ids),TI->Name(WER) )));
+ ({string})TI->Name(WER),
+ ({string})TI->QueryPossPronoun(MALE,WEN,SINGULAR),
+ sizeof(ids),
+ ({string})TI->Name(WER) )));
break;
}
return(1);
@@ -775,17 +780,17 @@
if (!present(pl,environment(environment())))
rwedel="aus der Ferne";
- tell_object(PL,BS("Du wedelst "+pl->Name(WEM)
- + (rwedel?" "+rwedel:"")
- +" heftig mit Deinem Merkzettel vor der Nase herum."));
- tell_object(pl,BS(PL->Name(WER)+ " wedelt Dir "
- + (rwedel?rwedel+" ":"") +"heftig mit "
- +PL->QueryPossPronoun(MALE,WEM,SINGULAR)
- +" Merkzettel vor der Nase herum."));
- tell_room(environment(pl),BS(PL->Name(WER) + " wedelt "
- +pl->Name(WEM) + (rwedel?" "+rwedel:"") + " heftig mit "
- +PL->QueryPossPronoun(MALE,WEM,SINGULAR)
- +" Merkzettel vor der Nase herum."),({PL,pl}));
+ tell_object(PL,BS("Du wedelst "+({string})pl->Name(WEM)+
+ (rwedel?" "+rwedel:"")+
+ " heftig mit Deinem Merkzettel vor der Nase herum."));
+ tell_object(pl,BS(({string})PL->Name(WER)+ " wedelt Dir "
+ +(rwedel?rwedel+" ":"") +"heftig mit "
+ +({string})PL->QueryPossPronoun(MALE,WEM,SINGULAR)
+ +" Merkzettel vor der Nase herum."));
+ tell_room(environment(pl),BS(({string})PL->Name(WER) + " wedelt "
+ +({string})pl->Name(WEM) + (rwedel?" "+rwedel:"") + " heftig mit "
+ +({string})PL->QueryPossPronoun(MALE,WEM,SINGULAR)
+ +" Merkzettel vor der Nase herum."),({PL,pl}));
return(1);
}
diff --git a/room/death/death_room_vc.c b/room/death/death_room_vc.c
index c7c8292..9cfd529 100644
--- a/room/death/death_room_vc.c
+++ b/room/death/death_room_vc.c
@@ -47,7 +47,7 @@
void test_remove()
{
if (!sizeof(all_inventory(this_object())&users()))
- if (!this_object()->remove()) destruct(this_object());
+ if (!({int})this_object()->remove()) destruct(this_object());
}
public void reset()
@@ -84,12 +84,12 @@
if ( !(prayroom = (string) this_player()->QueryPrayRoom()) )
prayroom = "/room/pray_room";
- if ( !this_player()->QueryProp(P_GHOST) )
+ if ( !({int})this_player()->QueryProp(P_GHOST) )
{
if ( IS_WIZARD(this_player()) &&
- this_player()->QueryProp(P_WANTS_TO_LEARN) )
+ ({int})this_player()->QueryProp(P_WANTS_TO_LEARN) )
{
- if ( !this_player()->QueryProp(P_INVIS) )
+ if ( !({int})this_player()->QueryProp(P_INVIS) )
tell_room( this_object(),
"Der Tod sagt: WAS WILLST DU HIER, "+
upperstring((string) this_player()->name())+"?\n"+
diff --git a/secure/bbmaster.c b/secure/bbmaster.c
index d0bc8f1..91bba47 100644
--- a/secure/bbmaster.c
+++ b/secure/bbmaster.c
@@ -79,7 +79,7 @@
string uid;
if (objectp(trigob)
&& strstr(load_name(trigob),"/std/shells/") == 0
- && !trigob->QueryGuest()) {
+ && !({int})trigob->QueryGuest()) {
// Bei Login und Logout den BBMode einschalten (weil der Loginevent ja
// erst 1-2s nach Einloggen abgearbeitet wird.
trigob->__set_bb(1);
@@ -186,7 +186,7 @@
return 0;
// in jedem Fall wird nun (temporaer) der BB-Modus aktiviert.
- if (!previous_object()->QueryGuest())
+ if (!({int})previous_object()->QueryGuest())
previous_object()->__set_bb(1);
// nur fuer 'permanente' auch 1 zurueckgeben.
@@ -338,7 +338,7 @@
// Alles ab hier nur zum Ueberwachen von FTP-Aktivitaeten.
private int player_exists( string user )
{
- return master()->find_userinfo(user);
+ return ({int})master()->find_userinfo(user);
}
public int add( string user, int timeout )
diff --git a/std/clothing/wear.c b/std/clothing/wear.c
index 69cb54f..742b813 100644
--- a/std/clothing/wear.c
+++ b/std/clothing/wear.c
@@ -427,7 +427,7 @@
//Behinderung beim Wechsel nur fuer Spieler
if (query_once_interactive(PL)) {
({int*})PL->SetProp(P_LAST_WEAR_ACTION,({WA_UNWEAR,time()}));
- if (({int})PL->InFight()) {
+ if (({int})PL->InFight()) {
({int})PL->SetProp(P_ATTACK_BUSY,1);
}
}
@@ -455,7 +455,7 @@
}
// Vielleicht darf der Spieler ja gar nix mehr anziehen.
- if (({int})PL->InFight()) {
+ if (({object})PL->InFight()) {
last=({int*})PL->QueryProp(P_LAST_WEAR_ACTION);
if (pointerp(last) && (last[0]==WA_UNWEAR) && ((time()-last[1])<2)) {
notify_fail("Du hast doch gerade erst etwas ausgezogen!\n"
diff --git a/std/pile.c b/std/pile.c
index 4f58d50..7464f5a 100644
--- a/std/pile.c
+++ b/std/pile.c
@@ -72,7 +72,7 @@
protected void NotifyMove(object dest, object oldenv, int method) {
if( query_once_interactive(dest)) {
log_file( "PILE.log", dtime(time()) + ": pile in "
- + dest->query_real_name() + " gelandet.\n" );
+ + ({string})dest->query_real_name() + " gelandet.\n" );
}
if( living(dest) ) {
filter_objects( all_inventory(), "move", dest, M_SILENT | M_NOCHECK );
@@ -116,7 +116,7 @@
::reset();
// wenn nur noch unsichtbare items im Haufen: aufloesen
if (!sizeof(filter(all_inventory(), function int (object o)
- { return stringp(o->short());} )))
+ { return stringp(({string})o->short());} )))
remove(1);
}