Skip to content

Commit

Permalink
Merge pull request #1367 from DavideRei/master
Browse files Browse the repository at this point in the history
Fixed NPC FLEE action
  • Loading branch information
raydienull authored Jan 16, 2025
2 parents 8ccb640 + fdea61d commit 6dd376e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3985,3 +3985,6 @@ Added: 'H' shortcut for variables to get the value as hexadecimal.
TALKMODE_SPELL = 10 // Used by spells
TALKMODE_GUILD = 13 // Used by guild chat (client shortcut: \)
TALKMODE_ALLIANCE = 14 // Used by alliance chat (client shortcut: shift+\)

08-01-2025, DavideRei
- Fixed: NPC FLEE action didn't work because it was using action target (empty) instead of fight target
2 changes: 1 addition & 1 deletion src/game/chars/CCharNPCAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ bool CChar::NPC_Act_Follow(bool fFlee, int maxDistance, bool fMoveAway)
//If the NPC action is following somebody, directly assign the character from the m_Act_UID value.
if (Skill_GetActive() == NPCACT_FOLLOW_TARG)
pChar = m_Act_UID.CharFind();
else if (Fight_IsActive())
else if (Fight_IsActive() || Skill_GetActive() == NPCACT_FLEE)
pChar = m_Fight_Targ_UID.IsValidUID() ? m_Fight_Targ_UID.CharFind() : m_Act_UID.CharFind();
else
pChar = m_Act_UID.CharFind();
Expand Down

0 comments on commit 6dd376e

Please sign in to comment.