Skip to content

Commit

Permalink
Merge pull request #27 from bittiez/update-cuo
Browse files Browse the repository at this point in the history
Update cuo
  • Loading branch information
bittiez authored Mar 14, 2023
2 parents 5aa99ad + 8376e9a commit 10c17ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
6 changes: 4 additions & 2 deletions src/ClassicUO.Client/Game/GameObjects/RenderedText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,9 @@ public unsafe void CreateTexture()
);
}

if (fi.Data != null && fi.Data.Length > 0 && (Texture == null || Texture.IsDisposed))
var isValid = fi.Data != null && fi.Data.Length > 0;

if (isValid && (Texture == null || Texture.IsDisposed))
{
Texture = new Texture2D(Client.Game.GraphicsDevice, fi.Width, fi.Height, false, SurfaceFormat.Color);
}
Expand All @@ -703,7 +705,7 @@ public unsafe void CreateTexture()

LinesCount = fi.LineCount;

if (Texture != null)
if (Texture != null && isValid)
{
fixed (uint* dataPtr = fi.Data)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ClassicUO.Client/Game/UI/Gumps/HouseCustomizationGump.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ public HouseCustomizationGump(uint serial, int x, int y) : base(serial, 0)
}


public override void Update()
public new void Update()
{
_dataBox.Clear();
_dataBoxGUI.Clear();
Expand Down Expand Up @@ -2018,4 +2018,4 @@ private enum ID_GUMP_CUSTOM_HOUSE
ID_GCH_ITEM_IN_LIST
}
}
}
}
11 changes: 5 additions & 6 deletions src/ClassicUO.Utility/Extensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#region license
#region license

// Copyright (c) 2021, andreakarasho
// All rights reserved.
Expand Down Expand Up @@ -30,16 +30,15 @@

#endregion

using ClassicUO.Utility.Logging;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using ClassicUO.Utility.Logging;
using Microsoft.Xna.Framework;

namespace ClassicUO.Utility
{
Expand Down Expand Up @@ -167,7 +166,7 @@ public static bool InRect(ref Rectangle rect, ref Rectangle r)
return inrect;
}


#if NETFRAMEWORK
public static void ExtractToDirectory(this ZipArchive archive, string destinationDirectoryName, bool overwrite)
{
Expand Down Expand Up @@ -221,4 +220,4 @@ public static string ToHex(this byte b)
return $"0x{b:X2}";
}
}
}
}
4 changes: 2 additions & 2 deletions tools/ManifestCreator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class Program
"ClassicUO",
"ClassicUO.Assets.dll",
"ClassicUO.Utility.dll",
"ClassicUO.IO",
"ClassicUO.Renderer",
"ClassicUO.IO.dll",
"ClassicUO.Renderer.dll",

"ClassicUO.bin.osx",
"ClassicUO.bin.x86_64",
Expand Down

0 comments on commit 10c17ab

Please sign in to comment.