82 lines
1.6 KiB
C++
82 lines
1.6 KiB
C++
#pragma once
|
|
|
|
//#include <vector>
|
|
#include <mmo/ArType.h>
|
|
#include "KTypes.h"
|
|
|
|
struct UI_SYNC_INFO
|
|
{
|
|
struct TARGET_INFO
|
|
{
|
|
TARGET_INFO()
|
|
{
|
|
hTarget = 0;
|
|
nTarget_hp = -1;
|
|
nTarget_mp = -1;
|
|
nTarget_maxHp = -1;
|
|
nTarget_maxMp = -1;
|
|
nDamage = 0;
|
|
nMPDamage = 0;
|
|
}
|
|
AR_HANDLE hTarget;
|
|
|
|
__int64 nTarget_hp;
|
|
__int64 nTarget_mp;
|
|
__int64 nTarget_maxHp;
|
|
__int64 nTarget_maxMp;
|
|
__int64 nDamage;
|
|
__int64 nMPDamage;
|
|
};
|
|
|
|
UI_SYNC_INFO()
|
|
{
|
|
nMode = 0;
|
|
dwTime = 0;
|
|
}
|
|
|
|
TARGET_INFO CasterInfo;
|
|
int nMode;
|
|
DWORD dwTime;
|
|
|
|
std::vector< TARGET_INFO > vTargetInfo;
|
|
};
|
|
|
|
struct UI_SYNC_DATA
|
|
{
|
|
UI_SYNC_DATA()
|
|
{
|
|
nLast_hp = -1;
|
|
nLast_mp = -1;
|
|
nMessageCnt = 0;
|
|
}
|
|
~UI_SYNC_DATA()
|
|
{
|
|
vinfo_list.clear();
|
|
}
|
|
|
|
int nLast_hp;
|
|
int nLast_mp;
|
|
short nMessageCnt;
|
|
|
|
std::vector< UI_SYNC_INFO > vinfo_list;
|
|
};
|
|
|
|
class SGameUISyncMng
|
|
{
|
|
private:
|
|
std::vector< AR_HANDLE > m_vHandleInfo;
|
|
class SGame* m_pGame;
|
|
public:
|
|
void ProcUiSyncMsg( class SGameAvatarEx* pCaster, AR_HANDLE target, int nUseType );
|
|
void ProcessHPMP( SGameAvatarEx* pAvatar, UI_SYNC_DATA* pSyncData, UI_SYNC_INFO::TARGET_INFO* pSyncInfo );
|
|
void SendUIMessage( SGameAvatarEx* pAvatar, int nMode, __int64 nHP, __int64 nMP );
|
|
void SendUIMessage( SGameAvatarEx* pAvatar, int nMode, int nPer, __int64 nExp, __int64 nJp );
|
|
void LeaveUISyncMsg( SGameAvatarEx* pAvatar );
|
|
public:
|
|
void ProcessUIMsg( DWORD dwTime );
|
|
void AddHandle( AR_HANDLE hHandle );
|
|
void LeaveHandle( AR_HANDLE hHandle );
|
|
public:
|
|
SGameUISyncMng( class SGame* pGame );
|
|
~SGameUISyncMng();
|
|
}; |