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

314 lines
9.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
//#include "SUIWnd.h"
#include <mmo/ArType.h>
class KUIControlStatic;
class KUIControlGauge;
class KUIControlDamage;
class KUIControlSkillCastGauge;
class KUIControlIconStatic;
class KUIControlNumberEffectBase;
class KUIControlEffectTextGroup;
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
/// 아이템 툴팁
class SUIDropItemWnd : public SUIWnd
{
public:
SUIDropItemWnd( class SGameManager* pGameManager, AR_HANDLE handle, int nItemID, count_t nCnt );
virtual ~SUIDropItemWnd();
virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG);
virtual void Process(DWORD dwTime);
virtual void Render( KViewportObject *pViewport, bool isFront = false );
protected:
std::string m_sTip;
KUIControlStatic* m_pControl;
AR_HANDLE m_hItemHandle;
int m_nItemID;
count_t m_nCnt;
};
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
/// 메인 캐릭터 스킬 게이지, 활 게이지
class SUIGaugeWnd : public SUIWnd
{
public:
SUIGaugeWnd( class SGameManager* pGameManager, class SUIDisplayInfo* pDisplayInfo );
virtual ~SUIGaugeWnd();
virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG);
virtual void Process(DWORD dwTime);
virtual void Render( KViewportObject *pViewport, bool isFront = false );
void SetBowGaugeBack();
void SetSkillGaugeBack(bool bLocalCraeture);
//Bow
void ActivateBowGauge(DWORD dwContinueTime);
void DeActivateBowGauge(DWORD dwContinueTime);
void SetBowEnd() { m_bBowEnd = true; }
//Casting
void ActivateGauge(DWORD dwContinueTime, const char * pSkillName);
void DelayGauge(DWORD dwDelayTime );
void ChangeMaxGauge( DWORD dwMaxOffsetTime );
void SetActivate( bool bActivate );
protected:
void SetBowActivate( bool bActivate )
{
if( !m_pBowGauge ) return;
m_pBowGauge->SetShow( bActivate );
m_pBowGauge->SetActivate( bActivate );
//진행중에 Fire가 들어왔으면 완료된 진행률을 표시한다
if( !( m_dwBowActivateTime + m_dwBowActivateContinueTime < m_dwTime ) )
m_pBowGauge->SetGauge( m_dwBowActivateContinueTime, 1 );
}
SUIDisplayInfo* m_pDisplayInfo;
// KUIControlGauge* m_pActivateGauge; //Casting Gauge
KUIControlGauge* m_pBowGauge; ///< Bow Gauge
KUIControlSkillCastGauge* m_pSkillGauge; ///< Casting Gauge
KUIControlStatic* m_pSkillGaugeBack;
bool m_bDeactiveBow; ///< 휴지기 처리
bool m_bBowEnd;
DWORD m_dwTime;
DWORD m_dwActivateTime;
DWORD m_dwActivateContinueTime;
DWORD m_dwBowActivateTime;
DWORD m_dwBowActivateContinueTime;
};
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//
typedef struct Add_Damage_Info
{
std::string strAniName00; ///< 메인 Ani Name;
std::string strAniName01; ///< Block or Critical or Perfect or Max Heal Ani Name;
std::string strAniName02; ///< Perfect Ani Name;
std::string strAniName03; ///< add_plus Ani Name;
std::string strAniName04; ///< add_number Ani Name;
int nDamage00; ///< 기본
int nDamage01; ///< 추가
Add_Damage_Info()
{
nDamage00 = 0;
nDamage01 = 0;
};
} ADD_DAMAGE_INFO;
struct stMovingCTL{
stMovingCTL(LPCSTR _str, int _adjustSize=0)
: str(_str), adjustSize(_adjustSize) {}
std::string str;
int adjustSize;
};
// Each characters name bar
class SUICharacterWnd : public SUIWnd
{
public:
SUICharacterWnd( class SGameManager* pGameManager, AR_HANDLE handle, bool bUseBooth, class SUIDisplayInfo* pDisplayInfo, bool bIsMain );
virtual ~SUICharacterWnd();
virtual void Create(KUIWND_CREATE_ARG& CREATE_ARG);
virtual void Process(DWORD dwTime);
virtual void ForcedProcess(DWORD dwTime);
virtual void Render( KViewportObject *pViewport, bool isFront = false );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD dwMessage, DWORD lParam, DWORD wParam );
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
virtual DWORD OnKeyMessage(DWORD dwMessage, DWORD dwKeyCode);
virtual void OnPosChangeNofity(int XOffset, int YOffset);
void SetObjType( int nObjType ) { m_nObjType = nObjType; }
int GetObjType() { return m_nObjType; }
void MoveDotControl( int nX, int nY );
void RefreshHP( int nCur, int nMax );
void RefreshHP(); // 2012. 6. 19 - marine 외부에서 hp값을 모르고, 게이지 리프레시만 원할때
void SetNameAlarm( int nAlarmCount );
void SetPKNameColor( unsigned status );
void SetName(LPCSTR lpszName, LPCSTR lpszNameEffect, int objType = -1);
void SetNameBackAni(LPCSTR lpszBackAni, int nIndex);
void SetBoothName( AR_HANDLE hTargetHandle, LPCSTR lpszName );
void SetChatMessage(LPCSTR lpszMesasge);
void SetLocalName(LPCSTR lpszLocalName, bool bShow);
const int GetGuildID() const { return m_nGuild_id; }
void SetGuildID( int nGuild_id ) { m_nGuild_id = nGuild_id; }
void SetGuildInfo( LPCSTR lpszGuildName, LPCSTR lpszIconAniName );
void ChangeGuildName( LPCSTR lpszGuildName );
void ChangeGuildName();
void SetProperty(DWORD dwChatRemoveTime);
void SetHPGaugeBack(LPCSTR lpszBack);
void RemoveHpGuage();
bool IsShowHpGuage();
void createEmblemIcon(int objType);
void SetEmblem(int nID);
KPoint GetDamageCenterPoint() const;
enum
{
FONT_DEFAULT = 0,
FONT_HEAL,
FONT_CRITICAL,
FONT_ETC, ///< Block, Miss 등등
FONT_MAX_HEAL, //
};
/// bMoveDefaultPos가 true인 경우, 리턴값은 무시해도 무방. 좌표를 참고하거나 이동해주기 위함.
KUIControl* AddDamage( int nDamageflag, ADD_DAMAGE_INFO * pAddDamageInfo, bool bMoveDefaultPos = true );
void AddState( const char * pString, KUIControlEffectText::EFFECT_TYPE nType, bool bScaleDown );
///위치 올리기
void PositionUpper( int nAdd );
void SetBackType( unsigned char backType ) { m_nBackType = backType; }
const unsigned char GetBackType() { return m_nBackType; }
/// 2011.01.17 - prodongi
int getMarkStatus() const { return m_markStatus; }
void ChangeDisplayName( struct SIMSG_UI_CHANGE_DISPLAY_NAME* pMsg );
void createQuestIcon(int objType); /// 2011.08.05 퀘스트 대상 몹인지의 마크 표시 - prodongi
bool IsTitleUsing(); // 2012. 5. 24 - marine 호칭의 사용 유무 체크
void createTitleStatic(int objType); // 호칭이름
void setTitleName(std::string &strName);
void setTitleName( int nID );
void NotifyTitleNameUsingState(); // 호칭보이기 옵션 변경 알림
void SetMovingControl(bool isTitleUsing); // 호칭사용 여부에 따라 그 위의 컨트롤을 이동하는 함수
void CalcTitleHeight(KRect &rc); // 호칭 사용 여부에 따라 호칭만큼의 높이값 계산
int GetVsIconPos(); // VS 아이콘 위치 설정
void ShowPVPIcon(bool bShow);
void ShowPKIcon(bool bShow);
bool IsThisLocalPlayer();
bool IsPvpUnit(unsigned char Type);
void setEnemyUnit(bool bEnemyUnit, unsigned char type); // 아레나, 시즈에서 적캐릭터, 적 크리쳐관련 설정..
void SetEnemyGuage();
void setCreatureState(unsigned int type);
void ReFreshWnd();
void ReFreshCheck(DWORD dwTime);
protected:
KRect _GetNameBackRect();
KRect _GetBoothBackRect();
KRect _GetLocalNameBackRect();
KRect _GetIconRect();
/// 대련 아이콘 영역
KRect _GetPVPIconRect(); // #kappamind.
KRect _GetGuildNameRect();
KRect _GetGuildIconRect();
KRect getQuestMobIconRect(char const* aniName);
void procQuestIcon(); /// 2011.08.05 - prodongi
AR_HANDLE m_hOwner;
int m_nObjType;
SUIDisplayInfo* m_pDisplayInfo;
KUIControlStatic* m_pBoothTitleControl;
KUIControlSimpleButton* m_pBoothBackControl;
KUIControlStatic* m_pNameControl;
KUIControlStatic* m_pNameBackControl;
KUIControlStatic* m_pChatControl;
KUIControlStatic* m_pLocalNameControl;
KUIControlStatic* m_pLocalNameBackControl;
KUIControlIconStatic* m_pIconControl;
KUIControlIconStatic* m_pGuildIconControl;
KUIControlIconStatic* m_pPVPIconControl;
KUIControlStatic* m_pGuildNameControl;
bool m_bIsExistGuild;
KUIControlIconStatic* m_pEmblemControl;
KUIControlGauge* m_pHPGauge;
// KUIControlStatic* m_pHPGaugeBack;
KUIControlEffectTextGroup* m_pDotControl; ///< 상태 이상 데미지 처리
KUIControlIconStatic* m_questIconControl; /// 2011.08.05 - prodongi
KUIControlStatic* m_pTitleName; //2012. 5. 29 - marine
std::vector<stMovingCTL> m_vMoveControl;
DWORD m_dwBeforeRefrshTime;
std::list<KUIWnd*> m_DamageList;
#ifdef _KUI_INVALIDATION
std::list<KUIWnd*> m_StateEffectTextList;
#endif
std::string m_sName;
std::string m_sBackUpName;
std::string m_sBackUpNameEffect;
std::string m_sNameEffect;
std::string m_sChatMessage;
std::string m_sBoothName;
std::string m_sGuildName;
std::string m_sGuildAniName;
bool m_bNowMutate;
int m_nGuild_id;
int m_nBackBoard;
int m_nDamageCnt01;
int m_nDamageCnt02;
bool m_bMain;
unsigned char m_nBackType; ///< 선택 활성화, 픽킹, 공격 중
AR_HANDLE m_hTargetHandle;
bool m_bUseBooth;
DWORD m_dwStartTime; ///< 시작 시간
DWORD m_dwTime;
DWORD m_dwChatLastRemoveTime;
DWORD m_dwChatRemoveTime;
DWORD m_dwLocalNameStartTime;
DWORD m_dwLocalNameDisplayTime;
DWORD m_dwAlarmTime;
int m_nAlarmCount;
unsigned m_status;
std::string m_sPK_Color;
bool m_bIcon;
/// 2011.01.17 - prodongi
int m_markStatus;
std::string m_strTitleName;
int m_UpAndDownState;
int m_curHP;
int m_maxHP;
bool m_IsEnemyUnit;
};