Merge pull request #56 from MindRapist/mr-6

PK Mode fix
This commit is contained in:
rtw1x1
2025-12-31 09:09:56 +00:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -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.

View File

@@ -2117,7 +2117,6 @@ void CInstanceBase::SetStateFlags(DWORD dwStateFlags)
// 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();
DWORD myGuildID = GetGuildID();
@@ -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