MR-5: FlyTarget fixes
This commit is contained in:
@@ -13,7 +13,6 @@ This repository contains the source code necessary to compile the game client ex
|
|||||||
## 📋 Changelog
|
## 📋 Changelog
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
* **Shaman Mounted Combat:** Fixed a bug that wrongly calculated Shaman characters mounted hits that didn't collide with the target to cause damage when attack speed was had an extremely high value.
|
* **Debug mode:** Fly effects are now registering when using Debug mode.
|
||||||
* **Invisibility VFX Logic:** Fixed an issue where skill visual effects remained visible to the character while under the `AFFECT_INVISIBLE` state.
|
* **Fix effect rendering in low opacity models:** Effects now appear normally on semi-transparent meshes.
|
||||||
* **Buff Effects Visibility Recovery:** Fixed an issue where buff skill visual effects remained invisible if the skill was cast while the character was under the `AFFECT_INVISIBLE` state.
|
* **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).
|
||||||
* **Casting Speed Cooldowns:** Fixed an issue where Casting Speed was not properly calculated in skill cooldowns. The system now supports real-time calculation updates whenever the bonus value changes.
|
|
||||||
|
|||||||
@@ -351,6 +351,17 @@ void CEffectManager::HideEffect()
|
|||||||
m_pSelectedEffectInstance->Hide();
|
m_pSelectedEffectInstance->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||||
|
// Credits to d1str4ught
|
||||||
|
void CEffectManager::RenderEffect()
|
||||||
|
{
|
||||||
|
if (!m_pSelectedEffectInstance)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_pSelectedEffectInstance->Render();
|
||||||
|
}
|
||||||
|
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||||
|
|
||||||
void CEffectManager::ApplyAlwaysHidden()
|
void CEffectManager::ApplyAlwaysHidden()
|
||||||
{
|
{
|
||||||
if (!m_pSelectedEffectInstance)
|
if (!m_pSelectedEffectInstance)
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ class CEffectManager : public CScreen, public CSingleton<CEffectManager>
|
|||||||
|
|
||||||
void ShowEffect();
|
void ShowEffect();
|
||||||
void HideEffect();
|
void HideEffect();
|
||||||
|
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||||
|
// Credits to d1str4ught
|
||||||
|
void RenderEffect();
|
||||||
|
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||||
|
|
||||||
void ApplyAlwaysHidden();
|
void ApplyAlwaysHidden();
|
||||||
void ReleaseAlwaysHidden();
|
void ReleaseAlwaysHidden();
|
||||||
|
|||||||
@@ -32,6 +32,18 @@ void CActorInstance::SetMaterialAlpha(DWORD dwAlpha)
|
|||||||
|
|
||||||
void CActorInstance::OnRender()
|
void CActorInstance::OnRender()
|
||||||
{
|
{
|
||||||
|
// MR-5: Fix effect rendering when actor is semi-transparent
|
||||||
|
// Credits to d1str4ught
|
||||||
|
if (GetAlphaValue() < 1.0f)
|
||||||
|
{
|
||||||
|
for (auto it = m_AttachingEffectList.begin(); it != m_AttachingEffectList.end(); ++it)
|
||||||
|
{
|
||||||
|
CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex);
|
||||||
|
CEffectManager::Instance().RenderEffect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// MR-5: -- END OF -- Fix effect rendering when actor is semi-transparent
|
||||||
|
|
||||||
D3DMATERIAL9 kMtrl;
|
D3DMATERIAL9 kMtrl;
|
||||||
STATEMANAGER.GetMaterial(&kMtrl);
|
STATEMANAGER.GetMaterial(&kMtrl);
|
||||||
|
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ namespace NMotionEvent
|
|||||||
isFishingEffect = FALSE;
|
isFishingEffect = FALSE;
|
||||||
}
|
}
|
||||||
dwEffectIndex = GetCaseCRC32(strEffectFileName.c_str(), strEffectFileName.length());
|
dwEffectIndex = GetCaseCRC32(strEffectFileName.c_str(), strEffectFileName.length());
|
||||||
#ifndef _DEBUG
|
// #ifndef _DEBUG
|
||||||
CEffectManager::Instance().RegisterEffect(strEffectFileName.c_str());
|
CEffectManager::Instance().RegisterEffect(strEffectFileName.c_str());
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -188,10 +188,10 @@ namespace NMotionEvent
|
|||||||
return false;
|
return false;
|
||||||
dwFlyIndex = GetCaseCRC32(strFlyFileName.c_str(), strFlyFileName.length());
|
dwFlyIndex = GetCaseCRC32(strFlyFileName.c_str(), strFlyFileName.length());
|
||||||
|
|
||||||
#ifndef _DEBUG
|
// #ifndef _DEBUG
|
||||||
// Register Fly
|
// Register Fly
|
||||||
CFlyingManager::Instance().RegisterFlyingData(strFlyFileName.c_str());
|
CFlyingManager::Instance().RegisterFlyingData(strFlyFileName.c_str());
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1142,10 +1142,38 @@ bool CPythonNetworkStream::SendCharacterStatePacket(const TPixelPosition& c_rkPP
|
|||||||
// NOTE : SlotIndex는 임시
|
// NOTE : SlotIndex는 임시
|
||||||
bool CPythonNetworkStream::SendUseSkillPacket(DWORD dwSkillIndex, DWORD dwTargetVID)
|
bool CPythonNetworkStream::SendUseSkillPacket(DWORD dwSkillIndex, DWORD dwTargetVID)
|
||||||
{
|
{
|
||||||
|
// tw1x1 fix wrong fly targeting for viewing clients
|
||||||
|
if (dwTargetVID)
|
||||||
|
{
|
||||||
|
CPythonCharacterManager& rpcm = CPythonCharacterManager::Instance();
|
||||||
|
CInstanceBase* pTarget = rpcm.GetInstancePtr(dwTargetVID);
|
||||||
|
|
||||||
|
if (pTarget)
|
||||||
|
{
|
||||||
|
TPixelPosition kPos;
|
||||||
|
|
||||||
|
pTarget->NEW_GetPixelPosition(&kPos);
|
||||||
|
SendFlyTargetingPacket(dwTargetVID, kPos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TPixelPosition kPos;
|
||||||
|
|
||||||
|
kPos.x = 0;
|
||||||
|
kPos.y = 0;
|
||||||
|
kPos.z = 0;
|
||||||
|
|
||||||
|
SendFlyTargetingPacket(0, kPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// END OF tw1x1 fix wrong fly targeting for viewing clients
|
||||||
|
|
||||||
TPacketCGUseSkill UseSkillPacket;
|
TPacketCGUseSkill UseSkillPacket;
|
||||||
|
|
||||||
UseSkillPacket.bHeader = HEADER_CG_USE_SKILL;
|
UseSkillPacket.bHeader = HEADER_CG_USE_SKILL;
|
||||||
UseSkillPacket.dwVnum = dwSkillIndex;
|
UseSkillPacket.dwVnum = dwSkillIndex;
|
||||||
UseSkillPacket.dwTargetVID = dwTargetVID;
|
UseSkillPacket.dwTargetVID = dwTargetVID;
|
||||||
|
|
||||||
if (!Send(sizeof(TPacketCGUseSkill), &UseSkillPacket))
|
if (!Send(sizeof(TPacketCGUseSkill), &UseSkillPacket))
|
||||||
{
|
{
|
||||||
Tracen("CPythonNetworkStream::SendUseSkillPacket - SEND PACKET ERROR");
|
Tracen("CPythonNetworkStream::SendUseSkillPacket - SEND PACKET ERROR");
|
||||||
|
|||||||
Reference in New Issue
Block a user