Example #1
0
 public static void flush_items(user thisuser)
 {
     foreach(item thisitem in MainClass.items)
     {
         if(thisitem.owner == thisuser)
         {
             thisuser.write("ITEM;OK;"+ thisitem.item_id + ";"+ thisitem.vnum);
         }
         else if(MainClass.inRange(thisitem.position.x,thisuser.position.x) &&
            MainClass.inRange(thisitem.position.y,thisuser.position.y) &&
            MainClass.inRange(thisitem.position.z,thisuser.position.z))
         {
             int x = thisitem.position.x;
             int y = thisitem.position.y;
             int z = thisitem.position.z;
             thisuser.write("ITEM;OK;"+ thisitem.item_id + ";"+ thisitem.vnum + ";"+ x + ";"+ y + ";"+ z);
         }
     }
 }