Thanks, nlin, for a patch implementing persistence for "When Left Clicked"

object property. Fix issue 2149.
0.6.0-stable
Mike Mazur 2008-09-10 00:19:36 +00:00
parent fac18f608d
commit e0d092ec53
3 changed files with 25 additions and 0 deletions

View File

@ -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;
}
/// <summary>

View File

@ -0,0 +1,6 @@
begin;
ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0;
commit;

View File

@ -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