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 },
|
||||
|
||||
@@ -7,13 +7,11 @@
|
||||
#define ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||
//#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__
|
||||
// #define FIX_POS_SYNC
|
||||
// #define TW1X1_TEST
|
||||
|
||||
// Python-only
|
||||
#define FIX_HORSE_SKILLS_TAB
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#include "Gamelib/RaceData.h"
|
||||
#include "StdAfx.h"
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
#include "GameType.h"
|
||||
#endif
|
||||
|
||||
typedef uint8_t TPacketHeader;
|
||||
|
||||
@@ -516,6 +514,18 @@ typedef struct command_attack
|
||||
uint32_t dwVictimVID; // 적 VID
|
||||
uint8_t bCRCMagicCubeProcPiece;
|
||||
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;
|
||||
|
||||
typedef struct command_chat
|
||||
@@ -735,9 +745,7 @@ enum
|
||||
MESSENGER_SUBHEADER_GC_LOGOUT,
|
||||
MESSENGER_SUBHEADER_GC_INVITE,
|
||||
MESSENGER_SUBHEADER_GC_MOBILE,
|
||||
#ifdef FIX_MESSENGER_ACTION_SYNC
|
||||
MESSENGER_SUBHEADER_GC_REMOVE_FRIEND
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct packet_messenger
|
||||
@@ -1870,6 +1878,16 @@ typedef struct packet_attack
|
||||
uint32_t dwVID;
|
||||
uint32_t dwVictimVID; // 적 VID
|
||||
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;
|
||||
|
||||
typedef struct packet_c2c
|
||||
|
||||
@@ -1489,22 +1489,4 @@ void initapp()
|
||||
#else
|
||||
PyModule_AddIntConstant(poModule, "ENABLE_NEW_EQUIPMENT_SYSTEM", 0);
|
||||
#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
|
||||
}
|
||||
|
||||
@@ -5,10 +5,8 @@ void CPythonMessenger::RemoveFriend(const char * c_szKey)
|
||||
{
|
||||
m_FriendNameMap.erase(c_szKey);
|
||||
|
||||
#ifdef FIX_MESSENGER_ACTION_SYNC
|
||||
if (m_poMessengerHandler)
|
||||
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*/)
|
||||
|
||||
@@ -1495,7 +1495,6 @@ bool CPythonNetworkStream::RecvPointChange()
|
||||
case POINT_STAT_RESET_COUNT:
|
||||
__RefreshStatus();
|
||||
break;
|
||||
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
|
||||
case POINT_PLAYTIME:
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].dwPlayMinutes = PointChange.value;
|
||||
break;
|
||||
@@ -1504,9 +1503,6 @@ bool CPythonNetworkStream::RecvPointChange()
|
||||
__RefreshStatus();
|
||||
__RefreshSkillWindow();
|
||||
break;
|
||||
#else
|
||||
case POINT_LEVEL:
|
||||
#endif
|
||||
case POINT_ST:
|
||||
case POINT_DX:
|
||||
case POINT_HT:
|
||||
@@ -2429,6 +2425,30 @@ bool CPythonNetworkStream::RecvDamageInfoPacket()
|
||||
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()
|
||||
{
|
||||
TPacketGCTarget TargetPacket;
|
||||
@@ -2520,11 +2540,20 @@ bool CPythonNetworkStream::RecvChangeSpeedPacket()
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// 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)
|
||||
#endif
|
||||
{
|
||||
if (!__CanActMainInstance())
|
||||
return true;
|
||||
|
||||
#ifdef FIX_POS_SYNC
|
||||
CPythonCharacterManager& rkChrMgr = CPythonCharacterManager::Instance();
|
||||
CInstanceBase* pkInstMain = rkChrMgr.GetMainInstancePtr();
|
||||
#endif
|
||||
|
||||
#ifdef ATTACK_TIME_LOG
|
||||
static DWORD prevTime = timeGetTime();
|
||||
DWORD curTime = timeGetTime();
|
||||
@@ -2537,6 +2566,25 @@ bool CPythonNetworkStream::SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim)
|
||||
kPacketAtk.header = HEADER_CG_ATTACK;
|
||||
kPacketAtk.bType = uMotAttack;
|
||||
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))
|
||||
{
|
||||
@@ -2832,7 +2880,6 @@ bool CPythonNetworkStream::RecvMessenger()
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef FIX_MESSENGER_ACTION_SYNC
|
||||
case MESSENGER_SUBHEADER_GC_REMOVE_FRIEND:
|
||||
{
|
||||
BYTE bLength;
|
||||
@@ -2850,7 +2897,6 @@ bool CPythonNetworkStream::RecvMessenger()
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -324,10 +324,9 @@ void CPythonNetworkStream::__RecvCharacterUpdatePacket(SNetworkUpdateActorData *
|
||||
__RefreshAlignmentWindow();
|
||||
__RefreshEquipmentWindow();
|
||||
__RefreshInventoryWindow();
|
||||
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
|
||||
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wHairPart = pkNetUpdateActorData->m_dwHair;
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].wMainPart = pkNetUpdateActorData->m_dwArmor;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -328,7 +328,7 @@ bool CPythonNetworkStream::__RecvPlayerPoints()
|
||||
for (DWORD i = 0; i < POINT_MAX_NUM; ++i)
|
||||
{
|
||||
CPythonPlayer::Instance().SetStatus(i, PointsPacket.points[i]);
|
||||
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
|
||||
|
||||
if (i == POINT_LEVEL)
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byLevel = PointsPacket.points[i];
|
||||
else if (i == POINT_ST)
|
||||
@@ -339,7 +339,6 @@ bool CPythonNetworkStream::__RecvPlayerPoints()
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byDX = PointsPacket.points[i];
|
||||
else if (i == POINT_IQ)
|
||||
m_akSimplePlayerInfo[m_dwSelectedCharacterIndex].byIQ = PointsPacket.points[i];
|
||||
#endif
|
||||
}
|
||||
|
||||
PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "RefreshStatus", Py_BuildValue("()"));
|
||||
|
||||
@@ -532,7 +532,6 @@ void CPythonPlayer::NotifyChangePKMode()
|
||||
PyCallClassMemberFunc(m_ppyGameWindow, "OnChangePKMode", Py_BuildValue("()"));
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void CPythonPlayer::ResetSkillCoolTimes()
|
||||
{
|
||||
for (int i = 0; i < SKILL_MAX_NUM; ++i)
|
||||
@@ -599,7 +598,6 @@ void CPythonPlayer::ResetHorseSkillCoolTime(DWORD dwSkillIndex, DWORD dwVisualSl
|
||||
CPythonSkill::SKILL_TYPE_HORSE,
|
||||
dwVisualSlotIndex);
|
||||
}
|
||||
#endif
|
||||
|
||||
void CPythonPlayer::MoveItemData(TItemPos SrcCell, TItemPos DstCell)
|
||||
{
|
||||
@@ -1104,12 +1102,10 @@ void CPythonPlayer::SetSkillLevel_(DWORD dwSkillIndex, DWORD dwSkillGrade, DWORD
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
if (m_playerStatus.aSkill[dwSlotIndex].iLevel <= 0)
|
||||
{
|
||||
ResetSkillCoolTimeForSlot(dwSlotIndex);
|
||||
}
|
||||
#endif
|
||||
|
||||
m_playerStatus.aSkill[dwSlotIndex].fcurEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel) / 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();)
|
||||
{
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
CPythonSkill::TSkillData* data = nullptr;
|
||||
|
||||
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))
|
||||
#else
|
||||
if (bAll || __GetSkillType(it->first) == CPythonSkill::SKILL_TYPE_ACTIVE)
|
||||
#endif
|
||||
it = m_skillSlotDict.erase(it);
|
||||
else
|
||||
++it;
|
||||
@@ -1664,7 +1656,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
|
||||
|
||||
for (int i = 0; i < SKILL_MAX_NUM; ++i)
|
||||
{
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
DWORD dwSkillIndex = m_playerStatus.aSkill[i].dwIndex;
|
||||
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_GUILD))
|
||||
continue;
|
||||
#endif
|
||||
|
||||
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].fnextEfficientPercentage = 0.05f;
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
m_playerStatus.aSkill[j].isCoolTime = false;
|
||||
m_playerStatus.aSkill[j].fCoolTime = 0.0f;
|
||||
m_playerStatus.aSkill[j].fLastUsedTime = 0.0f;
|
||||
@@ -1704,7 +1693,6 @@ void CPythonPlayer::NEW_ClearSkillData(bool bAll)
|
||||
CPythonSkill::SKILL_TYPE_ACTIVE,
|
||||
j + iGrade * CPythonSkill::SKILL_GRADE_STEP_COUNT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (m_ppyGameWindow)
|
||||
|
||||
@@ -262,11 +262,9 @@ class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
|
||||
void NotifyCharacterUpdate(DWORD dwVID);
|
||||
void NotifyDeadMainCharacter();
|
||||
void NotifyChangePKMode();
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
void ResetSkillCoolTimes();
|
||||
void ResetSkillCoolTimeForSlot(DWORD dwSlotIndex);
|
||||
void ResetHorseSkillCoolTime(DWORD dwSkillIndex, DWORD dwVisualSlotIndex);
|
||||
#endif
|
||||
|
||||
|
||||
// Player Status
|
||||
|
||||
@@ -543,7 +543,6 @@ PyObject * playerGetSkillCoolTime(PyObject* poSelf, PyObject* poArgs)
|
||||
return Py_BuildValue("ff", fCoolTime, fElapsedCoolTime);
|
||||
}
|
||||
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
PyObject * playerResetSkillCoolTimeForSlot(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
int iSlotIndex;
|
||||
@@ -566,7 +565,6 @@ PyObject* playerResetHorseSkillCoolTime(PyObject* poSelf, PyObject* poArgs)
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
#endif
|
||||
|
||||
PyObject * playerIsSkillActive(PyObject* poSelf, PyObject* poArgs)
|
||||
{
|
||||
@@ -2258,10 +2256,8 @@ void initPlayer()
|
||||
|
||||
{ "IsSkillCoolTime", playerIsSkillCoolTime, METH_VARARGS },
|
||||
{ "GetSkillCoolTime", playerGetSkillCoolTime, METH_VARARGS },
|
||||
#ifdef FIX_REFRESH_SKILL_COOLDOWN
|
||||
{ "ResetSkillCoolTimeForSlot", playerResetSkillCoolTimeForSlot, METH_VARARGS },
|
||||
{ "ResetHorseSkillCoolTime", playerResetHorseSkillCoolTime, METH_VARARGS },
|
||||
#endif
|
||||
{ "IsSkillActive", playerIsSkillActive, METH_VARARGS },
|
||||
{ "UseGuildSkill", playerUseGuildSkill, METH_VARARGS },
|
||||
{ "AffectIndexToSkillIndex", playerAffectIndexToSkillIndex, METH_VARARGS },
|
||||
@@ -2293,11 +2289,9 @@ void initPlayer()
|
||||
{ "IsValuableItem", playerIsValuableItem, METH_VARARGS },
|
||||
{ "IsOpenPrivateShop", playerIsOpenPrivateShop, METH_VARARGS },
|
||||
|
||||
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||
{ "IsBeltInventorySlot", playerIsBeltInventorySlot, METH_VARARGS },
|
||||
{ "IsEquippingBelt", playerIsEquippingBelt, METH_VARARGS },
|
||||
{ "IsAvailableBeltInventoryCell", playerIsAvailableBeltInventoryCell, METH_VARARGS },
|
||||
#endif
|
||||
{ "IsEquippingBelt", playerIsEquippingBelt, METH_VARARGS },
|
||||
{ "IsAvailableBeltInventoryCell", playerIsAvailableBeltInventoryCell, METH_VARARGS },
|
||||
|
||||
// Refine
|
||||
{ "GetItemGrade", playerGetItemGrade, METH_VARARGS },
|
||||
|
||||
Reference in New Issue
Block a user