Tweak to update appearance calls Fix for deleting inventory items from a folder. Thanks StrawberryFride!0.6.9-post-fixes
parent
e589a31bc4
commit
3bd2ec7b2e
|
@ -635,9 +635,9 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <param name="connection">connection to the database</param>
|
/// <param name="connection">connection to the database</param>
|
||||||
private void DeleteItemsInFolder(UUID folderID, SqlConnection connection)
|
private void DeleteItemsInFolder(UUID folderID, SqlConnection connection)
|
||||||
{
|
{
|
||||||
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE folderID=@folderID", connection))
|
using (SqlCommand command = new SqlCommand("DELETE FROM inventoryitems WHERE parentFolderID=@parentFolderID", connection))
|
||||||
{
|
{
|
||||||
command.Parameters.Add(database.CreateParameter("folderID", folderID));
|
command.Parameters.Add(database.CreateParameter("parentFolderID", folderID));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -582,8 +582,21 @@ namespace OpenSim.Data.MSSQL
|
||||||
/// <param name="appearance">the appearence</param>
|
/// <param name="appearance">the appearence</param>
|
||||||
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
string sql = @"DELETE FROM avatarappearance WHERE owner=@owner;
|
string sql = @"DELETE FROM avatarappearance WHERE owner=@owner";
|
||||||
INSERT INTO avatarappearance
|
using (AutoClosingSqlCommand cmd = database.Query(sql))
|
||||||
|
{
|
||||||
|
cmd.Parameters.Add(database.CreateParameter("@owner", appearance.Owner));
|
||||||
|
try
|
||||||
|
{
|
||||||
|
cmd.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat("[USER DB] Error deleting old user appearance, error: {0}", e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sql=@"INSERT INTO avatarappearance
|
||||||
(owner, serial, visual_params, texture, avatar_height,
|
(owner, serial, visual_params, texture, avatar_height,
|
||||||
body_item, body_asset, skin_item, skin_asset, hair_item,
|
body_item, body_asset, skin_item, skin_asset, hair_item,
|
||||||
hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset,
|
hair_asset, eyes_item, eyes_asset, shirt_item, shirt_asset,
|
||||||
|
|
Loading…
Reference in New Issue