Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4053,3 +4053,6 @@ When setting a property like MORE to the a spell or skill defname, trying to rea

22-09-2025, Mulambo
- 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) when stepping over players.
7 changes: 6 additions & 1 deletion src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -4629,17 +4630,21 @@ 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
{
if (IsTrigUsed(TRIGGER_PERSONALSPACE))
{
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<bool>(pScriptArgs->m_iN3);
}
if (IsTrigUsed(TRIGGER_CHARSHOVE))
{
Expand All @@ -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
Expand Down
Loading