Aenderungen fuer wieder funktionierendes strict_types
- Deklarative Casts hinzugefuegt
- Typen gefixt
Change-Id: I44c6082d907efb241a35da248774809054f8c5ab
diff --git a/items/money.c b/items/money.c
index f6a5173..c971d9d 100644
--- a/items/money.c
+++ b/items/money.c
@@ -17,7 +17,7 @@
// zum debuggen (debugmode kommt aus /std/unit.c
#include <living/comm.h>
#define ZDEBUG(x) if (stringp(debugmode) && find_player(debugmode)) \
- find_player(debugmode)->ReceiveMsg(x,MT_DEBUG,0,object_name()+": ",ME)
+ ({int})find_player(debugmode)->ReceiveMsg(x,MT_DEBUG,0,object_name()+": ",ME)
//#define ZDEBUG(x)
protected void NotifyMove(object dest, object oldenv, int method)
@@ -30,7 +30,7 @@
!query_once_interactive(previous_object()) &&
load_name(previous_object()) != GELD) &&
moneylog)
- moneylog->AddMoney( previous_object(), Query(U_REQ) );
+ ({void})moneylog->AddMoney( previous_object(), Query(U_REQ) );
// Hier passiert Vereinigung mit anderen Geldobjekten... Etc.
::NotifyMove(dest, oldenv, method);
@@ -68,7 +68,7 @@
|| present(BOERSEID, environment());
if (boerse)
{
- boerse->MergeMoney(this_object());
+ ({void})boerse->MergeMoney(this_object());
// Sollten wir jetzt P_AMOUNT == 0 haben, zerstoert uns der Code aus
// unit.c spaeter.
ZDEBUG(sprintf("NotifyMove nach Boersenvereinigung 1: amount: %d\n",
@@ -80,7 +80,7 @@
object boerse = present(GELDBOERSE_MIT_GELD, environment());
if (boerse)
{
- boerse->MergeMoney(this_object());
+ ({void})boerse->MergeMoney(this_object());
ZDEBUG(sprintf("NotifyMove nach Boersenvereinigung 2: amount: %d\n",
QueryProp(P_AMOUNT)));
}
@@ -90,7 +90,7 @@
object geldkarte = present(SEHERKARTEID_AKTIV, environment());
if (geldkarte)
{
- geldkarte->MergeMoney(this_object());
+ ({void})geldkarte->MergeMoney(this_object());
ZDEBUG(sprintf("NotifyMove nach Kartenvereinigung: amount: %d\n",
QueryProp(P_AMOUNT)));
}
@@ -140,13 +140,13 @@
((Query(U_REQ)==1)?"Du nimmst die Muenze":
"Du nimmst eine der Muenzen")+
" und schnippst sie in die Luft. Sie klingt hell auf. "+
- ((this_player() && this_player()->QueryAttribute(A_DEX)>10)?
+ ((this_player() && ({int})this_player()->QueryAttribute(A_DEX)>10)?
"Geschickt faengst Du sie wieder auf.":
"Sie plumpst Dir wieder in die Hand und beinahe laesst Du "
"sie fallen."),78));
if(this_player() && environment(this_player()))
tell_room(environment(this_player()),
- break_string(this_player()->Name()+" schnippt mit hellem "
+ break_string(({string})this_player()->Name()+" schnippt mit hellem "
"Klingen ein Muenze in die Luft und faengt sie "
"wieder.",78),
({this_player()}));
@@ -163,7 +163,7 @@
78));
if(this_player() && environment(this_player()))
tell_room(environment(this_player()),
- break_string(this_player()->Name()+" beisst in eine Muenze "
+ break_string(({string})this_player()->Name()+" beisst in eine Muenze "
"und schaut irgendwie befriedigt drein.",78),
({this_player()}));
return 1;
@@ -213,7 +213,7 @@
"betrachtest das Ergebnis:", 78));
if (this_player() && environment(this_player()))
tell_room(environment(this_player()),
- break_string(this_player()->Name()+" wirft "+
+ break_string(({string})this_player()->Name()+" wirft "+
((num==1)?"eine Muenze":
sprintf("%d Muenzen", num))+
" hoch, laesst sie zu Boden prasseln und betrachtet "
@@ -276,10 +276,10 @@
((num==1)?"Deine Muenze":"Deine Muenzen")+" wieder ein.", 78));
if (this_player() && environment(this_player()))
tell_room(environment(this_player()),
- break_string(this_player()->Name()+ " sammelt schnell "+
- ((num==1)?(this_player()->QueryPossPronoun(FEMALE,WEN, SINGULAR)
+ break_string(({string})this_player()->Name()+ " sammelt schnell "+
+ ((num==1)?(({string})this_player()->QueryPossPronoun(FEMALE,WEN, SINGULAR)
+" Muenze wieder ein."):
- (this_player()->QueryPossPronoun(FEMALE,WEN, PLURAL)+
+ (({string})this_player()->QueryPossPronoun(FEMALE,WEN, PLURAL)+
" Muenzen wieder ein."))), ({this_player()}));
return 1;
}
diff --git a/obj/entsorg.c b/obj/entsorg.c
index 6fdda13..f5163ed 100644
--- a/obj/entsorg.c
+++ b/obj/entsorg.c
@@ -50,7 +50,7 @@
notify_fail("So etwas hast Du nicht.\n");
if((!ob=present(s2,this_player())) &&
(!ob=present(s2,environment()))) return 0;
- if(ob->QueryProp(P_NODROP) || ob->QueryProp(P_NEVERDROP)){
+ if(({int|string})ob->QueryProp(P_NODROP) || ({int})ob->QueryProp(P_NEVERDROP)){
write("Das kannst Du nicht wegwerfen.\n");
return 1;
}
@@ -58,15 +58,15 @@
write("Der Muellschlucker frisst keine Lebewesen.\n");
return 1;
}
- if(ob->QueryProp(P_VALUE)){
+ if(({int})ob->QueryProp(P_VALUE)){
write("Das ist zu wertvoll, das vertraegt der Muellschlucker nicht.\n");
return 1;
}
- if (ob->QueryProp(P_CURSED)) {
+ if (({int})ob->QueryProp(P_CURSED)) {
write("Verfluchte Dinge bekommen dem Muellschlucker nicht!\n");
return 1;
}
- ob->remove();
+ ({int})ob->remove();
if(ob){
write("Aus irgendeinem Grund scheint das dem Muellschlucker nicht "+
"zu schmecken.\n");
diff --git a/obj/tools/MGtool.c b/obj/tools/MGtool.c
index 4656d68..5619ecf 100644
--- a/obj/tools/MGtool.c
+++ b/obj/tools/MGtool.c
@@ -399,9 +399,9 @@
static void dprop(string key, mixed data, object obj)
{
if(pipe_out&&pipe_of)
- write_file(pipe_of,break_string_hard(mixed_to_string(obj->QueryProp(key),MAX_RECURSION),78,ALEFT(key+" ",18,".")+" = "));
+ write_file(pipe_of,break_string_hard(mixed_to_string(({mixed})obj->QueryProp(key),MAX_RECURSION),78,ALEFT(key+" ",18,".")+" = "));
else
- W(break_string_hard(mixed_to_string(obj->QueryProp(key),MAX_RECURSION),78,ALEFT(key+" ",18,".")+" = "));
+ W(break_string_hard(mixed_to_string(({mixed})obj->QueryProp(key),MAX_RECURSION),78,ALEFT(key+" ",18,".")+" = "));
}
static string propflags(string key, object ob)
diff --git a/obj/tools/MGtool/toolcmd.c b/obj/tools/MGtool/toolcmd.c
index 59bfbcb..ad6b3aa 100644
--- a/obj/tools/MGtool/toolcmd.c
+++ b/obj/tools/MGtool/toolcmd.c
@@ -60,7 +60,7 @@
{
obj=find_object(LPC_FILE);
ru1=rusage();
- error=catch(res=obj->eval(callobj, cloner, ENV(cloner)));
+ error=catch(res=({mixed})obj->eval(callobj, cloner, ENV(cloner)));
ru2=rusage();
if(error)
W("Error: "+error[1..]);
@@ -183,7 +183,7 @@
TK("Xcd: str: "+(str?str:"(NULL)"));
if(!str)
{
- if(!(path=cloner->QueryProp("start_home")))
+ if(!(path=({string})cloner->QueryProp("start_home")))
path="/";
}
else if((dest=XFindObj(str,1)))
@@ -233,7 +233,7 @@
m_add(variable, "clone", obj);
if(!MoveObj(obj, ENV(cloner), TRUE))
WDLN("Cannot move object into this room");
- else if(!obj->QueryNoGet())
+ else if(!({mixed})obj->QueryNoGet())
{
if(!MoveObj(obj, cloner, TRUE))
WDLN("Cannot move object into your inventory");
@@ -265,7 +265,7 @@
variable["clone"] = obj;
if(!MoveObj(obj, ENV(cloner), TRUE))
WDLN("Cannot move object into this room");
- else if(!obj->QueryNoGet())
+ else if(!({mixed})obj->QueryNoGet())
{
if(!MoveObj(obj, cloner, TRUE))
WDLN("Cannot move object into your inventory");
@@ -487,7 +487,7 @@
else
{
ru1=rusage();
- error=catch(res=obj->eval(cloner, ENV(cloner)));
+ error=catch(res=({mixed})obj->eval(cloner, ENV(cloner)));
ru2=rusage();
if(error)
W("Error: "+error[1..]);
@@ -928,7 +928,7 @@
return FALSE;
PIPE_DELETE(pipe_of);
if(!(pipe_out&&pipe_of))
- WLN(who->name(WESSEN)+" Inventory:"+(short?" (short)":""));
+ WLN(({string})who->name(WESSEN)+" Inventory:"+(short?" (short)":""));
if(!short)
if(pipe_out&&pipe_of)
FORALL(item, who) PrintShort(ARIGHT(++i+". ", 4, " "), item, pipe_of);
@@ -952,7 +952,7 @@
if(!(daemon=load_object(LAG_O_DAEMON)))
lag=({-1.0,-1.0,-1.0});
else
- lag=daemon->read_lag_data();
+ lag=({float*})daemon->read_lag_data();
lags="Letzte 60 min: ";
if(lag[0]>=0.0)
{
@@ -998,7 +998,7 @@
cloner->AddIntLight(addlight);
}
WDLN("Current light levels: "+TOOL_NAME+"="+xlight+", room="+
- ENV(cloner)->QueryIntLight());
+ ({int})ENV(cloner)->QueryIntLight());
return TRUE;
}
@@ -1102,7 +1102,7 @@
else
{
ru1=rusage();
- error=catch(res=obj->eval(cloner, ENV(cloner)));
+ error=catch(res=({mixed})obj->eval(cloner, ENV(cloner)));
ru2=rusage();
if(error)
W("Error: "+error[1..]);
@@ -1266,12 +1266,12 @@
opt="";
else
opt=implode(strs[0..s-3], " ");
- if(!(dir="/"+MASTER->valid_read(strs[s-2], geteuid(),
+ if(!(dir="/"+({int})MASTER->valid_read(strs[s-2], geteuid(),
"get_dir", ME))) {
WDLN("No permission to open directory for reading");
return TRUE;
}
- if(!(file="/"+MASTER->valid_write(strs[s-1], geteuid(),
+ if(!(file="/"+({int})MASTER->valid_write(strs[s-1], geteuid(),
"write_file", ME))) {
WDLN("No permission to open script file for writing");
return TRUE;
@@ -1380,7 +1380,7 @@
}
else if(obj=XFindObj(str))
{
- if(xpr=obj->__query_xprof_data__())
+ if(xpr=({mixed})obj->__query_xprof_data__())
{
funcs=m_indices(xpr);
data=m_values(xpr);
diff --git a/obj/tools/fehlerteufel.c b/obj/tools/fehlerteufel.c
index 7b9c8e6..664eb07 100644
--- a/obj/tools/fehlerteufel.c
+++ b/obj/tools/fehlerteufel.c
@@ -58,7 +58,7 @@
{
if (!issue) return 0;
- string txt=ERRORD->format_error(issue, 0);
+ string txt=({string})ERRORD->format_error(issue, 0);
if (!stringp(txt) || !sizeof(txt))
return 0;
@@ -196,7 +196,7 @@
{
if (!(m & modus))
continue;
- < <int|string>* >* list = ERRORD->QueryIssueListByLoadname(loadname,m);
+ < <int|string>* >* list = ({< <int|string>* >*})ERRORD->QueryIssueListByLoadname(loadname,m);
if (pointerp(list))
{
foreach(<int|string>* row : list)
@@ -892,9 +892,10 @@
return;
}
SetProp(P_EXTRA_LOOK,break_string(
- "Auf "+environment()->Name(WESSEN)+" Schulter sitzt ein kleiner "
+ "Auf "+({string})environment()->Name(WESSEN)
+ +" Schulter sitzt ein kleiner "
"Fehlerteufel, der "
- +environment()->QueryPronoun(WEM)
+ +({string})environment()->QueryPronoun(WEM)
+" immer wieder etwas ins Ohr fluestert.",78));
call_out("reset",1);
@@ -1034,7 +1035,7 @@
private struct fullissue_s|struct fullissue_s* get_issues(string arg)
{
- arg=PL->_unparsed_args();
+ arg=({string})PL->_unparsed_args();
struct fullissue_s|struct fullissue_s* issues;
// Erstmal schauen, ob arg eine ID ist.
@@ -1046,7 +1047,7 @@
// wird im aktuellen Verzeichnis gesucht.
if(sizeof(arg) && arg[0] != '/')
{
- arg=PL->QueryProp(P_CURRENTDIR)+"/"+arg;
+ arg=({string})PL->QueryProp(P_CURRENTDIR)+"/"+arg;
}
issues=({});
foreach(int m: ALL_ERR_TYPES)
diff --git a/obj/tools/lupe.c b/obj/tools/lupe.c
index 94da478..b751d58 100644
--- a/obj/tools/lupe.c
+++ b/obj/tools/lupe.c
@@ -183,7 +183,7 @@
{
case "erzaehl": return tell(str);
}
- str=PL->_unparsed_args();
+ str=({string})PL->_unparsed_args();
for (i=0;i<maxverb;i++)
if (commands[i]==verb[0..sizeof(commands[i])-1])
if (ret=evalcmd(str))
@@ -199,14 +199,14 @@
int ret;
if (!IS_ARCH(this_interactive())) return 0;
- if (!(str=this_interactive()->_unparsed_args())) return 0;
+ if (!(str=({string})this_interactive()->_unparsed_args())) return 0;
if (sizeof(tmp=old_explode(str," "))<2) return 0;
if (!(who=find_player(tmp[0]))) return 0;
if (!(sn=query_snoop(who))) return 0;
if (query_wiz_grp(this_interactive())<=query_wiz_grp(sn) ||
query_wiz_grp(this_interactive())<=query_wiz_grp(who)) return 0;
snoop(sn,0);
- ret=this_interactive()->_erzaehle(str);
+ ret=({int})this_interactive()->_erzaehle(str);
snoop(sn,who);
return ret;
}
@@ -433,7 +433,7 @@
mixed pl(string arg)
{
string who,rest;
- object p;
+ string|object p;
who=getarg(arg);
rest=getrest(arg);
if (err) return 0;
@@ -488,7 +488,7 @@
if (!err)
{
push(ob);
- ob->move(this_player(),M_NOCHECK);
+ ({int})ob->move(this_player(),M_NOCHECK);
write("Created "+desc(ob)+".\n");
}
else
@@ -753,8 +753,8 @@
return "<corrupted stack entry>";
if (query_once_interactive(ob))
return object_name(ob)+" "+capitalize(geteuid(ob));
- if (!hide_short && ob->short())
- return object_name(ob)+" "+ob->name();
+ if (!hide_short && ({string})ob->short())
+ return object_name(ob)+" "+({string})ob->name();
else
return object_name(ob);
}
@@ -786,8 +786,8 @@
if (err) return arg;
push(ob);
write("FILENAME: "+object_name(ob)+" ");
- if (!hide_short && (s=ob->short()))
- write(" SHORT: "+ob->name());
+ if (!hide_short && (({string})s=ob->short()))
+ write(" SHORT: "+({string})ob->name());
write("\n");
return arg;
}
@@ -800,8 +800,8 @@
ob=pop();
if (err) return arg;
write("FILENAME: "+object_name(ob)+" ");
- if (s=ob->short())
- write(" SHORT: "+ob->name());
+ if (s=({string})ob->short())
+ write(" SHORT: "+({string})ob->name());
write("\n");
if (getuid(ob))
write("CREATOR: "+getuid(ob)+"\n");
@@ -811,26 +811,26 @@
+ query_idle(ob)+"\n");
}
if (s=query_snoop(ob))
- write("SNOOPED BY: "+s->query_real_name()+"\n");
+ write("SNOOPED BY: "+({string})s->query_real_name()+"\n");
s="";
if (living(ob))
s +="living ";
- if (ob->query_npc())
+ if (({int})ob->query_npc())
s+="npc ";
- if (ob->query_gender_string())
- s+=ob->query_gender_string();
+ if (({string})ob->query_gender_string())
+ s+=({string})ob->query_gender_string();
if (s!="")
write("FLAGS: "+s+"\n");
// write("LONG:\n");
- // if (stringp(s=ob->long()))
+ // if (stringp(s=({string})ob->long()))
// write(s);
// write("\n");
for (i=0;i<sizeof(query_list);i+=2)
{
if (query_list[i+1][0]=='-')
- s=ob->QueryProp(query_list[i+1][1..]);
+ s=({string})ob->QueryProp(query_list[i+1][1..]);
else
- s=call_other(ob,query_list[i+1]);
+ s=({string})call_other(ob,query_list[i+1]);
if (s)
{
printf("%s: %O\n",query_list[i],s);
@@ -1046,9 +1046,9 @@
if (!a)
{
printf("Removing %O",ob);
- if (!hide_short) printf(" %O",ob->name());
+ if (!hide_short) printf(" %O",({string})ob->name());
}
- catch(ob->remove());
+ catch(({int})ob->remove());
if (ob)
{
if (!a) printf(" HARD");
@@ -1084,7 +1084,7 @@
{
object p,p2;
p=first_inventory(ob);
- while (p && p->id(str) && destroyable(p))
+ while (p && ({int})p->id(str) && destroyable(p))
{
if (recursive) clean(p);
Remove(p,0);
@@ -1093,7 +1093,7 @@
while (p)
{
p2=next_inventory(p);
- if (p2 && p2->id(str) && destroyable(p2))
+ if (p2 && ({int})p2->id(str) && destroyable(p2))
{
if (recursive) clean(p2);
Remove(p2,0);
@@ -1153,7 +1153,7 @@
if (err) return arg;
from=pop();
if (err) return arg;
- from->move(to,M_NOCHECK);
+ ({int})from->move(to,M_NOCHECK);
write("Bewege "+desc(from)+" nach "+desc(to)+".\n");
return arg;
}
@@ -1262,7 +1262,7 @@
for (i=sizeof(list)-1;i>=0;i--)
if (list[i] && query_once_interactive(list[i]))
{
- list[i]->move("room/void",M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
+ ({int})list[i]->move("room/void",M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
} else
list[i]=0;
list-=({0});
@@ -1279,7 +1279,7 @@
}
err=catch(ob=clone_object(file));
if (!err)
- ob->move(env,M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
+ ({int})ob->move(env,M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
}
else
{
@@ -1296,7 +1296,7 @@
}
for (i=sizeof(list)-1;i>=0;i--)
if (list[i])
- list[i]->move(ob,M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
+ ({int})list[i]->move(ob,M_TPORT | M_SILENT | M_NO_SHOW | M_NOCHECK);
return arg;
}
@@ -1454,7 +1454,7 @@
ob=pop();
if (err) return arg;
- write(capitalize(ob->name(WER))+" ");
+ write(capitalize(({string})ob->name(WER))+" ");
if (!query_once_interactive(ob))
{
write("ist kein echter Spieler.\n");
@@ -1477,7 +1477,7 @@
{
object ob;
mapping quests;
- mixed stats, *arr, tmp,tmp2, list;
+ mixed stats, arr, tmp,tmp2, list;
string titel, level, stat_str,weapon,armour;
int pl;
int i;
@@ -1486,7 +1486,7 @@
if (err)
return arg;
- titel=ob->QueryProp(P_TITLE);
+ titel=({string})ob->QueryProp(P_TITLE);
if (!(pl=query_once_interactive(ob)))
level="Monster="+old_explode(object_name(ob),"#")[0];
else
@@ -1508,7 +1508,7 @@
level="Seher";
else level="Spieler";
if (IS_DOMAINMEMBER(ob))
- for (tmp="secure/master"->get_domain_homes(geteuid(ob));
+ for (tmp=({string*})"secure/master"->get_domain_homes(geteuid(ob));
sizeof(tmp);tmp=tmp[1..])
level+="-"+capitalize(tmp[0]);
if (pl)
@@ -1518,54 +1518,54 @@
else
if (query_idle(ob)>600)
level+=", idle";
- if (ob->QueryProp(P_GHOST))
+ if (({int})ob->QueryProp(P_GHOST))
level+=", tot";
- if (ob->QueryProp(P_INVIS))
+ if (({int})ob->QueryProp(P_INVIS))
level+=", unsichtbar";
- if (ob->QueryProp(P_FROG))
+ if (({int})ob->QueryProp(P_FROG))
level+=", gruen und glitschig";
- if (ob->QueryProp(P_TESTPLAYER))
+ if (({int|string})ob->QueryProp(P_TESTPLAYER))
level+=", Testspieler";
}
- tmp=ob->QueryProp(P_PRESAY);
+ tmp=({string})ob->QueryProp(P_PRESAY);
if (tmp && tmp!="")
tmp=tmp+" ";
else
tmp="";
- tmp2=ob->QueryProp(P_RACE);
+ tmp2=({string})ob->QueryProp(P_RACE);
if(!tmp2)
tmp2="Dingsda";
- arr=ob->QueryProp(P_NAME);
+ arr=({string})ob->QueryProp(P_NAME);
if (pointerp(arr)) arr=arr[0];
printf("%s%s %s (%s)[%s].\n\n",tmp||"",arr||"",titel||"",
tmp2||"??",level||"??");
if (pl)
printf(" Alter : %s.%s\n",
- timef(2*ob->QueryProp(P_AGE)),
- (tmp=ob->QueryProp(P_MARRIED))?
+ timef(2*({int})ob->QueryProp(P_AGE)),
+ (tmp=({string})ob->QueryProp(P_MARRIED))?
("Verheiratet mit "+capitalize(tmp)+"."):"");
else
printf(" Aggressiv : %4s Gespraechig : %d%%\n",
- ob->QueryProp(P_AGGRESSIVE)? "Ja" : "Nein",
- ob->QueryProp(P_CHAT_CHANCE)) ;
+ ({int|float|mapping})ob->QueryProp(P_AGGRESSIVE)? "Ja" : "Nein",
+ ({int})ob->QueryProp(P_CHAT_CHANCE)) ;
printf(" Lebenspunkte : [%4d/%4d] Magiepunkte : [%4d/%4d] " +
"Erfahrung : %d\n",
- ob->QueryProp(P_HP), ob->QueryProp(P_MAX_HP),
- ob->QueryProp(P_SP), ob->QueryProp(P_MAX_SP),
- ob->QueryProp(P_XP));
+ ({int})ob->QueryProp(P_HP), ({int})ob->QueryProp(P_MAX_HP),
+ ({int})ob->QueryProp(P_SP), ({int})ob->QueryProp(P_MAX_SP),
+ ({int})ob->QueryProp(P_XP));
printf(" Nahrung : [%3d/%d] Fluessigkeit : [%3d/%d] " +
"Alkohol : [%3d/%d]\n",
- ob->QueryProp(P_FOOD), ob->QueryProp(P_MAX_FOOD),
- ob->QueryProp(P_DRINK), ob->QueryProp(P_MAX_DRINK),
- ob->QueryProp(P_ALCOHOL), ob->QueryProp(P_MAX_ALCOHOL)) ;
- switch(ob->QueryProp(P_GENDER)) {
+ ({int})ob->QueryProp(P_FOOD), ({int})ob->QueryProp(P_MAX_FOOD),
+ ({int})ob->QueryProp(P_DRINK), ({int})ob->QueryProp(P_MAX_DRINK),
+ ({int})ob->QueryProp(P_ALCOHOL), ({int})ob->QueryProp(P_MAX_ALCOHOL)) ;
+ switch(({int})ob->QueryProp(P_GENDER)) {
case FEMALE : tmp2 = "weiblich " ; break ;
case MALE : tmp2 = "maennlich" ; break ;
default : tmp2 = "boingisch" ; break ;
}
printf(" Geschlecht : %s Charakter : %-5d Stufe : %-3d\n",
- tmp2, ob->QueryProp(P_ALIGN), ob->QueryProp(P_LEVEL)) ;
- stats = ob->QueryProp(P_ATTRIBUTES) ;
+ tmp2, ({int})ob->QueryProp(P_ALIGN), ({int})ob->QueryProp(P_LEVEL)) ;
+ stats = ({mapping})ob->QueryProp(P_ATTRIBUTES) ;
if (!mappingp(stats)) stats=([]);
tmp = m_indices(stats); tmp2 = m_values(stats); stat_str = "" ;
for(; sizeof(tmp); tmp=tmp[1..],tmp2=tmp2[1..])
@@ -1576,20 +1576,20 @@
else
stat_str = stat_str[0..<2];
- printf(" Geld : %-9d Stati : %s\n\n", ob->QueryMoney(),
+ printf(" Geld : %-9d Stati : %s\n\n", ({int})ob->QueryMoney(),
stat_str) ;
weapon = "Keine" ; armour = "" ;
for(tmp=all_inventory(ob); sizeof(tmp); tmp=tmp[1..])
{
- if(tmp[ 0 ]->QueryProp(P_WIELDED)) // gezueckte Waffe
+ if(({object})tmp[ 0 ]->QueryProp(P_WIELDED)) // gezueckte Waffe
weapon = (tmp[ 0 ]->name(WER)) + " (" +
old_explode(object_name(tmp[ 0 ]),"#")[0] + ")[" +
- tmp[ 0 ]->QueryProp(P_WC) + "]" ;
+ ({int})tmp[ 0 ]->QueryProp(P_WC) + "]" ;
- if(tmp[ 0 ]->QueryProp(P_WORN)) // getragene Ruestung
- armour += (tmp[ 0 ]->name(WER)) + "[" +
- tmp[ 0 ]->QueryProp(P_AC) + "]" +
+ if(({object})tmp[ 0 ]->QueryProp(P_WORN)) // getragene Ruestung
+ armour += (({string})tmp[ 0 ]->name(WER)) + "[" +
+ ({int})tmp[ 0 ]->QueryProp(P_AC) + "]" +
", " ;
}
@@ -1606,17 +1606,17 @@
}
printf(" Waffe(%3d) : %s\nRuestung(%3d) : %s\n",
- ob->QueryProp(P_TOTAL_WC), weapon,
- ob->QueryProp(P_TOTAL_AC), armour) ;
+ ({int})ob->QueryProp(P_TOTAL_WC), weapon,
+ ({int})ob->QueryProp(P_TOTAL_AC), armour) ;
- list = ob->QueryEnemies();
+ list = ({mixed})ob->QueryEnemies();
if (pointerp(list))
{
list=list[0];
tmp2 = "" ;
for(i=sizeof(list)-1 ; i>=0;i--)
if (objectp(list[i]))
- tmp2 += (list[ i ]->name(WER) + ", ") ;
+ tmp2 += (({string})list[ i ]->name(WER) + ", ") ;
if(tmp2 != "")
printf(" Feinde : %s.\n", tmp2[0..<3]);
}
@@ -1625,11 +1625,11 @@
if(pl)
{
printf( break_string(
- CountUp(m_indices(ob->QueryProp(P_QUESTS))),
+ CountUp(m_indices(({mapping})ob->QueryProp(P_QUESTS))),
75,
" Aufgaben : ",
BS_INDENT_ONCE));
- if(((tmp2 = ob->QueryProp(P_MAILADDR)) != "none") && tmp2 &&
+ if(((tmp2 = ({string})ob->QueryProp(P_MAILADDR)) != "none") && tmp2 &&
(tmp2 != ""))
tmp2 = " (" + tmp2 + ")" ;
else
@@ -1655,22 +1655,22 @@
if (err) return arg;
if (query_once_interactive(ob))
printf("Spieler: %s, Level: %d, Wizlevel: %d\n",
- capitalize(getuid(ob)), ob->QueryProp(P_LEVEL),
+ capitalize(getuid(ob)), ({int})ob->QueryProp(P_LEVEL),
query_wiz_level(ob));
else
printf("Monster, UID: %s, EUID: %s, Level: %d\n",
- getuid(ob), (geteuid(ob)?geteuid(ob):"0"), ob->QueryProp(P_LEVEL));
- tmp=ob->short();
+ getuid(ob), (geteuid(ob)?geteuid(ob):"0"), ({int})ob->QueryProp(P_LEVEL));
+ tmp=({string})ob->short();
if (!stringp(tmp)||!sizeof(tmp))
- tmp=sprintf("(%s %s %s %s)",ob->QueryProp(P_PRESAY)+"",
- ob->QueryProp(P_NAME)+"",ob->QueryProp(P_TITLE)+"",
+ tmp=sprintf("(%s %s %s %s)",({string})ob->QueryProp(P_PRESAY)+"",
+ ({string})ob->QueryProp(P_NAME)+"",({string})ob->QueryProp(P_TITLE)+"",
(interactive(ob)?"":"(netztot"));
else
tmp=tmp[0..<3];
- printf("%s, Rasse: %s\n",tmp, ""+ob->QueryProp(P_RACE));
+ printf("%s, Rasse: %s\n",tmp, ""+({string})ob->QueryProp(P_RACE));
printf("Stats: ");
- tmp=ob->QueryProp(P_ATTRIBUTES);
- tmp3=ob->QueryProp(P_ATTRIBUTES_OFFSETS);
+ tmp=({mapping})ob->QueryProp(P_ATTRIBUTES);
+ tmp3=({mapping})ob->QueryProp(P_ATTRIBUTES_OFFSETS);
if (!tmp)
printf("keine\n");
else
@@ -1685,9 +1685,9 @@
printf("\n");
}
printf("Ruestung: %-6d Waffen: %-6d Vorsicht: %-6d Geschlecht: ",
- ob->QueryProp(P_TOTAL_AC),ob->QueryProp(P_TOTAL_WC),
- ob->QueryProp(P_WIMPY));
- if (!(tmp=ob->QueryProp(P_GENDER)))
+ ({int})ob->QueryProp(P_TOTAL_AC),({int})ob->QueryProp(P_TOTAL_WC),
+ ({int})ob->QueryProp(P_WIMPY));
+ if (!(tmp=({int})ob->QueryProp(P_GENDER)))
printf("N\n");
else
{
@@ -1696,29 +1696,29 @@
else
printf("M\n");
}
- if (tmp=ob->QueryProp(P_MARRIED))
+ if (tmp=({string})ob->QueryProp(P_MARRIED))
printf("Verheiratet mit %s.\n",capitalize(tmp));
printf("Lebenspunkte: %4d [%4d], Magiepunkte: %4d [%4d], Erf: %-8d\n",
- ob->QueryProp(P_HP), ob->QueryProp(P_MAX_HP),
- ob->QueryProp(P_SP), ob->QueryProp(P_MAX_SP),
- ob->QueryProp(P_XP));
+ ({int})ob->QueryProp(P_HP), ({int})ob->QueryProp(P_MAX_HP),
+ ({int})ob->QueryProp(P_SP), ({int})ob->QueryProp(P_MAX_SP),
+ ({int})ob->QueryProp(P_XP));
if (living(ob))
{
tmp=present("geld",ob);
if (tmp)
- tmp=tmp->QueryProp(P_AMOUNT);
+ tmp=({int})tmp->QueryProp(P_AMOUNT);
printf("Traegt %6d (%6d) g. Eigengewicht %6d g. %6d Muenzen.\n",
- ob->query_weight_contents(),ob->QueryProp(P_MAX_WEIGHT),
- ob->QueryProp(P_WEIGHT),tmp);
- if (tmp=ob->SelectEnemy())
- printf("Kaempft gegen %s [%O]\n",tmp->name(WEN),tmp);
+ ({int})ob->query_weight_contents(),({int})ob->QueryProp(P_MAX_WEIGHT),
+ ({int})ob->QueryProp(P_WEIGHT),tmp);
+ if (tmp=({object})ob->SelectEnemy())
+ printf("Kaempft gegen %s [%O]\n",({string})tmp->name(WEN),tmp);
}
printf("ENV: %s",
((tmp=environment(ob))?object_name(tmp):"- fabric of space -"));
if(query_once_interactive(ob))
{
- printf(", EMail: %s\n", ob->QueryProp(P_MAILADDR)+"");
- tmp="/secure/master"->find_userinfo(getuid(ob));
+ printf(", EMail: %s\n", ({string})ob->QueryProp(P_MAILADDR)+"");
+ tmp=({int})"/secure/master"->find_userinfo(getuid(ob));
if (pointerp(tmp) && sizeof(tmp)>USER_DOMAIN)
{
tmp=tmp[USER_DOMAIN];
@@ -1730,7 +1730,7 @@
printf(".\n");
}
}
- tmp="/secure/master"->get_domain_homes(getuid(ob));
+ tmp=({string*})"/secure/master"->get_domain_homes(getuid(ob));
if (pointerp(tmp)&&sizeof(tmp)>0)
{
printf("Mitglied in: ");
@@ -1739,7 +1739,7 @@
printf(".\n");
}
printf("Quests: ");
- tmp=ob->QueryProp(P_QUESTS);
+ tmp=({mapping})ob->QueryProp(P_QUESTS);
if (tmp==({})||!pointerp(tmp))
printf("Keine.\n");
else
@@ -1752,8 +1752,8 @@
tmp=tmp[8..];
printf("%s",tmp);
}
- printf("PKills: %d ",ob->QueryProp(P_KILLS));
- printf(", QuestPoints: %d (%d/%d), Alter: %s\n",ob->QueryProp(P_QP),ob->QueryProp(P_NEEDED_QP),QM->QueryMaxQP(),timef(2*ob->QueryProp(P_AGE)));
+ printf("PKills: %d ",({int})ob->QueryProp(P_KILLS));
+ printf(", QuestPoints: %d (%d/%d), Alter: %s\n",({int})ob->QueryProp(P_QP),({int})ob->QueryProp(P_NEEDED_QP),({int})QM->QueryMaxQP(),timef(2*({int})ob->QueryProp(P_AGE)));
if (interactive(ob))
{
printf("From: %s (%s) [%s]\n",query_ip_name(ob),query_ip_number(ob),country(query_ip_name(ob)));
@@ -1761,9 +1761,9 @@
printf("Idle seit %d Sekunden",tmp);
if (tmp>60)
printf(" (%s)",timef(tmp));
- printf(", cmd avg: %d",ob->QueryProp("command_average"));
+ printf(", cmd avg: %d",({int})ob->QueryProp("command_average"));
printf(", noch %d ZT zu finden.\nGesnooped von: %s\n",
- ((tmp=ob->QueryProp(P_POTIONROOMS))?sizeof(tmp):0),
+ ((tmp=({int*})ob->QueryProp(P_POTIONROOMS))?sizeof(tmp):0),
((tmp=query_snoop(ob))?capitalize(getuid(tmp)):"Niemandem"));
}
else
@@ -1772,7 +1772,7 @@
tmp=file_time("save/"+tmp[0..0]+"/"+tmp+".o");
tmp=time()-tmp;
printf("Kam von: %s, vor: %d s(%s)\n",
- ob->QueryProp(P_CALLED_FROM_IP),tmp,timef(tmp));
+ ({string})ob->QueryProp(P_CALLED_FROM_IP),tmp,timef(tmp));
}
}
else
@@ -1864,7 +1864,7 @@
err=desc(ob)+" is not an interactive player";
return arg;
}
- if ((err="/secure/master"->renew_player_object(ob))<0)
+ if ((err=({int})"/secure/master"->renew_player_object(ob))<0)
err="error "+err+" when renewing "+desc(ob);
return arg;
}
@@ -1883,10 +1883,10 @@
return arg;
}
new=clone_object(old_explode(object_name(ob),"#")[0]);
- props=ob->QueryProperties();
- new->SetProperties(ob->QueryProperties());
+ props=({mapping})ob->QueryProperties();
+ ({mapping})new->SetProperties(ob->QueryProperties());
push(new);
- new->move(this_player(),M_NOCHECK);
+ ({int})new->move(this_player(),M_NOCHECK);
return arg;
}
diff --git a/secure/awmaster.c b/secure/awmaster.c
index f1ce7d4..d9f0bbc 100644
--- a/secure/awmaster.c
+++ b/secure/awmaster.c
@@ -152,16 +152,16 @@
{
armours += ([ id :
([
- AWM_TYPE : ob->QueryProp(P_ARMOUR_TYPE) ,
- AWM_CLASS : ob->QueryProp(P_AC) ,
- AWM_EFF_CLASS : ob->QueryProp(P_EFFECTIVE_AC) ,
+ AWM_TYPE : ({string})ob->QueryProp(P_ARMOUR_TYPE) ,
+ AWM_CLASS : ({int})ob->QueryProp(P_AC) ,
+ AWM_EFF_CLASS : ({int})ob->QueryProp(P_EFFECTIVE_AC) ,
AWM_FLAGS : xflags(ob),
- AWM_WEIGHT : ob->QueryProp(P_WEIGHT) ,
- AWM_VALUE : ob->QueryProp(P_VALUE) ,
- AWM_HANDS : ob->QueryProp(P_NR_HANDS) , // Fuer Schilde
- AWM_D_TYPE : ob->QueryProp(P_DAM_TYPE) ,
- AWM_X_CLASS : ob->QueryProp(P_EFFECTIVE_WC) ||
- ob->QueryProp(P_WC),
+ AWM_WEIGHT : ({int})ob->QueryProp(P_WEIGHT) ,
+ AWM_VALUE : ({int})ob->QueryProp(P_VALUE) ,
+ AWM_HANDS : ({int})ob->QueryProp(P_NR_HANDS) , // Fuer Schilde
+ AWM_D_TYPE : ({string*})ob->QueryProp(P_DAM_TYPE) ,
+ AWM_X_CLASS : ({int})ob->QueryProp(P_EFFECTIVE_WC) ||
+ ({int})ob->QueryProp(P_WC),
AWM_TIME : time()
]) ]);
}
@@ -206,16 +206,16 @@
{
weapons += ([ id :
([
- AWM_TYPE : ob->QueryProp(P_WEAPON_TYPE) ,
- AWM_CLASS : ob->QueryProp(P_WC) ,
- AWM_EFF_CLASS : ob->QueryProp(P_EFFECTIVE_WC) ,
+ AWM_TYPE : ({string})ob->QueryProp(P_WEAPON_TYPE) ,
+ AWM_CLASS : ({int})ob->QueryProp(P_WC) ,
+ AWM_EFF_CLASS : ({int})ob->QueryProp(P_EFFECTIVE_WC) ,
AWM_FLAGS : xflags(ob),
- AWM_WEIGHT : ob->QueryProp(P_WEIGHT) ,
- AWM_VALUE : ob->QueryProp(P_VALUE) ,
- AWM_HANDS : ob->QueryProp(P_NR_HANDS) ,
- AWM_D_TYPE : ob->QueryProp(P_DAM_TYPE) ,
- AWM_X_CLASS : ob->QueryProp(P_EFFECTIVE_AC) ||
- ob->QueryProp(P_AC),
+ AWM_WEIGHT : ({int})ob->QueryProp(P_WEIGHT) ,
+ AWM_VALUE : ({int})ob->QueryProp(P_VALUE) ,
+ AWM_HANDS : ({int})ob->QueryProp(P_NR_HANDS) ,
+ AWM_D_TYPE : ({string*})ob->QueryProp(P_DAM_TYPE) ,
+ AWM_X_CLASS : ({int})ob->QueryProp(P_EFFECTIVE_AC) ||
+ ({int})ob->QueryProp(P_AC),
AWM_TIME : time()
]) ]);
}
diff --git a/secure/errord.c b/secure/errord.c
index 884d3c1..a17639b 100644
--- a/secure/errord.c
+++ b/secure/errord.c
@@ -459,7 +459,7 @@
// nicht gespeichert.
if (this_interactive() && IS_LEARNER(this_interactive())
&& strstr(issue->loadname,WIZARDDIR)==0
- && this_interactive()->QueryProp(P_DONT_LOG_ERRORS))
+ && ({int})this_interactive()->QueryProp(P_DONT_LOG_ERRORS))
{
return 0;
}
@@ -624,7 +624,7 @@
// nicht gespeichert.
if (this_interactive() && IS_LEARNER(this_interactive())
&& strstr(issue->loadname,WIZARDDIR)==0
- && this_interactive()->QueryProp(P_DONT_LOG_ERRORS)) {
+ && ({int})this_interactive()->QueryProp(P_DONT_LOG_ERRORS)) {
return 0;
}
@@ -1435,7 +1435,7 @@
mail[MSG_BODY]=text;
mail[MSG_ID]=sprintf(MUDNAME": %d.%d",time(),random(__INT_MAX__));
- if (!sizeof("/secure/mailer"->DeliverMail(mail,0)))
+ if (!sizeof(({string*})"/secure/mailer"->DeliverMail(mail,0)))
res = -1; // an niemanden erfolgreich zugestellt. :-(
else
res = 1;
@@ -1462,7 +1462,7 @@
getuid(TI));
mail[MSG_BODY] = text;
- if (!sizeof("/secure/mailer"->DeliverMail(mail,0)))
+ if (!sizeof(({string*})"/secure/mailer"->DeliverMail(mail,0)))
res |= -1;
else
res |= 1;
diff --git a/secure/explorationmaster.c b/secure/explorationmaster.c
index 6bcb346..ecc6ee9 100644
--- a/secure/explorationmaster.c
+++ b/secure/explorationmaster.c
@@ -28,7 +28,7 @@
#include <living/comm.h>
#define ZDEBUG(x) if (find_player("zesstra")) \
- find_player("zesstra")->ReceiveMsg(x,MT_DEBUG,0,object_name()+":",this_object())
+ ({int})find_player("zesstra")->ReceiveMsg(x,MT_DEBUG,0,object_name()+":",this_object())
//#define ZDEBUG(x)
// Struktur: ([ string filename : string* action, int number, int type ])
@@ -95,8 +95,8 @@
//ZDEBUG(sprintf("check %s...",pl));
// Letzte Loginzeit ermitteln, wenn laenger als 90 Tage her und nicht
// eingeloggt, wird der Spieler uebersprungen.
- pldata->ReleasePlayer();
- pldata->LoadPlayer(pl);
+ ({int})pldata->ReleasePlayer();
+ ({int})pldata->LoadPlayer(pl);
// Testspieler ausnehmen, Spieler, die 90 Tage nicht da waren.
if ( (({int})pldata->QueryProp(P_LAST_LOGIN) < time() - 7776000
&& !find_player(pl))
@@ -154,7 +154,7 @@
int avgspieler = extra[5];
if (objectp(pldata))
- pldata->remove(1);
+ ({int})pldata->remove(1);
if (file_size(BY_EP) >= 0)
rm(BY_EP);
@@ -524,7 +524,7 @@
return;
}
if (!what || what == "") {
- this_interactive()->More(DUMPFILE, 1);
+ ({void})this_interactive()->More(DUMPFILE, 1);
log_file("ARCH/EPZugriffe", ctime(time())+": "+
capitalize(getuid(this_interactive()))+" schaute sich das DUMPFILE an.\n");
return;
@@ -538,13 +538,13 @@
if (!what || what == "")
what = "/"+getuid(this_interactive())+"/";
else {
- if (!master()->domain_master(getuid(this_interactive()), what)) {
+ if (!({int})master()->domain_master(getuid(this_interactive()), what)) {
write("Sorry, Du kannst nur Objekte in Deiner eigenen Region abfragen!\n");
return;
}
if (!magname || magname=="")
magname = getuid(this_interactive());
-// if (!master()->domain_member(magname, what)) {
+// if (!({int})master()->domain_member(magname, what)) {
// write(capitalize(magname)+" ist gar kein Mitarbeiter in Deiner Region!\n");
// return;
// }
@@ -563,9 +563,9 @@
what="/"+what+"/";
}
if (allowed())
- this_interactive()->More(getMatchArch(what));
+ ({void})this_interactive()->More(getMatchArch(what));
else
- this_interactive()->More(getMatch(what));
+ ({void})this_interactive()->More(getMatch(what));
log_file("ARCH/EPZugriffe", ctime(time())+": "+
capitalize(getuid(this_interactive()))+" schaute sich "+what+" an.\n");
return;
@@ -669,8 +669,8 @@
if (!previous_object() || !this_interactive() || !this_player() ||
this_player() != this_interactive() ||
- this_player()->QueryProp(P_KILLS) ||
- this_player()->QueryGuest() )
+ ({int})this_player()->QueryProp(P_KILLS) ||
+ ({int})this_player()->QueryGuest() )
return 0;
fn = old_explode(object_name(previous_object()), "#")[0];
@@ -681,7 +681,7 @@
if (member(obs[fn],key) < 0)
return 0;
- ep = (MASTER->query_ep(getuid(this_interactive())) || "");
+ ep = (({string})MASTER->query_ep(getuid(this_interactive())) || "");
gesetzt=test_bit(ep,obs[fn,1]);
check_to_fast(getuid(this_player()),fn,gesetzt);
@@ -698,7 +698,7 @@
string ep;
int gesetzt;
- if (!objectp(ob) || ob->QueryProp(P_KILLS ))
+ if (!objectp(ob) || ({int})ob->QueryProp(P_KILLS ))
return 0;
fn = old_explode(object_name(previous_object()), "#")[0];
@@ -709,7 +709,7 @@
if (member(obs[fn],key) < 0)
return 0;
- ep = (MASTER->query_ep(getuid(ob)) || "");
+ ep = (({string})MASTER->query_ep(getuid(ob)) || "");
gesetzt=test_bit(ep,obs[fn,1]);
check_to_fast(getuid(this_player()),fn,gesetzt);
@@ -723,7 +723,7 @@
private int QueryRealExplorationPoints(string pl)
{
- return count_bits(MASTER->query_ep(pl) || " ");
+ return count_bits(({string})MASTER->query_ep(pl) || " ");
}
nomask int QueryExplorationPoints(mixed pl)
@@ -753,7 +753,7 @@
{
int i,j,k,t,maxEP;
string ep;
- ep = (MASTER->query_ep(pl) || "");
+ ep = (({string})MASTER->query_ep(pl) || "");
maxEP = QueryMaxEP();
for( i=0; i<num; i++)
@@ -765,7 +765,7 @@
if( j==maxEP ) break;
ep = clear_bit(ep, k);
}
- MASTER->update_ep(pl,ep);
+ ({int})MASTER->update_ep(pl,ep);
return i;
}
@@ -794,13 +794,13 @@
if (!pl) return -2;
i=remove_fp(num, pl);
log_file("ARCH/fp_strafen", ctime(time())+": "
- +this_interactive()->Name(WER)+" loescht "+pl+" "+i
+ +({string})this_interactive()->Name(WER)+" loescht "+pl+" "+i
+" FPs\nGrund:"+grund+"\n");
if( i>0 ) {
text =
"Hallo "+capitalize(pl)+",\n\n"+
break_string(
- this_interactive()->Name(WER)+" hat soeben veranlasst, dass Dir "+i
+ ({string})this_interactive()->Name(WER)+" hat soeben veranlasst, dass Dir "+i
+" FPs abgezogen wurden.\nGrund:"+grund+"\n", 78 );
mail = allocate(9);
@@ -814,7 +814,7 @@
mail[MSG_ID]=MUDNAME":"+time();
mail[MSG_BODY]=text;
- "/secure/mailer"->DeliverMail(mail,1);
+ ({string*})"/secure/mailer"->DeliverMail(mail,1);
}
return i;
}
@@ -824,7 +824,7 @@
{
int i,j,k,t,maxEP;
string ep;
- ep = (MASTER->query_ep(pl) || "");
+ ep = (({string})MASTER->query_ep(pl) || "");
maxEP = QueryMaxEP();
for( i=0; i<num; i++)
@@ -836,7 +836,7 @@
if( j==maxEP ) break;
ep = set_bit(ep, k);
}
- MASTER->update_ep(pl,ep);
+ ({int})MASTER->update_ep(pl,ep);
return i;
}
@@ -848,7 +848,7 @@
if (!pl) return -2;
i=add_fp(num, pl);
log_file("ARCH/fp_strafen", ctime(time())+": "
- +this_interactive()->Name(WER)+" gibt "+pl+" "+i
+ +({string})this_interactive()->Name(WER)+" gibt "+pl+" "+i
+" FPs\n");
return i;
@@ -861,12 +861,12 @@
if (!allowed()) return -1;
if ( num<0 ) return -3;
if (!pl) return -2;
- ep = (MASTER->query_ep(pl) || "");
+ ep = (({string})MASTER->query_ep(pl) || "");
maxEP = QueryMaxEP();
if (num<0 || num>=maxEP) return -4;
ep = set_bit(ep, num);
- MASTER->update_ep(pl,ep);
+ ({int})MASTER->update_ep(pl,ep);
return num;
}
@@ -877,12 +877,12 @@
if (!allowed()) return -1;
if ( num<0 ) return -3;
if (!pl) return -2;
- ep = (MASTER->query_ep(pl) || "");
+ ep = (({string})MASTER->query_ep(pl) || "");
maxEP = QueryMaxEP();
if (num<0 || num>=maxEP) return -4;
ep = clear_bit(ep, num);
- MASTER->update_ep(pl,ep);
+ ({int})MASTER->update_ep(pl,ep);
return num;
}
@@ -896,7 +896,7 @@
{
string ep,teststring;
if (!allowed()) return -1;
- ep = (MASTER->query_ep(pl) || "");
+ ep = (({string})MASTER->query_ep(pl) || "");
output="";
if (!pattern || pattern=="")
@@ -908,7 +908,7 @@
if ( test_bit(ep, v2) && sscanf(fn, teststring, unused, unused) )
printep(v2, fn, v3, v1);
});
- this_interactive()->More(output);
+ ({void})this_interactive()->More(output);
return 1;
}
diff --git a/secure/gildenmaster.c b/secure/gildenmaster.c
index dfd411d..6018d9f 100644
--- a/secure/gildenmaster.c
+++ b/secure/gildenmaster.c
@@ -57,9 +57,9 @@
"Bitte verstaendige einen Erzmagier.\n");
return -2;
}
- pl->SetProp(P_GUILD,gname);
+ ({string})pl->SetProp(P_GUILD,gname);
// Event Gildenwechsel triggern
- EVENTD->TriggerEvent(EVT_GUILD_CHANGE, ([
+ ({int})EVENTD->TriggerEvent(EVT_GUILD_CHANGE, ([
E_OBJECT: pl, E_PLNAME: getuid(pl),
E_ENVIRONMENT: environment(pl),
E_GUILDNAME: gname,
@@ -94,7 +94,7 @@
write("Du kannst hier nicht aus einer anderen Gilde austreten.\n");
return -1;
}
- if (gname[8..]==(pl->QueryProp(P_DEFAULT_GUILD)||DEFAULT_GUILD))
+ if (gname[8..]==(({string})pl->QueryProp(P_DEFAULT_GUILD)||DEFAULT_GUILD))
{
write("Aus dieser Gilde kannst Du nicht austreten.\n");
return -1;
@@ -102,18 +102,18 @@
if (loss<=0) loss=20;
skills=({mapping})pl->QueryProp(P_NEWSKILLS);
walk_mapping(skills,"loose_ability",this_object(),loss);
- pl->SetProp(P_NEWSKILLS,skills);
- pl->SetProp(P_GUILD,0);
+ ({mapping})pl->SetProp(P_NEWSKILLS,skills);
+ ({string})pl->SetProp(P_GUILD,0);
// Event Gildenwechsel triggern
- EVENTD->TriggerEvent(EVT_GUILD_CHANGE, ([
+ ({int})EVENTD->TriggerEvent(EVT_GUILD_CHANGE, ([
E_OBJECT: pl, E_PLNAME: getuid(pl),
E_ENVIRONMENT: environment(pl),
- E_GUILDNAME: pl->QueryProp(P_GUILD),
+ E_GUILDNAME: ({string})pl->QueryProp(P_GUILD),
E_LAST_GUILDNAME: gname ]) );
// Defaultgilde ggf. neuen Titel setzen lassen.
gname = ({string})pl->QueryProp(P_GUILD);
- (GUILD_DIR+"/"+gname)->adjust_title(pl);
+ ({void})(GUILD_DIR+"/"+gname)->adjust_title(pl);
return 1;
}
diff --git a/secure/lepmaster.c b/secure/lepmaster.c
index 6e53834..592b624 100644
--- a/secure/lepmaster.c
+++ b/secure/lepmaster.c
@@ -305,8 +305,8 @@
DEBUG("Es geht um: %O\n", player);
// Abenteuerpunkte
- DEBUG("Abenteuerpunkte: %d ("+REQ_QP+")\n", player->QueryProp(P_QP));
- if (player->QueryProp(P_QP) < REQ_QP) {
+ DEBUG("Abenteuerpunkte: %d ("+REQ_QP+")\n", ({int})player->QueryProp(P_QP));
+ if (({int})player->QueryProp(P_QP) < REQ_QP) {
s += sprintf(" * Dir fehlen noch mindestens %d Abenteuerpunkte.\n",
REQ_QP - ({int})player->QueryProp(P_QP));
i--;
@@ -345,7 +345,7 @@
int minlevel = QueryLevel(REQ_LEP);
// Restliche Stufenpunkte
- DEBUG("Stufenpunkte: %d ("+REQ_LEP+")\n", player->QueryProp(P_LEP));
+ DEBUG("Stufenpunkte: %d ("+REQ_LEP+")\n", ({int})player->QueryProp(P_LEP));
if (({int})(player->QueryProp(P_LEP)) < REQ_LEP) {
s += sprintf(" * Du musst mindestens %d Stufenpunkte, entspricht Stufe %d, "
"erreichen.\n", REQ_LEP, minlevel);
@@ -353,7 +353,7 @@
}
// Demnach mindestens REQ/100-Level
- DEBUG("Level: %d ("+REQ_LEP/100+")\n", player->QueryProp(P_LEVEL));
+ DEBUG("Level: %d ("+REQ_LEP/100+")\n", ({int})player->QueryProp(P_LEVEL));
if (({int})player->QueryProp(P_LEVEL) < minlevel) {
s += sprintf(" * Du musst mindestens Stufe %d erreichen.\n", minlevel);
i--;
diff --git a/secure/login.c b/secure/login.c
index ab6ee16..3652e21 100644
--- a/secure/login.c
+++ b/secure/login.c
@@ -192,9 +192,9 @@
// machen das natuerlich nicht fuer die IP vom Mudrechner...
if (query_ip_number(this_object()) != "87.79.24.60")
{
- "/p/daemon/dnslookup"->check_tor(query_ip_number(this_object()),
+ ({int})"/p/daemon/dnslookup"->check_tor(query_ip_number(this_object()),
query_mud_port());
- "/p/daemon/dnslookup"->check_dnsbl(query_ip_number(this_object()));
+ ({int})"/p/daemon/dnslookup"->check_dnsbl(query_ip_number(this_object()));
}
// ggf. muss TLS (initiiert durch STARTTLS) noch ausverhandelt werden.
@@ -232,7 +232,7 @@
ip = query_ip_number(this_object());
u = filter(users(), function status (object ob, string addr, int a) {
return query_ip_number(ob) == addr
- && ob->QueryProp(P_AGE) < a;
+ && ({int})ob->QueryProp(P_AGE) < a;
}, ip, 12*60*60); // 24h in heart_beats
if ( sizeof(u) > 25 ){
@@ -266,8 +266,8 @@
// check connection from Tor exit node
string eff_ip = (sizeof(realip) ? realip
: query_ip_number(this_object()));
- if ("/p/daemon/dnslookup"->check_tor(eff_ip, query_mud_port())
- || "/p/daemon/dnslookup"->check_dnsbl(eff_ip))
+ if (({int})"/p/daemon/dnslookup"->check_tor(eff_ip, query_mud_port())
+ || ({int})"/p/daemon/dnslookup"->check_dnsbl(eff_ip))
res =
"\nSorry, von Deiner Adresse kamen ein paar Idioten, die "
"ausschliesslich\nAerger machen wollten. Deshalb haben wir "
@@ -346,8 +346,8 @@
realip=str[sizeof(SSL_GRRETING)..];
} // andere IPs werden einfach ignoriert. -> log/PROXY.REQ ?
// ggf. Lookup fuer Torexits anstossen.
- "/p/daemon/dnslookup"->check_tor(realip,query_mud_port());
- "/p/daemon/dnslookup"->check_dnsbl(realip);
+ ({int})"/p/daemon/dnslookup"->check_tor(realip,query_mud_port());
+ ({int})"/p/daemon/dnslookup"->check_dnsbl(realip);
input_to( "logon2", INPUT_PROMPT,
"Wie heisst Du denn (\"neu\" fuer neuen Spieler)? ");
@@ -391,7 +391,7 @@
loginname = str;
/* read the secure save file to see if character already exists */
- string ssavef=master()->secure_savefile(loginname);
+ string ssavef=({string})master()->secure_savefile(loginname);
if ( loginname != "gast"
&& (!ssavef || !sizeof(ssavef) || !restore_object(ssavef) ))
{
@@ -529,7 +529,7 @@
password = str;
- if ( !master()->good_password( str, loginname ) ) {
+ if ( !({int})master()->good_password( str, loginname ) ) {
input_to( "new_password", INPUT_NOECHO|INPUT_PROMPT,
"Bitte gib ein Passwort an: ");
return 1;
@@ -736,7 +736,7 @@
return;
}
- write( call_other( races[num - 1][0], "QueryProp", P_RACE_DESCRIPTION ));
+ write( ({string})call_other( races[num - 1][0], "QueryProp", P_RACE_DESCRIPTION ));
input_to( "get_race_answer", INPUT_PROMPT,
"\nWas willst Du tun: ");
return;
@@ -1057,7 +1057,7 @@
seteuid(ROOTID);
/* read the secure save file to see if character already exists */
- if ( !restore_object( master()->secure_savefile(loginname) ) ){
+ if ( !restore_object( ({string})master()->secure_savefile(loginname) ) ){
write( "Kein solcher Spieler!\n" );
destruct( this_object() );
return 0;
diff --git a/secure/mailer.c b/secure/mailer.c
index ecfb649..bc22db9 100644
--- a/secure/mailer.c
+++ b/secure/mailer.c
@@ -357,7 +357,7 @@
sender = regreplace( sender, "@", "%", 1 );
// Zustellung via Intermud-Mail an andere Muds.
if ( member( mud, '.' ) == -1 ) {
- "/secure/udp_mail"->deliver_mail( rec, mud, sender,
+ ({void})"/secure/udp_mail"->deliver_mail( rec, mud, sender,
msg[MSG_SUBJECT],
msg[MSG_BODY] );
recok += ({ recipients[i] });
@@ -392,7 +392,7 @@
}
else
- if (master()->find_userinfo(recipients[i]) )
+ if (({int})master()->find_userinfo(recipients[i]) )
{
save_msg( newmsg, recipients[i] );
recok += ({ recipients[i] });
@@ -603,13 +603,13 @@
public int query_recipient_ok( string name )
{
#if INTERNET_MAIL_ENABLED
- return (master()->find_userinfo(name)
+ return (({int})master()->find_userinfo(name)
|| member( name, '%' ) > 0 || member( name, '@' ) > 0 );
#else
// es darf zwar ein @ in der Adresse vorkommen, dahinter aber kein . mehr
// (dann ist es ne Mail via Intermud-Mail, nicht ins Internet).
string *tmp;
- return (master()->find_userinfo(name)
+ return (({int})master()->find_userinfo(name)
|| member( name, '%' ) > 0
|| (sizeof(tmp=explode(name,"@")) == 2 && strstr(tmp[1],".") == -1));
#endif
diff --git a/secure/master.c b/secure/master.c
index bdbf779..b853771 100644
--- a/secure/master.c
+++ b/secure/master.c
@@ -300,7 +300,7 @@
++loading_simul_efuns;
- if (!(err=catch(SIMUL_EFUN_FILE->start_simul_efun())) ) {
+ if (!(err=catch(({void})SIMUL_EFUN_FILE->start_simul_efun())) ) {
--loading_simul_efuns;
return ({SIMUL_EFUN_FILE});
}
@@ -308,7 +308,7 @@
debug_message("Failed to load simul efun " + SIMUL_EFUN_FILE +
" " + err, DMSG_STDOUT | DMSG_LOGFILE | DMSG_STAMP);
- if (!(err=catch(SPARE_SIMUL_EFUN_FILE->start_simul_efun())) ) {
+ if (!(err=catch(({void})SPARE_SIMUL_EFUN_FILE->start_simul_efun())) ) {
--loading_simul_efuns;
return ({SPARE_SIMUL_EFUN_FILE});
}
@@ -593,7 +593,7 @@
// Was machen bei disconnect?
protected void disconnect(object who, string remaining) {
- who->NetDead(); return;
+ ({void})who->NetDead(); return;
}
// Es gibt kein File 'filename'. VC aktivieren so vorhanden ...
@@ -640,8 +640,8 @@
// Spieler bei Shutdown entfernen
protected void remove_player(object victim)
{
- catch(victim->quit());
- if (victim) catch(victim->remove());
+ catch(({int})victim->quit());
+ if (victim) catch(({int})victim->remove());
if (victim) destruct(victim);
return;
}
@@ -652,7 +652,7 @@
//sollte nur vom GD gerufen werden. Oder allenfalls Master selbst
filter(users(),#'tell_object,
"Der Gamedriver ruft: Der Speicher wird knapp ! Bereitet euch auf das Ende vor !\n");
- "/obj/shut"->shut(minutes);
+ ({int})"/obj/shut"->shut(minutes);
return;
}
@@ -885,7 +885,7 @@
if (efun::object_info(culprit, OI_ONCE_INTERACTIVE))
call_out("restart_heart_beat", 5, culprit);
else
- catch(culprit->make_immortal(); publish);
+ catch(({void})culprit->make_immortal(); publish);
return 0;
}
@@ -1006,7 +1006,7 @@
// nicht waehrend des ladens der simulefuns auftrat, bei der Ausgabe der
// Meldung ueber die Kaenaele wieder sefuns genutzt werden.
if (!loading_simul_efuns) {
- if (titp && (IS_LEARNER(titp) || (titp->QueryProp(P_TESTPLAYER))))
+ if (titp && (IS_LEARNER(titp) || (({int|string})titp->QueryProp(P_TESTPLAYER))))
{
catch(send_channel_msg("Entwicklung",
capitalize(objectp(po) ? REAL_UID(po) : ""),
diff --git a/secure/master.h b/secure/master.h
index e0b8ea7..b9988b7 100644
--- a/secure/master.h
+++ b/secure/master.h
@@ -90,6 +90,7 @@
string _get_path(string path, string user);
string QueryBanished(string str);
int TBanishName(string name, int days);
+varargs void BanishName(string name, string reason, int force);
// sendet bei Befoerderungen Infomail an Magier
protected void SendWizardHelpMail(string name, int level);
diff --git a/secure/master/destruct.c b/secure/master/destruct.c
index 1b7c19a..bd36571 100644
--- a/secure/master/destruct.c
+++ b/secure/master/destruct.c
@@ -28,10 +28,10 @@
&& ob) {
// Spieler speichern, dann erst Inventar entleeren, dann remove() und
// und destruct() anwenden.
- catch(ob->save_me(1); publish);
+ catch(({void})ob->save_me(1); publish);
filter(all_inventory(ob), #'recursive_remove, immediate_destruct);
if (!immediate_destruct)
- catch(ob->remove(0);publish);
+ catch(({int})ob->remove(0);publish);
if (ob)
destruct(ob);
}
@@ -43,7 +43,7 @@
filter(all_inventory(ob), #'recursive_remove, immediate_destruct);
// ggf. zuerst remove versuchen
if (!immediate_destruct)
- catch(ob->remove(1);publish);
+ catch(({int})ob->remove(1);publish);
if (ob)
destruct(ob);
}
@@ -82,7 +82,7 @@
old_env=environment(item);
// M_MOVE_ALL, falls item nen Unitobjekt ist. Sonst clonen die u.U. noch
// wieder nen neues Objekt im alten Env.
- if(catch(item->move(env, M_NOCHECK|M_MOVE_ALL);publish))
+ if(catch(({int})item->move(env, M_NOCHECK|M_MOVE_ALL);publish))
recursive_remove(item, 1);
else if (item && environment(item) == old_env)
recursive_remove(item, 1);
diff --git a/secure/master/domain.c b/secure/master/domain.c
index ade06ba..b73378d 100644
--- a/secure/master/domain.c
+++ b/secure/master/domain.c
@@ -25,8 +25,8 @@
{
string *domains;
- if ((call_other(SIMUL_EFUN_FILE, "process_call") ||
- call_other(SIMUL_EFUN_FILE, "secure_level") < GOD_LVL) ||
+ if ((({int})call_other(SIMUL_EFUN_FILE, "process_call") ||
+ ({int})call_other(SIMUL_EFUN_FILE, "secure_level") < GOD_LVL) ||
!find_userinfo(user))
return 0;
domains=query_userlist(user, USER_DOMAIN);
diff --git a/secure/master/guild.c b/secure/master/guild.c
index d0c025c..e863409 100644
--- a/secure/master/guild.c
+++ b/secure/master/guild.c
@@ -26,8 +26,8 @@
{
string *guilds;
- if ((call_other(SIMUL_EFUN_FILE, "process_call") ||
- call_other(SIMUL_EFUN_FILE, "secure_level") < GOD_LVL) ||
+ if ((({int})call_other(SIMUL_EFUN_FILE, "process_call") ||
+ ({int})call_other(SIMUL_EFUN_FILE, "secure_level") < GOD_LVL) ||
!find_userinfo(user))
return 0;
diff --git a/secure/master/misc.c b/secure/master/misc.c
index 7d41566..d952d6e 100644
--- a/secure/master/misc.c
+++ b/secure/master/misc.c
@@ -35,12 +35,12 @@
{
// sonst faken wir eins. *seufz*
sender=clone_object("/p/daemon/namefake");
- sender->SetProp(P_NAME, sendername);
- sender->SetProp(P_ARTICLE,0);
+ ({string})sender->SetProp(P_NAME, sendername);
+ ({int})sender->SetProp(P_ARTICLE,0);
// Dieses Objekt zerstoert sich nach 3s automatisch.
}
}
- CHMASTER->send(channel, sender, msg);
+ ({int})CHMASTER->send(channel, sender, msg);
}
static string *explode_files(string file) {
@@ -180,7 +180,7 @@
return;
}
-/* if (!("/secure/login"->valid_name(name))) return;*/
+/* if (!(({int})"/secure/login"->valid_name(name))) return;*/
if ( lower_case(reason) != "loeschen" ){
names = ({ name + " " + reason });
@@ -416,8 +416,8 @@
// Lese- und Schreibberechtigungen fuer die Rubrik 'polizei' setzen
ob = load_object("secure/news");
ginfo = (({mixed*})ob->GetGroup("polizei"))[5..6];
- ob->RemoveAllowed( "polizei", 0, ginfo[0], ginfo[1] );
- ob->AddAllowed( "polizei", 0, deputies, deputies );
+ ({int})ob->RemoveAllowed( "polizei", 0, ginfo[0], ginfo[1] );
+ ({int})ob->AddAllowed( "polizei", 0, deputies, deputies );
LoadDeputyFileList();
}
@@ -471,7 +471,7 @@
{
tell_object(player, "Arbeitszimmer " + castle + " erzeugt.\n");
// Arbeitszimmer als Home setzen
- player->SetProp(P_START_HOME,castle[0..<3]);
+ ({string})player->SetProp(P_START_HOME,castle[0..<3]);
}
else
tell_object(player, "Arbeitszimmer konnte nicht erzeugt werden !\n");
@@ -497,7 +497,7 @@
mixed mail = ({"Merlin", "<Master>", name, 0, 0, subject,
call_sefun("dtime",time()),
MUDNAME+time(), text });
- MAILDEMON->DeliverMail(mail, 0);
+ ({string*})MAILDEMON->DeliverMail(mail, 0);
}
int allowed_advance_wizlevel(mixed ob)
@@ -558,13 +558,12 @@
void restart_heart_beat(object heart_beat)
{
- if (heart_beat) heart_beat->_restart_beat();
+ if (heart_beat) ({void})heart_beat->_restart_beat();
}
int renew_player_object(string|object who)
{
object newob;
- object *obs, *obs2;
mixed err;
string ob_name;
object *armours, weapon;
@@ -585,7 +584,7 @@
return -2;
if (!object_info(who, OI_ONCE_INTERACTIVE))
return -3;
- if (who->QueryGuest())
+ if (({int})who->QueryGuest())
{
printf("Can't renew guests!\n");
return -6;
@@ -604,11 +603,11 @@
if (!newob)
return -5;
/* Ok, the object is here now ... lets go for it ... */
- who->save_me(0);
+ ({void})who->save_me(0);
/* SSL ip weiterreichen */
if( call_sefun("query_ip_number", who) != efun::interactive_info(who,II_IP_NUMBER) )
{
- newob->set_realip( call_sefun("query_ip_number",who) );
+ ({string})newob->set_realip( call_sefun("query_ip_number",who) );
}
efun::configure_object(who, OC_COMMANDS_ENABLED, 0);
efun::set_this_player(0);
@@ -634,7 +633,7 @@
{
send_channel_msg("Debug",previous_object(),
"ERROR: exec() during Renew unsuccessful.\n");
- newob->remove();
+ ({int})newob->remove();
return 0;
}
}
@@ -643,7 +642,7 @@
{
send_channel_msg("Debug",previous_object(),
"ERROR: still active !\n");
- newob->remove();
+ ({int})newob->remove();
return 0;
}
// newob->start_player(capitalize(getuid(who)),who->_query_my_ip());
@@ -657,65 +656,64 @@
})
), who
),
- capitalize(getuid(who)), who->_query_my_ip() );
+ capitalize(getuid(who)), ({string})who->_query_my_ip() );
- newob->move(environment(who),M_TPORT|M_NOCHECK|M_NO_SHOW|M_SILENT
+ ({int})newob->move(environment(who),M_TPORT|M_NOCHECK|M_NO_SHOW|M_SILENT
|M_NO_ATTACK);
- obs=all_inventory(who);
foreach(object tob: all_inventory(who)) {
- if (!tob->QueryProp(P_AUTOLOADOBJ))
+ if (!({mixed})tob->QueryProp(P_AUTOLOADOBJ))
{
// kein Autoloader...
foreach(object ob: deep_inventory(tob))
{
// aber enthaltene Autoloader entsorgen...
- if (ob->QueryProp(P_AUTOLOADOBJ))
+ if (({mixed})ob->QueryProp(P_AUTOLOADOBJ))
{
- catch(ob->remove();publish);
+ catch(({int})ob->remove();publish);
if (ob) destruct(ob);
}
}
// objekt ohne die AL bewegen.
- catch(tob->move(newob,M_NOCHECK);publish);
+ catch(({int})tob->move(newob,M_NOCHECK);publish);
}
else {
// Inhalt von Autoloadern retten.
// neue instanz des ALs im neuen Objekt.
object new_al_instance = present_clone(tob, newob);
foreach(object ob: deep_inventory(tob)) {
- if (ob->QueryProp(P_AUTOLOADOBJ)) {
+ if (({mixed})ob->QueryProp(P_AUTOLOADOBJ)) {
// autoloader in Autoloadern zerstoeren...
- catch(ob->remove(1);publish);
+ catch(({int})ob->remove(1);publish);
if (ob) destruct(ob);
}
// alle nicht autoloader in die AL-Instanz im neuen Objekt oder
// notfalls ins Inv.
else {
if (objectp(new_al_instance))
- catch(ob->move(new_al_instance, M_NOCHECK);publish);
+ catch(({int})ob->move(new_al_instance, M_NOCHECK);publish);
else
- catch(ob->move(newob, M_NOCHECK);publish);
+ catch(({int})ob->move(newob, M_NOCHECK);publish);
}
}
// Autoloader zerstoeren. Wird nicht vom Spielerobjekt im remove()
// gemacht, wenn nicht NODROP.
- catch(tob->remove(1);publish);
+ catch(({int})tob->remove(1);publish);
if (tob) destruct(tob);
}
}
- who->remove();
+ ({int})who->remove();
if ( objectp(who) )
destruct(who);
rename_object(newob,ob_name);
- newob->__reload_explore();
+ ({void})newob->__reload_explore();
tp=this_player();
efun::set_this_player(newob);
if (objectp(weapon))
- weapon->DoWield();
+ ({int})weapon->DoWield();
if (pointerp(armours))
for (i=sizeof(armours)-1;i>=0;i--)
if (objectp(armours[i]))
- armours[i]->do_wear("alles");
+ ({int})armours[i]->do_wear("alles");
efun::set_this_player(tp);
//Rueckgabewert noetig, weil Funktion vom Typ 'int'
return(1);
diff --git a/secure/master/network.c b/secure/master/network.c
index 31a59b3..b3178b1 100644
--- a/secure/master/network.c
+++ b/secure/master/network.c
@@ -80,7 +80,7 @@
if ( sizeof(mess) < 3 )
data = ({ "Error: Wen soll ich fingern ?" });
else
- data = explode( "/p/daemon/finger"->
+ data = explode( ({string})"/p/daemon/finger"->
finger_single( lower_case(mess[2]), 0 ), "\n" );
break;
@@ -147,13 +147,13 @@
// Die folgenden Services sind keine Intermud-Dienste
if(strstr(msg_text, "IPLOOKUP\n") == 0)
{
- "/p/daemon/iplookup"->update( msg_text );
+ ({void})"/p/daemon/iplookup"->update( msg_text );
return;
}
if( strstr(msg_text, "DNSLOOKUP\n") == 0)
{
- "/p/daemon/dnslookup"->update( msg_text );
+ ({void})"/p/daemon/dnslookup"->update( msg_text );
return;
}
@@ -162,7 +162,7 @@
return udp_query(msg_text[10..],host,port);
}
// Rest an inetd fuer Bearbeitung als Intermud-Nachricht.
- "secure/inetd"->_receive_udp(host, msg_text);
+ ({void})"secure/inetd"->_receive_udp(host, msg_text);
}
diff --git a/secure/master/userinfo.c b/secure/master/userinfo.c
index bde7788..e62a1db 100644
--- a/secure/master/userinfo.c
+++ b/secure/master/userinfo.c
@@ -872,9 +872,9 @@
m_delete(userlist,real_name);
if (wlevel >= LEARNER_LVL)
- TO->BanishName(real_name, "So hiess mal ein Magier hier");
+ ({void})TO->BanishName(real_name, "So hiess mal ein Magier hier");
else if (wlevel >= SEER_LVL)
- TO->BanishName(real_name, "So hiess mal ein Seher hier");
+ ({void})TO->BanishName(real_name, "So hiess mal ein Seher hier");
#ifdef _PUREFTPD_
if (member(ftpuser,real_name)) {
@@ -1080,7 +1080,7 @@
}
}
// Gildenname?
- else if (GUILDMASTER->ValidGuild(alias)) {
+ else if (({int})GUILDMASTER->ValidGuild(alias)) {
uids += ({GUILDID"."+alias});
//hat die Gilde ein Projektverzeichnis?
if (file_size("/"PROJECTDIR"/"+alias) == FSIZE_DIR) {
diff --git a/secure/merlin.c b/secure/merlin.c
index 21a4333..d010058 100644
--- a/secure/merlin.c
+++ b/secure/merlin.c
@@ -73,8 +73,8 @@
move("/gilden/abenteurer",0);
MBanishListe = m_allocate(0,2);
restore_object(SAVEFILE);
- EVENTD->RegisterEvent(EVT_LIB_PLAYER_CREATION, "player_change", ME);
- EVENTD->RegisterEvent(EVT_LIB_LOGIN, "player_change", ME);
+ ({int})EVENTD->RegisterEvent(EVT_LIB_PLAYER_CREATION, "player_change", ME);
+ ({int})EVENTD->RegisterEvent(EVT_LIB_LOGIN, "player_change", ME);
// absichtlich kein EVT_LIB_LOGOUT, s. Kommentar zu notify_player_leave().
}
@@ -112,7 +112,7 @@
{
if (!stringp(str)||str=="")
return 0;
- return call_other(this_object(),"_query_"+str);
+ return ({mixed})call_other(this_object(),"_query_"+str);
}
varargs int id(string str)
@@ -144,7 +144,7 @@
string long()
{
- EPMASTER->GiveExplorationPoint("merlin");
+ ({int})EPMASTER->GiveExplorationPoint("merlin");
return break_string(
"Merlin - der maechtige Urvater aller Magier - ist ein hagerer "
"Mann, der einen blauen, mit Monden und Sternen uebersaeten Umhang "
@@ -227,7 +227,7 @@
string QueryPossPronoun( mixed what, int casus, int number )
{
int gen2;
- gen2 = ( intp( what ) ) ? what : what->QueryProp(P_GENDER);
+ gen2 = ( intp( what ) ) ? what : ({int})what->QueryProp(P_GENDER);
return "sein" + query_g_suffix( gen2, casus, number );
}
@@ -273,7 +273,7 @@
mixed *art;
art=({"stufen","Merlin",0,0,sprintf("%s ist jetzt ein%s Seher%s!",who,(g==2?"e":""),(g==2?"in":"")),sprintf("\nAm %s hat %s die noetigen Bedingungen\nerfuellt und ist vom Spielerstatus zum Seherstatus aufgestiegen. \n\n Herzlichen Glueckwunsch, %s!\n",dtime(time()),who,who)});
- "/secure/news"->WriteNote(art,1);
+ ({int})"/secure/news"->WriteNote(art,1);
}
static void PostMagier(string who, string prom, int gender)
@@ -282,7 +282,7 @@
art=({"stufen","Merlin",0,0,sprintf("%s ist jetzt ein%s Magier%s!",who,(gender==2?"e":""),(gender==2?"in":"")),sprintf("\nAm %s hat %s %s zu%s Magier%s\nberufen. Herzlichen Glueckwunsch, %s. Glueckwuensche auch an Dich,\n %s, zu Deine%s neuen %s!\n",dtime(time()),prom,who,(gender==2?"r":"m"),(gender==2?"in":""),who,prom,
(gender==2?"r":"m"),(gender==2?"Tochter":"Sohn"))});
- "/secure/news"->WriteNote(art,1);
+ ({int})"/secure/news"->WriteNote(art,1);
}
@@ -290,9 +290,9 @@
if (!objectp(wiz))
return;
- clone_object(FEHLERTEUFEL)->move(wiz, M_NOCHECK|M_GET);
+ ({int})clone_object(FEHLERTEUFEL)->move(wiz, M_NOCHECK|M_GET);
tell_object(wiz, break_string(
- "Huhu "+wiz->Name(WER) + "! Ich habe gesehen, dass Du keinen "
+ "Huhu "+({string})wiz->Name(WER) + "! Ich habe gesehen, dass Du keinen "
"Fehlerteufel hast. Dieses Tool ist zum Debuggen von Fehlern im "
"Mud sehr praktisch. Bitte schau ihn Dir mal an. :-) Die Hilfe zum "
"Fehlerteufel kannst Du mit 'man fehlerteufel' lesen. BTW: Wenn "
@@ -324,7 +324,7 @@
object ob = find_player(who);
if (ob && rein && IS_WIZARD(ob)
&& !present_clone(FEHLERTEUFEL,ob)
- && ob->QueryProp(P_LAST_LOGOUT) < 1237329604 )
+ && ({int})ob->QueryProp(P_LAST_LOGOUT) < 1237329604 )
GibFehlerteufel(ob);
}
@@ -343,7 +343,7 @@
return;
}
- if (!pl->QueryGuest()) {
+ if (!({int})pl->QueryGuest()) {
string plname = ({string})pl->Name(WER);
CHMASTER->send("Anfaenger", this_object(),
sprintf("%s macht nun ebenfalls das Morgengrauen unsicher. "
@@ -373,16 +373,16 @@
tell_object(pl,break_string(sprintf("Huhu %s, um einen Bug in "
"Deinem Spielerobjekt zu beheben, wirst Du in ca. 8s "
"neugeladen. Bitte warte bis dahin ab und bleibe, wo "
- "Du gerade bist.",pl->Name()),78,"Merlin teilt Dir mit: "));
+ "Du gerade bist.",({string})pl->Name()),78,"Merlin teilt Dir mit: "));
return;
}
plname=getuid(pl);
tell_object(pl,break_string(sprintf("Huhu %s, um einen Bug in "
"Deinem Spielerobjekt zu beheben, wirst Du jetzt "
- "neugeladen.",pl->Name()),78,"Merlin teilt Dir mit: "));
+ "neugeladen.",({string})pl->Name()),78,"Merlin teilt Dir mit: "));
- if (err=catch(master()->renew_player_object(pl);publish)) {
+ if (err=catch(({int})master()->renew_player_object(pl);publish)) {
log_file("zesstra/failed_rewew.log",sprintf("%s: Fehler %O beim "
"Renew von %s\n",dtime(time()),err,plname));
tell_object(pl,break_string("Beim Neuladen Deines Spielerobjekts "
@@ -444,7 +444,7 @@
write("Merlin gibt Dir eine schallende Ohrfeige.\n");
say(sprintf("Merlin gibt %s eine schallende Ohrfeige.\n",
capitalize((string)this_player()->name(WEM))), this_player());
- en->StopHuntFor(this_object(), 1);
+ ({int})en->StopHuntFor(this_object(), 1);
}
*/
void shoutansw()
@@ -455,11 +455,11 @@
if (!(env=environment()))
return;
- if (!(ti=this_interactive())||ti->QueryProp(P_LEVEL)<19||ti->QueryProp(P_GHOST))
+ if (!(ti=this_interactive())||({int})ti->QueryProp(P_LEVEL)<19||({int})ti->QueryProp(P_GHOST))
return;
tell_object(ti,"Du spuerst einen sengenden Schmerz.\n");
- ti->do_damage( ti->QueryProp(P_HP) / 2 + 5);
- if(ti->QueryProp(P_GHOST)) return;
+ ({int})ti->do_damage( ({int})ti->QueryProp(P_HP) / 2 + 5);
+ if(({int})ti->QueryProp(P_GHOST)) return;
ans="ich hab nicht die leiseste Idee, wo ich hier bin ...\n";
path=old_explode(object_name(env),"/");
if (path[0]=="d")
@@ -526,8 +526,8 @@
if( path[0]=="p" && path[1]=="verein" ) {
ans="ich stehe in Port Vain.";
}
- if (!this_interactive()->QueryProp(P_INVIS))
- ans=this_interactive()->Name(WER)+", "+ans;
+ if (!({int})this_interactive()->QueryProp(P_INVIS))
+ ans=({string})this_interactive()->Name(WER)+", "+ans;
else ans=capitalize(ans);
call_out("myshout",0,break_string(ans, 78, "Merlin ruft: "));
}
@@ -577,7 +577,7 @@
if (sscanf(str,"%s sagt: %s",name,message)!=2)
return;
- if (!name || !sizeof(name) || !master()->find_userinfo(name))
+ if (!name || !sizeof(name) || !({int})master()->find_userinfo(name))
return;
if (name!=getuid(this_interactive()) && !ARCH_SECURITY)
@@ -646,7 +646,7 @@
if (IS_SEER(pl))
return 1;
- if (LEPMASTER->QueryReadyForWiz(pl)==1)
+ if (({int})LEPMASTER->QueryReadyForWiz(pl)==1)
return 1;
s=({string})LEPMASTER->QueryReadyForWizText(pl);
@@ -660,7 +660,7 @@
78, "Merlin teilt Dir mit: "));
if (environment() == environment(pl))
- say(pl->name(WER)
+ say(({string})pl->name(WER)
+" erfuellt noch nicht alle Anforderungen fuer den "+was+
"status.\n",pl);
@@ -689,11 +689,11 @@
//
// player is second?
//
- if (who->QueryProp(P_SECOND))
+ if (({string})who->QueryProp(P_SECOND))
{
tell_object(who,"Du bist ein Zweitspieler und kannst als solcher kein Magier werden.\n"
+"Versuchs Doch mal mit Deinem Erstie.\n");
- write("Du kannst "+who->name()+" nicht zum Magier machen. Das geht bei "
+ write("Du kannst "+({string})who->name()+" nicht zum Magier machen. Das geht bei "
+"Zweities\nleider nicht. Frag doch mal nach dem Erstie.\n");
return 1;
}
@@ -713,15 +713,15 @@
{
tell_object(promoter,capitalize(who)+" darf nur von einem Erzmagier zum "+
"Magier gemacht werden.\n");
- say(promoter->name(WER)+" ist kein Erzmagier und darf "+capitalize(who)+
+ say(({string})promoter->name(WER)+" ist kein Erzmagier und darf "+capitalize(who)+
" nicht zum Magier machen.\n");
return 1;
}
//
// player has PK?
//
- if (who->QueryProp("playerkills")) {
- tell_room(environment(who),who->name()+" hat noch einen Playerkill und kann somit kein Magier werden.\n"
+ if (({string})who->QueryProp("playerkills")) {
+ tell_room(environment(who),({string})who->name()+" hat noch einen Playerkill und kann somit kein Magier werden.\n"
"Am besten den Sheriff oder einen Erzmagier verstaendigen.\n");
return 1;
}
@@ -741,7 +741,7 @@
{
if (!ARCH_SECURITY) {
Write("Dich kann nur ein Erzmagier zum \"richtigen\" Magier machen!\n");
- Say("Nur ein Erzmagier kann "+who->name(WEN)+" zum \"richtigen\" Magier machen!\n");
+ Say("Nur ein Erzmagier kann "+({string})who->name(WEN)+" zum \"richtigen\" Magier machen!\n");
return 0;
}
ret=({int})"secure/master"->advance_wizlevel(geteuid(who),21);
@@ -750,11 +750,11 @@
say("Merlin: error "+ret+"\n");
write("Merlin: error "+ret+"\n");
}
- write("Merlin ruft: "+who->name(WER)+" ist in den Kreis der Magier "+
+ write("Merlin ruft: "+({string})who->name(WER)+" ist in den Kreis der Magier "+
"aufgenommen worden!\n");
- shout("Merlin ruft: "+who->name(WER)+" ist in den Kreis der Magier "+
+ shout("Merlin ruft: "+({string})who->name(WER)+" ist in den Kreis der Magier "+
"aufgenommen worden!\n");
- "secure/master"->renew_player_object(who);
+ ({int})"secure/master"->renew_player_object(who);
return 1;
}
@@ -766,7 +766,7 @@
domains=({string*})"secure/master"->get_domain_homes(getuid(who));
if (!domains || !pointerp(domains) || !sizeof(domains))
{
- Say(who->name(WER)+" gehoert noch keiner Region an und kann daher noch "+
+ Say(({string})who->name(WER)+" gehoert noch keiner Region an und kann daher noch "+
"kein Voll-\nmagier werden.\n");
Write("Du gehoerst noch keiner Region an. Schliess Dich zunaechst einer "+
"an und komm\ndann wieder!\n");
@@ -775,8 +775,8 @@
ret=({int})"secure/master"->advance_wizlevel(geteuid(who),25);
if(ret>0)
{
- shout(who->name(WER)+" arbeitet jetzt an einer Region mit!\n");
- "secure/master"->renew_player_object(who);
+ shout(({string})who->name(WER)+" arbeitet jetzt an einer Region mit!\n");
+ ({int})"secure/master"->renew_player_object(who);
return 1;
}
write("RETURNVALUE "+ret+"\n");
@@ -791,7 +791,7 @@
{
if (!ARCH_SECURITY) {
Write("Dich kann nur ein Erzmagier zum \"richtigen\" Magier machen!\n");
- Say("Nur ein Erzmagier kann "+who->name(WEN)+" zum \"richtigen\" Magier machen!\n");
+ Say("Nur ein Erzmagier kann "+({string})who->name(WEN)+" zum \"richtigen\" Magier machen!\n");
return 0;
}
ret=({int})"secure/master"->advance_wizlevel(geteuid(who),20);
@@ -801,7 +801,7 @@
write("Merlin: error "+ret+"\n");
}
string wizname = ({string})who->query_real_name();
- "secure/master"->renew_player_object(who);
+ ({int})"secure/master"->renew_player_object(who);
// Fehlerteufel geben
call_out(#'GibFehlerteufel,4,find_player(wizname));
return 1;
@@ -815,7 +815,7 @@
tell_object(promoter,"Du musst derzeit mindestens Level "+
(DOMAINMEMBER_LVL+1)+" haben, um jemanden befoerden zu "+
"koennen.\n");
- say(promoter->name(WER)+" ist kein Vollmagier und darf daher niemanden "+
+ say(({string})promoter->name(WER)+" ist kein Vollmagier und darf daher niemanden "+
"zum Vollmagier machen.\n");
return 1;
}
@@ -824,19 +824,19 @@
// Er schlaegt fehl, wenn der Vertrag der Clone einer alten BP ist.
if (!(vertrag=present_clone("/obj/vertrag",who)) ||
object_name(blueprint(vertrag))!="/obj/vertrag" ||
- !(vertrag->is_unterschrieben()) )
+ !(({int})vertrag->is_unterschrieben()) )
{
Write("Du hast ja gar keinen unterschriebenen Vertrag bei Dir. Besorg Dir "+
"einen Ver-\ntrag, unterschreibe ihn und komm dann wieder!\n");
- Say(who->name(WER)+" hat keinen unterschriebenen Vertrag.\n");
+ Say(({string})who->name(WER)+" hat keinen unterschriebenen Vertrag.\n");
return 1;
}
if (geteuid(vertrag)!=secure_euid())
{
tell_object(promoter,"Das geht nicht, er hat einen Vertrag von "+
capitalize(geteuid(vertrag))+" bei sich.\n");
- say(promoter->name(WER)+" versucht, "+who->name(WER)+" zum Magier zu "+
- "machen, doch "+who->name(WER)+" hat einen Vertrag\nvon "+
+ say(({string})promoter->name(WER)+" versucht, "+({string})who->name(WER)+" zum Magier zu "+
+ "machen, doch "+({string})who->name(WER)+" hat einen Vertrag\nvon "+
capitalize(geteuid(vertrag))+" bei sich.\n",promoter);
return 0;
}
@@ -847,18 +847,18 @@
{
PostMagier(capitalize(getuid(who)),
capitalize(secure_euid()),
- who->QueryProp(P_GENDER));
+ ({int})who->QueryProp(P_GENDER));
write_file("/log/SPONSOR",dtime(time())+": "+capitalize(getuid(promoter))+" macht "+
- who->name(WER)+" zum Learner.\n");
- write(who->name(WER)+" ist in den Kreis der Magier aufgenommen worden!\n");
- shout(who->name(WER)+" ist in den Kreis der Magier aufgenommen worden!\n");
- if ("secure/master"->set_player_object(geteuid(who),"/std/shells/magier")
+ ({string})who->name(WER)+" zum Learner.\n");
+ write(({string})who->name(WER)+" ist in den Kreis der Magier aufgenommen worden!\n");
+ shout(({string})who->name(WER)+" ist in den Kreis der Magier aufgenommen worden!\n");
+ if (({int})"secure/master"->set_player_object(geteuid(who),"/std/shells/magier")
<=0)
{
say("MERLIN: konnte Magiershell nicht einstellen.\n");
write("MERLIN: konnte Magiershell nicht einstellen.\n");
}
- "secure/master"->renew_player_object(who);
+ ({int})"secure/master"->renew_player_object(who);
return 1;
}
write(" --RETURNVALUE IS "+ret+"\n");
@@ -904,7 +904,7 @@
+"um %s herum auf.\n\nDie Aura verschwindet langsam.\n",
plname),78,0,1), ({player}));
- if ("secure/master"->advance_wizlevel(geteuid(player),1)<=0)
+ if (({int})"secure/master"->advance_wizlevel(geteuid(player),1)<=0)
{
write("Merlin sagt: Da geht was schief ... sag mal Zook Bescheid.\n");
say("Merlin sagt: Da geht was schief ... sag mal Zook Bescheid.\n");
@@ -912,18 +912,18 @@
return;
}
playername = geteuid(player);
- "secure/master"->renew_player_object(player);
+ ({int})"secure/master"->renew_player_object(player);
player = find_player(playername);
text = sprintf(" ist jetzt ein%s Seher%s!\n",
- ((player->QueryProp(P_GENDER))==2?"e":""),
- ((player->QueryProp(P_GENDER))==2?"in":""));
+ ((({int})player->QueryProp(P_GENDER))==2?"e":""),
+ ((({int})player->QueryProp(P_GENDER))==2?"in":""));
write("Merlin ruft: "+capitalize(playername)+text);
shout("Merlin ruft: "+capitalize(playername)+text);
PostSeher(capitalize(playername),({int})player->QueryProp(P_GENDER));
if(!catch(
faq=clone_object("/d/seher/haeuser/special/seherfaqmobil") ;publish))
{
- faq->move(player,M_NOCHECK);
+ ({int})faq->move(player,M_NOCHECK);
tell_object(player, "Aus dem Nichts erscheint eine kleine Belohnung fuer Dich.\n");
}
@@ -971,7 +971,7 @@
break_string(sprintf("Das ist eine grosse Freude. %s hat sich "
"tapfer durch das "MUDNAME" geschlagen und mittlerweile alle "
"Anforderungen erfuellt, um %s zu werden.",
- plname, (player->QueryProp(P_GENDER))==1?"Seher":"Seherin"),
+ plname, (({int})player->QueryProp(P_GENDER))==1?"Seher":"Seherin"),
78, "Merlin sagt: "));
call_out("seer_sequenz2", 4, player, plname);
@@ -997,7 +997,7 @@
"erfuellt. Warte einen Moment...", 78,
"Merlin teilt Dir mit: "));
busy=1;
- call_out("seer_sequenz1",4,player, player->Name());
+ call_out("seer_sequenz1",4,player, ({string})player->Name());
return(0); //non-void funktion
}
@@ -1019,8 +1019,8 @@
}
public int remove(int silent) {
- EVENTD->UnregisterEvent(EVT_LIB_LOGIN, ME);
- EVENTD->UnregisterEvent(EVT_LIB_PLAYER_CREATION, ME);
+ ({int})EVENTD->UnregisterEvent(EVT_LIB_LOGIN, ME);
+ ({int})EVENTD->UnregisterEvent(EVT_LIB_PLAYER_CREATION, ME);
destruct(this_object());
return 1;
}
@@ -1044,7 +1044,7 @@
foreach(object ob: all_inventory(environment()))
{
if (interactive(ob) && query_idle(ob)<180
- && ob->QueryProp(P_XP)>999999)
+ && ({int})ob->QueryProp(P_XP)>999999)
return;
}
// Ausgaenge durchsuchen
@@ -1082,17 +1082,17 @@
{
string descr;
- if( IS_LEARNER(who) && who->QueryProp( P_WANTS_TO_LEARN ) )
+ if( IS_LEARNER(who) && ({int})who->QueryProp( P_WANTS_TO_LEARN ) )
descr = "[" + object_name(ME) + "]\n";
else
descr = "";
descr+="Du bist im Wizclub 'Zum lustigen Merlin'. Dieser Wizclub ist etwas besonderes -\ner hat keinen festen Standort, sondern wandert im Mud herum. Ausserdem kann er\nSpieler zu Magiern machen - aber nur, wenn man ihn von aussen aus darauf\nanspricht.\n";
- if ( who->QueryProp(P_SHOW_EXITS) )
+ if ( ({int})who->QueryProp(P_SHOW_EXITS) )
descr += "Es gibt 2 sichtbare Ausgaenge: raus und gilde.\n";
descr += make_invlist(who, all_inventory(ME) - ({ who }));
if( environment())
descr += "\nAusserhalb siehst Du:\n"
- + environment()->int_short(who,ME);
+ + ({string})environment()->int_short(who,ME);
return descr;
}
@@ -1102,7 +1102,7 @@
string descr;
descr = "";
- iswiz = IS_LEARNER( viewer ) && viewer->QueryProp(P_WANTS_TO_LEARN);
+ iswiz = IS_LEARNER( viewer ) && ({int})viewer->QueryProp(P_WANTS_TO_LEARN);
for (i = 0; i < sizeof(inv); i++)
{
@@ -1184,7 +1184,7 @@
void show_exits()
{
- printf("%s",environment()->GetExits());
+ printf("%s",({string})environment()->GetExits());
}
int gehen(string str)
@@ -1198,10 +1198,10 @@
switch (query_verb())
{
case "gilde":
- this_player()->move("/gilden/abenteurer",M_GO,"in die Gilde");
+ ({int})this_player()->move("/gilden/abenteurer",M_GO,"in die Gilde");
return 1;
case "raus":
- this_player()->move(environment(),M_GO,"raus");
+ ({int})this_player()->move(environment(),M_GO,"raus");
return 1;
}
if (!IS_WIZARD(this_interactive()))
@@ -1212,7 +1212,7 @@
mapping exits=({mapping})environment()->QueryProp(P_EXITS);
if (!str||str=="")
{
- printf(environment()->int_short(ME,ME));
+ printf(({string})environment()->int_short(ME,ME));
show_exits();
return 1;
}
@@ -1233,7 +1233,7 @@
if (str[0]=='*')
{
goto(str[1..]);
- printf(environment()->int_short(ME,ME));
+ printf(({string})environment()->int_short(ME,ME));
show_exits();
return 1;
}
@@ -1241,7 +1241,7 @@
return 0;
move(exits[str],0);
write("Merlin sagt: Jawoll, Chef.\n");
- printf(environment()->int_short(ME,ME));
+ printf(({string})environment()->int_short(ME,ME));
show_exits();
return 1;
}
diff --git a/secure/news.c b/secure/news.c
index 2f9e6aa..83a73f5 100644
--- a/secure/news.c
+++ b/secure/news.c
@@ -131,7 +131,7 @@
if (member(grouplist, name)) return -2; // Gibt es schon
- if (!master()->find_userinfo(owner)) return -3;
+ if (!({int})master()->find_userinfo(owner)) return -3;
savefilea = old_explode(name,".");
savefile = implode(savefilea,"/");
diff --git a/secure/questmaster.c b/secure/questmaster.c
index d6f2fb4..eccb425 100644
--- a/secure/questmaster.c
+++ b/secure/questmaster.c
@@ -101,13 +101,13 @@
RebuildMQCache();
set_next_reset(43200); // Reset alle 12 Stunden.
- EVENTD->RegisterEvent(EVT_LIB_QUEST_SOLVED,"HandleQuestSolved",
+ ({int})EVENTD->RegisterEvent(EVT_LIB_QUEST_SOLVED,"HandleQuestSolved",
ME);
}
public int remove(int silent) {
save_info();
- EVENTD->UnregisterEvent(EVT_LIB_QUEST_SOLVED, ME);
+ ({int})EVENTD->UnregisterEvent(EVT_LIB_QUEST_SOLVED, ME);
destruct(ME);
return 1;
}
@@ -370,7 +370,7 @@
void Channel(string msg) {
if(!interactive(previous_object()))
return;
- catch(CHMASTER->send("Abenteuer", ME, msg);publish);
+ catch(({int})CHMASTER->send("Abenteuer", ME, msg);publish);
}
/* quoted from /sys/mail.h: */
@@ -423,7 +423,7 @@
mail[MSG_ID]=MUDNAME":"+time();
mail[MSG_BODY]=text;
- "/secure/mailer"->DeliverMail(mail,0);
+ ({string*})"/secure/mailer"->DeliverMail(mail,0);
return;
}
@@ -451,7 +451,7 @@
if(!objectp(pl))
return "Ohne Spielernamen/Spielerobjekt gibt es auch keine Liste.\n";
- if ( (pl->QueryProp(P_TTY)) == "ansi")
+ if ( (({string})pl->QueryProp(P_TTY)) == "ansi")
{
ja = ANSI_GREEN + "ja" + ANSI_NORMAL;
nein = ANSI_RED + "nein" + ANSI_NORMAL;
@@ -480,7 +480,7 @@
for (j=sizeof(qgrouped[i])-1;j>=0; j--)
{
qtmp = QueryQuest(qgrouped[i][j]);
- int geloest_status = pl->QueryQuest(qgrouped[i][j]);
+ int geloest_status = ({int})pl->QueryQuest(qgrouped[i][j]);
// Quest ausgeben, wenn "kein Filter" gegeben oder Quest geloest und
// Filter "geloest" oder Quest ungeloest und Filter "ungeloest".
if ( !(geloest_filter & (FILTER_GELOEST|FILTER_UNGELOEST))
@@ -552,7 +552,7 @@
string qname = data[E_QUESTNAME];
if (!quests[qname] || !objectp(trigob)
- || trigob->QueryProp(P_TESTPLAYER) || IS_LEARNER(trigob))
+ || ({int|string})trigob->QueryProp(P_TESTPLAYER) || IS_LEARNER(trigob))
return;
int lvl = ({int})trigob->QueryProp(P_LEVEL);
@@ -870,7 +870,7 @@
((this_player() == winner) && !query_once_interactive(winner)))
return MQ_ILLEGAL_OBJ;
// Gaeste koennen keine Miniquests bestehen.
- if (winner->QueryGuest())
+ if (({int})winner->QueryGuest())
return MQ_GUEST;
// Aufrufendes Objekt existiert gar nicht?
if (!previous_object())
@@ -884,7 +884,7 @@
if (!miniquests[objname, MQ_DATA_ACTIVE])
return MQ_IS_INACTIVE;
- string mq = (MASTER->query_mq(getuid(winner)) || "");
+ string mq = (({string})MASTER->query_mq(getuid(winner)) || "");
// Spieler hat die MQ schonmal bestanden? Dann keine weiteren Aktivitaet
// noetig
@@ -892,14 +892,14 @@
return MQ_ALREADY_SET;
catch(mq = set_bit(mq, miniquests[objname,MQ_DATA_QUESTNO]);publish);
- MASTER->update_mq(getuid(winner), mq);
+ ({int})MASTER->update_mq(getuid(winner), mq);
MQSOLVEDLOG(sprintf("%s: %s, (#%d), (Stupse %d)",
objname, geteuid(winner), miniquests[objname, MQ_DATA_QUESTNO],
miniquests[objname, MQ_DATA_POINTS]));
// Miniquest-Event ausloesen
- EVENTD->TriggerEvent( EVT_LIB_MINIQUEST_SOLVED, ([
+ ({int})EVENTD->TriggerEvent( EVT_LIB_MINIQUEST_SOLVED, ([
E_OBJECT: previous_object(),
E_OBNAME: objname,
E_PLNAME: getuid(winner),
@@ -934,7 +934,7 @@
if (!member(users_mq, spieler)) {
int mqpoints;
int p=-1;
- string s = (MASTER->query_mq(spieler) || "");
+ string s = (({string})MASTER->query_mq(spieler) || "");
while( (p=next_bit(s, p)) != -1) {
mqpoints+=by_num[p][0];
}
@@ -972,7 +972,7 @@
if (!member(miniquests,name))
return MQ_KEY_INVALID;
- mq = (MASTER->query_mq(spieler) || "");
+ mq = (({string})MASTER->query_mq(spieler) || "");
return test_bit(mq, miniquests[name, MQ_DATA_QUESTNO]);
}
@@ -989,13 +989,13 @@
if (!member(miniquests,name))
return MQ_KEY_INVALID;
- string mq = (MASTER->query_mq(pl) || "");
+ string mq = (({string})MASTER->query_mq(pl) || "");
if (test_bit(mq, miniquests[name,MQ_DATA_QUESTNO]))
return MQ_ALREADY_SET;
catch (mq = set_bit(mq, miniquests[name, MQ_DATA_QUESTNO]);publish);
- MASTER->update_mq(pl, mq);
+ ({int})MASTER->update_mq(pl, mq);
MQMLOG(sprintf("SetPlayerMiniQuest: %s %s (%s)",
pl, name, getuid(this_interactive())));
@@ -1015,13 +1015,13 @@
if (!member(miniquests,name))
return MQ_KEY_INVALID;
- string mq = (MASTER->query_mq(pl) || "");
+ string mq = (({string})MASTER->query_mq(pl) || "");
if (!test_bit(mq, miniquests[name, MQ_DATA_QUESTNO]))
return MQ_ALREADY_SET;
catch (mq = clear_bit(mq, miniquests[name, MQ_DATA_QUESTNO]);publish);
- MASTER->update_mq(pl, mq);
+ ({int})MASTER->update_mq(pl, mq);
MQMLOG(sprintf("ClearPlayerMiniQuest: %s %s (%s)",
pl, name, getuid(this_interactive())));
diff --git a/secure/scoremaster.c b/secure/scoremaster.c
index 6a08eff..0cd1e5d 100644
--- a/secure/scoremaster.c
+++ b/secure/scoremaster.c
@@ -226,7 +226,7 @@
i=sizeof(whop=m_indices(to_change))-1;
while (i>=0 && get_eval_cost()>100000)
{
- ek = ({string})(MASTER->query_ek(who=whop[i]) || "");
+ ek = (({string})MASTER->query_ek(who=whop[i]) || "");
for (j=sizeof(what=to_change[who])-1;j>=0;j--) {
if ((value=what[j])>0) {
// Vergabestatistik hochzaehlen.
@@ -245,7 +245,7 @@
sprintf("SET_CLEAR_BIT (reset): %s %4d %s\n",
who, j, strftime("%d%m%Y-%T",time()) ));
}
- MASTER->update_ek(who, ek);
+ ({int})MASTER->update_ek(who, ek);
if (member(users_ek, who))
m_delete(users_ek, who);
@@ -399,7 +399,7 @@
foreach(string pl: unconfirmed_scores[bit]) {
string eks = ({string})master()->query_ek(pl);
eks = set_bit(eks, bit);
- master()->update_ek(pl, eks);
+ ({int})master()->update_ek(pl, eks);
write_file(SCOREAUTOLOG, sprintf(
"SETBIT: %s %5d %s\n",
strftime("%d%m%Y-%T",time()), bit, pl));
@@ -688,7 +688,7 @@
// ausgetragen/deaktiviet sind.
public string QueryAllKills(string pl)
{
- return (MASTER->query_ek(pl) || "");
+ return (({string})MASTER->query_ek(pl) || "");
}
// filtert alle Eintraege aus dem Bitstring heraus, die fuer
@@ -711,7 +711,7 @@
if (member(users_ek,pl)) return users_ek[pl];
- string s = (MASTER->query_ek(pl) || "");
+ string s = (({string})MASTER->query_ek(pl) || "");
int p=-1;
int summe;
@@ -779,11 +779,11 @@
}
else {
// sonst wird das Bit direkt im Spieler gesetzt.
- ek = (MASTER->query_ek(pls) || "");
+ ek = (({string})MASTER->query_ek(pls) || "");
if (test_bit(ek, bit))
return -3;
ek = set_bit(ek, bit);
- MASTER->update_ek(pls, ek);
+ ({int})MASTER->update_ek(pls, ek);
// Vergabestatistik hochzaehlen.
npcs[by_num[bit,BYNUM_KEY],NPC_COUNT]++;
}
@@ -818,7 +818,7 @@
member(pls,pl) != -1)
return 1;
- string eks = (MASTER->query_ek(pl) || "");
+ string eks = (({string})MASTER->query_ek(pl) || "");
return test_bit(eks, bit);
}
@@ -865,9 +865,9 @@
if (!allowed())
return SCORE_NO_PERMISSION;
- ek = (MASTER->query_ek(pl) || "");
+ ek = (({string})MASTER->query_ek(pl) || "");
ek = set_bit(ek, bit);
- MASTER->update_ek(pl, ek);
+ ({int})MASTER->update_ek(pl, ek);
// Vergabestatistik hochzaehlen.
npcs[by_num[bit,BYNUM_KEY],NPC_COUNT]++;
@@ -889,9 +889,9 @@
if (!allowed())
return SCORE_NO_PERMISSION;
- ek = (MASTER->query_ek(pl) || "");
+ ek = (({string})MASTER->query_ek(pl) || "");
ek = clear_bit(ek, bit);
- MASTER->update_ek(pl, ek);
+ ({int})MASTER->update_ek(pl, ek);
// Vergabestatistik runterzaehlen.
npcs[by_num[bit,BYNUM_KEY],NPC_COUNT]--;
@@ -1297,7 +1297,7 @@
tip=getTip(tmp[index]);
if (stringp(tip) && sizeof(tip)) {
ektip=set_bit(ektip,npcs[tmp[index],NPC_NUMBER]);
- MASTER->update_ektips(pl,ektip);
+ ({int})MASTER->update_ektips(pl,ektip);
break; //fertig
}
}
@@ -1412,10 +1412,10 @@
}
if (changed) {
- master()->update_ek(pl, eks);
+ ({int})master()->update_ek(pl, eks);
}
if (changed2) {
- master()->update_ektips(pl, ektips);
+ ({int})master()->update_ektips(pl, ektips);
}
opfer-=({""});
write_file(WERKILLTWEN,sprintf("%s\n%=-78s\n\n",pl,CountUp(opfer)||""));
diff --git a/secure/telnetneg.c b/secure/telnetneg.c
index 707bc7b..c5da0d2 100644
--- a/secure/telnetneg.c
+++ b/secure/telnetneg.c
@@ -279,7 +279,7 @@
{
send_telnet_neg_str(
to_bytes(({SB, TELOPT_MSSP}))
- + to_bytes(sprintf("%s", mssp->get_telnegs_str()),
+ + to_bytes(sprintf("%s", ({string})mssp->get_telnegs_str()),
"ASCII//TRANSLIT"));
// die Daten brauchen wir nicht mehr
opt->lo_wishes->sbdata = 0;
@@ -988,8 +988,8 @@
_bind_telneg_std_handlers();
// dann restliche Daten aus dem Loginobjekt holen.
Terminals = ({string *}) previous_object()->query_terminals();
- Set( P_TTY_COLS, previous_object()->Query(P_TTY_COLS) );
- Set( P_TTY_ROWS, previous_object()->Query(P_TTY_ROWS) );
+ Set( P_TTY_COLS, ({int})previous_object()->Query(P_TTY_COLS) );
+ Set( P_TTY_ROWS, ({int})previous_object()->Query(P_TTY_ROWS) );
struct telopt_s opt = TN[TELOPT_NAWS];
if (optargs = (opt->re_wishes)->sbdata) {
diff --git a/secure/wizlevels.h b/secure/wizlevels.h
index e785158..f2a72fb 100644
--- a/secure/wizlevels.h
+++ b/secure/wizlevels.h
@@ -37,15 +37,15 @@
#define IS_SPECIAL(user) (query_wiz_level(user) >= SPECIAL_LVL)
#define IS_WIZARD(user) (query_wiz_level(user) >= WIZARD_LVL)
#define IS_DOMAINMEMBER(user) (query_wiz_level(user) >= DOMAINMEMBER_LVL)
-#define IS_DEPUTY(user) (master()->IsDeputy(user))
+#define IS_DEPUTY(user) (({int})master()->IsDeputy(user))
#define IS_LORD(user) (query_wiz_level(user) >= LORD_LVL)
#define IS_ELDER(user) (query_wiz_level(user) >= ELDER_LVL)
#define IS_ARCH(user) (query_wiz_level(user) >= ARCH_LVL)
#define IS_GOD(user) (query_wiz_level(user) >= GOD_LVL)
#define IS_LEARNING(user) (query_wiz_level(user) >= LEARNER_LVL &&\
- user->QueryProp(P_WANTS_TO_LEARN))
-#define IS_LORD_DOMAIN(user,domain) (master()->domain_master(user,domain))
+ ({int})user->QueryProp(P_WANTS_TO_LEARN))
+#define IS_LORD_DOMAIN(user,domain) (({int})master()->domain_master(user,domain))
/*
* Interface for enhanced security functions
diff --git a/std/armour/combat.c b/std/armour/combat.c
index 59d3fdd..b3456bc 100644
--- a/std/armour/combat.c
+++ b/std/armour/combat.c
@@ -60,7 +60,7 @@
prot = (pac/4 + random(pac*3/4 + 1)) || 1 ;
object stat = find_object("/d/erzmagier/zesstra/pacstat");
if (stat)
- stat->acstat(QueryProp(P_ARMOUR_TYPE),prot,
+ ({string})stat->acstat(QueryProp(P_ARMOUR_TYPE),prot,
random(pac)+1);
// ruestungschutz an defendfunc weitermelden
@@ -112,7 +112,7 @@
// Es duerfen nur "legale" Ruestungstypen gesetzt werden, ansonsten
// wird AT_ILLEGAL gesetzt.
static mixed _set_armour_type(mixed type ) {
- if (!COMBAT_MASTER->valid_armour_type(type))
+ if (!({int})COMBAT_MASTER->valid_armour_type(type))
{
Set(P_ARMOUR_TYPE, (type=AT_ILLEGAL), F_VALUE);
}
@@ -213,7 +213,7 @@
// muss der Traeger davon natuerlich beeinflusst werden.
if (objectp(worn_by=QueryProp(P_WORN)))
{
- worn_by->AddResistanceModifier(resistance_strengths,
+ ({int})worn_by->AddResistanceModifier(resistance_strengths,
QueryProp(P_ARMOUR_TYPE));
}
return resistance_strengths;
diff --git a/std/clothing/container_description.c b/std/clothing/container_description.c
index ca0d9c6..3f19e80 100644
--- a/std/clothing/container_description.c
+++ b/std/clothing/container_description.c
@@ -97,7 +97,7 @@
{
string id, tmp;
int idx;
- tmp = capitalize(obj->short()||"")[0..<2]
+ tmp = capitalize(({string})obj->short()||"")[0..<2]
+ (!(flags & 4) && (flags & 1) ? " ["+object_name(obj)+"]" : "");
if(flags & 3 || living(obj)) id = object_name(obj);
else
@@ -125,7 +125,7 @@
mixed objs, info;
string descr;
- iswiz = IS_LEARNER( viewer ) && viewer->QueryProp(P_WANTS_TO_LEARN);
+ iswiz = IS_LEARNER( viewer ) && ({int})viewer->QueryProp(P_WANTS_TO_LEARN);
descr = ""; objs = ({}); info = ({});
map(inv, #'stringenize/*'*/, iswiz | (flags & 2) | (flags & 4), &objs, &info);
if(flags & 1) return info;
diff --git a/std/container/description.c b/std/container/description.c
index 1de834e..cf56803 100644
--- a/std/container/description.c
+++ b/std/container/description.c
@@ -47,16 +47,16 @@
if ( (!(flags & 4) && (flags & 1))) {
//wenn Magier und Magierinfos angehaengt werden sollen:
- tmp = capitalize(obj->short()||"")[0..<2]
+ tmp = capitalize(({string})obj->short()||"")[0..<2]
+ " ["+object_name(obj)+"]";
}
- else if (obj->QueryProp(P_INVIS)) {
+ else if (({int})obj->QueryProp(P_INVIS)) {
//keine Ausgabe bzw. leerer String, wird dann von collect rausgeschmissen
tmp="";
}
else {
//Spieler, Magier ohne P_WANTS_TO_LEARN etc.
- tmp = capitalize(obj->short()||"")[0..<2];
+ tmp = capitalize(({string})obj->short()||"")[0..<2];
}
//wenn wizard und 'dont collect equal objects': id ist object_name()
if(flags & 3 || living(obj))
@@ -90,7 +90,7 @@
int iswiz;
mixed objs, info;
- iswiz = IS_LEARNER( viewer ) && viewer->QueryProp(P_WANTS_TO_LEARN);
+ iswiz = IS_LEARNER( viewer ) && ({int})viewer->QueryProp(P_WANTS_TO_LEARN);
objs = ({}); info = ({});
map(inv, #'stringenize/*'*/, iswiz | (flags & 2) | (flags & 4), &objs, &info);
if(flags & 1) return info;
diff --git a/std/container/items.c b/std/container/items.c
index c27736f..d581425 100644
--- a/std/container/items.c
+++ b/std/container/items.c
@@ -44,7 +44,7 @@
Set(P_ITEMS,({}));
Set(P_ITEMS,SECURED,F_MODE_AS);
- OBJECTD->QueryObject(); // querying general objects
+ ({void})OBJECTD->QueryObject(); // querying general objects
}
protected void create_super()
@@ -121,7 +121,7 @@
if(objectp(ob))
{
- ob->move(ME,M_NOCHECK|M_NO_ATTACK);
+ ({int})ob->move(ME,M_NOCHECK|M_NO_ATTACK);
// mit Absicht keine Pruefung aufs Move, wenns nicht geht, solls 2s
// spaeter auf der Ebene buggen, weil praktisch niemand im create() das
// Ergebnis vom AddItem() prueft.
@@ -160,14 +160,14 @@
foreach(object o : inv)
{
- o->remove(1);
+ ({int})o->remove(1);
if(objectp(o))
{
destruct(o);
}
}
- ob->remove(1);
+ ({int})ob->remove(1);
if(ob)
{
@@ -212,12 +212,12 @@
{
foreach(string fn: &filename)
{
- fn=master()->make_path_absolute(fn);
+ fn=({string})master()->make_path_absolute(fn);
}
}
else
{
- filename=master()->make_path_absolute( filename );
+ filename=({string})master()->make_path_absolute( filename );
}
SetProp(P_ITEMS,filter(items, #'ri_filter/*'*/,filename));
@@ -248,7 +248,7 @@
if(objectp(item[RITEM_OBJECT]) &&
environment(item[RITEM_OBJECT])!=ME)
{
- item[RITEM_OBJECT]->move(ME,M_GO|M_NO_ATTACK);
+ ({int})item[RITEM_OBJECT]->move(ME,M_GO|M_NO_ATTACK);
break;
}
@@ -272,7 +272,7 @@
ob=clone_object(file);
}
- ob->move(ME,M_NOCHECK|M_NO_ATTACK);
+ ({int})ob->move(ME,M_NOCHECK|M_NO_ATTACK);
break;
}
diff --git a/std/container/light.c b/std/container/light.c
index 24a2bf4..2b34de8 100644
--- a/std/container/light.c
+++ b/std/container/light.c
@@ -78,7 +78,7 @@
// eigenes P_LIGHT und P_TOTAL_LIGHT der enthaltenen Objekte verrechnen
int intlight = add_light_sources(
- all_inventory()->QueryProp(P_TOTAL_LIGHT) + ({QueryProp(P_LIGHT)}));
+ ({int*})all_inventory()->QueryProp(P_TOTAL_LIGHT) + ({QueryProp(P_LIGHT)}));
// P_INT_LIGHT (gerundet) abspeichern
Set(P_INT_LIGHT, intlight, F_VALUE);
diff --git a/std/container/restrictions.c b/std/container/restrictions.c
index 30b8df1..68329df 100644
--- a/std/container/restrictions.c
+++ b/std/container/restrictions.c
@@ -111,7 +111,7 @@
public int MayAddObject( object ob )
{
if (ob) {
- if ( !ob->short() )
+ if ( !({string})ob->short() )
return 1; // invis-Objekte duerfen immer
if ( ob == ME || environment(ob) == ME)
@@ -162,7 +162,7 @@
// Container kann Gewicht nicht mehr aufnehmen
return -1;
- if ( aw && ENV()->MayAddWeight(aw) < 0 )
+ if ( aw && ({int})ENV()->MayAddWeight(aw) < 0 )
// Umgebung des Containers kann Gewicht nicht mehr aufnehmen
return -2;
@@ -290,7 +290,7 @@
case "eigenes":
case "meins":
if (objectp(haufen=present("\nhaufen "+
- this_player()->name(WEM)))) {
+ ({string})this_player()->name(WEM)))) {
obs = all_inventory(haufen);
}
// kein break;, Fall-through!
@@ -384,7 +384,7 @@
case "meins":
case "alles eigene":
if (objectp(haufen=present("\nhaufen "+
- this_player()->name(WEM)))) {
+ ({string})this_player()->name(WEM)))) {
obs = all_inventory(haufen);
}
// kein break;, Fall-through!
@@ -449,7 +449,7 @@
// bestimmten ID (im Gegensatz zu "alles", "jede waffe" etc.)
// soll ein Item gefunden werden, auch wenn die Short 0 ist
// (unsichtbar, aber interagierbar).
- else if ( ob && ob != ME && !ob->QueryProp(P_INVIS) )
+ else if ( ob && ob != ME && !({int})ob->QueryProp(P_INVIS) )
erg += ({ ob }); //Normalfall: einzelne ID
continue;
diff --git a/std/container/vitems.c b/std/container/vitems.c
index ad86d52..ca50dc2 100644
--- a/std/container/vitems.c
+++ b/std/container/vitems.c
@@ -57,10 +57,10 @@
// Es wird auch zerstoert, wenn das genommene Objekt gerade im Raum
// rumliegt (weil Spieler es hat fallen lassen etc.)
if (vitems[key, VI_OBJECT])
- vitems[key, VI_OBJECT]->remove(1);
+ ({int})vitems[key, VI_OBJECT]->remove(1);
if (vitems[key, VI_LAST_OBJ]
&& environment(vitems[key, VI_LAST_OBJ]) == this_object())
- vitems[key, VI_LAST_OBJ]->remove(1);
+ ({int})vitems[key, VI_LAST_OBJ]->remove(1);
m_delete(vitems, key);
SetProp(P_VITEMS, vitems);
@@ -123,39 +123,39 @@
switch(k)
{
case P_READ_DETAILS:
- if (reset_prop) ob->RemoveReadDetail(0);
+ if (reset_prop) ({void})ob->RemoveReadDetail(0);
walk_mapping(v, "AddReadDetail", ob);
break;
case P_DETAILS:
- if (reset_prop) ob->RemoveDetail(0);
+ if (reset_prop) ({void})ob->RemoveDetail(0);
walk_mapping(v, "AddDetail", ob);
break;
case P_SMELLS:
- if (reset_prop) ob->RemoveSmells(0);
+ if (reset_prop) ({void})ob->RemoveSmells(0);
walk_mapping(v, "AddSmells", ob);
break;
case P_SOUNDS:
- if (reset_prop) ob->RemoveSounds(0);
+ if (reset_prop) ({void})ob->RemoveSounds(0);
walk_mapping(v, "AddSounds", ob);
break;
case P_TOUCH_DETAILS:
- if (reset_prop) ob->RemoveTouchDetail(0);
+ if (reset_prop) ({void})ob->RemoveTouchDetail(0);
walk_mapping(v, "AddTouchDetail", ob);
break;
case P_IDS:
- if (reset_prop) ob->SetProp(P_IDS, v);
- else ob->AddId(v);
+ if (reset_prop) ({string*})ob->SetProp(P_IDS, v);
+ else ({void})ob->AddId(v);
case P_CLASS:
- if (reset_prop) ob->SetProp(P_CLASS, v);
- else ob->AddClass(v);
+ if (reset_prop) ({string*})ob->SetProp(P_CLASS, v);
+ else ({void})ob->AddClass(v);
case P_ADJECTIVES:
- if (reset_prop) ob->SetProp(P_ADJECTIVES, v);
- else ob->AddAdjective(v);
+ if (reset_prop) ({string*})ob->SetProp(P_ADJECTIVES, v);
+ else ({void})ob->AddAdjective(v);
break;
// Alle anderen Properties stumpf setzen.
default:
- ob->SetProp(k, v);
+ ({mixed})ob->SetProp(k, v);
}
}
}
@@ -188,13 +188,13 @@
if (path)
{
obj=clone_object(path);
- obj->SetAutoObject(1);
+ ({int})obj->SetAutoObject(1);
if (mappingp(props))
configure_object(obj, props);
// Schatten erzeugen, welcher die Beschreibung des Objekts im Container nach
// den Props in shadow_props abaendert.
sh = clone_object("/obj/vitem_shadow");
- sh->set_shadow(obj, shadow_props);
+ ({void})sh->set_shadow(obj, shadow_props);
}
else
{
@@ -227,7 +227,7 @@
{
foreach(object o : GetVItemClones())
{
- if (o->id(complex_desc))
+ if (({int})o->id(complex_desc))
return o;
}
return 0;
@@ -297,7 +297,7 @@
// wird es immer refresht...
// Zu beachten: es soll auch nicht hier in diesem Container rumliegen
// nach dem Heimbewegen, also zerstoeren!
- last_obj->remove(1);
+ ({int})last_obj->remove(1);
// Fallthrough
case VI_REFRESH_REMOVE:
// wenn nicht mehr als vItem hier ist (d.h. auch wenn es hier im Raum
diff --git a/std/corpse.c b/std/corpse.c
index 5025ad8..05d6424 100644
--- a/std/corpse.c
+++ b/std/corpse.c
@@ -95,8 +95,8 @@
SetProp( P_SHORT, "Die Leiche "+ _name );
SetProp( P_LONG, "Du siehst die sterblichen Ueberreste "+ _name + ".\n" );
_decay = 4;
- SetProp( P_ORIG_NAME, to_string(ob->name(RAW)) );
- SetProp( P_PILE_NAME, to_string(ob->name(WEM)) );
+ SetProp( P_ORIG_NAME, ({string})ob->name(RAW) );
+ SetProp( P_PILE_NAME, ({string})ob->name(WEM) );
AddId( "\nleiche "+ QueryProp(P_PILE_NAME) );
SetProp( P_KILLER, ({<object|string>})funcall(cl, P_KILLER));
SetProp( P_ATTRIBUTES, ({mapping})funcall(cl, P_ATTRIBUTES));
@@ -256,10 +256,10 @@
heal = heal * wieviel / nahrung_gesamt;
if ( ( heal ) < 0 ) {
//
- this_player()->do_damage( random(-heal), this_object() );
+ ({int})this_player()->do_damage( random(-heal), this_object() );
msg = "Buah, diese Leiche war zweifellos nicht besonders gesund.\n";
} else {
- this_player()->heal_self( random(heal) );
+ ({int})this_player()->heal_self( random(heal) );
msg = "Hmmm, lecker!\n";
}
return msg;
@@ -274,7 +274,7 @@
if ( !str || !id(str) )
return 0;
- if (this_player()->QueryProp(P_GHOST))
+ if (({int})this_player()->QueryProp(P_GHOST))
{
_notify_fail("Das wuerde durch Dich hindurch fallen.\n");
return 0;
@@ -290,7 +290,7 @@
write("Du bekommst von der Leiche nicht einen Bissen mehr runter.\n");
} else if (gegessen >= nahrung_aktuell) {
// spieler kann die gesamte Leiche essen, also entfernen.
- this_player()->eat_food(nahrung_aktuell);
+ ({int})this_player()->eat_food(nahrung_aktuell);
// Verdammt. eat_food() kann TP umgebracht haben und im Falle eines NPC
// ist der dann weg.
if (objectp(this_player())) {
@@ -303,7 +303,7 @@
remove();
} else {
// Auch teilweise Verspeisung ist moeglich, nahrung_aktuell anpassen
- this_player()->eat_food(gegessen);
+ ({int})this_player()->eat_food(gegessen);
if (objectp(this_player())) {
write(mampf_heilung(gegessen)+"Leider bist Du nicht in der Lage,"
" alles aufzuessen.\n");
@@ -342,15 +342,15 @@
switch ( str[0] )
{
case ':':
- "/std/corpse"->ChannelMessageJeer( PL, str[1..], MSG_EMOTE );
+ ({void})"/std/corpse"->ChannelMessageJeer( PL, str[1..], MSG_EMOTE );
break;
case ';':
- "/std/corpse"->ChannelMessageJeer( PL, str[1..], MSG_GEMOTE );
+ ({void})"/std/corpse"->ChannelMessageJeer( PL, str[1..], MSG_GEMOTE );
break;
default:
- "/std/corpse"->ChannelMessageJeer( PL, str, MSG_SAY );
+ ({void})"/std/corpse"->ChannelMessageJeer( PL, str, MSG_SAY );
break;
}
@@ -364,7 +364,7 @@
void ChannelMessageJeer( mixed sender, string text, int flag )
{
if (member(inherit_list(previous_object()),CORPSE_OBJ)>-1)
- CHMASTER->send( "Moerder", sender, text, flag );
+ ({int})CHMASTER->send( "Moerder", sender, text, flag );
}
@@ -703,7 +703,7 @@
if ( stringp(msg) )
msg = sprintf( msg, killer || "Moerder" );
- CHMASTER->send( "Moerder", this_object(), funcall(msg) );
+ ({int})CHMASTER->send( "Moerder", this_object(), funcall(msg) );
rueck = previous_object(i);
}
@@ -717,12 +717,12 @@
}
void transform_into_pile() {
- if( environment()->QueryProp(P_PREVENT_PILE) ) return;
+ if( ({int})environment()->QueryProp(P_PREVENT_PILE) ) return;
object* inv = all_inventory();
if( sizeof(inv)<2 ) return;
object p = clone_object(PILE_OBJ);
filter_objects( inv, "move", p, M_SILENT | M_NOCHECK );
- p->move( environment(), M_SILENT | M_NOCHECK );
+ ({int})p->move( environment(), M_SILENT | M_NOCHECK );
}
// Verhindert die Zerstoerung im reset() von Containern, die mit
diff --git a/std/gilden_ob.c b/std/gilden_ob.c
index 7b0a565..3435ba4 100644
--- a/std/gilden_ob.c
+++ b/std/gilden_ob.c
@@ -57,7 +57,7 @@
if (intp(cond)) {
_notify_fail("Dir fehlt noch die noetige Erfahrung. "+
"Komm spaeter wieder.\n");
- return (this_player()->QueryProp(P_XP)>=cond);
+ return (({int})this_player()->QueryProp(P_XP)>=cond);
}
if (mappingp(cond)) {
res=check_restrictions(this_player(),cond);
@@ -98,19 +98,19 @@
if (mappingp(ti))
ti=ti[lv];
if (stringp(ti))
- pl->SetProp(P_GUILD_TITLE,ti);
+ ({string})pl->SetProp(P_GUILD_TITLE,ti);
// Spielertitel nullen, damit der Gildentitel angezeigt wird.
if (!IS_SEER(pl) && !FAO_HAS_TITLE_GIFT(pl))
- pl->SetProp(P_TITLE,0);
+ ({string})pl->SetProp(P_TITLE,0);
}
void do_advance() {
int lv;
- lv=this_player()->QueryProp(P_GUILD_LEVEL)+1;
+ lv=({int})this_player()->QueryProp(P_GUILD_LEVEL)+1;
if (lv<1) lv=1;
- this_player()->SetProp(P_GUILD_LEVEL,lv);
+ ({int})this_player()->SetProp(P_GUILD_LEVEL,lv);
adjust_title(this_player());
}
@@ -135,7 +135,7 @@
if (erg=({int})GUILDMASTER->beitreten()) {
if (erg<0)
return erg;
- if (!(this_player()->QueryProp(P_GUILD_LEVEL)))
+ if (!(({int})this_player()->QueryProp(P_GUILD_LEVEL)))
try_advance(); // Level 1 wird sofort vergeben
return 1;
}
@@ -369,7 +369,7 @@
spell=lower_case(spell);
if (!(ski=QuerySpell(spell)))
return 0;
- if (pl->QuerySkill(spell)) {
+ if (({mapping})pl->QuerySkill(spell)) {
_notify_fail("Du kannst diesen Spruch doch schon!\n");
return 0;
}
@@ -384,7 +384,7 @@
write("Du lernst einen neuen Zauberspruch.\n");
if (!(diff=GetFValueO(SI_DIFFICULTY,ski,pl)))
diff=GetFValueO(SI_SPELLCOST,ski,pl);
- pl->ModifySkill(spell,abil,diff);
+ ({void})pl->ModifySkill(spell,abil,diff);
return 1;
}
@@ -406,7 +406,7 @@
skill=capitalize(skill);
if (!(ski=QuerySkill(skill)))
return 0;
- if (pl->QuerySkill(skill)) {
+ if (({mapping})pl->QuerySkill(skill)) {
_notify_fail("Du hast diese Faehigkeit doch schon!\n");
return 0;
}
@@ -421,7 +421,7 @@
if (abil<-MAX_ABILITY) abil=-MAX_ABILITY;
write("Du erwirbst eine neue Faehigkeit.\n");
diff=GetFValueO(SI_DIFFICULTY,ski,pl);
- pl->ModifySkill(skill,abil,diff);
+ ({void})pl->ModifySkill(skill,abil,diff);
return 1;
}
diff --git a/std/lightsource.c b/std/lightsource.c
index 129121d..f45d510 100644
--- a/std/lightsource.c
+++ b/std/lightsource.c
@@ -123,7 +123,7 @@
// Der Zweck heiligt ja bekanntlich die Mittel. ;-)
//
// Tiamak
- env->_set_last_content_change();
+ ({int})env->_set_last_content_change();
call_time = (fuel < CALL_OUT_TIME)? fuel : CALL_OUT_TIME ;
call_out( "out_of_fuel", call_time ) ;
if( ({int})PL->QueryProp(P_PLAYER_LIGHT) == 1 )
@@ -171,7 +171,7 @@
// Der Zweck heiligt ja bekanntlich die Mittel. ;-)
//
// Tiamak
- env->_set_last_content_change();
+ ({int})env->_set_last_content_change();
if ( ({int})this_player()->QueryProp(P_PLAYER_LIGHT) == 0 )
{
write( "Es wird dunkel.\n" ) ;
@@ -196,6 +196,7 @@
if( !lighted )
return FALSE ;
+
if( ( ti = remove_call_out( "out_of_fuel" ) ) == -1 )
ti = 0 ;
@@ -204,7 +205,7 @@
env=this_object();
while (objectp(env=environment(env)))
// Kommentar siehe oben ;^)
- env->_set_last_content_change();
+ ({int})env->_set_last_content_change();
if( fuel <= 0 ) test_remove() ;
return TRUE ;
}
@@ -224,7 +225,7 @@
env=this_object();
while (objectp(env=environment(env)))
// Immer noch nicht wirklich sauber. Aber Begruendung siehe oben.
- env->_set_last_content_change();
+ ({int})env->_set_last_content_change();
if (environment())
{
@@ -232,11 +233,11 @@
{
inv=(users() & all_inventory(environment(environment())))-({ environment() });
for (i=sizeof(inv)-1; i>=0; i--)
- if (inv[i]->QueryProp(P_PLAYER_LIGHT)<=0)
- tell_object(inv[i], "Es wird dunkel, als " + environment()->name(WESSEN) +
+ if (({int})inv[i]->QueryProp(P_PLAYER_LIGHT)<=0)
+ tell_object(inv[i], "Es wird dunkel, als " + ({string})environment()->name(WESSEN) +
" " + QueryProp(P_NAME) + " erlischt.\n" ) ;
else tell_object(inv[i], CAP( name( WER, 0 ) ) + " erlischt.\n" ) ;
- if (environment()->QueryProp(P_PLAYER_LIGHT)<=0)
+ if (({int})environment()->QueryProp(P_PLAYER_LIGHT)<=0)
tell_object(environment(),
CAP( name( WER, 1 ) ) + " erlischt, und es wird dunkel.\n" ) ;
else tell_object(environment(), CAP( name( WER, 1 ) ) + " erlischt.\n" ) ;
@@ -245,7 +246,7 @@
{
inv=(users() & all_inventory(environment()));
for (i=sizeof(inv)-1; i>=0; i--)
- if (inv[i]->QueryProp(P_PLAYER_LIGHT)<=0)
+ if (({int})inv[i]->QueryProp(P_PLAYER_LIGHT)<=0)
tell_object(inv[i], "Es wird dunkel, als " + name(WER,1)
+ " erlischt.\n" ) ;
else tell_object(inv[i], CAP( name( WER, 0 ) ) + " erlischt.\n" ) ;
diff --git a/std/living/life.c b/std/living/life.c
index 7feb2c2..554a702 100644
--- a/std/living/life.c
+++ b/std/living/life.c
@@ -140,7 +140,7 @@
// ---------------------------------------
// 2
//
- object *inv = enemy->TeamMembers();
+ object *inv = ({object*})enemy->TeamMembers();
if ( pointerp(inv) )
{
present_enemies=m_allocate(sizeof(inv), 1);
@@ -179,7 +179,7 @@
}
if ( !total_damage )
{
- enemy->AddExp(exp_to_give);
+ ({int})enemy->AddExp(exp_to_give);
}
else
{
@@ -216,15 +216,15 @@
&& living(enemy)
&& !QueryProp(P_ENABLE_IN_ATTACK_OUT))
{
- al=time()-enemy->QueryProp(P_LAST_MOVE);
+ al=time()-({int})enemy->QueryProp(P_LAST_MOVE);
if (al<3) // Erste Kampfrunde nach Betreten des Raumes?
dam/=(4-al); // Gegen Rein-Feuerball-Raus-Taktik
}
if ( QueryProp(P_GHOST) || QueryProp(P_NO_ATTACK) || (dam<=0)
|| ( objectp(enemy)
- && ( enemy->QueryProp(P_GHOST)
- || enemy->QueryProp(P_NO_ATTACK) ) ) )
+ && ( ({int})enemy->QueryProp(P_GHOST)
+ || ({int|string})enemy->QueryProp(P_NO_ATTACK) ) ) )
return 0;
hit_point = QueryProp(P_HP)-dam;
@@ -232,7 +232,7 @@
if ( QueryProp(P_XP) && objectp(enemy) )
{
if ( !QueryProp(P_NO_XP) )
- enemy->AddExp(dam*({int})QueryProp(P_TOTAL_WC)/10);
+ ({int})enemy->AddExp(dam*({int})QueryProp(P_TOTAL_WC)/10);
}
if (living(enemy)) {
@@ -246,7 +246,7 @@
// nur wenn gegner NPC ist und noch nicht drinsteht: Daten aus
// P_HELPER_NPC auswerten
if (!member(enemy_damage,enemy) && !query_once_interactive(enemy)) {
- mixed helper = enemy->QueryProp(P_HELPER_NPC);
+ mixed helper = ({mixed})enemy->QueryProp(P_HELPER_NPC);
if (pointerp(helper) && objectp(helper[0]))
enemy_damage[enname,1] = helper[0];
}
@@ -260,7 +260,7 @@
//TODO: Warum nicht das ganze Zeug ins die() verlegen?
if ( enemy )
{
- enemy->StopHuntFor(ME,1);
+ ({int})enemy->StopHuntFor(ME,1);
if ( !QueryProp(P_NO_XP) )
DistributeExp(enemy,QueryProp(P_XP)/100);
if ( !query_once_interactive(ME) )
@@ -268,13 +268,13 @@
"[%s] %s, XP: %d, HP*WC: %d, Killer: %s\n",
dtime(time()), object_name(ME), (QueryProp(P_XP)/100),
QueryProp(P_TOTAL_WC)*QueryProp(P_MAX_HP)/10,
- enemy->name()||"NoName" ));
- al = QueryProp(P_ALIGN)/50 + enemy->QueryProp(P_ALIGN)/200;
+ ({string})enemy->name()||"NoName" ));
+ al = QueryProp(P_ALIGN)/50 + ({int})enemy->QueryProp(P_ALIGN)/200;
if (al>20)
al=20;
else if(al<-20)
al=-20;
- enemy->SetProp(P_ALIGN,enemy->QueryProp(P_ALIGN)-al);
+ ({int})enemy->SetProp(P_ALIGN,({int})enemy->QueryProp(P_ALIGN)-al);
}
SetProp(P_KILLER, enemy);
@@ -296,10 +296,10 @@
// Pruefung auf zerstoerte Objekte, da einige sich evtl. im NotifyPlayerDeath()
// zerstoeren.
while ( i && get_eval_cost() > 300000 )
- if ( objectp(obs[--i]) && !obs[i]->QueryProp(P_NEVERDROP) )
+ if ( objectp(obs[--i]) && !({int})obs[i]->QueryProp(P_NEVERDROP) )
// Jetzt wird's noch etwas teurer mit catch() - aber manche Sachen
// duerfen einfach nicht buggen
- catch( obs[i]->move( dest, flag );publish );
+ catch( ({int})obs[i]->move( dest, flag );publish );
if ( i > 0 )
// Zuviel Rechenzeit verbraten, es muessen noch Objekte bewegt werden
@@ -359,7 +359,7 @@
return 0;
while (killer && !query_once_interactive(killer))
- killer = killer->QueryUser();
+ killer = ({object})killer->QueryUser();
return killer;
}
@@ -374,9 +374,9 @@
mixed *fr;
int i,j,sz;
- if ( pointerp(obs=pl->TeamMembers()) && (member(obs,pl)>=0) )
+ if ( pointerp(obs=({object*})pl->TeamMembers()) && (member(obs,pl)>=0) )
{
- if ( !pointerp(fr=pl->PresentTeamRows())
+ if ( !pointerp(fr=({mixed})pl->PresentTeamRows())
|| !sizeof(fr)
|| !pointerp(fr=fr[0])) // Erste Reihe des Teams
fr=({});
@@ -413,11 +413,11 @@
&& query_idle(ob)<600 // gegen Leute die sich nur mitschleppen lassen
&& environment(ob)==environment(pl) // Nur anwesende Teammitglieder
&& !IS_LEARNER(ob)
-// && !ob->QueryProp(P_TESTPLAYER)
- && !(SCOREMASTER->HasKill(ob,ME)) )
- return SCOREMASTER->GiveKill(ob,npcnum),ob;
+// && !({int|string})ob->QueryProp(P_TESTPLAYER)
+ && !(({int})SCOREMASTER->HasKill(ob,ME)) )
+ return ({int})SCOREMASTER->GiveKill(ob,npcnum),ob;
- return SCOREMASTER->GiveKill(pl,npcnum),pl;
+ return ({int})SCOREMASTER->GiveKill(pl,npcnum),pl;
}
// zum ueberschreiben in Spielern
@@ -452,7 +452,7 @@
&& intp(res[0]) && time()<res[0]
&& objectp(res[1]) && stringp(res[2]) )
{
- if ( res = call_other( res[1], res[2], poisondeath ) ) {
+ if ( res = ({mixed})call_other( res[1], res[2], poisondeath ) ) {
SetProp(P_KILLER,0);
return;
}
@@ -503,12 +503,12 @@
ctime(time()),
capitalize(getuid(killer)),
query_wiz_level(killer),
- killer->QueryProp(P_LEVEL),
+ ({int})killer->QueryProp(P_LEVEL),
capitalize(getuid(ME)),
query_wiz_level(ME),
QueryProp(P_LEVEL) ) );
- killer->SetProp( P_KILLS, -1 );
+ ({int})killer->SetProp( P_KILLS, -1 );
}
}
@@ -521,18 +521,18 @@
if ( killer && query_once_interactive(killer) )
{
- if (stringp(res=killer->QueryProp(P_GUILD))
+ if (stringp(res=({string})killer->QueryProp(P_GUILD))
&& objectp(res=find_object("/gilden/"+res)))
- res->NPC_Killed_By(killer);
+ ({void})res->NPC_Killed_By(killer);
if (environment())
- environment()->NPC_Killed_By(killer);
+ ({void})environment()->NPC_Killed_By(killer);
res = QueryProp(P_XP);
res = (res < SCORE_LOW_MARK) ? 0 : ((res > SCORE_HIGH_MARK) ? 2 : 1);
if ( !QueryProp(P_NO_SCORE) && !IS_LEARNER(killer) &&
// !killer->QueryProp(P_TESTPLAYER) &&
- pointerp( res = SCOREMASTER->QueryNPC(res)) )
+ pointerp( res = ({mixed})SCOREMASTER->QueryNPC(res)) )
GiveKillScore( killer, res[0] );
}
}
@@ -570,8 +570,8 @@
else
// sonst in die Leiche legen.
{
- corpse->Identify(ME);
- corpse->move( environment(), M_NOCHECK|M_SILENT );
+ ({void})corpse->Identify(ME);
+ ({int})corpse->move( environment(), M_NOCHECK|M_SILENT );
// Magier oder Testspieler behalten ihre Ausruestung.
// Sonst kaemen u.U. Spieler an Magiertools etc. heran
if ( !(IS_LEARNER(ME) || (tmp = Query(P_TESTPLAYER)) &&
@@ -585,7 +585,7 @@
if ( query_once_interactive(ME) ) {
Set( P_DEADS, Query(P_DEADS) + 1 );
// Spieler-Tod-event ausloesen
- EVENTD->TriggerEvent(EVT_LIB_PLAYER_DEATH, ([
+ ({int})EVENTD->TriggerEvent(EVT_LIB_PLAYER_DEATH, ([
E_OBJECT: ME, E_PLNAME: getuid(ME),
E_ENVIRONMENT: environment(), E_TIME: time(),
P_KILLER: QueryProp(P_KILLER),
@@ -617,8 +617,8 @@
P_RACE: QueryProp(P_RACE),
P_CLASS: QueryProp(P_CLASS),
]);
- EVENTD->TriggerEvent(EVT_LIB_NPC_DEATH(""), data);
- EVENTD->TriggerEvent(
+ ({int})EVENTD->TriggerEvent(EVT_LIB_NPC_DEATH(""), data);
+ ({int})EVENTD->TriggerEvent(
EVT_LIB_NPC_DEATH(load_name(ME)), data);
}
@@ -768,11 +768,11 @@
log_file("REDUCE_HP", name()+" by ");
if(!this_player()) log_file("REDUCE_HP","?\n");
else {
- log_file("REDUCE_HP",this_player()->name());
+ log_file("REDUCE_HP",({string})this_player()->name());
o=previous_object();
if (o)
log_file("REDUCE_HP", " " + object_name(o) + ", " +
- o->name(WER,0) + " (" + creator(o) + ")\n");
+ ({string})o->name(WER,0) + " (" + creator(o) + ")\n");
else
log_file("REDUCE_HP", " ??\n");
}
@@ -1023,10 +1023,10 @@
// Gilde und Environment informieren ueber Alkoholauswirkung.
if ( stringp(gilde = QueryProp(P_GUILD))
&& objectp(ob = find_object( "/gilden/" + gilde )) )
- ob->InformAlcoholEffect( ME, n, ALC_EFFECT_AREA_GUILD );
+ ({void})ob->InformAlcoholEffect( ME, n, ALC_EFFECT_AREA_GUILD );
if ( environment() )
- environment()->InformAlcoholEffect( ME, n, ALC_EFFECT_AREA_ENV );
+ ({void})environment()->InformAlcoholEffect( ME, n, ALC_EFFECT_AREA_ENV );
}
// Alkohol abbauen und etwas extra heilen, falls erlaubt.
diff --git a/std/living/moving.c b/std/living/moving.c
index 78a1cf5..52d2b80 100644
--- a/std/living/moving.c
+++ b/std/living/moving.c
@@ -51,7 +51,7 @@
return;
SetProp(P_PURSUERS,({ pur[0], pur[1]+({ob})-({0}) }));
- ob->_SetPursued(ME);
+ ({void})ob->_SetPursued(ME);
}
public void RemovePursuer(object ob)
@@ -63,7 +63,7 @@
{
pur[1]-=({ob,0});
if (ob)
- ob->_RemovePursued(ME);
+ ({void})ob->_RemovePursued(ME);
if (!pur[0]&&!sizeof(pur[1]))
pur=0;
SetProp(P_PURSUERS,pur);
@@ -78,7 +78,7 @@
pur=({0,({})});
else
if (objectp(pur[0]))
- pur[0]->RemovePursuer(ME);
+ ({void})pur[0]->RemovePursuer(ME);
pur[0]=ob;
pur[1]-=({0});
Set(P_PURSUERS,pur);
@@ -100,10 +100,10 @@
private void kampfende( object en ) {
if (!objectp(en)) return;
- tell_object( ME, capitalize(en->name()) +
+ tell_object( ME, capitalize(({string})en->name()) +
" ist jetzt hinter Dir her.\n" );
tell_object( en, "Du verfolgst jetzt " + name(WEN) + ".\n" );
- en->InsertSingleEnemy(ME);
+ ({int})en->InsertSingleEnemy(ME);
}
private int _is_learner(object pl) {
@@ -120,9 +120,9 @@
if ((method&M_NOCHECK)) {
// erst PreventLeaveLiving() rufen...
if(environment())
- environment()->PreventLeaveLiving(this_object(), dest);
+ ({int})environment()->PreventLeaveLiving(this_object(), dest);
// dann PreventInsertLiving() im Ziel-Env.
- dest->PreventInsertLiving(this_object());
+ ({int})dest->PreventInsertLiving(this_object());
// und raus...
return(0);
}
@@ -139,17 +139,17 @@
// alte und neue Umgebung auf NO_TPORT pruefen.
if ( (method & M_TPORT) ) {
if ( environment() &&
- (environment()->QueryProp(P_NO_TPORT) & (NO_TPORT_OUT|NO_TPORT)) )
+ (({int})environment()->QueryProp(P_NO_TPORT) & (NO_TPORT_OUT|NO_TPORT)) )
return ME_CANT_TPORT_OUT;
- else if ( dest->QueryProp(P_NO_TPORT) & (NO_TPORT_IN|NO_TPORT) )
+ else if ( ({int})dest->QueryProp(P_NO_TPORT) & (NO_TPORT_IN|NO_TPORT) )
return ME_CANT_TPORT_IN;
}
// erst PreventLeaveLiving() testen...
- if( environment() && environment()->PreventLeaveLiving(this_object(), dest))
+ if( environment() && ({int})environment()->PreventLeaveLiving(this_object(), dest))
return ME_CANT_LEAVE_ENV;
// dann PreventInsertLiving() im Ziel-Env
- if (dest->PreventInsertLiving(this_object()))
+ if (({int})dest->PreventInsertLiving(this_object()))
return ME_CANT_BE_INSERTED;
return 0;
@@ -178,7 +178,7 @@
&& objectp(ME)
&& QueryProp(P_TEAM_AUTOFOLLOW)
&& objectp( enem = IsTeamLeader() ) )
- enem->StartFollow(oldenv); // Teamverfolgung
+ ({void})enem->StartFollow(oldenv); // Teamverfolgung
}
@@ -227,7 +227,7 @@
!catch(tmp=({int})call_other(vc,"QueryValidObject",fn);
publish) && tmp>0)) &&
!catch(load_object(fn);publish) )) &&
- (!interactive(ME) || !fn->QueryProp(P_NO_PLAYERS) ||
+ (!interactive(ME) || !({int})fn->QueryProp(P_NO_PLAYERS) ||
(method & M_NOCHECK) || IS_LEARNER(ME) ||
(stringp(res = QueryProp(P_TESTPLAYER)) &&
IS_LEARNER( lower_case(res) ))) )
@@ -248,7 +248,7 @@
if ( pointerp(res) && sizeof(res) >= 3
&& intp(res[0]) && time()<res[0]
&& objectp(res[1]) && stringp(res[2]) ){
- if ( res = call_other( res[1], res[2], dest, method, direction,
+ if ( res = ({mixed})call_other( res[1], res[2], dest, method, direction,
textout, textin ) ){
if ( pointerp(res) && sizeof(res) == 5 ){
dest = res[0];
@@ -352,7 +352,7 @@
filter((QueryEnemies()[0] & all_inventory(oldenv))-({0}),
#'kampfende);
// Bugs im exit() sind ohne catch() einfach mist.
- catch(environment()->exit(ME, dest);publish);
+ catch(({void})environment()->exit(ME, dest);publish);
}
}
@@ -429,11 +429,11 @@
if (objectp(follower) && environment(follower)!=env) {
//meth=M_NOCHECK;
meth=M_GO;
- if (follower->Query(P_FOLLOW_SILENT))
+ if (({int})follower->Query(P_FOLLOW_SILENT))
meth|=M_SILENT|M_NO_SHOW;
- catch(r=follower->PreventFollow(env);publish);
+ catch(r=({int})follower->PreventFollow(env);publish);
if (!r)
- follower->move(env,meth);
+ ({int})follower->move(env,meth);
else if (r==2)
RemovePursuer(follower);
}
@@ -446,9 +446,9 @@
if (environment())
{
if ( objectp(team=Query(P_TEAM)) )
- catch(team->RemoveMember(ME);publish);
+ catch(({int})team->RemoveMember(ME);publish);
- environment()->NotifyRemove(ME);
+ ({void})environment()->NotifyRemove(ME);
}
destruct(ME);
return 1;
diff --git a/std/living/skills.c b/std/living/skills.c
index b9b7bfe..f7077a6 100644
--- a/std/living/skills.c
+++ b/std/living/skills.c
@@ -116,14 +116,14 @@
return 1; // Die sollten problemlos aendern duerfen
if ( file_size("/gilden/access_rights")>0
- && call_other("/gilden/access_rights",
+ && ({int})call_other("/gilden/access_rights",
"access_rights",
getuid(previous_object()),
gilde+".c"))
return 1; // Setzendes Objekt kommt vom Gildenprogrammierer
if ( file_size("/gilden/"+gilde+".c")>0
- && call_other("/gilden/"+gilde,
+ && ({int})call_other("/gilden/"+gilde,
"valid_setskills",
explode(fn,"#")[0]) )
return 1; // Die Gilde selber kann Ausnahmen zulassen
@@ -140,7 +140,7 @@
if ( IS_ARCH(this_interactive()) )
return 1; // Erzmagier duerfen immer aendern
- if ( call_other("/gilden/access_rights",
+ if ( ({int})call_other("/gilden/access_rights",
"access_rights",
getuid(this_interactive()),
gilde+".c"))
@@ -159,7 +159,7 @@
this_interactive(),
gilde,
( this_interactive() ? query_verb() + " " +
- this_interactive()->_unparsed_args() : "") ));
+ ({string})this_interactive()->_unparsed_args() : "") ));
return 0;
}
diff --git a/std/player/skills.c b/std/player/skills.c
index cdac73e..390ad77 100644
--- a/std/player/skills.c
+++ b/std/player/skills.c
@@ -47,7 +47,7 @@
foreach(string guild:
({string *})call_other(GUILDMASTER,"QueryProp",P_VALID_GUILDS))
{
- if(catch(act=call_other("/gilden/"+guild,"QueryProp",
+ if(catch(act=({mapping})call_other("/gilden/"+guild,"QueryProp",
P_GUILD_DEACTIVATE_SKILLS); publish ))
log_file("WEAPON_SKILLS", sprintf ("%s: Gilde nicht ladbar: "
+"TP: %O, TI: %O, PO: %O, Gilde: %s\n", dtime(time()),
@@ -223,10 +223,10 @@
WT_SPEAR : 6,
WT_CLUB : 1,
WT_WHIP : 9,
- WT_STAFF : 7])[sinfo[P_WEAPON]->QueryProp(P_WEAPON_TYPE)];
+ WT_STAFF : 7])[({string})sinfo[P_WEAPON]->QueryProp(P_WEAPON_TYPE)];
- val = sinfo[SI_SKILLABILITY]*(sinfo[P_WEAPON]->QueryProp(P_WC)*
+ val = sinfo[SI_SKILLABILITY]*(({int})sinfo[P_WEAPON]->QueryProp(P_WC)*
(w*QueryAttribute(A_DEX)+
(10-w)*QueryAttribute(A_STR))/700)
/MAX_ABILITY;
@@ -239,7 +239,7 @@
previous_object(), val,
QueryAttribute(A_DEX),
QueryAttribute(A_STR), sinfo[P_WEAPON],
- sinfo[P_WEAPON]->QueryProp(P_WC)));
+ ({int})sinfo[P_WEAPON]->QueryProp(P_WC)));
val = 85;
}
@@ -276,7 +276,7 @@
|| (!random(300) && sinfo[SI_SKILLABILITY]<MAX_ABILITY))
{
enemy=sinfo[SI_ENEMY];
- if (objectp(enemy) && (enemy->QueryProp(P_XP)>0))
+ if (objectp(enemy) && (({int})enemy->QueryProp(P_XP)>0))
{
object ausbilder;
// log_file("humni/log_wurm","Haut: %s und zwar %s, mit xp %d\n",geteuid(this_object()),to_string(enemy),enemy->QueryProp(P_XP));
@@ -293,7 +293,7 @@
object waf_aus,waf_azu;
waf_azu=QueryProp(P_WEAPON);
- waf_aus=call_other(ausbilder,"QueryProp",P_WEAPON);
+ waf_aus=({object})call_other(ausbilder,"QueryProp",P_WEAPON);
//wt_azu=call_other(waf_azu,"QueryProp",P_WEAPON_TYPE);
//wt_aus=call_other(waf_aus,"QueryProp",P_WEAPON_TYPE);
@@ -332,7 +332,7 @@
{ int abil,val;
if (!mappingp(sinfo) || !dam || !objectp(sinfo[P_WEAPON]) ||
- (sinfo[P_WEAPON]->QueryProp(P_SHOOTING_WC))<5)
+ (({int})sinfo[P_WEAPON]->QueryProp(P_SHOOTING_WC))<5)
return 0;
abil=sinfo[SI_SKILLABILITY]+sinfo[OFFSET(SI_SKILLABILITY)];
@@ -559,7 +559,7 @@
if ( !t && query_once_interactive(this_object())
&& objectp(g=find_object("/gilden/"+gilde)) )
{
- g->adjust_title(this_object());
+ ({void})g->adjust_title(this_object());
SetProp(P_TITLE,0);
if ( !mappingp(titles=Query(P_GUILD_TITLE)) )
diff --git a/std/room/description.c b/std/room/description.c
index 9431d31..c1c3693 100644
--- a/std/room/description.c
+++ b/std/room/description.c
@@ -100,7 +100,7 @@
string|int transparency;
flags &= 3;
- if( IS_LEARNER(viewer) && viewer->QueryProp( P_WANTS_TO_LEARN ) )
+ if( IS_LEARNER(viewer) && ({int})viewer->QueryProp( P_WANTS_TO_LEARN ) )
descr = "[" + object_name(ME) + "]\n";
else
descr = "";
@@ -115,7 +115,7 @@
}
// ggf. Ausgaenge hinzufuegen.
- if ( viewer->QueryProp(P_SHOW_EXITS) && (!QueryProp(P_HIDE_EXITS)
+ if ( ({int})viewer->QueryProp(P_SHOW_EXITS) && (!QueryProp(P_HIDE_EXITS)
|| pointerp(QueryProp(P_HIDE_EXITS))) )
descr += GetExits(viewer) || "";
@@ -131,7 +131,7 @@
if(stringp(transparency)) descr += transparency;
else descr += "Ausserhalb siehst Du:\n";
- descr += environment()->int_short(viewer,ME);
+ descr += ({string})environment()->int_short(viewer,ME);
}
return descr;
@@ -158,8 +158,8 @@
if(IS_LEARNING(viewer))
descr[<1..<2]=" [" + object_name(ME) + "]";
- if ( ( viewer->QueryProp(P_SHOW_EXITS)
- || ( environment(viewer) == ME && !viewer->QueryProp(P_BRIEF) ) )
+ if ( ( ({int})viewer->QueryProp(P_SHOW_EXITS)
+ || ( environment(viewer) == ME && !({int})viewer->QueryProp(P_BRIEF) ) )
&& (!QueryProp(P_HIDE_EXITS) || pointerp(QueryProp(P_HIDE_EXITS))) )
descr += GetExits(viewer) || "";
diff --git a/std/room/gilde.c b/std/room/gilde.c
index 737dfc2..42f3b4c 100644
--- a/std/room/gilde.c
+++ b/std/room/gilde.c
@@ -106,8 +106,8 @@
int lvl;
if (PL && query_once_interactive(PL)
- && (lvl=PL->QueryProp(P_LEVEL)) <= 6
- && LEPMASTER->QueryLevel(PL->QueryProp(P_LEP)) > lvl)
+ && (lvl=({int})PL->QueryProp(P_LEVEL)) <= 6
+ && ({int})LEPMASTER->QueryLevel(({int})PL->QueryProp(P_LEP)) > lvl)
{
tell_object(PL,
"\nDu koenntest Deine Stufe mit \"erhoehe spieler\" hier in der Gilde "
@@ -160,10 +160,10 @@
{
int cond;
- cond=LEPMASTER->QueryReadyForWiz(this_player());
+ cond=({int})LEPMASTER->QueryReadyForWiz(this_player());
if (!silent)
- write(break_string(LEPMASTER->QueryReadyForWizText(this_player()),
+ write(break_string(({string})LEPMASTER->QueryReadyForWizText(this_player()),
78, 0, 1));
return cond;
@@ -173,9 +173,9 @@
{
string tmp;
- int lep = PL->QueryProp(P_LEP);
- int lvl = PL->QueryProp(P_LEVEL);
- int diff = LEPMASTER->QueryNextLevelLEP(lvl, lep);
+ int lep = ({int})PL->QueryProp(P_LEP);
+ int lvl = ({int})PL->QueryProp(P_LEVEL);
+ int diff = ({int})LEPMASTER->QueryNextLevelLEP(lvl, lep);
switch ( diff ) {
case 101..__INT_MAX__:
@@ -185,23 +185,23 @@
break;
case 81..100:
- tmp=kosten_0[PL->QueryProp(P_GUILD)] || kosten_0[0];
+ tmp=kosten_0[({string})PL->QueryProp(P_GUILD)] || kosten_0[0];
break;
case 61..80:
- tmp=kosten_20[PL->QueryProp(P_GUILD)] || kosten_20[0];
+ tmp=kosten_20[({string})PL->QueryProp(P_GUILD)] || kosten_20[0];
break;
case 41..60:
- tmp=kosten_40[PL->QueryProp(P_GUILD)] || kosten_40[0];
+ tmp=kosten_40[({string})PL->QueryProp(P_GUILD)] || kosten_40[0];
break;
case 21..40:
- tmp=kosten_60[PL->QueryProp(P_GUILD)] || kosten_60[0];
+ tmp=kosten_60[({string})PL->QueryProp(P_GUILD)] || kosten_60[0];
break;
case 1..20:
- tmp=kosten_80[PL->QueryProp(P_GUILD)] || kosten_80[0];
+ tmp=kosten_80[({string})PL->QueryProp(P_GUILD)] || kosten_80[0];
break;
default:
@@ -216,7 +216,7 @@
if (!IS_SEER(this_player())
&& ( (str == "lang") ||
- (this_player()->QueryProp(P_LEVEL) > 12 && str != "kurz"))) {
+ (({int})this_player()->QueryProp(P_LEVEL) > 12 && str != "kurz"))) {
seer_cond(0);
write (break_string("\nMit 'kosten kurz' kannst Du die Angabe der "
"Seher-Anforderungen unterdruecken.", 78,0,1));
@@ -236,7 +236,7 @@
if (lev<0) lev=0;
- if (pl->QueryProp(P_GENDER) == MALE)
+ if (({int})pl->QueryProp(P_GENDER) == MALE)
titles=QueryProp(P_GUILD_MALE_TITLES);
else
titles=QueryProp(P_GUILD_FEMALE_TITLES);
@@ -256,32 +256,32 @@
// drumrum, den advance() aus hysterischen Gruenden tut.
int try_player_advance(object pl) {
- if (PL->QueryProp(P_KILLS)>0)
+ if (({int})PL->QueryProp(P_KILLS)>0)
return -1;
- int level = pl->QueryProp( P_LEVEL );
+ int level = ({int})pl->QueryProp( P_LEVEL );
if (level == -1) level = 0;
- if (LEPMASTER->QueryNextLevelLEP(level, pl->QueryProp(P_LEP)) > 0)
+ if (({int})LEPMASTER->QueryNextLevelLEP(level, ({int})pl->QueryProp(P_LEP)) > 0)
return 0;
else
++level;
- pl->SetProp( P_LEVEL, level );
+ ({int})pl->SetProp( P_LEVEL, level );
// Aufstiegs-Event ausloesen
- EVENTD->TriggerEvent(EVT_LIB_ADVANCE, ([
+ ({int})EVENTD->TriggerEvent(EVT_LIB_ADVANCE, ([
E_OBJECT: PL, E_PLNAME: getuid(PL),
E_ENVIRONMENT: environment(PL),
- E_GUILDNAME: PL->QueryProp(P_GUILD),
- P_LEVEL: PL->QueryProp(P_LEVEL),
+ E_GUILDNAME: ({string})PL->QueryProp(P_GUILD),
+ P_LEVEL: ({int})PL->QueryProp(P_LEVEL),
]) );
// Falls die konkrete Gilde des Spielern irgedwas mit dem Titel in
// ABhaengigkeit des Spielerlevels tun will. Ausnahmsweise per call_other,
// die Funktion kommt eigentlich aus /std/gilden_ob.c.
string gname=({string})pl->QueryProp(P_GUILD);
- (GUILD_DIR+"/"+gname)->adjust_title(pl);
+ ({void})(GUILD_DIR+"/"+gname)->adjust_title(pl);
return 1;
}
@@ -307,18 +307,18 @@
"In diesem Fall kannst Du Deine Stufe nicht erhoehen.\n"+
"Bitte wende Dich an den Sheriff (oder einen Erzmagier) und bring "
"das in Ordnung.\n",78,BS_LEAVE_MY_LFS));
- say(break_string(PL->Name(WER)
+ say(break_string(({string})PL->Name(WER)
+ " hat soeben auf schmerzliche Weise erfahren muessen, dass "
"es wirklich nicht foerderlich ist, Mitspieler umzubringen.\n",
78), PL);
return 0;
}
- string name_of_player = PL->name(WER);
- int level = PL->QueryProp(P_LEVEL);
+ string name_of_player = ({string})PL->name(WER);
+ int level = ({int})PL->QueryProp(P_LEVEL);
say( name_of_player + " hat jetzt Stufe " + level + " erreicht.\n");
- string title = PL->QueryProp(P_TITLE);
+ string title = ({string})PL->QueryProp(P_TITLE);
switch(random(3)) {
case 0:
@@ -357,9 +357,9 @@
break;
}
- string str = QM->liste(this_player(), geloest_filter);
+ string str = ({string})QM->liste(this_player(), geloest_filter);
- this_player()->More( str, 0 );
+ ({void})this_player()->More( str, 0 );
return 1;
}
@@ -369,11 +369,11 @@
{
write("Ein Zauberspruch zieht vor Deinem geistigen Auge vorbei und Du\n"
"sprichst ihn nach.\n");
- say(PL->name()+" murmelt einen geheimen Zauberspruch und schwebt langsam\n"
+ say(({string})PL->name()+" murmelt einen geheimen Zauberspruch und schwebt langsam\n"
"zur Decke hinauf und verschwindet durch die Wand.\n");
write("Du schwebst langsam zur Decke hinauf und als ob diese nicht da\n"
"waere mitten hindurch in den Magiertreff.\n");
- return (PL->move("/secure/merlin", M_TPORT | M_SILENT ) >= 0);
+ return (({int})PL->move("/secure/merlin", M_TPORT | M_SILENT ) >= 0);
}
write("Du springst zur Decke hinauf und nix passiert.\n");
return 1;
diff --git a/std/shells/magier.c b/std/shells/magier.c
index efde69f..320b947 100644
--- a/std/shells/magier.c
+++ b/std/shells/magier.c
@@ -166,7 +166,7 @@
static string _query_race()
{
- if (previous_object() && previous_object()->query_login_object())
+ if (previous_object() && ({int})previous_object()->query_login_object())
return 0;
return Query(P_RACE) ? Query(P_RACE) : Set(P_RACE, "Magier");
@@ -304,7 +304,7 @@
if (str=="\\ESCAPE" && IS_LORD(this_object()))
{
__set_environment(this_object(),"/room/void");
- environment()->init();
+ ({void})environment()->init();
printf("You escaped.\n");
return "";
}
diff --git a/std/shells/magier/admin.c b/std/shells/magier/admin.c
index 64f3168..0dcac9f 100644
--- a/std/shells/magier/admin.c
+++ b/std/shells/magier/admin.c
@@ -89,7 +89,7 @@
if (!str) return 0;
if (sscanf(str,"%s %s",master,domain)!=2) return 0;
if (!master || !domain) return 0;
- if (!"/secure/master"->add_domain_master(master,domain))
+ if (!({int})"/secure/master"->add_domain_master(master,domain))
write("Hat nicht funktioniert.\n");
else
write("Ok.\n");
@@ -109,7 +109,7 @@
if (!str) return 0;
if (sscanf(str,"%s %s",master,domain)!=2) return 0;
if (!master || !domain) return 0;
- if (!"/secure/master"->remove_domain_master(master,domain))
+ if (!({int})"/secure/master"->remove_domain_master(master,domain))
write("Hat nicht funktioniert.\n");
else
write("Ok.\n");
@@ -130,7 +130,7 @@
if (!str) return 0;
if (sscanf(str, "%s %s", master, guild)!=2) return 0;
if (!master || !guild) return 0;
- if (!"/secure/master"->add_guild_master(master,guild))
+ if (!({int})"/secure/master"->add_guild_master(master,guild))
write("Hat nicht funktioniert.\n");
else
write ("Ok.\n");
@@ -150,7 +150,7 @@
if (!str) return 0;
if (sscanf(str, "%s %s", master, guild)!=2) return 0;
if (!master || !guild) return 0;
- if (!"/secure/master"->remove_guild_master(master,guild))
+ if (!({int})"/secure/master"->remove_guild_master(master,guild))
write("Hat nicht funktioniert.\n");
else
write("Ok.\n");
@@ -179,12 +179,12 @@
if ( arg=="?" )
{
- write(call_other("/secure/sinmaster","ListSinners"));
+ write(({string})call_other("/secure/sinmaster","ListSinners"));
return 1;
}
if ( arg=="!" )
{
- write(call_other("/secure/sinmaster","Dump"));
+ write(({string})call_other("/secure/sinmaster","Dump"));
return 1;
}
if ( arg=="*" )
@@ -200,7 +200,7 @@
{
if ( i<2 )
return 0;
- write(call_other("/secure/sinmaster","RemoveSin",
+ write(({string})call_other("/secure/sinmaster","RemoveSin",
lowerstring(parts[0][1..]),
to_int(parts[1])));
}
@@ -208,7 +208,7 @@
{
if ( i<2 )
return 0;
- write(call_other("/secure/sinmaster","AddSin",
+ write(({string})call_other("/secure/sinmaster","AddSin",
lowerstring(parts[0][1..]),
implode(parts[1..]," ")));
}
@@ -216,7 +216,7 @@
{
if ( i>1 )
return 0;
- write(call_other("/secure/sinmaster","ListSins",
+ write(({string})call_other("/secure/sinmaster","ListSins",
lowerstring(parts[0])));
}
return 1;
@@ -251,7 +251,7 @@
}
name=lower_case(name);
- "/secure/master"->BanishName( name, grund, force );
+ ({int})"/secure/master"->BanishName( name, grund, force );
return 1;
}
@@ -305,7 +305,7 @@
name = lower_case(name);
if ( !grund || !stringp(grund) || lower_case(grund) != "loeschen" ){
- "/secure/merlin"->MBanishInsert( name, grund, this_interactive() );
+ ({void})"/secure/merlin"->MBanishInsert( name, grund, this_interactive() );
write( "Du setzt "+capitalize(name)+" auf die MBanish-Liste.\n" );
}
else{
@@ -313,7 +313,7 @@
write( "Das duerfen nur Erzmagier.\n" );
return 1;
}
- "/secure/merlin"->MBanishDelete( name );
+ ({void})"/secure/merlin"->MBanishDelete( name );
write( "Du loescht "+capitalize(name)+" von der MBanish-Liste.\n" );
}
@@ -342,7 +342,7 @@
name = lower_case(name);
- if ( !"/secure/master"->TBanishName( name, days ) )
+ if ( !({int})"/secure/master"->TBanishName( name, days ) )
return 1;
if ( !days )
@@ -395,7 +395,7 @@
_notify_fail("Syntax: sbanish <numerische ip> <tage>\n");
- if ( sscanf( this_player()->_unparsed_args(), "%s %d", ip, days ) != 2 )
+ if ( sscanf( ({string})this_player()->_unparsed_args(), "%s %d", ip, days ) != 2 )
return 0;
if ( !ip || !sizeof(ip) )
diff --git a/std/shells/magier/comm.c b/std/shells/magier/comm.c
index 5263979..444efb3 100644
--- a/std/shells/magier/comm.c
+++ b/std/shells/magier/comm.c
@@ -51,7 +51,7 @@
}
msg=break_string(msg,78);
tell_object(ob,msg);
- printf("%s->%s",ob->Name(WEN),msg);
+ printf("%s->%s",({string})ob->Name(WEN),msg);
return 1;
}
diff --git a/std/shells/magier/magier_ext.c b/std/shells/magier/magier_ext.c
index 365ac63..926d0b2 100644
--- a/std/shells/magier/magier_ext.c
+++ b/std/shells/magier/magier_ext.c
@@ -154,7 +154,7 @@
static string _set_currentdir(string path)
{
Set(P_CURRENTDIR, path);
- this_object()->modify_prompt(); // Prompt mit neuem Pfad setzen, telnetneg
+ ({void})this_object()->modify_prompt(); // Prompt mit neuem Pfad setzen, telnetneg
return path;
}
@@ -212,7 +212,7 @@
static string _set_prompt(string prompt) {
Set(P_PROMPT, prompt, F_VALUE);
- this_object()->modify_prompt(); // neuen Prompt setzen (telnetneg.c)
+ ({void})this_object()->modify_prompt(); // neuen Prompt setzen (telnetneg.c)
return prompt;
}
@@ -292,7 +292,7 @@
"nicht moeglich.\n");
return 1;
}
- ob->start_player(capitalize(getuid(this_object())));
+ ({int})ob->start_player(capitalize(getuid(this_object())));
remove();
return 1;
}
@@ -451,7 +451,7 @@
QueryProp(P_MMSGOUT)),({ this_object() }));
if (inform=="e") {
// Logout-event ausloesen
- EVENTD->TriggerEvent(EVT_LIB_LOGOUT, ([
+ ({int})EVENTD->TriggerEvent(EVT_LIB_LOGOUT, ([
E_OBJECT: this_object(),
E_PLNAME: getuid(this_object()),
E_ENVIRONMENT: environment() ]) );
@@ -473,7 +473,7 @@
SetProp(P_INVIS, 0);
if (inform=="e") {
// Login-event ausloesen
- EVENTD->TriggerEvent(EVT_LIB_LOGIN, ([
+ ({int})EVENTD->TriggerEvent(EVT_LIB_LOGIN, ([
E_OBJECT: this_object(),
E_PLNAME: getuid(this_object()),
E_ENVIRONMENT: environment() ]) );
diff --git a/std/shells/magier/objects.c b/std/shells/magier/objects.c
index 1a51ba5..b93f6c7 100644
--- a/std/shells/magier/objects.c
+++ b/std/shells/magier/objects.c
@@ -67,8 +67,8 @@
if (!objectp(ob))
return printf("clone: %s: Objekt beim Erzeugen zerstoert.\n",
args[0]),1;
- if ((ob->move(this_object(),M_GET)>0) ||
- (!objectp(ob)||ob->move(environment(),M_NOCHECK)>0)||!objectp(ob))
+ if ((({int})ob->move(this_object(),M_GET)>0) ||
+ (!objectp(ob)||({int})ob->move(environment(),M_NOCHECK)>0)||!objectp(ob))
{
if (!objectp(ob))
return printf("clone: %s: Objekt beim Erzeugen zerstoert.\n",
@@ -118,11 +118,11 @@
}
else
ob=args[0];
- cmdline=capitalize(to_string(ob->name(WER)));
+ cmdline=capitalize(to_string(({string})ob->name(WER)));
flags=({int})ob->QueryProp(P_PLURAL); // Missbrauch von flags :o)
if (query_verb()=="destruct")
{
- if (!ob->remove())
+ if (!({int})ob->remove())
{
notify_fail(cmdline+" will nicht zerstoert werden!\n");
return 0;
diff --git a/std/shells/magier/parsing.c b/std/shells/magier/parsing.c
index a38210a..31d3429 100644
--- a/std/shells/magier/parsing.c
+++ b/std/shells/magier/parsing.c
@@ -285,7 +285,7 @@
}
// Normalisiertes Pfadarray besorgen
- string *patharray=master()->path_array(filename);
+ string *patharray=({string*})master()->path_array(filename);
// und daraus auch filename neu erzeugen
filename=implode(patharray, "/");
@@ -301,7 +301,7 @@
object *vrooms = ({});
if (vcompiler)
- vrooms = vcompiler->QueryObjects();
+ vrooms = ({object*})vcompiler->QueryObjects();
map(vrooms,#'_vc_map,&data);
}
diff --git a/std/shells/magier/players.c b/std/shells/magier/players.c
index a07c343..6c80ffe 100644
--- a/std/shells/magier/players.c
+++ b/std/shells/magier/players.c
@@ -87,7 +87,7 @@
if ( !pointerp(message) || sizeof(message) != 3 ){
tell_room(environment(),sprintf("%s beschwoert einen Blitz "
"vom Himmel.\n",capitalize(getuid())),({ this_object() }));
- printf("Du toetest %s.\n",opfer->name( WEN,2));
+ printf("Du toetest %s.\n",({string})opfer->name( WEN,2));
}
else
{
@@ -97,7 +97,7 @@
tell_object(opfer,_zap_message(message[2],opfer));
}
- opfer->die();
+ ({void})opfer->die();
return 1;
}
else{
@@ -121,7 +121,7 @@
mixed *pur = Query(P_PURSUERS);
if ( pointerp(pur) && sizeof(pur) && objectp(pur[0]) )
{
- pur[0]->RemovePursuer(this_object());
+ ({void})pur[0]->RemovePursuer(this_object());
ReceiveMsg("Verfolgungsmodus abgeschaltet.", MT_NOTIFICATION);
}
else
@@ -167,10 +167,10 @@
else
{
ReceiveMsg(sprintf(
- "Du verfolgst jetzt %s. [%s]", ziel->name(WEN), object_name(ziel)),
+ "Du verfolgst jetzt %s. [%s]", ({string})ziel->name(WEN), object_name(ziel)),
MT_NOTIFICATION, MA_MOVE);
- ziel->AddPursuer(this_object());
- ziel->TakeFollowers();
+ ({void})ziel->AddPursuer(this_object());
+ ({void})ziel->TakeFollowers();
}
}
else
@@ -201,10 +201,10 @@
}
if(living=find_living(livname))
{
- if (living->move(object_name(environment()),
+ if (({int})living->move(object_name(environment()),
M_TPORT|M_NOCHECK)<=0)
{
- printf("Teleportieren von %s fehlgeschlagen.\n",living->Name(WEM));
+ printf("Teleportieren von %s fehlgeschlagen.\n",({string})living->Name(WEM));
if (IS_LEARNER(living))
tell_object(living,sprintf("%s wollte Dich teleportieren, "
"hat aber versagt!\n",capitalize(getuid())));
@@ -215,7 +215,7 @@
"Du verlierst die Orientierung ...\n"
+(QueryProp(P_INVIS)?"":"%s holt Dich zu sich.\n"),
capitalize(getuid())));
- printf("%s wurde herbeizitiert.\n",living->Name(WER));
+ printf("%s wurde herbeizitiert.\n",({string})living->Name(WER));
return 1;
}
printf("Das Lebewesen '%s' konnte nicht gefunden werden.\n",
@@ -249,13 +249,13 @@
mapping enemies = ({mapping})obj->StopHuntingMode(1);
foreach(object en : enemies)
{
- en->StopHuntFor(obj, 1);
+ ({int})en->StopHuntFor(obj, 1);
tell_object(obj,sprintf("%s beendet Deinen Kampf mit %s.\n",
- capitalize(getuid()),en->Name(WEM)));
+ capitalize(getuid()),({string})en->Name(WEM)));
tell_object(en,sprintf("%s beendet Deinen Kampf mit %s.\n",
capitalize(getuid()),him));
}
- printf("%s und alle Gegner wurden befriedet.\n",obj->Name(WER));
+ printf("%s und alle Gegner wurden befriedet.\n",({string})obj->Name(WER));
}
return 1;
}
@@ -281,7 +281,7 @@
spieler = filter(users(),(: return !IS_LEARNER($1); :));
#endif
spieler = sort_array(spieler, function int (object a, object b)
- { return a->QueryProp(P_LEVEL) > b->QueryProp(P_LEVEL); } );
+ { return ({int})a->QueryProp(P_LEVEL) > ({int})b->QueryProp(P_LEVEL); } );
res = "Lvl Name Erfahrung QP Int Str Dex Con WC "
"AC HANDS HP (max)\n"
@@ -290,19 +290,19 @@
for (i=sizeof(spieler)-1; i>=0; i--)
res += sprintf("%3d %-12s %9d %5d %3d %3d %3d %3d %4d %4d %5d "
"%4d (%4d)\n",
- spieler[i]->QueryProp(P_LEVEL),
+ ({int})spieler[i]->QueryProp(P_LEVEL),
capitalize(getuid(spieler[i])),
- spieler[i]->QueryProp(P_XP),
- spieler[i]->QueryProp(P_QP),
- spieler[i]->QueryAttribute(A_INT),
- spieler[i]->QueryAttribute(A_STR),
- spieler[i]->QueryAttribute(A_DEX),
- spieler[i]->QueryAttribute(A_CON),
- spieler[i]->QueryProp(P_TOTAL_WC),
- spieler[i]->QueryProp(P_TOTAL_AC),
- (sizeof(hands=(({int *})spieler[i]->QueryProp(P_HANDS)))?hands[1]:0),
- spieler[i]->QueryProp(P_HP),
- spieler[i]->QueryProp(P_MAX_HP));
+ ({int})spieler[i]->QueryProp(P_XP),
+ ({int})spieler[i]->QueryProp(P_QP),
+ ({int})spieler[i]->QueryAttribute(A_INT),
+ ({int})spieler[i]->QueryAttribute(A_STR),
+ ({int})spieler[i]->QueryAttribute(A_DEX),
+ ({int})spieler[i]->QueryAttribute(A_CON),
+ ({int})spieler[i]->QueryProp(P_TOTAL_WC),
+ ({int})spieler[i]->QueryProp(P_TOTAL_AC),
+ (sizeof(hands=(({<int|string|string*>*})spieler[i]->QueryProp(P_HANDS)))?hands[1]:0),
+ ({int})spieler[i]->QueryProp(P_HP),
+ ({int})spieler[i]->QueryProp(P_MAX_HP));
More(res);
return 1;
}
@@ -324,14 +324,14 @@
if (!(living = find_living(living_name)))
return printf ("Ein Lebewesen namens '%s' konnte nicht gefunden werden!\n",
capitalize(living_name)),1;
- if (living->command_me(what))
+ if (({int})living->command_me(what))
{
printf("Du zwingst %s zu \"%s\".\n",capitalize(living_name),what);
if (!IS_ARCH(this_object()) &&
getuid()!=({string|int})living->QueryProp(P_TESTPLAYER))
log_file(SHELLLOG("ZWINGE"),
sprintf("%s zwingt %s (%s) zu %s [%s]\n",
- capitalize(getuid()),living->Name(),capitalize(getuid(living)),
+ capitalize(getuid()),({string})living->Name(),capitalize(getuid(living)),
what,dtime(time())));
}
else
@@ -360,7 +360,7 @@
}
lpv = ({int})ob->QueryProp(P_HP);
mpv = ({int})ob->QueryProp(P_SP);
- ob->heal_self(1000000);
+ ({void})ob->heal_self(1000000);
string|int testie = ({string|int})ob->QueryProp(P_TESTPLAYER);
if (!IS_LEARNER(ob)
&& (!testie || (to_string(testie)[<5..<1] == "Gilde")))
@@ -368,7 +368,7 @@
log_file(SHELLLOG("HEAL"),
sprintf("%s heilt %s (%s) %s (LP: %d -> %d, MP: %d -> %d)\n",
capitalize(geteuid(this_player())),
- call_other(ob,"name"), capitalize(geteuid(ob)),
+ ({string})call_other(ob,"name"), capitalize(geteuid(ob)),
dtime(time()), lpv, ({int})ob->QueryProp(P_HP),
mpv,({int})ob->QueryProp(P_SP)));
}
@@ -422,11 +422,11 @@
a=0;res="";
for(i=0; i<sizeof(list); i++) {
string name_;
- name_ = capitalize(list[i]->query_real_name()||"<logon>");
+ name_ = capitalize(({string})list[i]->query_real_name()||"<logon>");
res += sprintf( "%s%-15s%s %s%-13s%s %s%3d%s %s %s %s%s%s%s %s%s\n",
a_ipnum, query_ip_number(list[i]),a_end,a_name,
- (list[i]->QueryProp(P_INVIS)?"("+name_+")":name_),
- a_end,a_level, MASTER->get_wiz_level(getuid(list[i])),
+ (({int})list[i]->QueryProp(P_INVIS)?"("+name_+")":name_),
+ a_end,a_level, ({int})MASTER->get_wiz_level(getuid(list[i])),
a_end,a_age,
time2string("%4x %0X",(({int})list[i]->QueryProp(P_AGE))*2),
query_idle(list[i])>=300?(a++,(a_idle+"I")):" ",
@@ -522,10 +522,10 @@
foreach(object u: spieler)
{
- string second=u->QueryProp(P_SECOND);
+ string second=({string})u->QueryProp(P_SECOND);
if (stringp(second) && sizeof(second))
{
- if (!master()->find_userinfo(second))
+ if (!({int})master()->find_userinfo(second))
second = "*ungueltig*";
else
second = capitalize(second);
@@ -535,7 +535,7 @@
arg+=sprintf("%-11s %-17s %26s %-15s\n",
capitalize(getuid(u)), second,
- dtime(u->QueryProp(P_LAST_LOGIN)),
+ dtime(({int})u->QueryProp(P_LAST_LOGIN)),
_spieler_time2string(query_idle(u)));
}
arg+="==============================================================="
diff --git a/std/shells/magier/upd.c b/std/shells/magier/upd.c
index f48d73c..87a3030 100644
--- a/std/shells/magier/upd.c
+++ b/std/shells/magier/upd.c
@@ -39,7 +39,7 @@
{
if ( query_once_interactive(obj) )
{
- obj->move( inv_saver, NO_CHECK );
+ ({int})obj->move( inv_saver, NO_CHECK );
return obj;
}
return 0;
@@ -140,7 +140,7 @@
}
if (!(flags&UPD_H))
{
- if(err = catch(obj->remove()))
+ if(err = catch(({int})obj->remove()))
printf("upd: %s: remove() fehlgeschlagen. Aufruf von " +
"destruct().\n",file);
}
@@ -394,10 +394,10 @@
items=transpose_array(items)[0];
while (i--)
if (member(items, inv[i])==-1)
- inv[i]->move(inv_saver,NO_CHECK);
+ ({int})inv[i]->move(inv_saver,NO_CHECK);
}
else // In diesem Objekt sind keine Items gesetzt.
- while (i--) inv[i]->move(inv_saver,NO_CHECK);
+ while (i--) ({int})inv[i]->move(inv_saver,NO_CHECK);
}
}
else
@@ -453,7 +453,7 @@
_illegal_closure(pro[names[i], F_SET_METHOD]) )
m_delete( pro, names[i] );
- obj->SetProperties(pro);
+ ({mapping})obj->SetProperties(pro);
msg += ", Properties gesetzt";
}
// Wenn kein UPD_C, wird ggf. das Ergebnis von Configure() wieder
@@ -476,7 +476,7 @@
}
if (env)
{
- if ( obj->move( env, NO_CHECK ) <= 0 )
+ if ( ({int})obj->move( env, NO_CHECK ) <= 0 )
printf( "upd: /%O konnte nicht in /%O zurueckbewegt werden\n",
obj, env );
else
@@ -484,7 +484,7 @@
}
if (i=sizeof(inv))
{
- while(i--) if (inv[i]) inv[i]->move(obj, NO_CHECK );
+ while(i--) if (inv[i]) ({int})inv[i]->move(obj, NO_CHECK );
msg += ", Inhalt zurueckbewegt";
}
}
diff --git a/std/thing/commands.c b/std/thing/commands.c
index c3eddf6..157fe74 100644
--- a/std/thing/commands.c
+++ b/std/thing/commands.c
@@ -79,10 +79,10 @@
// Restriktionen vor dem Anzeigen pruefen.
if (mappingp(restr))
{
- string res = "/std/restriction_checker"->check_restrictions(PL,restr);
+ string res = ({string})"/std/restriction_checker"->check_restrictions(PL,restr);
if (res)
{
- PL->ReceiveMsg("Fuer " + name(WEN,1) + " darfst Du "
+ ({int})PL->ReceiveMsg("Fuer " + name(WEN,1) + " darfst Du "
"die Syntaxhilfe (noch) nicht lesen:\n"
+ res,
MT_NOTIFICATION|MSG_BS_LEAVE_LFS,
@@ -96,12 +96,12 @@
if (res)
{
if (intp(res))
- PL->ReceiveMsg("Fuer " + name(WEN,1) + " darfst Du "
+ ({int})PL->ReceiveMsg("Fuer " + name(WEN,1) + " darfst Du "
"die Syntaxhilfe (noch) nicht lesen.",
MT_NOTIFICATION|MSG_BS_LEAVE_LFS,
"syntaxhilfe",0,this_object());
else if (stringp(res))
- PL->ReceiveMsg(res,
+ ({int})PL->ReceiveMsg(res,
MT_NOTIFICATION|MSG_BS_LEAVE_LFS,
"syntaxhilfe",0,this_object());
return 1;
@@ -127,7 +127,7 @@
return 0;
}
if (stringp(help) && sizeof(help))
- PL->ReceiveMsg(help, MT_NOTIFICATION|MSG_BS_LEAVE_LFS,
+ ({int})PL->ReceiveMsg(help, MT_NOTIFICATION|MSG_BS_LEAVE_LFS,
"syntaxhilfe",0,this_object());
return 1;
diff --git a/std/thing/moving.c b/std/thing/moving.c
index 484b335..fbee070 100644
--- a/std/thing/moving.c
+++ b/std/thing/moving.c
@@ -26,8 +26,8 @@
// M_NOCHECK? -> Bewegung eh erlaubt (und Rueckgabewert wuerde ignoriert)
if ((method&M_NOCHECK)) {
// Bei M_NOCHECK zwar Prevent* aufrufen, aber das Resultat ignorieren
- if (oldenv) oldenv->PreventLeave(this_object(),dest);
- dest->PreventInsert(this_object());
+ if (oldenv) ({int})oldenv->PreventLeave(this_object(),dest);
+ ({int})dest->PreventInsert(this_object());
return 0; // das wars, rest ist egal.
}
@@ -51,15 +51,15 @@
}
// Ist das Zielobjekt schon voll?
- if ( !dest->MayAddObject(this_object()) )
+ if ( !({int})dest->MayAddObject(this_object()) )
return TOO_MANY_OBJECTS;
// Darf hinausbewegt werden?
- if ( oldenv && oldenv->PreventLeave(this_object(), dest) )
+ if ( oldenv && ({int})oldenv->PreventLeave(this_object(), dest) )
return ME_CANT_LEAVE_ENV;
// Darf hineinbewegt werden?
- if ( dest->PreventInsert(this_object()) )
+ if ( ({int})dest->PreventInsert(this_object()) )
return ME_CANT_BE_INSERTED;
return(0);
@@ -108,7 +108,7 @@
!catch(valid=({int})vc->QueryValidObject(fn);publish)
&& valid>0)) &&
!catch(load_object(fn);publish))) &&
- (!fn->QueryProp(P_NO_PLAYERS) || QueryProp(P_TESTPLAYER)) )
+ (!({int})fn->QueryProp(P_NO_PLAYERS) || ({int|string})QueryProp(P_TESTPLAYER)) )
dest = fn;
}
}
@@ -141,7 +141,7 @@
mixed *sens = QueryProp(P_SENSITIVE);
if (sens && environment())
{
- environment()->RemoveSensitiveObject( this_object() );
+ ({void})environment()->RemoveSensitiveObject( this_object() );
if (!objectp(ME))
return ME_WAS_DESTRUCTED;
}
@@ -156,16 +156,16 @@
NotifyMove(environment(), oldenv, method);
// Alte Umgebung informieren
- if (oldenv) oldenv->NotifyLeave(this_object(), dest);
+ if (oldenv) ({void})oldenv->NotifyLeave(this_object(), dest);
// Wenn das Objekt eine Umgebung hat, selbige informieren
if (environment()) {
if (sens)
{
- environment()->InsertSensitiveObject(this_object(),sens);
+ ({void})environment()->InsertSensitiveObject(this_object(),sens);
if (!objectp(ME)) return ME_WAS_DESTRUCTED;
}
- environment()->NotifyInsert(this_object(), oldenv);
+ ({void})environment()->NotifyInsert(this_object(), oldenv);
}
//wurde das Objekt vielleicht noch zerstoert?
if (!objectp(ME)) return(ME_WAS_DESTRUCTED);
@@ -179,8 +179,8 @@
{
if (environment() ) {
if(QueryProp(P_SENSITIVE))
- environment()->RemoveSensitiveObject(this_object());
- environment()->NotifyRemove(this_object());
+ ({void})environment()->RemoveSensitiveObject(this_object());
+ ({void})environment()->NotifyRemove(this_object());
}
if (objectp(this_object()))
destruct(this_object());
@@ -197,7 +197,7 @@
// Der Zweck heiligt ja bekanntlich die Mittel. ;-)
//
// Tiamak
- env->_set_last_content_change();
+ ({int})env->_set_last_content_change();
}
return 0;
}
diff --git a/std/util/executer.c b/std/util/executer.c
index bdd4b81..bdd10d2 100644
--- a/std/util/executer.c
+++ b/std/util/executer.c
@@ -14,7 +14,7 @@
return apply(fun, args);
if (stringp(fun))
- return call_other(this_object(), fun, args...);
+ return ({mixed})call_other(this_object(), fun, args...);
if ( pointerp(fun))
{
@@ -30,7 +30,7 @@
if ( !objectp(ob) || !stringp(fun[1]) )
return 0;
- return call_other(ob, fun[1], args...);
+ return ({mixed})call_other(ob, fun[1], args...);
}
return 0;
}
diff --git a/std/util/path.c b/std/util/path.c
index 00ceaa6..ba16e71 100644
--- a/std/util/path.c
+++ b/std/util/path.c
@@ -54,6 +54,6 @@
user = getuid(RPL || PL);
if (expand)
path=expand_path(path, user);
- return implode(master()->path_array(path), "/");
+ return implode(({string*})master()->path_array(path), "/");
}
diff --git a/std/weapon/combat.c b/std/weapon/combat.c
index d266acc..f26b1d8 100644
--- a/std/weapon/combat.c
+++ b/std/weapon/combat.c
@@ -257,7 +257,7 @@
// gleich auf eine WieldFunc zurueckgreifen zu muessen.
// Die Auswertung erfolgt ueber den RestrictionChecker
if ( (res=QueryProp(P_RESTRICTIONS)) && mappingp(res) &&
- (res=call_other("/std/restriction_checker","check_restrictions",
+ (res=({string})call_other("/std/restriction_checker","check_restrictions",
PL,res)) && stringp(res) )
{
notify_fail(res);
diff --git a/sys/magier.h b/sys/magier.h
index 544bcc7..5936311 100644
--- a/sys/magier.h
+++ b/sys/magier.h
@@ -30,9 +30,9 @@
#define FILE_DELETED "%s wurde geloescht.\n"
#define NO_DELETE "%s konnte nicht geloescht werden.\n"
-#define MAY_READ(x) call_other(__MASTER_OBJECT__,"valid_read",x,getuid(this_object()))
-#define MAY_WRITE(x) call_other(__MASTER_OBJECT__,"valid_write",x,getuid(this_object()))
-#define MAY_DELETE(x) call_other(__MASTER_OBJECT__,"remove_file",x,getuid(this_object()))
+#define MAY_READ(x) ({mixed})call_other(__MASTER_OBJECT__,"valid_read",x,getuid(this_object()))
+#define MAY_WRITE(x) ({mixed})call_other(__MASTER_OBJECT__,"valid_write",x,getuid(this_object()))
+#define MAY_DELETE(x) ({mixed})call_other(__MASTER_OBJECT__,"remove_file",x,getuid(this_object()))
#define MAXLEN 50000
diff --git a/sys/pager.h b/sys/pager.h
index fef652a..f30e749 100644
--- a/sys/pager.h
+++ b/sys/pager.h
@@ -51,9 +51,9 @@
#include <player/base.h>
#define PAGELENGTH (this_interactive() ? \
- this_interactive()->QueryProp(P_SCREENSIZE) : \
+ ({int})this_interactive()->QueryProp(P_SCREENSIZE) : \
(interactive(this_player()) ? \
- this_player()->QueryProp(P_SCREENSIZE) : 20))
+ ({int})this_player()->QueryProp(P_SCREENSIZE) : 20))
// old_explode() must create an array that implode()'s to the same string
#define Explode(s,x) (explode(s,x))