Aenderungen fuer wieder funktionierendes strict_types

- Deklarative Casts hinzugefuegt
- Typen gefixt

Change-Id: I44c6082d907efb241a35da248774809054f8c5ab
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;
 }