Fix hourglass cursor after UseObject portal, add CastSpell client path, quiet logging

- Fix stuck hourglass after UseObject portal teleport by directly zeroing
  ClientUISystem.m_cBusy and calling UpdateCursorState to force cursor re-eval
- Add CommandInterpreter::ClearAllCommands and TakeControlFromServer for
  post-teleport action cleanup
- Switch CastSpell to ClientMagicSystem::CastSpell (0x00568DE0) with game
  action 0x4A fallback — fixes ring spell casting
- Move all success/info Compat log calls to Verbose; log file now errors-only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
tombohar 2026-04-17 22:08:27 -04:00
commit ba7b7d8375
44 changed files with 337 additions and 159 deletions

View file

@ -181,6 +181,7 @@ internal static class PluginManager
private static GetLastIdTimeCallbackDelegate? _getLastIdTimeCallback;
private static GetObjectHeadingCallbackDelegate? _getObjectHeadingCallback;
private static GetBusyStateCallbackDelegate? _getBusyStateCallback;
private static ForceResetBusyCountCallbackDelegate? _forceResetBusyCountCallback;
private static GetObjectSpellIdsCallbackDelegate? _getObjectSpellIdsCallback;
private static GetObjectSkillLevelCallbackDelegate? _getObjectSkillBuffedCallback;
private static GetObjectAttributeCallbackDelegate? _getObjectAttributeCallback;
@ -1737,6 +1738,7 @@ internal static class PluginManager
_getLastIdTimeCallback ??= GetLastIdTimeAction;
_getObjectHeadingCallback ??= GetObjectHeadingAction;
_getBusyStateCallback ??= GetBusyStateAction;
_forceResetBusyCountCallback ??= ForceResetBusyCountAction;
_getObjectSpellIdsCallback ??= GetObjectSpellIdsAction;
_getObjectSkillBuffedCallback ??= GetObjectSkillLevelAction;
_getObjectAttributeCallback ??= GetObjectAttributeAction;
@ -1833,6 +1835,7 @@ internal static class PluginManager
_api.GetObjectMotionOnFn = Marshal.GetFunctionPointerForDelegate(_getObjectMotionOnCallback);
_api.GetObjectStateFn = Marshal.GetFunctionPointerForDelegate(_getObjectStateCallback);
_api.GetObjectBitfieldFn = Marshal.GetFunctionPointerForDelegate(_getObjectBitfieldCallback);
_api.ForceResetBusyCountFn = Marshal.GetFunctionPointerForDelegate(_forceResetBusyCountCallback);
}
private static void ProbeClientHooks()
@ -2049,7 +2052,7 @@ internal static class PluginManager
private static unsafe int GetContainerContentsAction(uint containerId, uint* itemIds, int maxCount)
{
RynthLog.Compat($"Compat: GetContainerContentsAction ENTRY id=0x{containerId:X8} itemIds=0x{(int)itemIds:X8} maxCount={maxCount}");
RynthLog.Verbose($"Compat: GetContainerContentsAction ENTRY id=0x{containerId:X8} itemIds=0x{(int)itemIds:X8} maxCount={maxCount}");
if (itemIds == null || maxCount <= 0)
return 0;
@ -2379,6 +2382,8 @@ internal static class PluginManager
private static int GetBusyStateAction() => BusyCountHooks.GetBusyState();
private static void ForceResetBusyCountAction() => BusyCountHooks.ForceResetBusyCount();
private static unsafe int GetObjectSpellIdsAction(uint guid, uint* spellIds, int maxCount)
{
if (spellIds == null || maxCount <= 0)