Files
Leviathan/Client/Game/game/Interface/Party/SUIMessengerWnd.h
T
2026-06-01 12:46:52 +02:00

566 lines
19 KiB
C++

#pragma once
#ifndef _PARTY_RENEWAL_
// 이름은 메신저윈도우인테 파티창인 듯 -_-
#include "SUIWnd.h"
class SMessengerMgr;
class SUIDisplayInfo;
#ifdef _PARTY_RENEWAL_ // 2011.09.19 : servantes
enum RIGHT_CLICK_MENU1
{
RMN1_WHISPER = 0,
RMN1_ADD_DRIEND,
RMN1_BLOCK,
RMN1_REQUEST_DEAL,
RMN1_REQUEST_FIGHT,
RMN1_KICK_OUT,
RMN1_CHANGE_LEADER,
RMN1_SHOW_BUF,
RMN1_SHOW_CREATURE,
RMN1_SHOW_SMALL_UI,
RMN1_HIDE_BUF,
RMN1_HIDE_CREATURE,
RMN1_SHOW_BIG_UI,
RMN1_FOLLOW,
RMN1_MAX
};
enum RIGHT_CLICK_MENU2
{
RMN2_SHOW_BUF = 0,
RMN2_SHOW_CREATURE,
RMN2_HIDE_BUF,
RMN2_HIDE_CREATURE,
RMN2_MAX
};
enum CHANGE_VISIBLE_MINMAX_BTN // 2011.09.28 : servantes : 최대, 최소화버튼 보이기/안보이기
{
TO_BE_MIN = 0, // 최소화 버튼 보이고 최대화 버튼 숨김
TO_BE_MAX // 최대화 버튼 보이고 최소화 버튼 숨김
};
enum PARTY_UI_ID // 2011.09.28 : servantes : 파티 UI 아이디
{
PARTY_UI_ID_SMALL = 0, // 작은 UI
PARTY_UI_ID_BIG // 큰 UI
};
enum PARTY_UI_SIZE_TYPE // 2011.09.19 : servantes : 파티 타입
{
PARTY_UI_SIZE_SMALL = 0, // 작은 상태
PARTY_UI_SIZE_BIG // 큰 상태
};
enum PARTY_UI_LIST_SIZE_TYPE // 2011.09.19 : servantes : 파티 타입
{
PARTY_UI_LIST_SIZE_EXTEND = 0, // 리스트를 펼친 상태
PARTY_UI_LIST_SIZE_REDUCE // 리스트를 접은 상태
};
enum SIEGE_UI_STATE_TYPE // 2011.09.19 : servantes : 공격대 UI 종류
{
SIEGE_UI_STATE_MY = 0, // 내 파티
SIEGE_UI_STATE_OTHER // 다른 이들의 파티
};
enum PARTY_TYPE // 2011.09.19 : servantes : 파티 타입
{
PARTY_NORMAL = 0, // 일반파티
PARTY_BEARROAD, // 베어로드
PARTY_DUNGEON_RAID, // 던전 레이드
PARTY_SIEGE, // 공격대
PARTY_SIEGE_OTHER, // 다른 공격대
PARTY_MAX
};
#endif
#define SLOT_MAXLINE 8 ///< 보여주는 최대 라인수
struct PartyCreatureInfo
{
PartyCreatureInfo::PartyCreatureInfo(){}
PartyCreatureInfo::PartyCreatureInfo(AR_HANDLE _handle, AR_HANDLE _hMaster)
:handle(_handle), hMaster(_hMaster), bRender(true), bRenderUI(true) {}; // 2010.08.30 - prodongi
bool bRender;
bool bRenderUI; // 2010.08.30 - prodongi
AR_HANDLE handle;
AR_HANDLE hMaster;
};
class SUIMessengerWnd : public SUIWnd
{
public:
SUIMessengerWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager )
, m_pDisplayInfo ( pDisplayInfo )
, m_nTabType( 0 )
{};
virtual ~SUIMessengerWnd(); // 2011.05.17
virtual void *Perform( KID id, KArg& msg ); // #2.1.2.11.1
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
#ifdef _PARTY_RENEWAL_
public: // 2011.09.27 - servantes
// 2011.10.07 : servantes : 컨트롤 위치를 계산 받아오는 구조체
struct SSlotPosInfo
{
SSlotPosInfo()
{
clear();
}
void clear()
{
bLeader = false;
bCreature = false;
nID = -1;
x = y = xc = yc = 0;
}
bool bLeader; // 리더인가?
bool bCreature; // 크리처 존재하는가?
int nID; // 아이디
int x, y; // 리더 내용 표시 위치 시작 지점
int xc, yc; // 크리처 내용 표시 위치 시작 지점
};
#else
private:
#endif
// 생성 =========================
void CreateControls();
void DisableSlots();
void DisableCreatureSlot( AR_HANDLE hMaster );
void DisableCreatureSlot( int nIndex );
void MoveSlot( int nIndex, int nY );
void MoveCreatureSlot( int nIndex, int nY );
void ChangeSize();
void UpdateCreatureData_N_UI( int nPos, AR_HANDLE hMaster );
bool GetCreature( AR_HANDLE hMaster, int nIndex, PartyCreatureInfo& rCreatureInfo );
int GetCreatureIndex( AR_HANDLE handle );
bool IsAddCreature( AR_HANDLE handle, bool bMaster=false );
int AddCreature( AR_HANDLE handle );
//void AddCreature( int nIndex ); // 2010.08.30 - prodongi
bool ChangeCreature( AR_HANDLE handle );
bool ChangeMasterCreature( AR_HANDLE hMaster );
void LeaveMaster( AR_HANDLE hMaster );
int LeaveCreature( AR_HANDLE handle );
int RemoveCreature( AR_HANDLE handle );
//void RemoveCreature( int nIndex ); // 2010.08.30 - prodongi
void setRenderCreatureUI(int index, bool render); // 2010.08.30 - prodongi
AR_HANDLE GetMaster( AR_HANDLE handle );
class SGameAvatarEx* GetObject( AR_HANDLE handle );
bool SetPlayerCreatureData( int nPos, AR_HANDLE hMaster );
bool SetCreatureData( int nPos, AR_HANDLE handle );
void RefreshCreatureSlots();
SGameAvatarEx* GetPlayerPtr( int nIndex );
// 슬롯 =========================
void RefreshSlots();
void RefreshEnableSlots();
void SetMemberData( const char* szName, int nPos );
void SetPartyMemberData( const char* szName, int nPos );
void RefreshPartyInfo();
void RefreshGauge( int nPos, bool bHP, int curValue, int maxValue, bool bCreature=false ); /// 2011.08.08 - prodongi
bool RefreshCreatureGauge( AR_HANDLE handle );
void EnableSlot( int nPos, bool bShow );
void EnableCreatureSlot( int nPos, bool bShow );
#ifdef _PARTY_RENEWAL_
// 2011.09.15 - servantes : EnableCreatureSlot2nd 함수 추가 : 두번째 크리처도 표기해야 한다
void EnableCreatureSlot2nd( int nPos, bool bShow );
void MoveSlot(int id_slot, int x_startpos, int& x_next_startpos); // 2011.10.06 : servantes : 해당 슬롯의 위치를 변경한다
void MoveSlotControl(const char* ptr_name, int x, int y); // 2011.10.06 : servantes : 컨트롤 위치를 변경한다
void CalculateSlotPos(SSlotPosInfo* aPosArray8); // 2011.10.07 : servantes : 컨트롤 위치를 계산 받아온다
public:
AR_HANDLE GetSelectMember() { return m_hSelectMember; } // 2011.10.05 : servantes : 선택한 멤버 핸들
int GetPartyType(); // 2011.09.19 : servantes : 파티 타입
int GetUISizeState() { return m_nUISizeState; } // 2011.09.19 : servantes : UI 크기 상태
int GetListSizeType() { return m_nListSizeType; } // 2011.09.19 : servantes : 리스트 크기 타입
int GetSiegeUIType() { return m_nSiegeUIType; } // 2011.09.19 : servantes : 공격대 UI 타입
void SetPartyType(int type); // 2011.09.19 : servantes : 파티 타입
void SetUISizeState(int nState) { m_nUISizeState = nState; } // 2011.09.19 : servantes : UI 크기 상태
void SetListSizeType(int type); // 2011.09.19 : servantes : 리스트 크기 타입
void SetSiegeUIType(int type); // 2011.09.19 : servantes : 공격대 UI 타입
void SetUpClickDragRect(); // 2011.09.19 : servantes : UI 영역 재설정(클릭, 드래그)
void ChangeVisibleMinimizeManimizeButtom(int nToBeState); // 2011.09.28 : servantes : 최대 최소화버튼 서로 바뀜, 최대화(보임) 최소화(안보임) / 최대화(보임) 최소화(안보임)
void VisibleCloseButton();
// MSG_UI_SEND_DATA 로 메세지를 보내고 받고 하지만 현재의 UI는 SUITopPartyWnd 의 자식으로 UI 매니저에서 관리하는 메세지들을
// 받을 수가 없는 관계로 부모인 SUITopPartyWnd 가 메세지는 받고 필요한 동작들은 자식들에게 이 함수를 통하여 하도록 하자
void SendUIMessage(SGameMessage* pMsg); // 2011.10.05 : servantes : 메세지 처리 함수
private:
#endif
void RefreshOnLine();
// 선택 =========================
void UnSelect();
void unSelectCreature(); // 2010.08.31 - prodongi
void SelectMember( int nPos );
void SelectCreatureMember( int nPos );
void RefreshSelectMember( AR_HANDLE hPlayer, const char* szPlayer );
AR_HANDLE GetHandle( int nPos );
int GetSlotIndex( const char * szPlayer );
// 요청 =========================
void RequestPartyJoinAccept();
void RequestGuildJoinAccept();
void RequestRaidGuildJoinAccept();
void RequestRaidMercenaryJoinAccept();
// 출력 =========================
void OutputPartyText( const char* szText );
void OutputGuildText( const char* szText );
void OutputRaidText( const char* szText );
void OutputAllianceText( const char* szText );
void OutputMsg( int nMsgID );
private:
SUIDisplayInfo* m_pDisplayInfo;
std::string m_strSelectMember;
int m_nViewLine;
int m_nOldHP;
int m_nOldMP;
int m_nTabType;
int m_nSelectIndex;
int m_nSelectCreatureIndex;
bool m_bLogIn[SLOT_MAXLINE];
bool m_bLeaderCreature;
PartyCreatureInfo m_vecCreatureList[SLOT_MAXLINE];
#ifdef _PARTY_RENEWAL_
AR_HANDLE m_hSelectMember;
int m_nUISizeState; // 2011.09.19 : servantes : UI 크기 상태
int m_nPartyType; // 2011.09.19 : servantes : 파티 타입
int m_nListSizeType; // 2011.09.19 : servantes : 리스트 크기 타입
int m_nSiegeUIType; // 2011.09.19 : servantes : 공격대 UI 타입
KUIControlStatic* m_pStaticTitle;
KUIControlStatic* m_pStaticTitleBar;
KUIControlStatic* m_pStaticPartyMarkNormal;
KUIControlStatic* m_pStaticPartyMarkBearLoad;
KUIControlStatic* m_pStaticPartyMarkSeige;
KUIControlStatic* m_pStaticPartyMarkSeigeOther;
KUIControlSimpleButton* m_pBtnMaximize; // 2011.09.19 : servantes : 최대,최소,닫기버튼 포인터
KUIControlSimpleButton* m_pBtnMinimize;
KUIControlSimpleButton* m_pBtnClose;
KUIControlSimpleButton* m_pBtnSubOption;
#endif
};
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct _tagPARTYMENU
{
KRect rtMenu;
bool bEnableMenu;
std::string strCaption;
} PARTY_MENU;
/// 파티메뉴
class SUIMessengerMenuWnd : public SUIWnd
{
public:
SUIMessengerMenuWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager )
, m_pDisplayInfo( pDisplayInfo )
{};
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
private:
void RefreshMenu();
void RefreshPartyMenu();
void RefreshGuildMenu();
void SetControlEnableColor( const char * pControlName, const char * pColor );
void SetControlEnable( const char * pControlName, bool bEnable );
bool IsPartyMember( const AR_HANDLE handle );
void InitMenuList();
void RefreshMenuSlot();
void DisableMenuSlot();
void ShowSelectMenu( int nIndex );
bool SelectPartyMenu( int nIndex );
bool SelectGuildMenu( int nIndex );
private:
SUIDisplayInfo* m_pDisplayInfo;
std::vector<PARTY_MENU> m_vecMenuList;
enum
{
REQ_NONE,
REQ_INVITE,
REQ_KICK,
REQ_TRANSFER,
};
int m_nWorkMode; ///< 요청한 작업 모드
bool m_bOpen;
bool m_bCheck00;
bool m_bCheck01;
bool m_bCheck02;
};
class SUIPartyCreate : public SUIWnd
{
public:
SUIPartyCreate( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager )
, m_pDisplayInfo( pDisplayInfo )
{};
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
private:
SUIDisplayInfo* m_pDisplayInfo;
};
/// 파티원 지속효과
class SUIPartyStateWnd : public SUIWnd
{
public:
SUIPartyStateWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo );
~SUIPartyStateWnd() { ClearCtr(); }
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
void ClearCtr();
void ChangeSize(int nCount);
void MoveStateWindow( int nIndex, int nY, bool Creature );
void SetSlotData_N_Enable( int nIndex, class SPlayerSlot* pSlot, bool bCreature );
void SetSlotData_N_Enable( int nIndex, AR_HANDLE handle, bool bCreature );
void DisableAllSlots();
void RefreshEnableSlots();
void RefreshSlots();
void RefreshCreatureSlots();
class SUIPartyStateSetWnd* GetChildWnd( AR_HANDLE handle );
bool ChangeCreature( AR_HANDLE handle );
bool ChangeMasterCreature( AR_HANDLE hMaster );
int AddCreature( AR_HANDLE handle );
//void AddCreature( int nIndex ); // 2010.08.30 - prodongi
void LeaveMaster( AR_HANDLE hMaster );
int LeaveCreature( AR_HANDLE handle );
int RemoveCreature( AR_HANDLE handle );
//void RemoveCreature( int nIndex ); // 2010.08.30 - prodongi
void setRenderCreatureUI(int index, bool render); // 2010.08.30 - prodongi
void SetCreatureMaster( int nPos, AR_HANDLE hMaster );
bool IsAddCreature( AR_HANDLE handle, bool bMaster/*=false*/ );
SGameAvatarEx* GetPlayerPtr( int nIndex );
void ClearCreatureList();
AR_HANDLE GetMaster( AR_HANDLE handle );
SGameAvatarEx* GetMasterPtr( AR_HANDLE handle );
SGameAvatarEx* GetObject( AR_HANDLE handle );
void Move( int nX, int nY );
bool IsRenderStateLeft(int nRight=-1);
private:
bool m_bStateRender;
bool m_MemberStateRender[SLOT_MAXLINE];
bool m_CreatureStateRender[SLOT_MAXLINE];
SUIDisplayInfo* m_pDisplayInfo;
bool m_bLeftRender;
PartyCreatureInfo m_vecCreatureList[SLOT_MAXLINE];
};
/// 파티메뉴
class SUIMessengerPrivateMenuWnd : public SUIWnd
{
public:
SUIMessengerPrivateMenuWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo );
virtual bool InitControls( KPoint kPos );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
private:
private:
SUIDisplayInfo* m_pDisplayInfo;
bool m_bSendMsg;
bool m_bPlayer;
int m_nIndex;
bool m_bRender;
// bool m_MemberStateRender[SLOT_MAXLINE];
// bool m_CreatureStateRender[SLOT_MAXLINE];
};
#ifdef _PARTY_RENEWAL_ // 2011.09.01 - servantes
class SUITopPartyWnd : public SUIWnd
{
public:
SUITopPartyWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo );
virtual SUIWnd* CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID );
virtual bool InitControls( KPoint kPos );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
void DeleverMessage(int nSendID, int nReceiveID, const char* pStrMessage, int w=0, int l=0); //2011.09.28 : servantes : 작은 UI와 큰 UI간의 메세지 전달 함수
void ChangeWndState(int nUISizeState); // 0:small / 1:big
int GetUISizeState() { return m_nUISizeState; }
int GetPartyType(); // 2011.09.19 : servantes : 파티 타입
void SetPartyType(int type); // 2011.09.19 : servantes : 파티 타입
void SetUISizeState(int nState); // 2011.09.19 : servantes : UI 크기 상태
void SetListSizeType(int type); // 2011.09.19 : servantes : 리스트 크기 타입
void SetSiegeUIType(int type); // 2011.09.19 : servantes : 공격대 UI 타입
void SetUpClickDragRect(); // 2011.09.23 : servantes : UI 영역 재설정
private:
int m_nUISizeState; // 2011.09.22 : servantes : UI 상태변수
int m_nListSizeType; // 2011.09.27 : servantes : 리스트 크기 타입
SUIMessengerWnd* m_pWndBig;
SUIMessengerWnd* m_pWndSml;
SUIDisplayInfo* m_pDisplayInfo;
};
extern SUITopPartyWnd* g_pUITopPartyWnd;
/// 우클릭 메뉴1 : 2011.09.16 - servantes
class SUIRightMenu1Wnd : public SUIWnd
{
public:
SUIRightMenu1Wnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager )
, m_pDisplayInfo( pDisplayInfo )
{};
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
private:
/* void RefreshMenu();
void RefreshPartyMenu();
void RefreshGuildMenu();
void SetControlEnableColor( const char * pControlName, const char * pColor );
void SetControlEnable( const char * pControlName, bool bEnable );
bool IsPartyMember( const AR_HANDLE handle );
void InitMenuList();
void RefreshMenuSlot();
void DisableMenuSlot();
void ShowSelectMenu( int nIndex );
bool SelectPartyMenu( int nIndex );
bool SelectGuildMenu( int nIndex );
*/
public:
int GetUISizeState() { return m_nUISizeState; } // UI 크기 상태
void SetUISizeState(int nState) { m_nUISizeState = nState; } // UI 크기 상태
void ArrangeMenuByUISizeState(int nState);
private:
SUIDisplayInfo* m_pDisplayInfo;
int m_nUISizeState; // UI 크기 상태
KUIControlButton* m_paMenuButton[RMN1_MAX]; // 2011.09.29 : servantes
};
/// 우클릭 메뉴2 : 2011.09.16 - servantes
class SUIRightMenu2Wnd : public SUIWnd
{
public:
SUIRightMenu2Wnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
: SUIWnd( pGameManager )
, m_pDisplayInfo( pDisplayInfo )
{};
virtual bool InitControls( KPoint kPos );
virtual bool InitData( bool bReload = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
private:
/* void RefreshMenu();
void RefreshPartyMenu();
void RefreshGuildMenu();
void SetControlEnableColor( const char * pControlName, const char * pColor );
void SetControlEnable( const char * pControlName, bool bEnable );
bool IsPartyMember( const AR_HANDLE handle );
void InitMenuList();
void RefreshMenuSlot();
void DisableMenuSlot();
void ShowSelectMenu( int nIndex );
bool SelectPartyMenu( int nIndex );
bool SelectGuildMenu( int nIndex );
*/
private:
SUIDisplayInfo* m_pDisplayInfo;
KUIControlButton* m_paMenuButton[RMN2_MAX]; // 2011.09.29 : servantes
};
#endif
#endif