175 lines
5.3 KiB
C++
175 lines
5.3 KiB
C++
#include "stdafx.h"
|
|
|
|
/*#include <mmo/ArType.h>
|
|
#include "SUIDefine.h"
|
|
#include <toolkit/XEnv.h>
|
|
#include "SGame.h"
|
|
#include "SGameWorld.h"
|
|
#include "SChatType.h"
|
|
#include "SGameManager.h"
|
|
#include "SGameSystem.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SNetMessage.h"
|
|
#include "SGameMessage.h"
|
|
#include "ErrorCode/ErrorCode.h"
|
|
#include "KUIWndManager.h"
|
|
#include "SStringDB.h"
|
|
#include "TemplateUtil.h"*/
|
|
|
|
#include "SGameManager.h"
|
|
#include "SGameSystem.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SNetMessage.h"
|
|
#include "SGameMessage.h"
|
|
|
|
#include "SUIInstanceEntranceWnd.h"
|
|
#include "SStringDb.h"
|
|
#include "SGameAvatarEx.h"
|
|
|
|
/*#include "SPlayerInfoMgr.h"
|
|
#include "KUIControlButton.h"
|
|
#include "SPetMgr.h"
|
|
#include "SDebug_Util.h"*/
|
|
|
|
|
|
extern SGameSystem* g_pCurrentGameSystem;
|
|
|
|
SUIInstanceEntranceWnd::SUIInstanceEntranceWnd ( SGameManager* gameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( gameManager )
|
|
,m_pDisplayInfo( pDisplayInfo )
|
|
{
|
|
}
|
|
|
|
SUIInstanceEntranceWnd::~SUIInstanceEntranceWnd ()
|
|
{
|
|
}
|
|
|
|
bool SUIInstanceEntranceWnd::InitControls( KPoint pos )
|
|
{
|
|
SetCustomMovingRect( KRect( 0, 0, 468, 20 ) ); // 타이틀 바 선택 영역, 이동위해 클릭 Area
|
|
return SUIWnd::InitControls( pos );
|
|
}
|
|
|
|
void SUIInstanceEntranceWnd::ProcMsgAtStatic( SGameMessage* msg )
|
|
{
|
|
switch(msg->nType)
|
|
{
|
|
case MSG_PROPERTY:
|
|
{
|
|
SMSG_PROPERTY* pPropertyMsg = (SMSG_PROPERTY*)msg;
|
|
switch( pPropertyMsg->nPropertyType )
|
|
{
|
|
case SMSG_PROPERTY::PROPERTY_HUNTAHOLIC_ENT:
|
|
{
|
|
std::string sz = " <size:9><hcenter><vcenter>";
|
|
sz += pPropertyMsg->strValue;
|
|
SetChildCaption("edit_01", sz.c_str() );
|
|
}
|
|
break;
|
|
}
|
|
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
void SUIInstanceEntranceWnd::OnNotifyUIWindowOpen(bool bOpen, bool bLimitWnd)
|
|
{
|
|
if (bOpen)
|
|
{
|
|
/// 2012.06.22 알림창은 아레나 메뉴보다 위로 오게 해준다 - prodongi
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_LIST_MOVE_FORCE_BACK( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_NOTIFICATION ) );
|
|
}
|
|
}
|
|
|
|
void SUIInstanceEntranceWnd::PumpUpMessage( LPCTSTR controlID, DWORD msg, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch( msg )
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
m_pGameManager->StartSound( "ui_click_menu01.wav" );
|
|
if( ::_stricmp( controlID, "button_close" ) == 0 )
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_ENTRANCE, false) );
|
|
}
|
|
else if( 0 == ::_stricmp( "button_bearload_entrance_01" , controlID ) ) //servantes 2010.10.13
|
|
{
|
|
SGameAvatarEx* localPlayer(NULL);
|
|
localPlayer = g_pCurrentGameSystem->GetLocalPlayer();
|
|
if( localPlayer && localPlayer->IsCasting() )
|
|
{
|
|
m_pDisplayInfo->AddSystemMessage( S(9241), 0 ); // You cannot enter or exit while using a skill or changing channels
|
|
}
|
|
else
|
|
{
|
|
SMSG_INSTANCE_GAME_ENTER *pMsg = new SMSG_INSTANCE_GAME_ENTER(SMSG_INSTANCE_GAME_ENTER::INSTANCE_TYPE::HUNTAHOLIC_BEAR_ROAD);
|
|
m_pGameManager->PostMsgAtDynamic( pMsg );
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_ENTRANCE, false) );
|
|
}
|
|
}
|
|
else if( 0 == ::_stricmp( "button_death_entrance_nomal" , controlID ) ) //servantes 2010.10.13
|
|
{
|
|
|
|
SGameAvatarEx* localPlayer(NULL);
|
|
localPlayer = g_pCurrentGameSystem->GetLocalPlayer();
|
|
if( localPlayer && localPlayer->IsCasting() )
|
|
{
|
|
m_pDisplayInfo->AddSystemMessage( S(9241), 0); // You cannot enter or exit while using a skill or changing channels
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_ENTRANCE, false) );
|
|
|
|
m_pGameManager->PostMsgAtDynamic(
|
|
new SIMSG_REQ_OPEN_MSGBOX(
|
|
SIMSG_REQ_OPEN_MSGBOX::MSGBOX_DEATHMATCH_RANKED_ENTER,
|
|
S( 9203 ),
|
|
"deathmatchrankedenter" ) );
|
|
|
|
}
|
|
}
|
|
else if( 0 == ::_stricmp( "button_death_entrance_free" , controlID ) ) //servantes 2010.10.13
|
|
{
|
|
//SMSG_INSTANCE_GAME_ENTER *pMsg = new SMSG_INSTANCE_GAME_ENTER(SMSG_INSTANCE_GAME_ENTER::INSTANCE_TYPE::FREED_DEATHMATCH);
|
|
//m_pGameManager->PostMsgAtDynamic( pMsg );
|
|
|
|
SGameAvatarEx* localPlayer(NULL);
|
|
localPlayer = g_pCurrentGameSystem->GetLocalPlayer();
|
|
|
|
if( localPlayer && localPlayer->IsCasting() )
|
|
{
|
|
m_pDisplayInfo->AddSystemMessage( S(9241), 0); // You cannot enter or exit while using a skill or changing channels
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_ENTRANCE, false) );
|
|
|
|
m_pGameManager->PostMsgAtDynamic(
|
|
new SIMSG_REQ_OPEN_MSGBOX(
|
|
SIMSG_REQ_OPEN_MSGBOX::MSGBOX_DEATHMATCH_FREED_ENTER,
|
|
S( 9203 ),
|
|
"deathmatchfreedenter" ) );
|
|
}
|
|
|
|
}
|
|
else if( 0 == ::_stricmp( "button_result", controlID ) ) //servantes 2010.10.13
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CHARINFO, true ) );
|
|
m_pGameManager->PostMsgAtDynamic( new SMSG_INSTANCE_GAME_SCORE_REQUEST(true) );
|
|
//m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_WARRECORD ) );
|
|
}
|
|
}
|
|
break;
|
|
|
|
case KUI_MESSAGE::KGENWND_MOVE: // 윈도우 이동
|
|
{
|
|
LimitMoveWnd(); // 게임 외부로 나가지 못하게 제한
|
|
}
|
|
break;
|
|
}
|
|
|
|
SUIWnd::PumpUpMessage( controlID, msg, lparam, wparam );
|
|
}
|