Minor fixes & corrections

This commit is contained in:
Mind Rapist
2026-01-02 06:33:57 +02:00
parent 9f6348ad8c
commit efbdf9155e
4 changed files with 60 additions and 12 deletions

View File

@@ -13,4 +13,6 @@ This repository contains the source code necessary to compile the game client ex
## 📋 Changelog
### 🐛 Bug Fixes
* **PK Mode:** Resolved conflict for Hostile mode when both players have negative alignment, added PK_PROTECT mode safeguards.
* **Invisibility:** Resolved an issue where effects were not visible after becoming visible again, if they were added in AFFECT_INVISIBILITY state.
* **Invisibility:** Resolved an issue where projectile fly effects were visible on targets within AFFECT_INVISIBILITY state.
* **Effects on low opacity meshes**: Resolved a conflict between effects on meshes with opacity < 1 and invisibility fixes.

View File

@@ -211,7 +211,7 @@ void CGraphicObjectInstance::ReleaseAlwaysHidden() {
bool CGraphicObjectInstance::isShow()
{
return m_isVisible && !m_isAlwaysHidden;
return m_isVisible;
}
//

View File

@@ -349,7 +349,12 @@ bool CInstanceBase::NEW_UseSkill(UINT uSkill, UINT uMot, UINT uMotLoopCount, boo
float fCurRot=m_GraphicThingInstance.GetTargetRotation();
SetAdvancingRotation(fCurRot);
m_GraphicThingInstance.InterceptOnceMotion(CRaceMotionData::NAME_SKILL + uMot, 0.1f, uSkill, 1.0f);
// MR-7: Don't show skill motion if character is invisible
if (!IsAffect(AFFECT_INVISIBILITY))
{
m_GraphicThingInstance.InterceptOnceMotion(CRaceMotionData::NAME_SKILL + uMot, 0.1f, uSkill, 1.0f);
}
// MR-7: -- END OF -- Don't show skill motion if character is invisible
m_GraphicThingInstance.__OnUseSkill(uMot, uMotLoopCount, isMovingSkill);

View File

@@ -1056,40 +1056,81 @@ void CInstanceBase::__DetachEffect(DWORD dwEID)
DWORD CInstanceBase::__AttachEffect(UINT eEftType)
{
// 2004.07.17.levites.isShow를 ViewFrustumCheck로 변경
if (IsAffect(AFFECT_INVISIBILITY))
return 0;
if (eEftType>=EFFECT_NUM)
if (eEftType >= EFFECT_NUM)
return 0;
if (ms_astAffectEffectAttachBone[eEftType].empty())
{
return m_GraphicThingInstance.AttachEffectByID(0, NULL, ms_adwCRCAffectEffect[eEftType]);
DWORD dwEftID = m_GraphicThingInstance.AttachEffectByID(0, NULL, ms_adwCRCAffectEffect[eEftType]);
// MR-7: Recover affect visual effects when coming out of invisibility
if (dwEftID && IsAffect(AFFECT_INVISIBILITY))
{
CEffectManager::Instance().SelectEffectInstance(dwEftID);
CEffectManager::Instance().HideEffect();
CEffectManager::Instance().ApplyAlwaysHidden();
}
return dwEftID;
// MR-7: -- END OF -- Recover affect visual effects when coming out of invisibility
}
else
{
std::string & rstrBoneName = ms_astAffectEffectAttachBone[eEftType];
const char * c_szBoneName;
// 양손에 붙일 때 사용한다.
// 이런 식의 예외 처리를 해놓은 것은 캐릭터 마다 Equip 의 Bone Name 이 다르기 때문.
if (0 == rstrBoneName.compare("PART_WEAPON"))
{
if (m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON, &c_szBoneName))
{
return m_GraphicThingInstance.AttachEffectByID(0, c_szBoneName, ms_adwCRCAffectEffect[eEftType]);
// MR-7: Recover affect visual effects when coming out of invisibility
DWORD dwEftID = m_GraphicThingInstance.AttachEffectByID(0, c_szBoneName, ms_adwCRCAffectEffect[eEftType]);
if (dwEftID && IsAffect(AFFECT_INVISIBILITY))
{
CEffectManager::Instance().SelectEffectInstance(dwEftID);
CEffectManager::Instance().HideEffect();
CEffectManager::Instance().ApplyAlwaysHidden();
}
return dwEftID;
// MR-7: -- END OF -- Recover affect visual effects when coming out of invisibility
}
}
else if (0 == rstrBoneName.compare("PART_WEAPON_LEFT"))
{
if (m_GraphicThingInstance.GetAttachingBoneName(CRaceData::PART_WEAPON_LEFT, &c_szBoneName))
{
return m_GraphicThingInstance.AttachEffectByID(0, c_szBoneName, ms_adwCRCAffectEffect[eEftType]);
// MR-7: Recover affect visual effects when coming out of invisibility
DWORD dwEftID = m_GraphicThingInstance.AttachEffectByID(0, c_szBoneName, ms_adwCRCAffectEffect[eEftType]);
if (dwEftID && IsAffect(AFFECT_INVISIBILITY))
{
CEffectManager::Instance().SelectEffectInstance(dwEftID);
CEffectManager::Instance().HideEffect();
CEffectManager::Instance().ApplyAlwaysHidden();
}
return dwEftID;
// MR-7: -- END OF -- Recover affect visual effects when coming out of invisibility
}
}
else
{
return m_GraphicThingInstance.AttachEffectByID(0, rstrBoneName.c_str(), ms_adwCRCAffectEffect[eEftType]);
// MR-7: Recover affect visual effects when coming out of invisibility
DWORD dwEftID = m_GraphicThingInstance.AttachEffectByID(0, rstrBoneName.c_str(), ms_adwCRCAffectEffect[eEftType]);
if (dwEftID && IsAffect(AFFECT_INVISIBILITY))
{
CEffectManager::Instance().SelectEffectInstance(dwEftID);
CEffectManager::Instance().HideEffect();
CEffectManager::Instance().ApplyAlwaysHidden();
}
return dwEftID;
// MR-7: -- END OF -- Recover affect visual effects when coming out of invisibility
}
}