MR-2: Realtime character level updates + Macros removed
This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
#include "PythonWindow.h"
|
||||
#include "PythonSlotWindow.h"
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
#include "UserInterface/PythonSkill.h"
|
||||
#include "UserInterface/PythonPlayer.h"
|
||||
#endif
|
||||
|
||||
//#define __RENDER_SLOT_AREA__
|
||||
|
||||
@@ -209,12 +207,10 @@ void CSlotWindow::SetSlotType(DWORD dwType)
|
||||
m_dwSlotType = dwType;
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
DWORD CSlotWindow::GetSlotType() const
|
||||
{
|
||||
return m_dwSlotType;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void CSlotWindow::SetSlotStyle(DWORD dwStyle)
|
||||
@@ -520,7 +516,6 @@ void CSlotWindow::SetSlotCoolTime(DWORD dwIndex, float fCoolTime, float fElapsed
|
||||
pSlot->fStartCoolTime = CTimer::Instance().GetCurrentSecond() - fElapsedTime;
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void CSlotWindow::StoreSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex, float fCoolTime, float fElapsedTime)
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -618,12 +612,10 @@ void CSlotWindow::ActivateSlot(DWORD dwIndex)
|
||||
__CreateSlotEnableEffect();
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex);
|
||||
|
||||
if (it != m_CoolDownStore[1].end())
|
||||
it->second.bActive = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CSlotWindow::DeactivateSlot(DWORD dwIndex)
|
||||
@@ -635,12 +627,10 @@ void CSlotWindow::DeactivateSlot(DWORD dwIndex)
|
||||
|
||||
pSlot->bActive = FALSE;
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
std::map<DWORD, SStoreCoolDown>::iterator it = m_CoolDownStore[1].find(dwIndex);
|
||||
|
||||
if (it != m_CoolDownStore[1].end())
|
||||
it->second.bActive = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CSlotWindow::ClearSlot(DWORD dwIndex)
|
||||
@@ -1377,7 +1367,6 @@ void CSlotWindow::ReserveDestroyCoolTimeFinishEffect(DWORD dwSlotIndex)
|
||||
m_ReserveDestroyEffectDeque.push_back(dwSlotIndex);
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void CSlotWindow::ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex)
|
||||
{
|
||||
std::map<DWORD, SStoreCoolDown>& store = m_CoolDownStore[dwKey];
|
||||
@@ -1386,7 +1375,6 @@ void CSlotWindow::ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex)
|
||||
if (it != store.end())
|
||||
store.erase(it);
|
||||
}
|
||||
#endif
|
||||
|
||||
DWORD CSlotWindow::Type()
|
||||
{
|
||||
@@ -1509,9 +1497,7 @@ void CSlotWindow::__Initialize()
|
||||
m_dwSlotStyle = SLOT_STYLE_PICK_UP;
|
||||
m_dwToolTipSlotNumber = SLOT_NUMBER_NONE;
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
m_CoolDownStore.clear();
|
||||
#endif
|
||||
|
||||
|
||||
m_isUseMode = FALSE;
|
||||
|
||||
@@ -75,9 +75,7 @@ namespace UI
|
||||
} TSlot;
|
||||
typedef std::list<TSlot> TSlotList;
|
||||
typedef TSlotList::iterator TSlotListIterator;
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
typedef struct SStoreCoolDown { float fCoolTime; float fElapsedTime; bool bActive; };
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
@@ -88,9 +86,7 @@ namespace UI
|
||||
|
||||
// Manage Slot
|
||||
void SetSlotType(DWORD dwType);
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
DWORD GetSlotType() const;
|
||||
#endif
|
||||
void SetSlotStyle(DWORD dwStyle);
|
||||
|
||||
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 SetSlotCountNew(DWORD dwIndex, DWORD dwGrade, DWORD dwCount);
|
||||
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 RestoreSlotCoolTime(DWORD dwKey);
|
||||
void TransferSlotCoolTime(DWORD dwIndex1, DWORD dwIndex2);
|
||||
#endif
|
||||
void ActivateSlot(DWORD dwIndex);
|
||||
void DeactivateSlot(DWORD dwIndex);
|
||||
void RefreshSlot();
|
||||
@@ -162,9 +156,7 @@ namespace UI
|
||||
// CallBack
|
||||
void ReserveDestroyCoolTimeFinishEffect(DWORD dwSlotIndex);
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void ClearStoredSlotCoolTime(DWORD dwKey, DWORD dwSlotIndex);
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void __Initialize();
|
||||
@@ -215,9 +207,7 @@ namespace UI
|
||||
std::list<DWORD> m_dwSelectedSlotIndexList;
|
||||
TSlotList m_SlotList;
|
||||
DWORD m_dwToolTipSlotNumber;
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
std::map<DWORD, std::map<DWORD, SStoreCoolDown>> m_CoolDownStore;
|
||||
#endif
|
||||
|
||||
BOOL m_isUseMode;
|
||||
BOOL m_isUsableItem;
|
||||
|
||||
@@ -81,9 +81,7 @@ namespace UI
|
||||
bool HasParent() { return m_pParent ? true : false; }
|
||||
bool HasChild() { return m_pChildList.empty() ? false : true; }
|
||||
int GetChildCount() { return m_pChildList.size(); }
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
const TWindowContainer& GetChildList() const { return m_pChildList; }
|
||||
#endif
|
||||
|
||||
CWindow * GetRoot();
|
||||
CWindow * GetParent();
|
||||
|
||||
@@ -652,7 +652,6 @@ namespace UI
|
||||
m_pRightCaptureWindow = NULL;
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void CWindowManager::ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex)
|
||||
{
|
||||
// recursively walk the window tree starting from layers and clear stored cooldown entries
|
||||
@@ -683,7 +682,6 @@ namespace UI
|
||||
recurse(pLayer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void CWindowManager::SetResolution(int hres, int vres)
|
||||
{
|
||||
|
||||
@@ -106,9 +106,7 @@ namespace UI
|
||||
void SetTop(CWindow * pWin);
|
||||
void SetTopUIWindow();
|
||||
void ResetCapture();
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void ClearStoredSlotCoolTimeInAllSlotWindows(DWORD dwKey, DWORD dwSlotIndex);
|
||||
#endif
|
||||
|
||||
|
||||
void Update();
|
||||
|
||||
@@ -1254,7 +1254,6 @@ PyObject * wndMgrSetSlotCoolTime(PyObject * poSelf, PyObject * poArgs)
|
||||
return Py_BuildNone();
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
PyObject* wndMgrStoreSlotCoolTime(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
UI::CWindow* pWin;
|
||||
@@ -1326,7 +1325,6 @@ PyObject* wndMgrTransferSlotCoolTime(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
return Py_BuildNone();
|
||||
}
|
||||
#endif
|
||||
|
||||
PyObject * wndMgrSetToggleSlot(PyObject * poSelf, PyObject * poArgs)
|
||||
{
|
||||
@@ -2497,11 +2495,9 @@ void initwndMgr()
|
||||
{ "SetSlotCount", wndMgrSetSlotCount, METH_VARARGS },
|
||||
{ "SetSlotCountNew", wndMgrSetSlotCountNew, METH_VARARGS },
|
||||
{ "SetSlotCoolTime", wndMgrSetSlotCoolTime, METH_VARARGS },
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
{ "StoreSlotCoolTime", wndMgrStoreSlotCoolTime, METH_VARARGS },
|
||||
{ "RestoreSlotCoolTime", wndMgrRestoreSlotCoolTime, METH_VARARGS },
|
||||
{ "TransferSlotCoolTime", wndMgrTransferSlotCoolTime, METH_VARARGS },
|
||||
#endif
|
||||
{ "SetToggleSlot", wndMgrSetToggleSlot, METH_VARARGS },
|
||||
{ "ActivateSlot", wndMgrActivateSlot, METH_VARARGS },
|
||||
{ "DeactivateSlot", wndMgrDeactivateSlot, METH_VARARGS },
|
||||
|
||||
Reference in New Issue
Block a user