From 54a5dde03788dea6f58e1b36149038db530f52b0 Mon Sep 17 00:00:00 2001 From: Mind Rapist Date: Wed, 31 Dec 2025 04:14:02 +0200 Subject: [PATCH] PK Mode fix --- README.md | 4 +--- src/UserInterface/InstanceBase.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 94c0a82..0c2d0e9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,4 @@ This repository contains the source code necessary to compile the game client ex ## 📋 Changelog ### 🐛 Bug Fixes -* **Debug mode:** Fly effects are now registering when using Debug mode. -* **Fix effect rendering in low opacity models:** Effects now appear normally on semi-transparent meshes. -* **Fly targeting fixed for buff/healing skills:** Fixed an issue where fly target effect would render in the buffer's selected target even if the target was unbuffable (if viewing from another client). +* **PK Mode:** Resolved conflict for Hostile mode when both players have negative alignment, added PK_PROTECT mode safeguards. diff --git a/src/UserInterface/InstanceBase.cpp b/src/UserInterface/InstanceBase.cpp index ca9205d..1819994 100644 --- a/src/UserInterface/InstanceBase.cpp +++ b/src/UserInterface/InstanceBase.cpp @@ -2116,7 +2116,6 @@ void CInstanceBase::SetStateFlags(DWORD dwStateFlags) // MR-4: Fix PK Mode Bug // Prevent killer mode for same-guild attacks in GUILD PK mode bool skipKiller = false; - if ((dwStateFlags & ADD_CHARACTER_STATE_KILLER) && PK_MODE_GUILD == GetPKMode()) { CPythonPlayer& rkPlayer = CPythonPlayer::Instance(); @@ -2225,6 +2224,7 @@ bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) return false; } } + if (PK_MODE_GUILD == GetPKMode()) if (GetGuildID() == rkInstVictim.GetGuildID()) return false; @@ -2255,6 +2255,9 @@ bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) if (IsPVPInstance(rkInstVictim)) return true; + if (rkInstVictim.GetPKMode() == PK_MODE_PROTECT) + return false; + // MR-4: Fix PK Mode Bug if (PK_MODE_REVENGE == GetPKMode()) { @@ -2262,12 +2265,13 @@ bool CInstanceBase::IsAttackableInstance(CInstanceBase& rkInstVictim) { if ( (GetGuildID() == 0 || GetGuildID() != rkInstVictim.GetGuildID()) && - IsConflictAlignmentInstance(rkInstVictim) && rkInstVictim.GetAlignment() < 0 ) return true; } } + + return false; // MR-4: -- END OF -- Fix PK Mode Bug } else