316 lines
13 KiB
C++
316 lines
13 KiB
C++
#pragma once
|
|
|
|
|
|
//#include "SUIWnd.h"
|
|
#include "SUIPartyStateWnd.h"
|
|
#include "SUIPartyTypes.h"
|
|
|
|
class SUIDisplayInfo;
|
|
class SUIPartyDualWnd;
|
|
|
|
struct sBasePartyCreatureInfo
|
|
{
|
|
sBasePartyCreatureInfo() : hCreature1st(0), hCreature2nd(0), hMaster(0) {}
|
|
|
|
AR_HANDLE hCreature1st; // 2011.10.12 : servantes : 크리처 핸들 변수명 교체
|
|
AR_HANDLE hCreature2nd; // 2011.10.12 : servantes : 크리처 핸들 변수명 교체
|
|
AR_HANDLE hMaster;
|
|
};
|
|
|
|
|
|
//==============================================================================================================================================
|
|
// SUIPartyWndBase
|
|
//==============================================================================================================================================
|
|
class SUIPartyWndBase : public SUIWnd
|
|
{
|
|
public:
|
|
SUIPartyWndBase( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
, m_nTabType( 0 )
|
|
{};
|
|
|
|
virtual ~SUIPartyWndBase();
|
|
|
|
virtual SUIWnd* CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID );
|
|
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);
|
|
virtual void Process(DWORD dwTime);
|
|
|
|
public:
|
|
struct SSlotInfoCharacter
|
|
{
|
|
enum TYPE
|
|
{
|
|
SELECT = 0,
|
|
LOGOFF,
|
|
DEAD,
|
|
HP,
|
|
MP,
|
|
NOFRAME,
|
|
NAME,
|
|
JOB,
|
|
NUMBER
|
|
};
|
|
|
|
SSlotInfoCharacter();
|
|
|
|
void Alpha(float fCost);
|
|
void Show(bool bShow, bool bIncludeLogOff=false, bool bIncludeDead=false);
|
|
KUIWnd* GetControl(int id);
|
|
|
|
KUIControlStatic* pSelect; // select_zone00
|
|
KUIControlStatic* pLogOff; // select_logoff00
|
|
KUIControlStatic* pDead; // select_dead00
|
|
KUIControlGauge* pHP; // party_hp_gauge00
|
|
KUIControlGauge* pMP; // party_mp_gauge00
|
|
KUIControlStatic* pNoFrame; // panel_inframe_black00
|
|
KUIControlStatic* pName; // party_name_text00
|
|
KUIControlIconStatic* pJob; // party_member_job00
|
|
KUIControlStatic* pNumber; // mark_number_01
|
|
};
|
|
|
|
struct SSlotInfoCreature
|
|
{
|
|
enum TYPE
|
|
{
|
|
MAINMARK = 0,
|
|
SELECT_MAIN,
|
|
SELECT_SUB,
|
|
HP,
|
|
MP,
|
|
JOB,
|
|
DEAD,
|
|
HP2,
|
|
MP2,
|
|
JOB2,
|
|
DEAD2
|
|
};
|
|
|
|
SSlotInfoCreature();
|
|
|
|
void Alpha(float fCost);
|
|
void Show(bool bShow, int id=-1);
|
|
KUIWnd* GetControl(int id);
|
|
|
|
KUIControlStatic* pMainMark; // mark_creature_main00
|
|
KUIControlStatic* pSelectMain; // creature_select_zone_main
|
|
KUIControlStatic* pSelectSub; // creature_select_zone_sub
|
|
KUIControlGauge* pHP; // creature_hp_gauge00
|
|
KUIControlGauge* pMP; // creature_mp_gauge00
|
|
KUIControlIconStatic* pJob; // creature_job00
|
|
KUIControlStatic* pDead; // creature_dead00
|
|
KUIControlGauge* pHP2; // creature_hp_gauge00
|
|
KUIControlGauge* pMP2; // creature_mp_gauge00
|
|
KUIControlIconStatic* pJob2; // creature_job00
|
|
KUIControlStatic* pDead2; // creature_dead00
|
|
};
|
|
private:
|
|
// 생성 =========================
|
|
void CreateControls();
|
|
|
|
public:
|
|
void DisableSlots();
|
|
void InitSecond();
|
|
|
|
private:
|
|
void DisableCreatureSlot( AR_HANDLE hMaster );
|
|
// void DisableCreature2ndSlot( 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 );
|
|
void UpdateCreatureData_N_UI( int nPos, AR_HANDLE hMaster, int nAlphaGrade);
|
|
bool GetCreature( AR_HANDLE hMaster, int nIndex, sBasePartyCreatureInfo& 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, int nAlphaGrade);
|
|
bool SetCreatureData( int nPos, AR_HANDLE handle );
|
|
bool SetCreature2ndData( int nPos, AR_HANDLE handle );
|
|
void RefreshCreatureSlots();
|
|
SGameAvatarEx* GetPlayerPtr( int nIndex );
|
|
void updateBuffVisible(int nPos);
|
|
void notifyMouseMesseageReturnZero();
|
|
/// 2012.01.10 좌표가 타이틀바 영역에 있으면 우클릭 메뉴를 활성화 시킨다 - prodongi
|
|
bool checkActivateRMenu(int x, int y);
|
|
/// 2012.01.10 파어메뉴에 쓰일 반대 상태를 스트링으로 저장 - prodongi
|
|
void getInverseStatusString(std::string& str);
|
|
|
|
public:
|
|
// 슬롯 =========================
|
|
void RefreshSlots();
|
|
void RefreshEnableSlots();
|
|
void RefreshGaugeAll();
|
|
void RefreshGaugeByIndex(const char* szName);
|
|
|
|
void SetMemberData( const char* szName, int nPos, int& nAlphaGrade );
|
|
void SetPartyMemberData( const char* szName, int nPos, int& nAlphaGrade );
|
|
|
|
void RefreshPartyInfo();
|
|
void RefreshGauge( int nPos, bool bHP, int curValue, int maxValue, bool bCreature=false, bool isPlayer = true ); /// 2011.08.08 - prodongi
|
|
void RefreshGauge2nd( int nPos, bool bHP, int curValue, int maxValue, bool bCreature=false ); /// 2011.10.12 : servantes
|
|
bool RefreshCreatureGauge( AR_HANDLE handle );
|
|
|
|
void EnableSlot( int nPos, bool bShow );
|
|
void EnableCreatureSlot( int nPos, bool bShow );
|
|
|
|
// 2011.09.15 - servantes : EnableCreatureSlot2nd 함수 추가 : 두번째 크리처도 표기해야 한다
|
|
void EnableCreatureSlot2nd( int nPos, bool bShow ); // 2011.10.05 : servantes
|
|
void MoveSlotEx(int id_slot, int& x_next_startpos); // 2011.10.06 : servantes : 해당 슬롯의 위치를 변경한다
|
|
void MoveSlotControl(const char* ptr_name, int x, int y); // 2011.10.06 : servantes : 컨트롤 위치를 변경한다
|
|
/// 2011.11.15 button_suboption버튼 안에 있는지 조사 - prodongi
|
|
bool isInSubOptionButton(int x, int y);
|
|
|
|
/// 2011.11.10 모든 크리처 보이기 설정 - prodongi
|
|
void setShowAllCreature(bool show);
|
|
/// 2011.11.17 현재 파티의 플레이어 수 - prodongi
|
|
int getMemberNum();
|
|
void UpdatePartyMemberInfo(); // 2011.12.07 : servantes : 파티멤버 정보 갱신
|
|
void hideSelect();
|
|
|
|
void EnterCreature( AR_HANDLE hMaster, AR_HANDLE hCreature );
|
|
void LeaveCreature( AR_HANDLE hMaster, AR_HANDLE hCreature );
|
|
|
|
void CreatureInfo(AR_HANDLE hMaster, AR_HANDLE hMain, AR_HANDLE hSub);
|
|
// 크리처 순서 2012.01.10 - servantes
|
|
void CreatureOrder(bool bFirst, AR_HANDLE hMaster, AR_HANDLE hCreature);
|
|
void LeaveCreature(bool bFirst, AR_HANDLE hMaster, AR_HANDLE hCreature);
|
|
|
|
bool isCreature(int slotIndex) const; /// 2012.02.10 크리처가 있는지 없는지 - prodongi
|
|
|
|
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 SetPartymark(int type); // 2012. 1. 9 - marine 파티 마크 설정
|
|
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 ChangeVisibleMinimizeManimizeButtom(int nToBeState); // 2011.09.28 : servantes : 최대 최소화버튼 서로 바뀜, 최대화(보임) 최소화(안보임) / 최대화(보임) 최소화(안보임)
|
|
void VisibleCloseButton();
|
|
|
|
// MSG_UI_SEND_DATA 로 메세지를 보내고 받고 하지만 현재의 UI는 SUIPartyDualWnd 의 자식으로 UI 매니저에서 관리하는 메세지들을
|
|
// 받을 수가 없는 관계로 부모인 SUIPartyDualWnd 가 메세지는 받고 필요한 동작들은 자식들에게 이 함수를 통하여 하도록 하자
|
|
void SendUIMessage(SGameMessage* pMsg); // 2011.10.05 : servantes : 메세지 처리 함수
|
|
|
|
// void SetSubCreatureHandle( AR_HANDLE hSubCardCreature, int index=-1/*나*/ ); // 2011.12.15 - servantes : 보조크리처 핸들 설정
|
|
void SetCreatureHandle( AR_HANDLE hMainCardCreature, int index ); // 2011.12.15 - servantes : 크리처 핸들 설정
|
|
// void SetCreatureHandle( AR_HANDLE hMainCardCreature, AR_HANDLE hSubCardCreature, int index ); // 2011.12.15 - servantes : 크리처 핸들 설정
|
|
// void SetHideCreatureHandle( AR_HANDLE hSubCardCreature, int index=-1/*나*/ ); // 2011.12.15 - servantes : 사라지는 크리처 핸들 설정
|
|
private:
|
|
|
|
void RefreshOnLine();
|
|
|
|
// 선택 =========================
|
|
void UnSelect();
|
|
void unSelectCreature(); // 2010.08.31 - prodongi
|
|
void SelectMember( int nPos );
|
|
void SelectMemberForce( int nPos );
|
|
void SelectCreatureMember( int nPos );
|
|
void RefreshSelectMember( AR_HANDLE hPlayer, const char* szPlayer );
|
|
AR_HANDLE GetHandle( int nPos );
|
|
|
|
int GetSlotIndex( const char * szPlayer );
|
|
bool IsTopLeader( const char * szPlayer );
|
|
/// 2011.11.14 minimize 컨트롤 show/hide - prodongi
|
|
void setShowMinimizeMark(bool show);
|
|
void selectTarget(AR_HANDLE handle, int index);
|
|
std::string findMemberName(std::string* partyName, int slotIndex);
|
|
void InitTooltip(); //2012. 1. 10 - marine 툴팁초기화
|
|
public:
|
|
// 요청 =========================
|
|
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 CalculateSize();
|
|
|
|
void ResetWnd(); // 2011.11.12 - servantes
|
|
|
|
void SetTitleCaption(int type_use); // 2011.11.16 - servantes : 타이틀의 캡션 설정한다
|
|
|
|
void DeselectSlot(); // 선택된 슬롯 표시 숨김
|
|
/// 2012.06.14 - prodongi
|
|
void setTitlebarArenaInfo(char const* aniName, char const* caption);
|
|
std::string getArenaPartyName(char const* partyName);
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
std::string m_strSelectMember;
|
|
|
|
int m_nViewLine;
|
|
int m_nOldHP;
|
|
int m_nOldMP;
|
|
int m_nOldTime;
|
|
int m_nTabType;
|
|
|
|
int m_nSelectIndex;
|
|
int m_nSelectCreatureIndex;
|
|
/// 2011.11.10 dual로 보냈습니다. - prodongi
|
|
//bool m_bShowAllCreature;
|
|
|
|
bool m_bLogIn[SLOT_MAXLINE];
|
|
|
|
bool m_bLeaderCreature;
|
|
sBasePartyCreatureInfo m_vecCreatureList[SLOT_MAXLINE];
|
|
|
|
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 타입
|
|
//KRect m_rtSaveZone; // 2011.11.07 : servantes : 현재 UI의 크기 저장
|
|
|
|
KUIControlStatic* m_pStaticMinimizsMark;
|
|
KUIControlStatic* m_pMouseClick;
|
|
KUIControlStatic* m_pMouseClickCreature;
|
|
KUIControlStatic* m_pStaticLeaderMark;
|
|
KUIControlStatic* m_pStaticTopLeaderMark;
|
|
KUIControlStatic* m_pStaticTitle;
|
|
KUIControlStatic* m_pStaticTitleBar;
|
|
KUIControlStatic* m_staticPartyMark; /// 2012.06.22 파티 타입별로 컨트롤이 나누어져 있는걸 하나로 만듬 - prodongi
|
|
KUIControlStatic* m_pStaticPartyMarkSmile; // 2012. 1. 9 - marine 파티마크(각파티마다 다른 스마일 아이콘..)
|
|
KUIControlSimpleButton* m_pBtnMaximize; // 2011.09.19 : servantes : 최대,최소,닫기버튼 포인터
|
|
KUIControlSimpleButton* m_pBtnMinimize;
|
|
KUIControlSimpleButton* m_pBtnClose;
|
|
KUIControlSimpleButton* m_pBtnSubOption;
|
|
// KUIControlStatic* m_pPartyMarkBox[SLOT_MAXLINE];
|
|
|
|
SSlotInfoCreature m_aSlotCreature[SLOT_MAXLINE];
|
|
SSlotInfoCharacter m_aSlotChar[SLOT_MAXLINE];
|
|
|
|
/// 2011.11.10 - prodongi
|
|
SUIPartyDualWnd* m_parent;
|
|
};
|