Skip to content

Commit

Permalink
ITEMMEMORYEQUIP is not triggered in many default memories.
Browse files Browse the repository at this point in the history
Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item,
  • Loading branch information
canerksk committed Nov 8, 2024
1 parent 67de95e commit 6d27afb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3920,4 +3920,7 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
If the memory owner is not present, skills do not fail when taking damage, but if the memory owner is alive, skills fail when taking damage.

- Fixed: The entity was jumping frames in flooded pet commands (come, guard)


08-11-2024
- Fixed: ITEMMEMORYEQUIP is not triggered in many default memories.
Previously, many memories did not have morex information, but now for some reason many memories have morex information and for this reason the trigger was not triggered in almost most of the memories, the morex query was removed. Also, the slang did not represent the memory item.
9 changes: 6 additions & 3 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,14 @@ void CChar::LayerAdd( CItem * pItem, LAYER_TYPE layer )
return;
}

if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
{
//if (!pItem->IsTypeSpellable() && !pItem->m_itSpell.m_spell && !pItem->IsType(IT_WAND)) // can this item have a spell effect ? If so we do not send
// Since most of the memories came with a morex information by default, almost no memory was triggered.
if (!(pItem->IsTypeSpellable() || pItem->IsType(IT_WAND)))
{
if ((IsTrigUsed(TRIGGER_MEMORYEQUIP)) || (IsTrigUsed(TRIGGER_ITEMMEMORYEQUIP)))
{
CScriptTriggerArgs pArgs;
//CScriptTriggerArgs pArgs;
CScriptTriggerArgs pArgs(pItem); // added "argo" argument
pArgs.m_iN1 = layer;
if (pItem->OnTrigger(ITRIG_MemoryEquip, this, &pArgs) == TRIGRET_RET_TRUE)
{
Expand Down

0 comments on commit 6d27afb

Please sign in to comment.