コード例 #1
0
        internal void Destroy()
        {
            Array.Clear(SqState, 0, SqState.Length);
            Array.Clear(SqFloorHeight, 0, SqFloorHeight.Length);
            Array.Clear(SqSeatRot, 0, SqSeatRot.Length);

            staticModel = null;
            Heightmap = null;
            SqState = null;
            SqFloorHeight = null;
            SqSeatRot = null;
        }
コード例 #2
0
ファイル: Gamemap.cs プロジェクト: Kristopher-RZ/Firewind
        public GameMap(Room room)
        {
            this.room = room;
            this.DiagonalEnabled = true;
            this.mStaticModel = FirewindEnvironment.GetGame().GetRoomManager().GetModel(room.ModelName, room.RoomId);
            if (mStaticModel == null)
                throw new Exception("No modeldata found for roomID " + room.RoomId);
            this.mDynamicModel = new DynamicRoomModel(this.mStaticModel);

            this.mCoordinatedItems = new Hashtable();

            this.mGameMap = new byte[Model.MapSizeX, Model.MapSizeY];
            this.mItemHeightMap = new double[Model.MapSizeX, Model.MapSizeY];
            _unitMap = new Hashtable();
        }
コード例 #3
0
        internal DynamicRoomModel(RoomModel pModel)
        {
            this.staticModel = pModel;
            this.DoorX       = staticModel.DoorX;
            this.DoorY       = staticModel.DoorY;
            this.DoorZ       = staticModel.DoorZ;

            this.DoorOrientation = staticModel.DoorOrientation;
            this.Heightmap       = staticModel.Heightmap;

            this.MapSizeX = staticModel.MapSizeX;
            this.MapSizeY = staticModel.MapSizeY;
            this.ClubOnly = staticModel.ClubOnly;

            Generate();
        }
コード例 #4
0
        internal DynamicRoomModel(RoomModel pModel)
        {
            this.staticModel = pModel;
            this.DoorX = staticModel.DoorX;
            this.DoorY = staticModel.DoorY;
            this.DoorZ = staticModel.DoorZ;

            this.DoorOrientation = staticModel.DoorOrientation;
            this.Heightmap = staticModel.Heightmap;

            this.MapSizeX = staticModel.MapSizeX;
            this.MapSizeY = staticModel.MapSizeY;
            this.ClubOnly = staticModel.ClubOnly;

            Generate();
        }
コード例 #5
0
ファイル: Gamemap.cs プロジェクト: TheNaked/Firewind
        public Gamemap(Room room)
        {
            this.room            = room;
            this.DiagonalEnabled = true;
            this.mStaticModel    = FirewindEnvironment.GetGame().GetRoomManager().GetModel(room.ModelName, room.RoomId);
            if (mStaticModel == null)
            {
                throw new Exception("No modeldata found for roomID " + room.RoomId);
            }
            this.mDynamicModel = new DynamicRoomModel(this.mStaticModel);

            this.mCoordinatedItems = new Hashtable();

            this.mGameMap       = new byte[Model.MapSizeX, Model.MapSizeY];
            this.mItemHeightMap = new double[Model.MapSizeX, Model.MapSizeY];
            userMap             = new Hashtable();
        }
コード例 #6
0
ファイル: Gamemap.cs プロジェクト: TheNaked/Firewind
        internal void Destroy()
        {
            userMap.Clear();
            mDynamicModel.Destroy();
            mCoordinatedItems.Clear();

            Array.Clear(mGameMap, 0, mGameMap.Length);
            Array.Clear(mUserItemEffect, 0, mUserItemEffect.Length);
            Array.Clear(mItemHeightMap, 0, mItemHeightMap.Length);

            userMap           = null;
            mGameMap          = null;
            mUserItemEffect   = null;
            mItemHeightMap    = null;
            mCoordinatedItems = null;
            mDynamicModel     = null;
            room         = null;
            mStaticModel = null;
        }
コード例 #7
0
ファイル: RoomData.cs プロジェクト: Kristopher-RZ/Firewind
        internal void Fill(DataRow Row)
        {
            this.Id = Convert.ToUInt32(Row["id"]);
            this.Name = (string)Row["caption"];
            this.Description = (string)Row["description"];
            this.Owner = (string)Row["owner"];
            this.Badge = (string)Row["badge"];
            this.OwnerId = 0;

            DataRow groupRow;
            using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor())
            {
                dbClient.setQuery("SELECT id FROM users WHERE username = '******'");
                int result = dbClient.getInteger();
                if(result > 0)
                    this.OwnerId = result;

            //    dbClient.setQuery("SELECT * FROM guild WHERE rooms_id = @id");
            //    dbClient.addParameter("id", Id);
            //    groupRow = dbClient.getRow();
            }

            //if(groupRow != null)
            //    Group = new Group(groupRow, new DataTable());

            switch (Row["state"].ToString().ToLower())
            {
                case "open":

                    this.State = 0;
                    break;

                case "password":

                    this.State = 2;
                    break;

                case "locked":
                default:

                    this.State = 1;
                    break;
            }

            this.Category = (int)Row["category"];
            if (!string.IsNullOrEmpty(Row["active_users"].ToString()))
                this.UsersNow = (int)Row["active_users"];
            else
                this.UsersNow = 0;
            this.UsersMax = (int)Row["users_max"];
            this.ModelName = (string)Row["model_name"];
            this.Score = (int)Row["score"];
            this.Tags = new List<string>();
            this.AllowPets = FirewindEnvironment.EnumToBool(Row["allow_pets"].ToString());
            this.AllowPetsEating = FirewindEnvironment.EnumToBool(Row["allow_pets_eat"].ToString());
            this.AllowWalkthrough = FirewindEnvironment.EnumToBool(Row["allow_walkthrough"].ToString());
            this.AllowRightsOverride = FirewindEnvironment.EnumToBool(Row["allow_rightsoverride"].ToString());
            this.Hidewall = FirewindEnvironment.EnumToBool(Row["allow_hidewall"].ToString());
            this.Password = (string)Row["password"];
            this.Wallpaper = (string)Row["wallpaper"];
            this.Floor = (string)Row["floor"];
            this.Landscape = (string)Row["landscape"];
            this.FloorThickness = Convert.ToInt32(Row["floorthickness"]);
            this.WallThickness = Convert.ToInt32(Row["wallthickness"]);
            this.GroupID = Convert.ToInt32(Row["groups_id"]);
            //this.Event = null;

            foreach (string Tag in Row["tags"].ToString().Split(','))
            {
                this.Tags.Add(Tag);
            }

            mModel = FirewindEnvironment.GetGame().GetRoomManager().GetModel(ModelName, Id);
        }
コード例 #8
0
ファイル: RoomData.cs プロジェクト: Kristopher-RZ/Firewind
        internal void FillNull(UInt32 pId)
        {
            this.Id = pId;
            this.Name = "Unknown Room";
            this.Description = "-";
            this.Owner = "-";
            this.Category = 0;
            this.UsersNow = 0;
            this.UsersMax = 0;
            this.ModelName = "NO_MODEL";
            this.Score = 0;
            this.Tags = new List<string>();
            this.AllowPets = true;
            this.AllowPetsEating = false;
            this.AllowWalkthrough = true;
            this.Hidewall = false;
            this.Password = "";
            this.Wallpaper = "0.0";
            this.Floor = "0.0";
            this.Landscape = "0.0";
            this.WallThickness = 0;
            this.FloorThickness = 0;
            //this.Event = null;
            this.Badge = "";
            this.AllowRightsOverride = false;

            mModel = FirewindEnvironment.GetGame().GetRoomManager().GetModel(ModelName, pId);
        }
コード例 #9
0
ファイル: RoomData.cs プロジェクト: Kristopher-RZ/Firewind
        internal void Fill(Room Room)
        {
            this.Id = Room.RoomId;
            this.Name = Room.Name;
            this.Description = Room.Description;
            this.Owner = Room.Owner;
            this.Category = Room.Category;
            this.State = Room.State;
            this.UsersNow = Room.UsersNow;
            this.UsersMax = Room.UsersMax;
            this.ModelName = Room.ModelName;
            this.Score = Room.Score;

            this.Tags = new List<string>();
            foreach (string tag in Room.Tags.ToArray())
                this.Tags.Add(tag);
            this.AllowPets = Room.AllowPets;
            this.AllowPetsEating = Room.AllowPetsEating;
            this.AllowWalkthrough = Room.AllowWalkthrough;
            this.Hidewall = Room.Hidewall;
            this.Password = Room.Password;
            this.Event = Room.Event;
            this.Wallpaper = Room.Wallpaper;
            this.Floor = Room.Floor;
            this.Landscape = Room.Landscape;
            this.FloorThickness = Room.FloorThickness;
            this.WallThickness = Room.WallThickness;
            this.GroupID = Room.Group != null ? Room.Group.ID : 0;

            mModel = FirewindEnvironment.GetGame().GetRoomManager().GetModel(ModelName, Id);
        }
コード例 #10
0
ファイル: Gamemap.cs プロジェクト: Kristopher-RZ/Firewind
        internal void Destroy()
        {
            _unitMap.Clear();
            mDynamicModel.Destroy();
            mCoordinatedItems.Clear();

            Array.Clear(mGameMap, 0, mGameMap.Length);
            Array.Clear(mUserItemEffect, 0, mUserItemEffect.Length);
            Array.Clear(mItemHeightMap, 0, mItemHeightMap.Length);

            _unitMap = null;
            mGameMap = null;
            mUserItemEffect = null;
            mItemHeightMap = null;
            mCoordinatedItems = null;
            mDynamicModel = null;
            room = null;
            mStaticModel = null;
        }
コード例 #11
0
        internal void Fill(DataRow Row)
        {
            this.Id          = Convert.ToUInt32(Row["id"]);
            this.Name        = (string)Row["caption"];
            this.Description = (string)Row["description"];
            this.Owner       = (string)Row["owner"];
            this.Badge       = (string)Row["badge"];
            this.OwnerId     = 0;

            DataRow groupRow;

            using (IQueryAdapter dbClient = FirewindEnvironment.GetDatabaseManager().getQueryreactor())
            {
                dbClient.setQuery("SELECT id FROM users WHERE username = '******'");
                int result = dbClient.getInteger();
                if (result > 0)
                {
                    this.OwnerId = result;
                }

                //    dbClient.setQuery("SELECT * FROM guild WHERE rooms_id = @id");
                //    dbClient.addParameter("id", Id);
                //    groupRow = dbClient.getRow();
            }

            //if(groupRow != null)
            //    Group = new Group(groupRow, new DataTable());

            switch (Row["state"].ToString().ToLower())
            {
            case "open":

                this.State = 0;
                break;

            case "password":

                this.State = 2;
                break;

            case "locked":
            default:

                this.State = 1;
                break;
            }

            this.Category = (int)Row["category"];
            if (!string.IsNullOrEmpty(Row["active_users"].ToString()))
            {
                this.UsersNow = (int)Row["active_users"];
            }
            else
            {
                this.UsersNow = 0;
            }
            this.UsersMax            = (int)Row["users_max"];
            this.ModelName           = (string)Row["model_name"];
            this.Score               = (int)Row["score"];
            this.Tags                = new List <string>();
            this.AllowPets           = FirewindEnvironment.EnumToBool(Row["allow_pets"].ToString());
            this.AllowPetsEating     = FirewindEnvironment.EnumToBool(Row["allow_pets_eat"].ToString());
            this.AllowWalkthrough    = FirewindEnvironment.EnumToBool(Row["allow_walkthrough"].ToString());
            this.AllowRightsOverride = FirewindEnvironment.EnumToBool(Row["allow_rightsoverride"].ToString());
            this.Hidewall            = FirewindEnvironment.EnumToBool(Row["allow_hidewall"].ToString());
            this.Password            = (string)Row["password"];
            this.Wallpaper           = (string)Row["wallpaper"];
            this.Floor               = (string)Row["floor"];
            this.Landscape           = (string)Row["landscape"];
            this.FloorThickness      = Convert.ToInt32(Row["floorthickness"]);
            this.WallThickness       = Convert.ToInt32(Row["wallthickness"]);
            //this.Event = null;

            foreach (string Tag in Row["tags"].ToString().Split(','))
            {
                this.Tags.Add(Tag);
            }

            mModel = FirewindEnvironment.GetGame().GetRoomManager().GetModel(ModelName, Id);
        }