clear sell data when selling a object copy

master
UbitUmarov 2020-02-02 20:16:33 +00:00
parent a22acd1c5c
commit 662c41ddee
1 changed files with 14 additions and 1 deletions

View File

@ -151,7 +151,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
rootpart.ObjectSaleType = 0; rootpart.ObjectSaleType = 0;
rootpart.SalePrice = 10; rootpart.SalePrice = 10;
rootpart.ClickAction = Convert.ToByte(0); rootpart.ClickAction = 0;
group.HasGroupChanged = true; group.HasGroupChanged = true;
rootpart.SendPropertiesToClient(remoteClient); rootpart.SendPropertiesToClient(remoteClient);
@ -178,8 +178,21 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
return false; return false;
} }
// save sell data
int price = rootpart.SalePrice;
byte clickAction = rootpart.ClickAction;
// reset sale data for the copy
rootpart.ObjectSaleType = 0;
rootpart.SalePrice = 10;
rootpart.ClickAction = 0;
string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group); string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(group);
rootpart.ObjectSaleType = saleType;
rootpart.SalePrice = price;
rootpart.ClickAction = clickAction;
string name = rootpart.Name; string name = rootpart.Name;
string desc = rootpart.Description; string desc = rootpart.Description;