Commit 6edb6c08 authored by trevis's avatar trevis
Browse files

release

parents b681e28d ba6e055e
Pipeline #598766959 passed with stages
in 2 minutes and 36 seconds
## 0.2.7 (2022-07-27) [UtilityBeltInstaller-0.2.7.exe](https://gitlab.com/utilitybelt/utilitybelt.gitlab.io/uploads/f24f9359893592252815818da7b3b7ba/UtilityBeltInstaller-0.2.7.exe)
- Add expression: wobjectgetactivespellids[WorldObject]
- Fix Classic Server VTank patch to *hopefully* not enable itself on retail servers...
## 0.2.6(2022-07-26) [UtilityBeltInstaller-0.2.6.exe](https://gitlab.com/utilitybelt/utilitybelt.gitlab.io/uploads/da5dc28fa4ee3b092f706c99498100cd/UtilityBeltInstaller-0.2.6.exe)
- Add expression: getaccounthash[]
- Add expression: wobjectgetspellids[WorldObject]
......
......@@ -3,6 +3,7 @@
- build release
- build installer
- upload to gitlab
- update changelog header for current release by adding download link from above
- push branch to gitlab
- make new tag with release notes
- update changelog / ub / ubloader versions in sln
\ No newline at end of file
......@@ -4,7 +4,7 @@
<PropertyGroup>
<Major>0</Major>
<Minor>2</Minor>
<Build>6</Build>
<Build>7</Build>
<Revision>0</Revision>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
......
......@@ -5,41 +5,60 @@ using System.Text;
namespace UtilityBelt.Lib.Constants {
public enum Skills : uint {
Axe = 0x01,
Bow = 0x02,
Crossbow = 0x03,
Dagger = 0x04,
Mace = 0x05,
Melee_Defense = 0x06,
Missile_Defense = 0x07,
Spear = 0x09,
Staff = 0x0A,
Sword = 0x0B,
Thrown_Weapons = 0x0C,
Unarmed_Combat = 0x0D,
Arcane_Lore = 0x0E,
Magic_Defense = 0x0F,
Mana_Conversion = 0x10,
Item_Tinkering = 0x12,
Assess_Person = 0x13,
Deception = 0x14,
Healing = 0x15,
Jump = 0x16,
Lockpick = 0x17,
Run = 0x18,
Assess_Creature = 0x1B,
Weapon_Tinkering = 0x1C,
Armor_Tinkering = 0x1D,
Magic_Item_Tinkering = 0x1E,
Creature_Enchantment = 0x1F,
Item_Enchantment = 0x20,
Life_Magic = 0x21,
War_Magic = 0x22,
Leadership = 0x23,
Loyalty = 0x24,
Fletching = 0x25,
Alchemy = 0x26,
Cooking = 0x27,
Salvaging = 0x28
None,
Axe, /* Retired */
Bow, /* Retired */
Crossbow, /* Retired */
Dagger, /* Retired */
Mace, /* Retired */
MeleeDefense,
MissileDefense,
Sling, /* Retired */
Spear, /* Retired */
Staff, /* Retired */
Sword, /* Retired */
ThrownWeapon, /* Retired */
UnarmedCombat, /* Retired */
ArcaneLore,
MagicDefense,
ManaConversion,
Spellcraft, /* Unimplemented */
ItemTinkering,
AssessPerson,
Deception,
Healing,
Jump,
Lockpick,
Run,
Awareness, /* Unimplemented */
ArmsAndArmorRepair, /* Unimplemented */
AssessCreature,
WeaponTinkering,
ArmorTinkering,
MagicItemTinkering,
CreatureEnchantment,
ItemEnchantment,
LifeMagic,
WarMagic,
Leadership,
Loyalty,
Fletching,
Alchemy,
Cooking,
Salvaging,
TwoHandedCombat,
Gearcraft, /* Retired */
VoidMagic,
HeavyWeapons,
LightWeapons,
FinesseWeapons,
MissileWeapons,
Shield,
DualWield,
Recklessness,
SneakAttack,
DirtyFighting,
Challenge, /* Unimplemented */
Summoning
}
}
......@@ -512,6 +512,22 @@ Provides a command-line interface to inventory management.
return list;
}
#endregion wobjectgetspellids[wobject obj]
#region wobjectgetactivespellids[wobject obj]
[ExpressionMethod("wobjectgetactivespellids")]
[ExpressionParameter(0, typeof(ExpressionWorldObject), "obj", "World object to get spells of")]
[ExpressionReturn(typeof(ExpressionList), "List of spell IDs")]
[Summary("Returns a list of *active* spells on a World Object.")]
[Example("wobjectgetactivespellids[wobjectgetselection[]]", "Returns a list of *active* spell IDs of the selected item")]
public object Wobjectgetactivespellids(ExpressionWorldObject obj) {
var list = new ExpressionList();
for (var i = 0; i < obj.Wo.ActiveSpellCount; i++) {
list.Items.Add(obj.Wo.ActiveSpell(i));
}
return list;
}
#endregion wobjectgetactivespellids[wobject obj]
#region getinventorycountbytemplatetype[string name]
[ExpressionMethod("getinventorycountbytemplatetype")]
[ExpressionParameter(0, typeof(double), "templatetype", "templatetype to filter by")]
......
......@@ -7,7 +7,9 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using UBLoader.Lib.Settings;
using UtilityBelt.Lib;
using UtilityBelt.Lib.Constants;
using VirindiViewService;
using static uTank2.PluginCore;
......@@ -24,6 +26,29 @@ namespace UtilityBelt.Tools {
public int Family { get; set; }
}
#region config
[Summary("Enable automatically attempting to detect classic servers and patching vtank to support old skills.")]
public readonly Setting<bool> EnableAutoClassicPatch = new Setting<bool>(true);
#endregion // config
#region Commands
#region /ub dumpskills
[Summary("Prints all skills and training levels contained in Login_PlayerDesc (0x0013) to chat")]
[Usage("/ub dumpskills")]
[Example("/ub dumpskills", "Prints all skills and training levels to chat")]
[CommandPattern("dumpskills", @"^$")]
public void DumpSkills(string _, Match _1) {
var skillIds = UBLoader.FilterCore.PlayerDescSkillState.Keys.ToList();
skillIds.Sort();
Logger.WriteToChat($"Login_PlayerDesc (0x0013) Skills:");
foreach (var skillId in skillIds) {
var skillTraining = UBLoader.FilterCore.PlayerDescSkillState[skillId];
Logger.WriteToChat($" {(Skills)skillId} ({skillId}) = {(TrainingType)skillTraining} ({skillTraining})");
}
}
#endregion
#endregion // Commands
private static Dictionary<string, object> PatchedAuraSpells = new Dictionary<string, object>();
private static Dictionary<int, CastReplacementInfo> CastReplacements = new Dictionary<int, CastReplacementInfo>();
private static Dictionary<int, int> LevelSevenLookup = new Dictionary<int, int>();
......@@ -55,13 +80,10 @@ namespace UtilityBelt.Tools {
}
private void CheckForClassic() {
var classicSkills = new int[] { 1, 2, 3, 4, 5, 9, 10, 11, 12, 13 };
for (var i = 0; i < classicSkills.Length; i++) {
if (UBLoader.FilterCore.PlayerDescSkillState.ContainsKey(classicSkills[i])) {
PatchVTankClassic();
return;
}
if (!EnableAutoClassicPatch)
return;
if (!UBLoader.FilterCore.PlayerDescSkillState.ContainsKey(54)) {
PatchVTankClassic();
}
}
......
......@@ -5,7 +5,7 @@
<PropertyGroup>
<Major>0</Major>
<Minor>2</Minor>
<Build>6</Build>
<Build>7</Build>
<Revision>0</Revision>
<Branch>master</Branch>
</PropertyGroup>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment