Fix logout crash, add OnLogout plugin export, and read true buffed skill
The long-standing "DX9 error / client crash on logout" was ChatHooks.TickHide calling SetVisible() on a stale gmMainChatUI pointer that AC frees during the world-to-charselect transition. TickHide now gates on HasObservedLoginComplete and the cached instance is reset in DispatchPendingLogout. CrashLogger gained a register dump + EBP-frame walk + ESP sweep with module resolution that made this trace possible. Plugin contract bumped to v57 with optional RynthPluginOnLogout export. LogoutLifecycleHooks hooks CPlayerSystem::ExecuteLogOff (fires after the user confirms the logoff prompt — not RecvNotice_EndCharacterSession which fires on the menu click before the prompt) plus RecvNotice_Logoff as fallback. RynthCoreShell + PluginManager.RenderAll gate on HasObservedLoginComplete so the bar/plugins hide between sessions. ClientObjectHooks.TryGetObjectSkill now calls CACQualities::InqSkill(raw=0) for the truly buffed skill — the old code returned InitialLevel + LevelFromPracticePoints which is just the base trained level, missing attribute / augmentation / spell-buff contributions. CharacterCaptureHooks latches _autoLoginEverFired so manual logout doesn't re-fire auto-login from the next 0xF658 packet. AccountProfileDialog drops the now-redundant Character/Slot field. UpdateObjectInventoryHooks pack scan also matches by wielderID so wielded items are picked up. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cd3ccfd550
commit
8260c60494
17 changed files with 539 additions and 125 deletions
|
|
@ -561,14 +561,29 @@ internal static class ClientObjectHooks
|
|||
return false;
|
||||
|
||||
training = unchecked((int)skill.AdvancementClass);
|
||||
buffed = unchecked((int)(skill.InitialLevel + skill.LevelFromPracticePoints));
|
||||
|
||||
// Use CACQualities::InqSkill(stype, retval, raw=0) for the FULL buffed
|
||||
// skill — that includes attribute contribution, augmentations, and
|
||||
// spell-buff enchantments. The raw struct fields (InitialLevel +
|
||||
// LevelFromPracticePoints) only give the base trained level and miss
|
||||
// everything else, which is why this used to return ~208 for a
|
||||
// character whose true buffed Creature Enchantment was 360+.
|
||||
int rawBase = unchecked((int)(skill.InitialLevel + skill.LevelFromPracticePoints));
|
||||
int trulyBuffed = rawBase;
|
||||
if (_inqSkillLevel != null)
|
||||
{
|
||||
int retval = 0;
|
||||
if (_inqSkillLevel(qualitiesPtr, skillStype, &retval, 0) != 0)
|
||||
trulyBuffed = retval;
|
||||
}
|
||||
buffed = trulyBuffed;
|
||||
|
||||
if (_skillProbeLogCount < 6)
|
||||
{
|
||||
_skillProbeLogCount++;
|
||||
RynthLog.Verbose(
|
||||
$"Compat: skillTableProbe obj=0x{objectId:X8} skill={skillStype} qualities=0x{qualitiesPtr.ToInt32():X8} " +
|
||||
$"table=0x{skillTablePtr.ToInt32():X8} buckets={tableSize} training={training} base={buffed}");
|
||||
$"table=0x{skillTablePtr.ToInt32():X8} buckets={tableSize} training={training} base={rawBase} buffed={buffed}");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue