Merge pull request #38 from MindRapist/mr-2

MR-2
This commit is contained in:
d1str4ught
2025-12-20 01:31:56 +01:00
committed by GitHub
21 changed files with 113 additions and 158 deletions

View File

@@ -4,10 +4,8 @@
#include "PythonWindow.h" #include "PythonWindow.h"
#include "PythonSlotWindow.h" #include "PythonSlotWindow.h"
#ifdef FIX_REFRESH_SKILL_COOLDOWN
#include "UserInterface/PythonSkill.h" #include "UserInterface/PythonSkill.h"
#include "UserInterface/PythonPlayer.h" #include "UserInterface/PythonPlayer.h"
#endif
//#define __RENDER_SLOT_AREA__ //#define __RENDER_SLOT_AREA__
@@ -209,12 +207,10 @@ void CSlotWindow::SetSlotType(DWORD dwType)
m_dwSlotType = dwType; m_dwSlotType = dwType;
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
DWORD CSlotWindow::GetSlotType() const DWORD CSlotWindow::GetSlotType() const
{ {
return m_dwSlotType; return m_dwSlotType;
} }
#endif
void CSlotWindow::SetSlotStyle(DWORD dwStyle) void CSlotWindow::SetSlotStyle(DWORD dwStyle)
@@ -520,7 +516,6 @@ void CSlotWindow::SetSlotCoolTime(DWORD dwIndex, float fCoolTime, float fElapsed
pSlot->fStartCoolTime = CTimer::Instance().GetCurrentSecond() - fElapsedTime; pSlot->fStartCoolTime = CTimer::Instance().GetCurrentSecond() - fElapsedTime;
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void CSlotWindow::StoreSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex, float fCoolTime, float fElapsedTime) void CSlotWindow::StoreSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex, float fCoolTime, float fElapsedTime)
{ {
std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[dwKey].find(dwSlotIndex); std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[dwKey].find(dwSlotIndex);
@@ -602,7 +597,6 @@ void CSlotWindow::TransferSlotCoolTime(DWORD dwIndex1, DWORD dwIndex2)
} }
} }
} }
#endif
void CSlotWindow::ActivateSlot(DWORD dwIndex) void CSlotWindow::ActivateSlot(DWORD dwIndex)
{ {
@@ -618,12 +612,10 @@ void CSlotWindow::ActivateSlot(DWORD dwIndex)
__CreateSlotEnableEffect(); __CreateSlotEnableEffect();
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex); std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex);
if (it != m_CoolDownStore[1].end()) if (it != m_CoolDownStore[1].end())
it->second.bActive = true; it->second.bActive = true;
#endif
} }
void CSlotWindow::DeactivateSlot(DWORD dwIndex) void CSlotWindow::DeactivateSlot(DWORD dwIndex)
@@ -635,12 +627,10 @@ void CSlotWindow::DeactivateSlot(DWORD dwIndex)
pSlot->bActive = FALSE; pSlot->bActive = FALSE;
#ifdef FIX_REFRESH_SKILL_COOLDOWN
std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex); std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex);
if (it != m_CoolDownStore[1].end()) if (it != m_CoolDownStore[1].end())
it->second.bActive = false; it->second.bActive = false;
#endif
} }
void CSlotWindow::ClearSlot(DWORD dwIndex) void CSlotWindow::ClearSlot(DWORD dwIndex)
@@ -1377,7 +1367,6 @@ void CSlotWindow::ReserveDestroyCoolTimeFinishEffect(DWORD dwSlotIndex)
m_ReserveDestroyEffectDeque.push_back(dwSlotIndex); m_ReserveDestroyEffectDeque.push_back(dwSlotIndex);
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void CSlotWindow::ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex) void CSlotWindow::ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex)
{ {
std::map<DWORD, SStoreCoolDown>& store = m_CoolDownStore[dwKey]; std::map<DWORD, SStoreCoolDown>& store = m_CoolDownStore[dwKey];
@@ -1386,7 +1375,6 @@ void CSlotWindow::ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex)
if (it != store.end()) if (it != store.end())
store.erase(it); store.erase(it);
} }
#endif
DWORD CSlotWindow::Type() DWORD CSlotWindow::Type()
{ {
@@ -1509,9 +1497,7 @@ void CSlotWindow::__Initialize()
m_dwSlotStyle = SLOT_STYLE_PICK_UP; m_dwSlotStyle = SLOT_STYLE_PICK_UP;
m_dwToolTipSlotNumber = SLOT_NUMBER_NONE; m_dwToolTipSlotNumber = SLOT_NUMBER_NONE;
#ifdef FIX_REFRESH_SKILL_COOLDOWN
m_CoolDownStore.clear(); m_CoolDownStore.clear();
#endif
m_isUseMode = FALSE; m_isUseMode = FALSE;

View File

@@ -75,9 +75,7 @@ namespace UI
} TSlot; } TSlot;
typedef std::list<TSlot> TSlotList; typedef std::list<TSlot> TSlotList;
typedef TSlotList::iterator TSlotListIterator; typedef TSlotList::iterator TSlotListIterator;
#ifdef FIX_REFRESH_SKILL_COOLDOWN
typedef struct SStoreCoolDown { float fCoolTime; float fElapsedTime; bool bActive; }; typedef struct SStoreCoolDown { float fCoolTime; float fElapsedTime; bool bActive; };
#endif
public: public:
@@ -88,9 +86,7 @@ namespace UI
// Manage Slot // Manage Slot
void SetSlotType(DWORD dwType); void SetSlotType(DWORD dwType);
#ifdef FIX_REFRESH_SKILL_COOLDOWN
DWORD GetSlotType() const; DWORD GetSlotType() const;
#endif
void SetSlotStyle(DWORD dwStyle); void SetSlotStyle(DWORD dwStyle);
void AppendSlot(DWORD dwIndex, int ixPosition, int iyPosition, int ixCellSize, int iyCellSize); void AppendSlot(DWORD dwIndex, int ixPosition, int iyPosition, int ixCellSize, int iyCellSize);
@@ -114,11 +110,9 @@ namespace UI
void SetSlotCount(DWORD dwIndex, DWORD dwCount); void SetSlotCount(DWORD dwIndex, DWORD dwCount);
void SetSlotCountNew(DWORD dwIndex, DWORD dwGrade, DWORD dwCount); void SetSlotCountNew(DWORD dwIndex, DWORD dwGrade, DWORD dwCount);
void SetSlotCoolTime(DWORD dwIndex, float fCoolTime, float fElapsedTime = 0.0f); void SetSlotCoolTime(DWORD dwIndex, float fCoolTime, float fElapsedTime = 0.0f);
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void StoreSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex, float fCoolTime, float fElapsedTime = .0f); void StoreSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex, float fCoolTime, float fElapsedTime = .0f);
void RestoreSlotCoolTime(DWORD dwKey); void RestoreSlotCoolTime(DWORD dwKey);
void TransferSlotCoolTime(DWORD dwIndex1, DWORD dwIndex2); void TransferSlotCoolTime(DWORD dwIndex1, DWORD dwIndex2);
#endif
void ActivateSlot(DWORD dwIndex); void ActivateSlot(DWORD dwIndex);
void DeactivateSlot(DWORD dwIndex); void DeactivateSlot(DWORD dwIndex);
void RefreshSlot(); void RefreshSlot();
@@ -162,9 +156,7 @@ namespace UI
// CallBack // CallBack
void ReserveDestroyCoolTimeFinishEffect(DWORD dwSlotIndex); void ReserveDestroyCoolTimeFinishEffect(DWORD dwSlotIndex);
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex); void ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex);
#endif
protected: protected:
void __Initialize(); void __Initialize();
@@ -215,9 +207,7 @@ namespace UI
std::list<DWORD> m_dwSelectedSlotIndexList; std::list<DWORD> m_dwSelectedSlotIndexList;
TSlotList m_SlotList; TSlotList m_SlotList;
DWORD m_dwToolTipSlotNumber; DWORD m_dwToolTipSlotNumber;
#ifdef FIX_REFRESH_SKILL_COOLDOWN
std::map<DWORD, std::map<DWORD, SStoreCoolDown>> m_CoolDownStore; std::map<DWORD, std::map<DWORD, SStoreCoolDown>> m_CoolDownStore;
#endif
BOOL m_isUseMode; BOOL m_isUseMode;
BOOL m_isUsableItem; BOOL m_isUsableItem;

View File

@@ -81,9 +81,7 @@ namespace UI
bool HasParent() { return m_pParent ? true : false; } bool HasParent() { return m_pParent ? true : false; }
bool HasChild() { return m_pChildList.empty() ? false : true; } bool HasChild() { return m_pChildList.empty() ? false : true; }
int GetChildCount() { return m_pChildList.size(); } int GetChildCount() { return m_pChildList.size(); }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
const TWindowContainer& GetChildList() const { return m_pChildList; } const TWindowContainer& GetChildList() const { return m_pChildList; }
#endif
CWindow * GetRoot(); CWindow * GetRoot();
CWindow * GetParent(); CWindow * GetParent();

View File

@@ -652,7 +652,6 @@ namespace UI
m_pRightCaptureWindow = NULL; m_pRightCaptureWindow = NULL;
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void CWindowManager::ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex) void CWindowManager::ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex)
{ {
// recursively walk the window tree starting from layers and clear stored cooldown entries // recursively walk the window tree starting from layers and clear stored cooldown entries
@@ -683,7 +682,6 @@ namespace UI
recurse(pLayer); recurse(pLayer);
} }
} }
#endif
void CWindowManager::SetResolution(int hres, int vres) void CWindowManager::SetResolution(int hres, int vres)
{ {

View File

@@ -106,9 +106,7 @@ namespace UI
void SetTop(CWindow * pWin); void SetTop(CWindow * pWin);
void SetTopUIWindow(); void SetTopUIWindow();
void ResetCapture(); void ResetCapture();
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex); void ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex);
#endif
void Update(); void Update();

View File

@@ -1254,7 +1254,6 @@ PyObject * wndMgrSetSlotCoolTime(PyObject * poSelf, PyObject * poArgs)
return Py_BuildNone(); return Py_BuildNone();
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
PyObject* wndMgrStoreSlotCoolTime(PyObject* poSelf, PyObject* poArgs) PyObject* wndMgrStoreSlotCoolTime(PyObject* poSelf, PyObject* poArgs)
{ {
UI::CWindow* pWin; UI::CWindow* pWin;
@@ -1326,7 +1325,6 @@ PyObject* wndMgrTransferSlotCoolTime(PyObject* poSelf, PyObject* poArgs)
return Py_BuildNone(); return Py_BuildNone();
} }
#endif
PyObject * wndMgrSetToggleSlot(PyObject * poSelf, PyObject * poArgs) PyObject * wndMgrSetToggleSlot(PyObject * poSelf, PyObject * poArgs)
{ {
@@ -2497,11 +2495,9 @@ void initwndMgr()
{ "SetSlotCount", wndMgrSetSlotCount, METH_VARARGS }, { "SetSlotCount", wndMgrSetSlotCount, METH_VARARGS },
{ "SetSlotCountNew", wndMgrSetSlotCountNew, METH_VARARGS }, { "SetSlotCountNew", wndMgrSetSlotCountNew, METH_VARARGS },
{ "SetSlotCoolTime", wndMgrSetSlotCoolTime, METH_VARARGS }, { "SetSlotCoolTime", wndMgrSetSlotCoolTime, METH_VARARGS },
#ifdef FIX_REFRESH_SKILL_COOLDOWN
{ "StoreSlotCoolTime", wndMgrStoreSlotCoolTime, METH_VARARGS }, { "StoreSlotCoolTime", wndMgrStoreSlotCoolTime, METH_VARARGS },
{ "RestoreSlotCoolTime", wndMgrRestoreSlotCoolTime, METH_VARARGS }, { "RestoreSlotCoolTime", wndMgrRestoreSlotCoolTime, METH_VARARGS },
{ "TransferSlotCoolTime", wndMgrTransferSlotCoolTime, METH_VARARGS }, { "TransferSlotCoolTime", wndMgrTransferSlotCoolTime, METH_VARARGS },
#endif
{ "SetToggleSlot", wndMgrSetToggleSlot, METH_VARARGS }, { "SetToggleSlot", wndMgrSetToggleSlot, METH_VARARGS },
{ "ActivateSlot", wndMgrActivateSlot, METH_VARARGS }, { "ActivateSlot", wndMgrActivateSlot, METH_VARARGS },
{ "DeactivateSlot", wndMgrDeactivateSlot, METH_VARARGS }, { "DeactivateSlot", wndMgrDeactivateSlot, METH_VARARGS },

View File

@@ -362,10 +362,22 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
BOOL IsActEmotion(); BOOL IsActEmotion();
DWORD GetComboIndex(); DWORD GetComboIndex();
float GetAttackingElapsedTime(); float GetAttackingElapsedTime();
#ifdef FIX_POS_SYNC
void SetBlendingPosition(const TPixelPosition& c_rPosition, float fBlendingTime = 1.0f);
#else
void SetBlendingPosition(const TPixelPosition & c_rPosition, float fBlendingTime = 1.0f); void SetBlendingPosition(const TPixelPosition & c_rPosition, float fBlendingTime = 1.0f);
#endif
void ResetBlendingPosition(); void ResetBlendingPosition();
void GetBlendingPosition(TPixelPosition * pPosition); void GetBlendingPosition(TPixelPosition * pPosition);
#ifdef FIX_POS_SYNC
struct BlendingPosition {
D3DXVECTOR3 source;
D3DXVECTOR3 dest;
float duration;
};
#endif
BOOL NormalAttack(float fDirRot, float fBlendTime = 0.1f); BOOL NormalAttack(float fDirRot, float fBlendTime = 0.1f);
BOOL ComboAttack(DWORD wMotionIndex, float fDirRot, float fBlendTime = 0.1f); BOOL ComboAttack(DWORD wMotionIndex, float fDirRot, float fBlendTime = 0.1f);
@@ -479,6 +491,13 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
void RenderCollisionData(); void RenderCollisionData();
void RenderToShadowMap(); void RenderToShadowMap();
#ifdef FIX_POS_SYNC
void ClientAttack(DWORD dwVID);
void ServerAttack(DWORD dwVID);
bool ProcessingClientAttack(DWORD dwVID);
bool ServerAttackCameFirst(DWORD dwVID);
#endif
protected: protected:
void __AdjustCollisionMovement(const CGraphicObjectInstance * c_pGraphicObjectInstance); void __AdjustCollisionMovement(const CGraphicObjectInstance * c_pGraphicObjectInstance);
@@ -496,9 +515,7 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
float GetHeight(); float GetHeight();
void ShowAllAttachingEffect(); void ShowAllAttachingEffect();
void HideAllAttachingEffect(); void HideAllAttachingEffect();
#ifdef __ENABLE_STEALTH_FIX__ //EXP
void HideAllAttachingEffectForEunhyeong(); void HideAllAttachingEffectForEunhyeong();
#endif
void ClearAttachingEffect(); void ClearAttachingEffect();
// Fishing // Fishing
@@ -605,6 +622,10 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
void __ClearCombo(); void __ClearCombo();
void __OnEndCombo(); void __OnEndCombo();
#ifdef FIX_POS_SYNC
void __Push(const TPixelPosition& c_rkPPosDst, unsigned int unDuration);
#endif
void __ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill = 0, BOOL isSendPacket = TRUE); void __ProcessDataAttackSuccess(const NRaceData::TAttackData & c_rAttackData, CActorInstance & rVictim, const D3DXVECTOR3 & c_rv3Position, UINT uiSkill = 0, BOOL isSendPacket = TRUE);
void __ProcessMotionEventAttackSuccess(DWORD dwMotionKey, BYTE byEventIndex, CActorInstance & rVictim); void __ProcessMotionEventAttackSuccess(DWORD dwMotionKey, BYTE byEventIndex, CActorInstance & rVictim);
void __ProcessMotionAttackSuccess(DWORD dwMotionKey, CActorInstance & rVictim); void __ProcessMotionAttackSuccess(DWORD dwMotionKey, CActorInstance & rVictim);
@@ -612,7 +633,11 @@ class CActorInstance : public IActorInstance, public IFlyTargetableObject
void __HitStone(CActorInstance& rVictim); void __HitStone(CActorInstance& rVictim);
void __HitGood(CActorInstance& rVictim); void __HitGood(CActorInstance& rVictim);
#ifdef FIX_POS_SYNC
void __HitGreate(CActorInstance& rVictim, UINT uiSkill);
#else
void __HitGreate(CActorInstance& rVictim); void __HitGreate(CActorInstance& rVictim);
#endif
void __PushDirect(CActorInstance & rVictim); void __PushDirect(CActorInstance & rVictim);
void __PushCircle(CActorInstance & rVictim); void __PushCircle(CActorInstance & rVictim);

View File

@@ -580,10 +580,7 @@ void CActorInstance::ShowAllAttachingEffect()
{ {
CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex); CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex);
CEffectManager::Instance().ShowEffect(); CEffectManager::Instance().ShowEffect();
#ifdef __ENABLE_STEALTH_FIX__
CEffectManager::Instance().ReleaseAlwaysHidden(); CEffectManager::Instance().ReleaseAlwaysHidden();
//CEffectManager::Instance().Update();
#endif
} }
} }
@@ -595,13 +592,10 @@ void CActorInstance::HideAllAttachingEffect()
{ {
CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex); CEffectManager::Instance().SelectEffectInstance(it->dwEffectIndex);
CEffectManager::Instance().HideEffect(); CEffectManager::Instance().HideEffect();
#ifdef __ENABLE_STEALTH_FIX__
CEffectManager::Instance().ApplyAlwaysHidden(); CEffectManager::Instance().ApplyAlwaysHidden();
#endif
} }
} }
#ifdef __ENABLE_STEALTH_FIX__ //EXP
void CActorInstance::HideAllAttachingEffectForEunhyeong() void CActorInstance::HideAllAttachingEffectForEunhyeong()
{ {
std::list<TAttachingEffect>::iterator it; std::list<TAttachingEffect>::iterator it;
@@ -652,7 +646,6 @@ void CActorInstance::HideAllAttachingEffectForEunhyeong()
CEffectManager::Instance().ApplyAlwaysHidden(); CEffectManager::Instance().ApplyAlwaysHidden();
} }
} }
#endif
void CActorInstance::__ClearAttachingEffect() void CActorInstance::__ClearAttachingEffect()
{ {

View File

@@ -448,11 +448,7 @@ BOOL CInstanceBase::IsMovieMode()
BOOL CInstanceBase::IsInvisibility() BOOL CInstanceBase::IsInvisibility()
{ {
#ifdef __ENABLE_STEALTH_FIX__
if (IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG) || IsAffect(AFFECT_REVIVE_INVISIBILITY)) if (IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG) || IsAffect(AFFECT_REVIVE_INVISIBILITY))
#else
if (IsAffect(AFFECT_INVISIBILITY))
#endif
return true; return true;
return false; return false;
@@ -1560,7 +1556,11 @@ void CInstanceBase::StateProcess()
SetAdvancingRotation(fRotDst); SetAdvancingRotation(fRotDst);
SetRotation(fRotDst); SetRotation(fRotDst);
#ifdef FIX_POS_SYNC
NEW_UseSkill(1, eFunc& FUNC_SKILL - 1, uArg & 0x0f, (uArg >> 4) ? true : false);
#else
NEW_UseSkill(0, eFunc & 0x7f, uArg&0x0f, (uArg>>4) ? true : false); NEW_UseSkill(0, eFunc & 0x7f, uArg&0x0f, (uArg>>4) ? true : false);
#endif
//Tracen("가깝기 때문에 워프 공격"); //Tracen("가깝기 때문에 워프 공격");
} }
} }
@@ -1738,7 +1738,11 @@ void CInstanceBase::MovementProcess()
{ {
SetAdvancingRotation(m_fDstRot); SetAdvancingRotation(m_fDstRot);
BlendRotation(m_fDstRot); BlendRotation(m_fDstRot);
#ifdef FIX_POS_SYNC
NEW_UseSkill(1, m_kMovAfterFunc.eFunc& FUNC_SKILL - 1, m_kMovAfterFunc.uArg & 0x0f, (m_kMovAfterFunc.uArg >> 4) ? true : false);
#else
NEW_UseSkill(0, m_kMovAfterFunc.eFunc & 0x7f, m_kMovAfterFunc.uArg&0x0f, (m_kMovAfterFunc.uArg>>4) ? true : false); NEW_UseSkill(0, m_kMovAfterFunc.eFunc & 0x7f, m_kMovAfterFunc.uArg&0x0f, (m_kMovAfterFunc.uArg>>4) ? true : false);
#endif
} }
else else
{ {
@@ -1794,11 +1798,7 @@ void CInstanceBase::MovementProcess()
m_GraphicThingInstance.SetRotation(fRotation); m_GraphicThingInstance.SetRotation(fRotation);
} }
#ifdef __ENABLE_STEALTH_FIX__
if (__IsInDustRange() && !IsAffect(AFFECT_INVISIBILITY) && !IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_REVIVE_INVISIBILITY)) if (__IsInDustRange() && !IsAffect(AFFECT_INVISIBILITY) && !IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_REVIVE_INVISIBILITY))
#else
if (__IsInDustRange())
#endif
{ {
float fDustDistance = NEW_GetDistanceFromDestPixelPosition(m_kPPosDust); float fDustDistance = NEW_GetDistanceFromDestPixelPosition(m_kPPosDust);
if (IsMountingHorse()) if (IsMountingHorse())
@@ -1978,7 +1978,6 @@ void CInstanceBase::Render()
m_kHorse.Render(); m_kHorse.Render();
m_GraphicThingInstance.Render(); m_GraphicThingInstance.Render();
#ifdef __ENABLE_STEALTH_FIX__
CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance(); CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
for (auto ptr = rkChrMgr.CharacterInstanceBegin(); ptr != rkChrMgr.CharacterInstanceEnd(); ++ptr) for (auto ptr = rkChrMgr.CharacterInstanceBegin(); ptr != rkChrMgr.CharacterInstanceEnd(); ++ptr)
@@ -1999,7 +1998,6 @@ void CInstanceBase::Render()
} }
} }
} }
#endif
if (CActorInstance::IsDirLine()) if (CActorInstance::IsDirLine())
{ {

View File

@@ -160,11 +160,7 @@ void CInstanceBase::ProcessDamage()
m_bDamageEffectType = !m_bDamageEffectType; m_bDamageEffectType = !m_bDamageEffectType;
} }
#ifdef __ENABLE_STEALTH_FIX__ //EXP
else if (!bTarget || ((IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG)) && bTarget)) else if (!bTarget || ((IsAffect(AFFECT_INVISIBILITY) || IsAffect(AFFECT_EUNHYEONG)) && bTarget))
#else
else if (bTarget == false)
#endif
{ {
strDamageType = "nontarget_"; strDamageType = "nontarget_";
rdwCRCEft = EFFECT_DAMAGE_NOT_TARGET; rdwCRCEft = EFFECT_DAMAGE_NOT_TARGET;
@@ -802,31 +798,23 @@ void CInstanceBase::__SetReviveInvisibilityAffect(bool isVisible)
if (IsWearingDress()) if (IsWearingDress())
return; return;
#ifdef __ENABLE_STEALTH_FIX__
if (__IsMainInstance() || __MainCanSeeHiddenThing()) if (__IsMainInstance() || __MainCanSeeHiddenThing())
{ {
#endif
m_GraphicThingInstance.BlendAlphaValue(0.5f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(0.5f, 1.0f);
#ifdef __ENABLE_STEALTH_FIX__
} }
else else
{ {
m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f);
m_GraphicThingInstance.HideAllAttachingEffect(); m_GraphicThingInstance.HideAllAttachingEffect();
} }
#endif
} }
else else
{ {
#ifdef __ENABLE_STEALTH_FIX__
if (!IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_INVISIBILITY)) if (!IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_INVISIBILITY))
{ {
#endif
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
#ifdef __ENABLE_STEALTH_FIX__
m_GraphicThingInstance.ShowAllAttachingEffect(); m_GraphicThingInstance.ShowAllAttachingEffect();
} }
#endif
} }
} }
@@ -846,26 +834,20 @@ void CInstanceBase::__Assassin_SetEunhyeongAffect(bool isVisible)
{ {
// 2004.10.16.myevan.은형법 완전 투명 // 2004.10.16.myevan.은형법 완전 투명
m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(0.0f, 1.0f);
#ifdef __ENABLE_STEALTH_FIX__ //EXP
if (!IsAffect(AFFECT_INVISIBILITY) && !IsAffect(AFFECT_REVIVE_INVISIBILITY)) if (!IsAffect(AFFECT_INVISIBILITY) && !IsAffect(AFFECT_REVIVE_INVISIBILITY))
m_GraphicThingInstance.HideAllAttachingEffectForEunhyeong(); m_GraphicThingInstance.HideAllAttachingEffectForEunhyeong();
else else
#endif
m_GraphicThingInstance.HideAllAttachingEffect(); m_GraphicThingInstance.HideAllAttachingEffect();
} }
} }
else else
{ {
#ifdef __ENABLE_STEALTH_FIX__
if (!IsAffect(AFFECT_REVIVE_INVISIBILITY) && !IsAffect(AFFECT_INVISIBILITY)) if (!IsAffect(AFFECT_REVIVE_INVISIBILITY) && !IsAffect(AFFECT_INVISIBILITY))
{ {
#endif
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
m_GraphicThingInstance.ShowAllAttachingEffect(); m_GraphicThingInstance.ShowAllAttachingEffect();
#ifdef __ENABLE_STEALTH_FIX__
ProcessDamage(); ProcessDamage();
} }
#endif
} }
} }
@@ -944,11 +926,7 @@ void CInstanceBase::__SetAffect(UINT eAffect, bool isVisible)
return; return;
break; break;
case AFFECT_REVIVE_INVISIBILITY: case AFFECT_REVIVE_INVISIBILITY:
#ifdef __ENABLE_STEALTH_FIX__
__SetReviveInvisibilityAffect(isVisible); __SetReviveInvisibilityAffect(isVisible);
#else
__Assassin_SetEunhyeongAffect(isVisible);
#endif
break; break;
case AFFECT_EUNHYEONG: case AFFECT_EUNHYEONG:
__Assassin_SetEunhyeongAffect(isVisible); __Assassin_SetEunhyeongAffect(isVisible);
@@ -964,28 +942,16 @@ void CInstanceBase::__SetAffect(UINT eAffect, bool isVisible)
// 2004.07.17.levites.isShow를 ViewFrustumCheck로 변경 // 2004.07.17.levites.isShow를 ViewFrustumCheck로 변경
if (isVisible) if (isVisible)
{ {
#ifndef __ENABLE_STEALTH_FIX__
m_GraphicThingInstance.ClearAttachingEffect();
__EffectContainer_Destroy();
DetachTextTail();
#else
m_GraphicThingInstance.HideAllAttachingEffect(); m_GraphicThingInstance.HideAllAttachingEffect();
#endif
} }
else else
{ {
#ifdef __ENABLE_STEALTH_FIX__
if (!IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_REVIVE_INVISIBILITY)) if (!IsAffect(AFFECT_EUNHYEONG) && !IsAffect(AFFECT_REVIVE_INVISIBILITY))
{ {
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f); m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
m_GraphicThingInstance.ShowAllAttachingEffect(); m_GraphicThingInstance.ShowAllAttachingEffect();
ProcessDamage(); ProcessDamage();
} }
#else
m_GraphicThingInstance.BlendAlphaValue(1.0f, 1.0f);
AttachTextTail();
RefreshTextTail();
#endif
} }
return; return;
break; break;

View File

@@ -6,14 +6,3 @@
#define ENABLE_DRAGON_SOUL_SYSTEM #define ENABLE_DRAGON_SOUL_SYSTEM
#define ENABLE_NEW_EQUIPMENT_SYSTEM #define ENABLE_NEW_EQUIPMENT_SYSTEM
//#define ENABLE_DISCORD_RPC //#define ENABLE_DISCORD_RPC
// Fixes
#define FIX_MESSENGER_ACTION_SYNC
#define FIX_REFRESH_SKILL_COOLDOWN
#define FIX_SEQ_254
#define CHAR_SELECT_STATS_IMPROVEMENT // Improve stats values in character select screen
#define __ENABLE_STEALTH_FIX__
#define __BL_LEVEL_FIX__
// Python-only
#define FIX_HORSE_SKILLS_TAB

View File

@@ -2,9 +2,7 @@
#include "Gamelib/RaceData.h" #include "Gamelib/RaceData.h"
#include "StdAfx.h" #include "StdAfx.h"
#ifdef FIX_REFRESH_SKILL_COOLDOWN
#include "GameType.h" #include "GameType.h"
#endif
typedef uint8_t TPacketHeader; typedef uint8_t TPacketHeader;
@@ -516,6 +514,18 @@ typedef struct command_attack
uint32_t dwVictimVID; // 적 VID uint32_t dwVictimVID; // 적 VID
uint8_t bCRCMagicCubeProcPiece; uint8_t bCRCMagicCubeProcPiece;
uint8_t bCRCMagicCubeFilePiece; uint8_t bCRCMagicCubeFilePiece;
#ifdef FIX_POS_SYNC
BOOL bPacket;
LONG lSX;
LONG lSY;
LONG lX;
LONG lY;
float fSyncDestX;
float fSyncDestY;
DWORD dwBlendDuration;
DWORD dwComboMotion;
DWORD dwTime;
#endif
} TPacketCGAttack; } TPacketCGAttack;
typedef struct command_chat typedef struct command_chat
@@ -735,9 +745,7 @@ enum
MESSENGER_SUBHEADER_GC_LOGOUT, MESSENGER_SUBHEADER_GC_LOGOUT,
MESSENGER_SUBHEADER_GC_INVITE, MESSENGER_SUBHEADER_GC_INVITE,
MESSENGER_SUBHEADER_GC_MOBILE, MESSENGER_SUBHEADER_GC_MOBILE,
#ifdef FIX_MESSENGER_ACTION_SYNC
MESSENGER_SUBHEADER_GC_REMOVE_FRIEND MESSENGER_SUBHEADER_GC_REMOVE_FRIEND
#endif
}; };
typedef struct packet_messenger typedef struct packet_messenger
@@ -1870,6 +1878,16 @@ typedef struct packet_attack
uint32_t dwVID; uint32_t dwVID;
uint32_t dwVictimVID; // 적 VID uint32_t dwVictimVID; // 적 VID
uint8_t bType; // 공격 유형 uint8_t bType; // 공격 유형
#ifdef FIX_POS_SYNC
BOOL bPacket;
LONG lSX;
LONG lSY;
LONG lX;
LONG lY;
float fSyncDestX;
float fSyncDestY;
DWORD dwBlendDuration;
#endif
} TPacketGCAttack; } TPacketGCAttack;
typedef struct packet_c2c typedef struct packet_c2c

View File

@@ -1489,22 +1489,4 @@ void initapp()
#else #else
PyModule_AddIntConstant(poModule, "ENABLE_NEW_EQUIPMENT_SYSTEM", 0); PyModule_AddIntConstant(poModule, "ENABLE_NEW_EQUIPMENT_SYSTEM", 0);
#endif #endif
#ifdef FIX_MESSENGER_ACTION_SYNC
PyModule_AddIntConstant(poModule, "FIX_MESSENGER_ACTION_SYNC", 1);
#else
PyModule_AddIntConstant(poModule, "FIX_MESSENGER_ACTION_SYNC", 0);
#endif
#ifdef FIX_REFRESH_SKILL_COOLDOWN
PyModule_AddIntConstant(poModule, "FIX_REFRESH_SKILL_COOLDOWN", 1);
#else
PyModule_AddIntConstant(poModule, "FIX_REFRESH_SKILL_COOLDOWN", 0);
#endif
#ifdef FIX_HORSE_SKILLS_TAB
PyModule_AddIntConstant(poModule, "FIX_HORSE_SKILLS_TAB", 1);
#else
PyModule_AddIntConstant(poModule, "FIX_HORSE_SKILLS_TAB", 0);
#endif
} }

View File

@@ -5,10 +5,8 @@ void CPythonMessenger::RemoveFriend(const char * c_szKey)
{ {
m_FriendNameMap.erase(c_szKey); m_FriendNameMap.erase(c_szKey);
#ifdef FIX_MESSENGER_ACTION_SYNC
if (m_poMessengerHandler) if (m_poMessengerHandler)
PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey)); PyCallClassMemberFunc(m_poMessengerHandler, "OnRemoveList", Py_BuildValue("(is)", MESSENGER_GRUOP_INDEX_FRIEND, c_szKey));
#endif
} }
void CPythonMessenger::OnFriendLogin(const char * c_szKey/*, const char * c_szName*/) void CPythonMessenger::OnFriendLogin(const char * c_szKey/*, const char * c_szName*/)

View File

@@ -662,14 +662,10 @@ bool CPythonNetworkStream::RecvPingPacket()
if (!Send(sizeof(TPacketCGPong), &kPacketPong)) if (!Send(sizeof(TPacketCGPong), &kPacketPong))
return false; return false;
#ifdef FIX_SEQ_254
return SendSequence();
#else
if (IsSecurityMode()) if (IsSecurityMode())
return SendSequence(); return SendSequence();
else else
return true; return true;
#endif
} }
bool CPythonNetworkStream::RecvDefaultPacket(int header) bool CPythonNetworkStream::RecvDefaultPacket(int header)

View File

@@ -1495,7 +1495,6 @@ bool CPythonNetworkStream::RecvPointChange()
case POINT_STAT_RESET_COUNT: case POINT_STAT_RESET_COUNT:
__RefreshStatus(); __RefreshStatus();
break; break;
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
case POINT_PLAYTIME: case POINT_PLAYTIME:
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].dwPlayMinutes = PointChange.value; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].dwPlayMinutes = PointChange.value;
break; break;
@@ -1504,9 +1503,6 @@ bool CPythonNetworkStream::RecvPointChange()
__RefreshStatus(); __RefreshStatus();
__RefreshSkillWindow(); __RefreshSkillWindow();
break; break;
#else
case POINT_LEVEL:
#endif
case POINT_ST: case POINT_ST:
case POINT_DX: case POINT_DX:
case POINT_HT: case POINT_HT:
@@ -2429,6 +2425,30 @@ bool CPythonNetworkStream::RecvDamageInfoPacket()
return true; return true;
} }
#ifdef FIX_POS_SYNC
bool CPythonNetworkStream::RecvCharacterAttackPacket()
{
TPacketGCAttack kPacket;
if (!Recv(sizeof(TPacketGCAttack), &kPacket))
{
Tracen("CPythonNetworkStream::RecvCharacterAttackPacket - PACKET READ ERROR");
return false;
}
if (kPacket.lX && kPacket.lY) {
__GlobalPositionToLocalPosition(kPacket.lX, kPacket.lY);
}
__GlobalPositionToLocalPosition(kPacket.lSX, kPacket.lSY);
TPixelPosition tSyncPosition = TPixelPosition{ kPacket.fSyncDestX, kPacket.fSyncDestY, 0 };
m_rokNetActorMgr->AttackActor(kPacket.dwVID, kPacket.dwVictimVID, kPacket.lX, kPacket.lY, tSyncPosition, kPacket.dwBlendDuration);
return true;
}
#endif
bool CPythonNetworkStream::RecvTargetPacket() bool CPythonNetworkStream::RecvTargetPacket()
{ {
TPacketGCTarget TargetPacket; TPacketGCTarget TargetPacket;
@@ -2520,11 +2540,20 @@ bool CPythonNetworkStream::RecvChangeSpeedPacket()
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
// Recv // Recv
#ifdef FIX_POS_SYNC
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim, BOOL bPacket, CActorInstance::BlendingPosition& sBlending)
#else
bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim) bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
#endif
{ {
if (!__CanActMainInstance()) if (!__CanActMainInstance())
return true; return true;
#ifdef FIX_POS_SYNC
CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
#endif
#ifdef ATTACK_TIME_LOG #ifdef ATTACK_TIME_LOG
static DWORD prevTime = timeGetTime(); static DWORD prevTime = timeGetTime();
DWORD curTime = timeGetTime(); DWORD curTime = timeGetTime();
@@ -2537,6 +2566,25 @@ bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
kPacketAtk.header = HEADER_CG_ATTACK; kPacketAtk.header = HEADER_CG_ATTACK;
kPacketAtk.bType = uMotAttack; kPacketAtk.bType = uMotAttack;
kPacketAtk.dwVictimVID = dwVIDVictim; kPacketAtk.dwVictimVID = dwVIDVictim;
#ifdef FIX_POS_SYNC
kPacketAtk.bPacket = bPacket;
kPacketAtk.lX = (long)sBlending.dest.x;
kPacketAtk.lY = (long)sBlending.dest.y;
kPacketAtk.lSX = (long)sBlending.source.x;
kPacketAtk.lSY = (long)sBlending.source.y;
kPacketAtk.fSyncDestX = sBlending.dest.x;
// sources and dest are normalized with both coordinates positive
// since fSync are ment to be broadcasted to other clients, the Y has to preserve the negative coord
kPacketAtk.fSyncDestY = -sBlending.dest.y;
kPacketAtk.dwBlendDuration = (unsigned int)(sBlending.duration * 1000);
kPacketAtk.dwComboMotion = pkInstMain->GetComboMotion();
kPacketAtk.dwTime = ELTimer_GetServerMSec();
if (kPacketAtk.lX && kPacketAtk.lY)
__LocalPositionToGlobalPosition(kPacketAtk.lX, kPacketAtk.lY);
__LocalPositionToGlobalPosition(kPacketAtk.lSX, kPacketAtk.lSY);
#endif
if (!SendSpecial(sizeof(kPacketAtk), &kPacketAtk)) if (!SendSpecial(sizeof(kPacketAtk), &kPacketAtk))
{ {
@@ -2832,7 +2880,6 @@ bool CPythonNetworkStream::RecvMessenger()
break; break;
} }
#ifdef FIX_MESSENGER_ACTION_SYNC
case MESSENGER_SUBHEADER_GC_REMOVE_FRIEND: case MESSENGER_SUBHEADER_GC_REMOVE_FRIEND:
{ {
BYTE bLength; BYTE bLength;
@@ -2850,7 +2897,6 @@ bool CPythonNetworkStream::RecvMessenger()
break; break;
} }
#endif
} }
return true; return true;
} }

View File

@@ -324,10 +324,9 @@ void CPythonNetworkStream::__RecvCharacterUpdatePacket(SNetworkUpdateActorData *
__RefreshAlignmentWindow(); __RefreshAlignmentWindow();
__RefreshEquipmentWindow(); __RefreshEquipmentWindow();
__RefreshInventoryWindow(); __RefreshInventoryWindow();
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wHairPart = pkNetUpdateActorData->m_dwHair; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wHairPart = pkNetUpdateActorData->m_dwHair;
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wMainPart = pkNetUpdateActorData->m_dwArmor; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wMainPart = pkNetUpdateActorData->m_dwArmor;
#endif
} }
else else
{ {

View File

@@ -328,7 +328,7 @@ bool CPythonNetworkStream::__RecvPlayerPoints()
for (DWORD i = 0; i < POINT_MAX_NUM; ++i) for (DWORD i = 0; i < POINT_MAX_NUM; ++i)
{ {
CPythonPlayer::Instance().SetStatus(i, PointsPacket.points[i]); CPythonPlayer::Instance().SetStatus(i, PointsPacket.points[i]);
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
if (i == POINT_LEVEL) if (i == POINT_LEVEL)
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointsPacket.points[i]; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointsPacket.points[i];
else if (i == POINT_ST) else if (i == POINT_ST)
@@ -339,7 +339,6 @@ bool CPythonNetworkStream::__RecvPlayerPoints()
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointsPacket.points[i]; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointsPacket.points[i];
else if (i == POINT_IQ) else if (i == POINT_IQ)
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointsPacket.points[i]; m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointsPacket.points[i];
#endif
} }
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshStatus", Py_BuildValue("()")); PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshStatus", Py_BuildValue("()"));

View File

@@ -532,7 +532,6 @@ void CPythonPlayer::NotifyChangePKMode()
PyCallClassMemberFunc(m_ppyGameWindow, "OnChangePKMode", Py_BuildValue("()")); PyCallClassMemberFunc(m_ppyGameWindow, "OnChangePKMode", Py_BuildValue("()"));
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void CPythonPlayer::ResetSkillCoolTimes() void CPythonPlayer::ResetSkillCoolTimes()
{ {
for (int i = 0; i < SKILL_MAX_NUM; ++i) for (int i = 0; i < SKILL_MAX_NUM; ++i)
@@ -599,7 +598,6 @@ void CPythonPlayer::ResetHorseSkillCoolTime(DWORD dwSkillIndex, DWORD dwVisualSl
CPythonSkill::SKILL_TYPE_HORSE, CPythonSkill::SKILL_TYPE_HORSE,
dwVisualSlotIndex); dwVisualSlotIndex);
} }
#endif
void CPythonPlayer::MoveItemData(TItemPos SrcCell, TItemPos DstCell) void CPythonPlayer::MoveItemData(TItemPos SrcCell, TItemPos DstCell)
{ {
@@ -1104,12 +1102,10 @@ void CPythonPlayer::SetSkillLevel_(DWORD dwSkillIndex, DWORD dwSkillGrade, DWORD
return; return;
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
if (m_playerStatus.aSkill[dwSlotIndex].iLevel <= 0) if (m_playerStatus.aSkill[dwSlotIndex].iLevel <= 0)
{ {
ResetSkillCoolTimeForSlot(dwSlotIndex); ResetSkillCoolTimeForSlot(dwSlotIndex);
} }
#endif
m_playerStatus.aSkill[dwSlotIndex].fcurEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel) / 100.0f; m_playerStatus.aSkill[dwSlotIndex].fcurEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel) / 100.0f;
m_playerStatus.aSkill[dwSlotIndex].fnextEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel + 1) / 100.0f; m_playerStatus.aSkill[dwSlotIndex].fnextEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel + 1) / 100.0f;
@@ -1644,7 +1640,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
for (it = m_skillSlotDict.begin(); it != m_skillSlotDict.end();) for (it = m_skillSlotDict.begin(); it != m_skillSlotDict.end();)
{ {
#ifdef FIX_REFRESH_SKILL_COOLDOWN
CPythonSkill::TSkillData* data = nullptr; CPythonSkill::TSkillData* data = nullptr;
if (!CPythonSkill::Instance().GetSkillData(it->first, &data)) if (!CPythonSkill::Instance().GetSkillData(it->first, &data))
@@ -1654,9 +1649,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
} }
if (bAll || (data->byType != CPythonSkill::SKILL_TYPE_SUPPORT && data->byType != CPythonSkill::SKILL_TYPE_HORSE && data->byType != CPythonSkill::SKILL_TYPE_GUILD)) if (bAll || (data->byType != CPythonSkill::SKILL_TYPE_SUPPORT && data->byType != CPythonSkill::SKILL_TYPE_HORSE && data->byType != CPythonSkill::SKILL_TYPE_GUILD))
#else
if (bAll || __GetSkillType(it->first) == CPythonSkill::SKILL_TYPE_ACTIVE)
#endif
it = m_skillSlotDict.erase(it); it = m_skillSlotDict.erase(it);
else else
++it; ++it;
@@ -1664,7 +1656,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
for (int i = 0; i < SKILL_MAX_NUM; ++i) for (int i = 0; i < SKILL_MAX_NUM; ++i)
{ {
#ifdef FIX_REFRESH_SKILL_COOLDOWN
DWORD dwSkillIndex = m_playerStatus.aSkill[i].dwIndex; DWORD dwSkillIndex = m_playerStatus.aSkill[i].dwIndex;
CPythonSkill::TSkillData* pSkillData = NULL; CPythonSkill::TSkillData* pSkillData = NULL;
@@ -1680,7 +1671,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
pSkillData->byType == CPythonSkill::SKILL_TYPE_HORSE || pSkillData->byType == CPythonSkill::SKILL_TYPE_HORSE ||
pSkillData->byType == CPythonSkill::SKILL_TYPE_GUILD)) pSkillData->byType == CPythonSkill::SKILL_TYPE_GUILD))
continue; continue;
#endif
ZeroMemory(&m_playerStatus.aSkill[i], sizeof(TSkillInstance)); ZeroMemory(&m_playerStatus.aSkill[i], sizeof(TSkillInstance));
} }
@@ -1692,7 +1682,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
m_playerStatus.aSkill[j].fcurEfficientPercentage = 0.0f; m_playerStatus.aSkill[j].fcurEfficientPercentage = 0.0f;
m_playerStatus.aSkill[j].fnextEfficientPercentage = 0.05f; m_playerStatus.aSkill[j].fnextEfficientPercentage = 0.05f;
#ifdef FIX_REFRESH_SKILL_COOLDOWN
m_playerStatus.aSkill[j].isCoolTime = false; m_playerStatus.aSkill[j].isCoolTime = false;
m_playerStatus.aSkill[j].fCoolTime = 0.0f; m_playerStatus.aSkill[j].fCoolTime = 0.0f;
m_playerStatus.aSkill[j].fLastUsedTime = 0.0f; m_playerStatus.aSkill[j].fLastUsedTime = 0.0f;
@@ -1704,7 +1693,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
CPythonSkill::SKILL_TYPE_ACTIVE, CPythonSkill::SKILL_TYPE_ACTIVE,
j + iGrade * CPythonSkill::SKILL_GRADE_STEP_COUNT); j + iGrade * CPythonSkill::SKILL_GRADE_STEP_COUNT);
} }
#endif
} }
if (m_ppyGameWindow) if (m_ppyGameWindow)

View File

@@ -262,11 +262,9 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
void NotifyCharacterUpdate(DWORD dwVID); void NotifyCharacterUpdate(DWORD dwVID);
void NotifyDeadMainCharacter(); void NotifyDeadMainCharacter();
void NotifyChangePKMode(); void NotifyChangePKMode();
#ifdef FIX_REFRESH_SKILL_COOLDOWN
void ResetSkillCoolTimes(); void ResetSkillCoolTimes();
void ResetSkillCoolTimeForSlot(DWORD dwSlotIndex); void ResetSkillCoolTimeForSlot(DWORD dwSlotIndex);
void ResetHorseSkillCoolTime(DWORD dwSkillIndex, DWORD dwVisualSlotIndex); void ResetHorseSkillCoolTime(DWORD dwSkillIndex, DWORD dwVisualSlotIndex);
#endif
// Player Status // Player Status

View File

@@ -543,7 +543,6 @@ PyObject * playerGetSkillCoolTime(PyObject* poSelf, PyObject* poArgs)
return Py_BuildValue("ff", fCoolTime, fElapsedCoolTime); return Py_BuildValue("ff", fCoolTime, fElapsedCoolTime);
} }
#ifdef FIX_REFRESH_SKILL_COOLDOWN
PyObject * playerResetSkillCoolTimeForSlot(PyObject* poSelf, PyObject* poArgs) PyObject * playerResetSkillCoolTimeForSlot(PyObject* poSelf, PyObject* poArgs)
{ {
int iSlotIndex; int iSlotIndex;
@@ -566,7 +565,6 @@ PyObject* playerResetHorseSkillCoolTime(PyObject* poSelf, PyObject* poArgs)
Py_RETURN_NONE; Py_RETURN_NONE;
} }
#endif
PyObject * playerIsSkillActive(PyObject* poSelf, PyObject* poArgs) PyObject * playerIsSkillActive(PyObject* poSelf, PyObject* poArgs)
{ {
@@ -2258,10 +2256,8 @@ void initPlayer()
{ "IsSkillCoolTime", playerIsSkillCoolTime, METH_VARARGS }, { "IsSkillCoolTime", playerIsSkillCoolTime, METH_VARARGS },
{ "GetSkillCoolTime", playerGetSkillCoolTime, METH_VARARGS }, { "GetSkillCoolTime", playerGetSkillCoolTime, METH_VARARGS },
#ifdef FIX_REFRESH_SKILL_COOLDOWN
{ "ResetSkillCoolTimeForSlot", playerResetSkillCoolTimeForSlot, METH_VARARGS }, { "ResetSkillCoolTimeForSlot", playerResetSkillCoolTimeForSlot, METH_VARARGS },
{ "ResetHorseSkillCoolTime", playerResetHorseSkillCoolTime, METH_VARARGS }, { "ResetHorseSkillCoolTime", playerResetHorseSkillCoolTime, METH_VARARGS },
#endif
{ "IsSkillActive", playerIsSkillActive, METH_VARARGS }, { "IsSkillActive", playerIsSkillActive, METH_VARARGS },
{ "UseGuildSkill", playerUseGuildSkill, METH_VARARGS }, { "UseGuildSkill", playerUseGuildSkill, METH_VARARGS },
{ "AffectIndexToSkillIndex", playerAffectIndexToSkillIndex, METH_VARARGS }, { "AffectIndexToSkillIndex", playerAffectIndexToSkillIndex, METH_VARARGS },
@@ -2293,11 +2289,9 @@ void initPlayer()
{ "IsValuableItem", playerIsValuableItem, METH_VARARGS }, { "IsValuableItem", playerIsValuableItem, METH_VARARGS },
{ "IsOpenPrivateShop", playerIsOpenPrivateShop, METH_VARARGS }, { "IsOpenPrivateShop", playerIsOpenPrivateShop, METH_VARARGS },
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
{ "IsBeltInventorySlot", playerIsBeltInventorySlot, METH_VARARGS }, { "IsBeltInventorySlot", playerIsBeltInventorySlot, METH_VARARGS },
{ "IsEquippingBelt", playerIsEquippingBelt, METH_VARARGS }, { "IsEquippingBelt", playerIsEquippingBelt, METH_VARARGS },
{ "IsAvailableBeltInventoryCell", playerIsAvailableBeltInventoryCell, METH_VARARGS }, { "IsAvailableBeltInventoryCell", playerIsAvailableBeltInventoryCell, METH_VARARGS },
#endif
// Refine // Refine
{ "GetItemGrade", playerGetItemGrade, METH_VARARGS }, { "GetItemGrade", playerGetItemGrade, METH_VARARGS },