refactor(weapon): emit AOS attributes via AosAttributes/AosWeaponAttributes.GetProperties

This commit is contained in:
Kamron Batman 2026-06-22 08:28:59 -07:00
parent 54a512c98f
commit ea8dfd29bd
2 changed files with 47 additions and 210 deletions

View file

@ -0,0 +1,38 @@
using Server.Items;
using Xunit;
namespace UOContent.Tests;
[Collection("Sequential UOContent Tests")]
public class BaseWeaponPropertiesTests
{
[Fact]
public void Weapon_AttributeLineSet_Preserved()
{
var weapon = new Longsword();
try
{
weapon.Attributes.DefendChance = 5;
weapon.Attributes.BonusInt = 6;
weapon.Attributes.SpellChanneling = 1;
weapon.WeaponAttributes.UseBestSkill = 1;
weapon.WeaponAttributes.HitFireball = 12;
weapon.WeaponAttributes.MageWeapon = 25;
weapon.WeaponAttributes.SelfRepair = 3;
var map = ItemOplTestHelper.DecodeAttributeLines(weapon);
Assert.Equal("5", map[1060408]); // DefendChance
Assert.Equal("6", map[1060432]); // BonusInt
Assert.Equal("", map[1060482]); // SpellChanneling
Assert.Equal("", map[1060400]); // UseBestSkill
Assert.Equal("12", map[1060420]); // HitFireball
Assert.Equal("5", map[1060438]); // MageWeapon (30 - 25)
Assert.Equal("3", map[1060450]); // SelfRepair
}
finally
{
weapon.Delete();
}
}
}