123 lines
3.1 KiB
C++
123 lines
3.1 KiB
C++
#include "stdafx.h"
|
|
#include "SGameUIMgr.h"
|
|
|
|
#include "SInventoryMgr.h"
|
|
#include "SSKillSlot.h"
|
|
#include "SSummonSlotMgr.h"
|
|
#include "SMessengerMgr.h"
|
|
#include "STradeMgr.h"
|
|
#include "SStorageMgr.h"
|
|
#include "SMotionMgr.h"
|
|
#include "STargetMgr.h"
|
|
#include "SPlayerInfoMgr.h"
|
|
#include "SPetMgr.h" // sonador #2.1.2.4.3 팻 조작 UI 연동
|
|
#include "SPetSkillMgr.h" // sonador #2.1.2.4.3 팻 조작 UI 연동
|
|
#include "SGame.h"
|
|
#include "SMessage.h"
|
|
#include "SNetMessage.h"
|
|
#include "STitleMgr.h"
|
|
#include "SDebug_Util.h"
|
|
|
|
void SGameUIMgr::ResetInfo()
|
|
{
|
|
assert( false );
|
|
}
|
|
|
|
bool SGameUIMgr::SendGameInterfaceMsg( SGameMessage * game_msg )
|
|
{
|
|
if( m_pGame == NULL ) return false;
|
|
|
|
m_pGame->SendGameInterfaceMsg( game_msg );
|
|
|
|
return true;
|
|
}
|
|
|
|
bool SGameUIMgr::SendMsg( const TS_MESSAGE *msg )
|
|
{
|
|
if( m_pGame == NULL ) return false;
|
|
|
|
m_pGame->SendMsg( msg );
|
|
|
|
return true;
|
|
}
|
|
|
|
bool SGameUIMgr::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
if( m_pGame == NULL ) return false;
|
|
|
|
m_pGame->ProcMsgAtStatic( pMsg );
|
|
|
|
return true;
|
|
}
|
|
|
|
SGameUIInstance& SGameUIInstance::GetInstance()
|
|
{
|
|
static SGameUIInstance instance;
|
|
return instance;
|
|
}
|
|
|
|
SGameUIInstance::SGameUIInstance()
|
|
{
|
|
m_pMgrList[RAID_MGR] = new SRaidMgr;
|
|
m_pMgrList[PARTY_MGR] = new CPartyListMgr; // 2011.10.18 : servantes : SPartyMgr 관리 클래스
|
|
m_pMgrList[GUILD_MGR] = new SGuildMgr;
|
|
m_pMgrList[FRIEND_MGR] = new SFriendMgr;
|
|
m_pMgrList[CUT_MGR] = new SCutMgr;
|
|
m_pMgrList[TRADE_MGR] = new STradeMgr;
|
|
m_pMgrList[STORAGE_MGR] = new SStorageMgr;
|
|
m_pMgrList[MOTION_MGR] = new SMotionMgr;
|
|
m_pMgrList[PLAYERINFO_MGR] = new SPlayerInfoMgr;
|
|
m_pMgrList[INVENTORY_MGR] = new SInventoryMgr;
|
|
m_pMgrList[CREATURESLOT_MGR] = new SCreatureSlotMgr;
|
|
m_pMgrList[SKILLSLOT_MGR] = new SSkillSlotMgr;
|
|
m_pMgrList[CREATURESKILLSLOT_MGR] = new SCreatureSkillSlotMgr;
|
|
m_pMgrList[PET_MGR] = new SPetMgr; // sonador #2.1.2.4.3 팻 조작 UI 연동
|
|
m_pMgrList[PETSKILL_MGR] = new SPetSkillMgr; // sonador #2.1.2.4.3 팻 조작 UI 연동
|
|
m_pMgrList[GUILDDATA_MGR] = new SGuildDataMgr;
|
|
m_pMgrList[TITLE_MGR] = new STitleMgr; // 2012. 3. 4 - marine 호칭
|
|
}
|
|
|
|
SGameUIInstance::~SGameUIInstance()
|
|
{
|
|
for( int x = 0; x < UI_MGR_MAX; ++x )
|
|
{
|
|
SAFE_DELETE( m_pMgrList[x] );
|
|
}
|
|
}
|
|
|
|
void SGameUIInstance::ResetInfoMgr()
|
|
{
|
|
for( int x = 0; x < UI_MGR_MAX; ++x )
|
|
{
|
|
m_pMgrList[x]->ResetInfo();
|
|
}
|
|
}
|
|
|
|
void SGameUIInstance::Process( DWORD dwTime )
|
|
{
|
|
m_pMgrList[SKILLSLOT_MGR]->Process( dwTime );
|
|
m_pMgrList[MOTION_MGR]->Process( dwTime );
|
|
m_pMgrList[CREATURESKILLSLOT_MGR]->Process( dwTime );
|
|
m_pMgrList[PETSKILL_MGR]->Process( dwTime ); // sonador #2.1.2.4.3 팻 조작 UI 연동
|
|
m_pMgrList[PLAYERINFO_MGR]->Process( dwTime );
|
|
m_pMgrList[INVENTORY_MGR]->Process( dwTime );
|
|
m_pMgrList[STORAGE_MGR]->Process( dwTime );
|
|
m_pMgrList[GUILDDATA_MGR]->Process( dwTime );
|
|
m_pMgrList[TITLE_MGR]->Process(dwTime);
|
|
}
|
|
|
|
SGameUIMgr* SGameUIInstance::GetUIMgr( UI_MGR_TYPE type ) const
|
|
{
|
|
if( type < UI_MGR_MAX && type >= RAID_MGR )
|
|
return m_pMgrList[type];
|
|
|
|
return NULL;
|
|
}
|
|
|
|
void SGameUIInstance::SetGame( SGame* pGame )
|
|
{
|
|
for( int x = 0; x < UI_MGR_MAX; ++x )
|
|
{
|
|
m_pMgrList[x]->SetGame( pGame );
|
|
}
|
|
} |