public item(int item_id, int vnum, user thisuser) { this.vnum = vnum; this.item_id = item_id; this.owner = thisuser; this.owner_id = thisuser.user_id; gamesrv.MainClass.say("ADDED ITEM: " + this.item_id + "; " + this.vnum); }
public static void closeConn(user user) { gamesrv.MainClass.say("[ KILLD ] [ " + user.user_id + " ]: TIME: " + unixtime()); gamesrv.MainClass.allusers.Remove(user); user.stream.Close(); List<user> list = allusers; allusers = new List<user>{}; foreach(user thisuser in list) { allusers.Add(thisuser); } }
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); } } }
public quest(int user_id, user user) { this.user_id = user_id; this.user = user; }