Skip to content

Commit

Permalink
Merge pull request #216 from bittiez/dev
Browse files Browse the repository at this point in the history
v3.21.0
  • Loading branch information
bittiez committed Feb 20, 2024
2 parents dad78d7 + 83def12 commit 54727de
Show file tree
Hide file tree
Showing 46 changed files with 929 additions and 590 deletions.
151 changes: 36 additions & 115 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,125 +1,46 @@
<p align="center"><img src="https://github.com/bittiez/TazUO/assets/3859393/832c4cf3-8525-419b-ad16-3c5f7de1b80c" width="300" height="300"></p>

<p align="center">
<a href="https://discord.gg/VdyCpjQ">
<a href="https://discord.gg/SqwtB5g95H">
<img src="https://img.shields.io/discord/1087124353155608617.svg?logo=discord"
alt="chat on Discord"></a>
</p>
------------------------------------------------------------------

***

Release: [![Release](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml/badge.svg?branch=main)](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml) Dev: [![Dev](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml/badge.svg?branch=dev)](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml)


Join TazUO's discord for ideas/support/updates -> https://discord.gg/SqwtB5g95H

Check out our [wiki](../../wiki) for details on all of the changes TazUO has made for players!

This version of CUO adds [grid containers](../../wiki/TazUO.Grid-Containers) and many other features to the regular CUO client

Searchable

Resizable

Scrollable

Can lock items in specific place

Quick preview for containers inside *if the client has already cached that bag*

Item scaling!

[Cool down bars](../../wiki/TazUO.Cooldown-bars)

[Follow mode improvements](../../wiki/TazUO.Follow-mode)

[Improved journal](../../wiki/TazUO.Journal)

[Nameplate healthbars](../../wiki/TazUO.Nameplate-Healthbars)

And others in our [wiki](../../wiki)

![Cooldown](https://user-images.githubusercontent.com/3859393/227056224-ef1c6958-fff5-4698-a21a-c63c5814877c.gif)
![SlottedInv](https://user-images.githubusercontent.com/3859393/226514464-32919a68-ebad-4ec0-8bcf-8614a5055f7d.gif)
![Grid Previe](https://user-images.githubusercontent.com/3859393/222873187-c88ad321-8b19-4cfd-9617-7e23b2443b6a.gif)
![image](https://user-images.githubusercontent.com/3859393/222975241-319e5fa6-2c1e-441d-97e6-b04a5e1f6f3b.png)
![Journal](https://user-images.githubusercontent.com/3859393/222942915-e31d26aa-e9a7-41df-9c99-570bcc00d1fb.gif)
![image](https://user-images.githubusercontent.com/3859393/225168130-5ce83950-853d-43ce-9583-65ec4b0ae9d6.png)
![image](https://user-images.githubusercontent.com/3859393/225307385-c8e8014f-9b84-4fe4-a2cd-f33fbeee9563.png)
![image](https://user-images.githubusercontent.com/3859393/226114408-28c6556d-6ba8-43c7-bf1a-079342aaeacd.png)
![image](https://user-images.githubusercontent.com/3859393/226114417-e68b1653-f719-49b3-b799-0beb07e0a211.png)


# Original CUO Readme:
------------------------------------------------------------------

An open source implementation of the Ultima Online Classic Client.

Individuals/hobbyists: support continued maintenance and development via the monthly Patreon:
<br>&nbsp;&nbsp;[![Patreon](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/patreon_02.png)](http://www.patreon.com/classicuo)

Individuals/hobbyists: support continued maintenance and development via PayPal:
<br>&nbsp;&nbsp;[![PayPal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9ZWJBY6MS99D8)

<a href="https://discord.gg/VdyCpjQ">
<img src="https://img.shields.io/discord/458277173208547350.svg?logo=discord"
alt="chat on Discord"></a>

[![GitHub Actions Status](https://github.com/ClassicUO/ClassicUO/workflows/Build-Test/badge.svg)](https://github.com/ClassicUO/ClassicUO/actions)
[![GitHub Actions Status](https://github.com/ClassicUO/ClassicUO/workflows/Deploy/badge.svg)](https://github.com/ClassicUO/ClassicUO/actions)

# Introduction
ClassicUO is an open source implementation of the Ultima Online Classic Client. This client is intended to emulate all standard client versions and is primarily tested against Ultima Online free shards.

The client is currently under heavy development but is functional. The code is based on the [FNA-XNA](https://fna-xna.github.io/) framework. C# is chosen because there is a large community of developers working on Ultima Online server emulators in C#, because FNA-XNA exists and seems reasonably suitable for creating this type of game.

![screenshot_2020-07-06_12-29-02](https://user-images.githubusercontent.com/20810422/208747312-04f6782f-3dc8-4951-b0a0-73d2305bbfca.png)


ClassicUO is natively cross platform and supports:
* Browser [Chrome]
* Windows [DirectX 11, OpenGL, Vulkan]
* Linux [OpenGL, Vulkan]
* macOS [Metal, OpenGL, MoltenVK]

# Download & Play!
| Platform | Link |
| --- | --- |
| Browser | [Play!](https://play.classicuo.org) |
| Windows x64 | [Download](https://www.classicuo.eu/launcher/win-x64/ClassicUOLauncher-win-x64-release.zip) |
| Linux x64 | [Download](https://www.classicuo.eu/launcher/linux-x64/ClassicUOLauncher-linux-x64-release.zip) |
| macOS | [Download](https://www.classicuo.eu/launcher/osx/ClassicUOLauncher-osx-x64-release.zip) |

Or visit the [ClassicUO Website](https://www.classicuo.eu/)

# How to build the project

Clone repository with:
```
git config --global url."https://".insteadOf git://
git clone --recursive https://github.com/ClassicUO/ClassicUO.git
```

Build the project:
```
dotnet build -c Release
```

# Contribute
Everyone is welcome to contribute! The GitHub issues and project tracker are kept up to date with tasks that need work.

# Legal
The code itself has been written using the following projects as a reference:

* [OrionUO](https://github.com/hotride/orionuo)
* [Razor](https://github.com/msturgill/razor)
* [UltimaXNA](https://github.com/ZaneDubya/UltimaXNA)
* [ServUO](https://github.com/servuo/servuo)

Backend:
* [FNA](https://github.com/FNA-XNA/FNA)

This work is released under the BSD 4 license. This project does not distribute any copyrighted game assets. In order to run this client you'll need to legally obtain a copy of the Ultima Online Classic Client.
Using a custom client to connect to official UO servers is strictly forbidden. We do not assume any responsibility of the usage of this client.
Release: [![Release](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml/badge.svg?branch=main)](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml) Dev: [![Dev](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml/badge.svg?branch=dev)](https://github.com/bittiez/TazUO/actions/workflows/build-test.yml)

Ultima Online(R) © 2022 Electronic Arts Inc. All Rights Reserved.
# What is TazUO?
**TazUO** was originally a fork from ClassicUO with the mindset of adding features requested by users to improve QOL. **TazUO** has since moved away from ClassicUO, we will keep an eye on ClassicUO updates and incorporate changes or fixes as they have a wider user base that provides bug reports, but **TazUO** will no longer be merging all changes from ClassicUO.

# TazUO features
Check out our [wiki](../../wiki) for details on all of the changes TazUO has made for players!

***Most*** features can be disabled if you don't want to use said feature.

- [Launcher](../../wiki/TazUO.Updater-Launcher) - Managing profiles for multiple accounts/servers
- [Grid containers](../../wiki/TazUO.Grid-Containers) - Easily find and move items with out fully customizable grid containers
- [Journal](../../wiki/TazUO.Journal) - Vastly improved journal for readability and organization
- [Alternative paperdoll](../../wiki/TazUO.Alternate-Paperdoll) - A new flavor a your paperdoll
- [Improved buff bar](../../wiki/TazUO.Buff-Bars)
- [Client commands](../../wiki/TazUO.Commands) - Several commands have been added for various features
- [Controller support](../../wiki/TazUO.Controller-Support) - That's right, play with your controller!
- [Cooldown bars](../../wiki/TazUO.Cooldown-bars) - Customizable cooldown bars
- [Grid Highlighting](../../wiki/TazUO.Grid-highlighting-based-on-item-properties) - Grid highlighting of items that have specific properties, easier looting!
- [Tooltip overrides](../../wiki/TazUO.Tooltip-Override) - Customize and override any text in tooltips!
- [Custom fonts](../../wiki/TazUO.TTF-Fonts) - BYOF, Bring your own fonts for better readability.

There are ***many*** more features to check out in our [wiki](../../wiki) or in game, this list is just a sample!


# Screenshots
![Cooldown](https://user-images.githubusercontent.com/3859393/227056224-ef1c6958-fff5-4698-a21a-c63c5814877c.gif)
![SlottedInv](https://user-images.githubusercontent.com/3859393/226514464-32919a68-ebad-4ec0-8bcf-8614a5055f7d.gif)
![Grid Previe](https://user-images.githubusercontent.com/3859393/222873187-c88ad321-8b19-4cfd-9617-7e23b2443b6a.gif)
![image](https://user-images.githubusercontent.com/3859393/222975241-319e5fa6-2c1e-441d-97e6-b04a5e1f6f3b.png)
![Journal](https://user-images.githubusercontent.com/3859393/222942915-e31d26aa-e9a7-41df-9c99-570bcc00d1fb.gif)
![image](https://user-images.githubusercontent.com/3859393/225168130-5ce83950-853d-43ce-9583-65ec4b0ae9d6.png)
![image](https://user-images.githubusercontent.com/3859393/225307385-c8e8014f-9b84-4fe4-a2cd-f33fbeee9563.png)
![image](https://user-images.githubusercontent.com/3859393/226114408-28c6556d-6ba8-43c7-bf1a-079342aaeacd.png)
![image](https://user-images.githubusercontent.com/3859393/226114417-e68b1653-f719-49b3-b799-0beb07e0a211.png)
127 changes: 66 additions & 61 deletions src/ClassicUO.Assets/AnimationsLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private AnimationsLoader() { }
public static AnimationsLoader Instance =>
_instance ?? (_instance = new AnimationsLoader());

public IReadOnlyDictionary<ushort, Dictionary<ushort, EquipConvData>> EquipConversions => _equipConv;
public IReadOnlyDictionary<ushort, Dictionary<ushort, EquipConvData>> EquipConversions => _equipConv;

public List<(ushort, byte)>[] GroupReplaces { get; } =
new List<(ushort, byte)>[2]
Expand Down Expand Up @@ -189,7 +189,7 @@ private unsafe void LoadInternal()
_mobTypes[id] = new MobTypeInfo()
{
Type = (AnimationGroupsType)i,
Flags = (AnimationFlags )(0x80000000 | number)
Flags = (AnimationFlags)(0x80000000 | number)
};

break;
Expand Down Expand Up @@ -292,7 +292,7 @@ public ReadOnlySpan<AnimIdxBlock> GetIndices
ClientVersion clientVersion,
ushort body,
ref ushort hue,
ref AnimationFlags flags,
ref AnimationFlags flags,
out int fileIndex,
out AnimationGroupsType animType,
out sbyte mountHeight
Expand Down Expand Up @@ -388,7 +388,7 @@ out sbyte mountHeight
private long CalculateOffset(
ushort graphic,
AnimationGroupsType type,
AnimationFlags flags,
AnimationFlags flags,
out int groupCount
)
{
Expand Down Expand Up @@ -1071,91 +1071,91 @@ ref SittingInfoData data
{
case 7:
case 0:
{
if (data.Direction1 == -1)
{
if (direction == 7)
if (data.Direction1 == -1)
{
direction = (byte)data.Direction4;
if (direction == 7)
{
direction = (byte)data.Direction4;
}
else
{
direction = (byte)data.Direction2;
}
}
else
{
direction = (byte)data.Direction2;
direction = (byte)data.Direction1;
}
}
else
{
direction = (byte)data.Direction1;
}

break;
}
break;
}

case 1:
case 2:
{
if (data.Direction2 == -1)
{
if (direction == 1)
if (data.Direction2 == -1)
{
direction = (byte)data.Direction1;
if (direction == 1)
{
direction = (byte)data.Direction1;
}
else
{
direction = (byte)data.Direction3;
}
}
else
{
direction = (byte)data.Direction3;
direction = (byte)data.Direction2;
}
}
else
{
direction = (byte)data.Direction2;
}

break;
}
break;
}

case 3:
case 4:
{
if (data.Direction3 == -1)
{
if (direction == 3)
if (data.Direction3 == -1)
{
direction = (byte)data.Direction2;
if (direction == 3)
{
direction = (byte)data.Direction2;
}
else
{
direction = (byte)data.Direction4;
}
}
else
{
direction = (byte)data.Direction4;
direction = (byte)data.Direction3;
}
}
else
{
direction = (byte)data.Direction3;
}

break;
}
break;
}

case 5:
case 6:
{
if (data.Direction4 == -1)
{
if (direction == 5)
if (data.Direction4 == -1)
{
direction = (byte)data.Direction3;
if (direction == 5)
{
direction = (byte)data.Direction3;
}
else
{
direction = (byte)data.Direction1;
}
}
else
{
direction = (byte)data.Direction1;
direction = (byte)data.Direction4;
}
}
else
{
direction = (byte)data.Direction4;
}

break;
}
break;
}
}

GetSittingAnimDirection(ref direction, ref mirror, ref x, ref y);
Expand Down Expand Up @@ -1214,7 +1214,7 @@ public AnimationGroups GetGroupIndex(ushort graphic, AnimationGroupsType animTyp
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public byte GetDeathAction(
ushort animID,
AnimationFlags animFlags,
AnimationFlags animFlags,
AnimationGroupsType animType,
bool second,
bool isRunning = false
Expand Down Expand Up @@ -1249,14 +1249,14 @@ public byte GetDeathAction(
);

case AnimationGroupsType.SeaMonster:
{
if (!isRunning)
{
return 8;
}
if (!isRunning)
{
return 8;
}

goto case AnimationGroupsType.Monster;
}
goto case AnimationGroupsType.Monster;
}

case AnimationGroupsType.Monster:

Expand Down Expand Up @@ -1354,7 +1354,7 @@ AnimationsLoader.AnimIdxBlock index
reader.Seek(dataStart);

byte frameCount = (byte)(
type < AnimationGroupsType.Equipment ? Math.Round(fc / (float) MAX_DIRECTIONS) : MAX_DIRECTIONS * 2
type < AnimationGroupsType.Equipment ? Math.Round(fc / (float)MAX_DIRECTIONS) : MAX_DIRECTIONS * 2
);
if (frameCount > _frames.Length)
{
Expand Down Expand Up @@ -1446,13 +1446,18 @@ public Span<FrameInfo> ReadMULAnimationFrames(int fileIndex, AnimIdxBlock index)
return Span<FrameInfo>.Empty;
}

if (index.Position == 0xFFFF_FFFF || index.Size == 0xFFFF_FFFF)
if (index.Position == 0xFFFF_FFFF || index.Size == 0xFFFF_FFFF || index.Size <= 0)
{
return Span<FrameInfo>.Empty;
}

var file = _files[fileIndex];

if (index.Position + index.Size > file.Length)
{
return Span<FrameInfo>.Empty;
}

var reader = new StackDataReader(
new ReadOnlySpan<byte>(
(byte*)file.StartAddress.ToPointer() + index.Position,
Expand Down
Loading

0 comments on commit 54727de

Please sign in to comment.