Inheritance: IDataModel
示例#1
0
        public SceneTemplate CreateSceneTemplate()
        {
            var template = new SceneTemplate();

            template.SceneID         = Guid.GetEntry();
            template.Flags           = 0;
            template.ScriptPackageID = (uint)SceneObjectData.ScriptPackageID;
            template.Encrypted       = false;
            return(template);
        }
        public static void HandlePlayScene(Packet packet)
        {
            var sceneId = packet.ReadInt32("SceneID");
            SceneTemplate scene = new SceneTemplate
            {
                SceneID = (uint)sceneId
            };

            scene.Flags = (uint)packet.ReadInt32("PlaybackFlags");
            packet.ReadInt32("SceneInstanceID");
            scene.ScriptPackageID = (uint)packet.ReadInt32("SceneScriptPackageID");
            packet.ReadPackedGuid128("TransportGUID");
            packet.ReadVector3("Pos");
            packet.ReadSingle("Facing");

            Storage.Scenes.Add(scene, packet.TimeSpan);
        }