From e24043243f96642240fcba9f8948e31d390a7dce Mon Sep 17 00:00:00 2001 From: David Kindl Date: Wed, 24 Sep 2025 11:21:31 +0200 Subject: [PATCH 1/2] ARGN3 for @PersonalSpace trigger to bypass max stamina requirement --- Changelog.txt | 3 +++ src/game/chars/CCharAct.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index e6836e13b..4fc631090 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4050,3 +4050,6 @@ When setting a property like MORE to the a spell or skill defname, trying to rea 16-05-2025, Mulambo - Changed: When equipping item by dragging or using Dress macro, the item layer is now showing actual layer of the object in EquipTest and ItemEquipTest trigger (instead of 31 = LAYER_DRAGGING). This is the same behaviour, as equipping by double clicking. + +24-09-2025, Mulambo +- Added: ARGN3 for trigger @PersonalSpace [R/W], allowing to bypass maximum stamina requirement (default 1 = require maximum stamina). diff --git a/src/game/chars/CCharAct.cpp b/src/game/chars/CCharAct.cpp index 84b522d53..85070eed8 100644 --- a/src/game/chars/CCharAct.cpp +++ b/src/game/chars/CCharAct.cpp @@ -4608,6 +4608,7 @@ bool CChar::ShoveCharAtPosition(CPointMap const& ptDst, ushort *uiStaminaRequire // If i'm not pathfinding, ensure that i pass a valid uiStaminaRequirement, since i'll need it for the walk checks. ASSERT(fPathFinding || (nullptr != uiStaminaRequirement)); ushort uiLocalStamReq = 0; + bool fRequireFullStamina = true; CItem *pPoly = LayerFind(LAYER_SPELL_Polymorph); auto AreaChars = CWorldSearchHolder::GetInstance(ptDst); @@ -4629,6 +4630,8 @@ bool CChar::ShoveCharAtPosition(CPointMap const& ptDst, ushort *uiStaminaRequire else if ((pPoly && pPoly->m_itSpell.m_spell == SPELL_Wraith_Form) && (GetTopMap() == 0)) // chars under Wraith Form effect can always walk through chars in Felucca uiLocalStamReq = 0; + fRequireFullStamina = true; + TRIGRET_TYPE iRet = TRIGRET_RET_DEFAULT; if (!fPathFinding) //You want to avoid to trig the triggers if it's only a pathfinding evaluation { @@ -4636,10 +4639,12 @@ bool CChar::ShoveCharAtPosition(CPointMap const& ptDst, ushort *uiStaminaRequire { CScriptTriggerArgsPtr pScriptArgs = CScriptParserBufs::GetCScriptTriggerArgsPtr(); pScriptArgs->m_iN1 = uiLocalStamReq; + pScriptArgs->m_iN3 = fRequireFullStamina; iRet = pChar->OnTrigger(CTRIG_PersonalSpace, pScriptArgs, this); if (iRet == TRIGRET_RET_TRUE) goto set_and_return_false; uiLocalStamReq = (ushort)(pScriptArgs->m_iN1); + fRequireFullStamina = static_cast(pScriptArgs->m_iN3); } if (IsTrigUsed(TRIGGER_CHARSHOVE)) { @@ -4652,7 +4657,7 @@ bool CChar::ShoveCharAtPosition(CPointMap const& ptDst, ushort *uiStaminaRequire } } - if ((uiLocalStamReq > 0) && (Stat_GetVal(STAT_DEX) < Stat_GetMaxAdjusted(STAT_DEX))) + if ((uiLocalStamReq > 0) && fRequireFullStamina && (Stat_GetVal(STAT_DEX) < Stat_GetMaxAdjusted(STAT_DEX))) goto set_and_return_false; if (Stat_GetVal(STAT_DEX) < uiLocalStamReq) // check if we have enough stamina to push the char From f84cffeaef462fe023915dd7dceb8ec7386cbc08 Mon Sep 17 00:00:00 2001 From: David Kindl Date: Mon, 29 Sep 2025 12:56:12 +0200 Subject: [PATCH 2/2] Updated readme to reflect hardcoded behaviour in client --- Changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index bff1bdba0..7663831db 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -4055,4 +4055,4 @@ When setting a property like MORE to the a spell or skill defname, trying to rea - Changed: NPC Breath Damage (brain_dragon) is no longer capped at 200, but can go up to approx 65535. 24-09-2025, Mulambo -- Added: ARGN3 for trigger @PersonalSpace [R/W], allowing to bypass maximum stamina requirement (default 1 = require maximum stamina). +- Added: ARGN3 for trigger @PersonalSpace [R/W], allowing to bypass maximum stamina requirement (default 1 = require maximum stamina) when stepping over players.