Files
2026-06-01 12:46:52 +02:00

147 lines
4.1 KiB
C++

#pragma once
//#include "SUIWnd.h"
#include "SUIDefine.h"
class SGameAvatarEx;
class SUIDisplayInfo;
class SStateSlot;
namespace{
const int c_nMaxStateIcon = 48;
const int c_nMaxNum = 48;
/// 2011.01.19 - prodongi
const int c_nIconHeight = 20;
const int c_nLongMoveRect = 55;
const int c_nMidMoveRect = 35;
const int c_nShortMoveRect = 15;
enum SHOW_TYPE
{
SHOW_SHORT = 0,
SHOW_MIDDLE,
SHOW_LONG,
};
enum STATEWND_TYPE
{
STATEWND_VER = 0,
STATEWND_HORZ,
};
};
//class SUIStateVEffectWnd : public SUIWnd
//{
//public:
// SUIStateVEffectWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
// : SUIWnd( pGameManager ), m_nShowType(-1), m_nCurNegativePos(0)
// , m_pDisplayInfo( pDisplayInfo )
// { }
//
// virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
// virtual bool InitControls( KPoint kPos );
// virtual bool InitData( bool bReload = false );
// virtual void ProcMsgAtStatic( SGameMessage* pMsg );
// virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
//
//// operators
//private:
// void FreeList ();
// bool IsExistState ( int state_handle, bool bPositive = true );
// void UpdateStateInfo ( SStateSlot* pInfo, bool bPositive );
// void RefreshStateSlot ();
// void CheckState (); // 매초 검사해서 삭제처리
//
// void ChangeStateMenu ();
// void CreateItemIcon (); // 아이콘 생성
// void ToggleTitle ( int nShowType, bool bShow ); // 타이틀 변경
// void RefreshStateInfo ();
//
// void CloseWnd ();
//
// void RefreshSlot ( int nStart, bool bPositive );
// void DisableSlot ( int nIndex = 0, int nEnd = 0, bool bShow = false );
//
// void ChangeTitleBar ( int nShowType );
// SStateSlot* FindState( AR_HANDLE hState, bool bPositive = true );
//
//private:
// SUIDisplayInfo* m_pDisplayInfo;
//
// int m_nShowType;
// int m_nCurNegativePos;
//
// std::vector<SStateSlot*> m_vecPositiveList;
// std::vector<SStateSlot*> m_vecNegativeList;
//};
class SUIStateHEffectWnd : public SUIWnd
{
public:
SUIStateHEffectWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager ), m_nShowType(-1), m_nCurNegativePos(0)
, m_pDisplayInfo( pDisplayInfo ), m_pLocalplayer(NULL)
{ }
virtual ~SUIStateHEffectWnd() { m_vUpdateTimeSlot.clear(); }
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
// operators
private:
void CheckState();
/// 2011.03.30 - prodongi
void CheckState( class SStateSlot* pInfo, class KUIControlIconStatic* pIcon, class KUIControlClockBox* pClock, class KUIControlStatic* ctrlReiteration = NULL );
/// 아이콘 생성
void CreateItemIcon ();
void DisableSlot ( int nIndex = 0, int nEnd = 0, bool bShow = false );
bool IsSetPlayer();
void RefreshCashStateSlot();
void RefreshStateSlot( class SStateSlot* pInfo, class KUIControlIconStatic* pIcon, class KUIControlClockBox* pClock );
void DisableCashStateSlot( bool bShow );
void AddState( SIMSG_UI_STATE_LIST_UPDATE* pStateMsg );
bool IsState();
void InitChildShow( bool bShow );
void CashStateMoveEffectWnd( bool bInit=false );
void UpdateStateData( SGameMessage* pMsg );
void SetStateData( int Index, SStateSlot* pInfo, bool bCash, bool bOnlyTime=false );
int GetUpdateStateIndex( int Index, bool bHarmhul );
void RefreshAllStateSlot();
void ResetStateSet();
bool IsAbleRemove( int nID );
protected:
void setReiterationCount(SStateSlot const* state, KUIControlStatic* control); /// 2011.03.30 중첩 설정 - prodongi
private:
SUIDisplayInfo* m_pDisplayInfo;
int m_nShowType;
int m_nCurNegativePos;
SGameAvatarEx* m_pLocalplayer;
struct sUpdateTimeSlotInfo
{
sUpdateTimeSlotInfo(SStateSlot* stateSlot);
bool isEqual(SStateSlot* stateSlot);
int m_code;
AR_HANDLE m_handle;
int m_level;
};
std::vector<sUpdateTimeSlotInfo> m_vUpdateTimeSlot;
int m_StateIdSet[c_nMaxStateIcon];
};