From e0d092ec537a7187d3b5a367f27b834fccad778d Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Wed, 10 Sep 2008 00:19:36 +0000 Subject: Thanks, nlin, for a patch implementing persistence for "When Left Clicked" object property. Fix issue 2149. --- OpenSim/Data/MySQL/MySQLRegionData.cs | 5 +++++ OpenSim/Data/MySQL/Resources/018_RegionStore.sql | 6 ++++++ OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 OpenSim/Data/MySQL/Resources/018_RegionStore.sql (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index b7fc70b..920a001 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs @@ -941,6 +941,7 @@ namespace OpenSim.Data.MySQL createCol(prims, "SalePrice", typeof(Int32)); createCol(prims, "SaleType", typeof (Int16)); + createCol(prims, "ClickAction", typeof (Byte)); // Add in contraints prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; @@ -1225,6 +1226,8 @@ namespace OpenSim.Data.MySQL prim.SalePrice = Convert.ToInt32(row["SalePrice"]); prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); + prim.ClickAction = Convert.ToByte(row["ClickAction"]); + return prim; } @@ -1532,6 +1535,8 @@ namespace OpenSim.Data.MySQL row["SalePrice"] = prim.SalePrice; row["SaleType"] = Convert.ToInt16(prim.ObjectSaleType); + byte clickAction = prim.ClickAction; + row["ClickAction"] = clickAction; } /// diff --git a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql b/OpenSim/Data/MySQL/Resources/018_RegionStore.sql new file mode 100644 index 0000000..68c489c --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/018_RegionStore.sql @@ -0,0 +1,6 @@ +begin; + +ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0; + +commit; + diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f778557..ffd7001 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4772,6 +4772,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP } break; + case PacketType.ObjectClickAction: + ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack; + Scene tScene = (Scene)m_scene; + + foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData) + { + byte action = odata.ClickAction; + uint localId = odata.ObjectLocalID; + SceneObjectPart part = tScene.GetSceneObjectPart(localId); + part.ClickAction = action; + } + + break; + #endregion #region Inventory/Asset/Other related packets -- cgit v1.1