1438 lines
45 KiB
C++
1438 lines
45 KiB
C++
|
|
#include "stdafx.h"
|
|
|
|
#include "KUIDragAndDrop.h"
|
|
#include "KUIControlButton.h"
|
|
#include "KUIControlScroll.h"
|
|
#include "KUIControlStatic.h"
|
|
|
|
#include "SGameManager.h"
|
|
#include "SUITradeWnd.h"
|
|
#include "SGameMessage.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SUIDisplayInfo.h"
|
|
|
|
#include "SUISysMsgDefine.h"
|
|
|
|
//#include "Util.h"
|
|
#include "SItemDB.h"
|
|
#include "SStringDB.h"
|
|
#include "SPlayerInfoMgr.h"
|
|
#include "SInventoryMgr.h"
|
|
|
|
#include "SGameOption.h"
|
|
#include "SGameWorld.h"/// 2011.01.20 - prodongi
|
|
//#include "SUIUtil.h" /// 2011.08.03 - prodongi
|
|
#include "SGameInterface.h"
|
|
#include "SUILazyTooltip.h"
|
|
#include "SGameSystem.h"
|
|
extern SGameSystem * g_pCurrentGameSystem;
|
|
|
|
namespace
|
|
{
|
|
float c_fDelayTime = 4.0f;
|
|
int c_nMaxItem = 10;
|
|
int c_nViewItem = 10;
|
|
const char* g_strEmptyCardIcon = "common_mark_titanium_empty_card"; /// 2012. 1. 18 빈 카드 표시 - marine
|
|
const int nLayer = 8;
|
|
};
|
|
|
|
bool SUITradeWnd::InitControls( KPoint kPos )
|
|
{
|
|
SetCustomMovingRect( KRect( 0, 0, 680, 17 ) ); // 타이틀 바 선택 영역, 이동위해 클릭 Area
|
|
CreateItemCount();
|
|
|
|
// 버튼 클릭 영역
|
|
// SetValidRect( "trade_selfok", KRect(0, 0, -20, 0) );
|
|
// SetValidRect( "trade_selfcancel", KRect(10, 0, 0, 0) );
|
|
SetChildShow( "trade_itemcount01", false );
|
|
SetChildShow( "static_selectbar_01", false );
|
|
SetChildShow( "static_selectbar_02", false );
|
|
|
|
///////////// 광고판 설정 ///////////////
|
|
m_pEdit_Advertise = dynamicCast<KUIControlStatic*>(GetChild( "text_advertise_01" ));
|
|
if(NULL == m_pEdit_Advertise)
|
|
return false;
|
|
|
|
m_pEdit_Advertise->SetEnableOption(true);
|
|
m_pEdit_Advertise->SetEnableColor( "<#b92c36>" );
|
|
m_pEdit_Advertise->SetDisableColor( "<#A0A0A0>" );
|
|
#ifdef _COUNTRY_ME_
|
|
m_pEdit_Advertise->setCaptionScroll(true, true, sSpritePrimitiveScrollType::RIGHT,0.1f);
|
|
#else
|
|
m_pEdit_Advertise->setCaptionScroll(true, true, sSpritePrimitiveScrollType::LEFT,0.04f);
|
|
#endif
|
|
/////////////// 확인 버튼 캡션 설정///////////////
|
|
KUIControlButton* Selfok = dynamicCast<KUIControlButton*>(GetChild("trade_selfok"));
|
|
if(Selfok)
|
|
{
|
|
Selfok->SetEnableColor( "<#ffffff>" );
|
|
Selfok->SetDisableColor( "<#A0A0A0>" );
|
|
}
|
|
|
|
////////////// 최종 확인 버튼 캡션 설정///////////
|
|
KUIControlButton* pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_finalconfirm" ));
|
|
if( pButton )
|
|
{
|
|
pButton->SetEnableColor("<#b92c36>");
|
|
pButton->SetDisableColor("<#a0a0a0>");
|
|
}
|
|
|
|
return SUIWnd::InitControls( kPos );
|
|
}
|
|
bool SUITradeWnd::InitData( bool bReload )
|
|
{
|
|
m_InputState = STATE_NONE;
|
|
m_hSelItem = -1;
|
|
m_bHisFreezed = false;
|
|
m_bSelfFreezed = false;
|
|
m_dwTime = 0;
|
|
m_bConfirmWait = true;
|
|
m_bHisConfirm = false;
|
|
m_bSelfConfirm = false;
|
|
|
|
InitSlotControls();
|
|
|
|
return SUIWnd::InitData(bReload);
|
|
}
|
|
|
|
void SUITradeWnd::CreateItemCount()
|
|
{
|
|
KUIControlMultiIcon* pIcon = NULL;
|
|
for( int i = 0; i < c_nViewItem; i++ )
|
|
{
|
|
pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_selfitem%02d", i ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
pIcon->SetIconLayer( nLayer ); // 2012. 7. 27 - marine
|
|
|
|
KRect rect = pIcon->GetRect();
|
|
rect.top += 21;
|
|
rect.right = rect.left + 32;
|
|
|
|
m_pManager->CreateControl( KUIWND_CREATE_ARG( "static", CStringUtil::StringFormat( "trade_selfitemcount%02d", i ).c_str(), "", rect, KSTYLE_NUMBER_RIGHT, 0, this, "", c_szDEF_SPR_NAME, m_pManager, 0, "", KANCHOR_LEFT | KANCHOR_TOP ) );
|
|
}
|
|
pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_hisitem%02d", i ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
pIcon->SetIconLayer( nLayer ); // 2012. 7. 27 - marine
|
|
|
|
KRect rect = pIcon->GetRect();
|
|
rect.top += 21;
|
|
rect.right = rect.left + 32;
|
|
|
|
m_pManager->CreateControl( KUIWND_CREATE_ARG( "static", CStringUtil::StringFormat( "trade_hisitemcount%02d", i ).c_str(), "", rect, KSTYLE_NUMBER_RIGHT, 0, this, "", c_szDEF_SPR_NAME, m_pManager, 0, "", KANCHOR_LEFT | KANCHOR_TOP ) );
|
|
}
|
|
}
|
|
}
|
|
void SUITradeWnd::Process( DWORD dwTime )
|
|
{
|
|
if( m_bConfirmWait && m_bSelfFreezed && m_bHisFreezed && (dwTime - m_dwTime)/1000.f >= c_fDelayTime )
|
|
{
|
|
// 최종승인 버튼 활성
|
|
KUIControlButton* pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_finalconfirm" ));
|
|
if( pButton ) pButton->Enable();
|
|
m_bConfirmWait = false;
|
|
}
|
|
|
|
// 컨트롤 재정의
|
|
KUIWnd* pWnd = NULL;
|
|
for( int i = 0; i < c_nViewItem; i++ )
|
|
{
|
|
pWnd = GetChild( CStringUtil::StringFormat( "trade_selfitem%02d", i ).c_str() );
|
|
if( pWnd ) pWnd->Process(dwTime);
|
|
pWnd = GetChild( CStringUtil::StringFormat( "trade_hisitem%02d", i ).c_str() );
|
|
if( pWnd ) pWnd->Process(dwTime);
|
|
}
|
|
|
|
// 2011. 9 . 5 - marine
|
|
// 기본 루프 텍스트가 두개여서 번갈아 주면서 출력.
|
|
if(!m_bSelfFreezed)
|
|
{
|
|
if(true == m_pEdit_Advertise->GetUVScrollEndFlag())
|
|
{
|
|
SetCaptionAd(GetCurAd());
|
|
m_pEdit_Advertise->ResetUVScrollEndFlag();
|
|
}
|
|
}
|
|
|
|
//m_dwTime = dwTime;
|
|
}
|
|
|
|
void* SUITradeWnd::Perform( KID id, KArg& msg )
|
|
{
|
|
_CID( UI_BEGIN_DRAG );
|
|
_CID( UI_RECV_DROP );
|
|
|
|
if ( id == id_UI_BEGIN_DRAG )
|
|
return NULL;
|
|
else if ( id == id_UI_RECV_DROP )
|
|
{
|
|
KUISendRecvDropMessage* pSendMsg = static_cast<KUISendRecvDropMessage*>( &msg );
|
|
|
|
SUIDragInfo* pUIDragInfo = m_pDisplayInfo->GetUIDragInfo();
|
|
|
|
SUIInvenItemDragInfo* pItemDragInfo = static_cast< SUIInvenItemDragInfo* >( pUIDragInfo );
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( pItemDragInfo->m_hItem );
|
|
if( pSlot == NULL ) return SUIWnd::Perform( id, msg );
|
|
|
|
//에테리얼 내구도가 0이면 파괴 상태임으로 거부한다.
|
|
const ItemBaseEx_info * pItemBase = GetItemDB().GetItemData( pSlot->GetItemCode() );
|
|
if(pItemBase)
|
|
{
|
|
if(pSlot->getMaxEtherealDurability() > 0)
|
|
{
|
|
int ethereal = pSlot->GetItem()->ethereal_durability;
|
|
if(ethereal == 0)
|
|
{
|
|
m_pDisplayInfo->AddSystemMessage( S(7904), 0 ); // Destroyed items cannot be stored, or added or traded in the Auction House.
|
|
return NULL;
|
|
}
|
|
}
|
|
}
|
|
|
|
if( NULL != pUIDragInfo && SUIDragInfo::DRAGTYPE_INVENITEM == pUIDragInfo->m_type )
|
|
{
|
|
SUIInvenItemDragInfo* pItemDragInfo = (SUIInvenItemDragInfo*)pUIDragInfo;
|
|
|
|
// bintitle. 2010.10.06. 이전코드에 인벤토리의 NUI ID 로 가방에서의 드랍시도 여부를 검사한다. 인벤토리 NUI 가 변경되어 ID도 바뀌었음.
|
|
//if( ::_stricmp( pSendMsg->sSendDropParentID.c_str(), "window_inventory" ) == 0 && ::_stricmp( pSendMsg->sRecvDropParentID.c_str(), "window_trade" ) == 0 )
|
|
|
|
// marine. 2011. 9. 2 거래nui 아이디 변경으로 코드 수정
|
|
if( ::_stricmp( pSendMsg->sSendDropParentID.c_str(), "window_main_inventory_bag" ) == 0 && ::_stricmp( pSendMsg->sRecvDropParentID.c_str(), "window_business_trade" ) == 0 )
|
|
{
|
|
if( pItemDragInfo && pItemDragInfo->m_hItem == -1 ) return NULL;
|
|
// 프리즈 상태이면 리턴
|
|
if( m_bSelfFreezed ) return NULL;
|
|
if( m_bSelfConfirm || m_bHisConfirm ) return NULL;
|
|
// 장착은 리턴
|
|
if( ItemBase::WEAR_NONE != m_pDisplayInfo->GetItemCurrentWearState( pItemDragInfo->m_hItem ) ) return NULL;
|
|
|
|
m_hSelItem = pItemDragInfo->m_hItem;
|
|
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( m_hSelItem );
|
|
if( pSlot == NULL ) return NULL;
|
|
|
|
if( GetItemDB().IsJoin( pSlot->GetItemCode(), IsInstanceUnstackable(pSlot) ) && pSlot->GetItemCount() > 1 )
|
|
{
|
|
m_InputState = TRADE_STATE::STATE_SENDITEM;
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_REQ_INPUTNUMBER( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, pSlot->GetItemCount(), SIMSG_UI_REQ_INPUTNUMBER::TYPE_NUMBER ) );
|
|
}
|
|
else
|
|
{
|
|
if( m_vecSelfItemList.size() > c_nMaxItem ) return NULL;
|
|
RequestItem( m_hSelItem );
|
|
m_pGameManager->StartSound( m_pDisplayInfo->GetDragMaterialSound() );
|
|
}
|
|
}
|
|
}
|
|
return NULL;
|
|
}
|
|
return SUIWnd::Perform( id, msg );
|
|
}
|
|
void SUITradeWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch( nMessage )
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
if( ::_stricmp( lpszControlID, "button_close" ) == 0 || ::_stricmp( lpszControlID, "trade_selfcancel" ) == 0 )
|
|
{
|
|
_oprint( "SUITradeWnd::PumpUpMessage\n" );
|
|
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::CANCEL_TRADE;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "trade_rpinput_button01" ) == 0 )
|
|
{
|
|
m_InputState = TRADE_STATE::STATE_INPUTMONEY;
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_REQ_INPUTNUMBER( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, m_PlayerInfoMgr.GetPlayerInfo().GetGold(), SIMSG_UI_REQ_INPUTNUMBER::TYPE_GOLD ) );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "trade_finalconfirm" ) == 0 )
|
|
{
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::CONFIRM_TRADE;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
else if( ::_stricmp( lpszControlID, "trade_selfok" ) == 0 )
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_REQ_OPEN_MSGBOX( SIMSG_REQ_OPEN_MSGBOX::MSGBOX_TRADEFREEZECHECK, S(295)/*"거래를 완료 하시겠습니까?"*/, false ) );
|
|
}
|
|
break;
|
|
case KUI_MESSAGE::KICON_PRESSING: //servantes 2010.10.20
|
|
{
|
|
if(m_bShiftKey)
|
|
{
|
|
/// 2011.05.13 - prodongi
|
|
bool self;
|
|
int nPos = GetCtrIndex( lpszControlID, self );
|
|
|
|
if( nPos == -1 )
|
|
return ;
|
|
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( m_vecSelfItemList[nPos].handle );
|
|
if(pSlot == NULL)
|
|
return ;
|
|
|
|
count_t nCnt = pSlot->GetItemCount();
|
|
if(nCnt > 1 && GetItemDB().IsJoin( pSlot->GetItemCode(), IsInstanceUnstackable(pSlot) )) // 여러개가 있을 경우
|
|
{
|
|
m_hSelItem = pSlot->GetHandle();
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_REQ_INPUTNUMBER( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, pSlot->GetItemCount(), SIMSG_UI_REQ_INPUTNUMBER::TYPE_NUMBER ) ); //수입력기가 뜬다
|
|
m_InputState = TRADE_STATE::STATE_MOVEITEM;
|
|
}
|
|
else if(nCnt == count_t(1)) // 한 개일 경우
|
|
{
|
|
RequestRemoveItem( pSlot->GetHandle(), count_t(1) ); // 1개를 옮긴다
|
|
}
|
|
else
|
|
int error=0;
|
|
}
|
|
}
|
|
break;
|
|
|
|
case KUI_MESSAGE::KGENWND_MOVE: // 윈도우 이동
|
|
LimitMoveWnd();
|
|
break;
|
|
case KUI_MESSAGE::KICON_DBLCLK: // 더블 클릭
|
|
{
|
|
/// 2011.05.13 - prodongi
|
|
bool self;
|
|
int nPos = GetCtrIndex( lpszControlID, self );
|
|
|
|
if( nPos != -1 )
|
|
{
|
|
int nSize( m_vecSelfItemList.size() );
|
|
if( nSize>nPos )
|
|
RequestRemoveItem( m_vecSelfItemList[nPos].handle, count_t( m_vecSelfItemList[nPos].count ) );
|
|
}
|
|
}
|
|
break;
|
|
/// 2011.05.13 - prodongi
|
|
case KUI_MESSAGE::KICON_RCLICK:
|
|
{
|
|
bool self;
|
|
int nPos = GetCtrIndex( lpszControlID, self );
|
|
if( nPos == -1 )
|
|
return ;
|
|
|
|
TS_ITEM_INFO* info;
|
|
|
|
if (self)
|
|
{
|
|
if(m_vecSelfItemList.size() <= nPos) // 2011. 9. 30 - marine 없는 벡터를 참조하는 경우에 리턴..
|
|
return;
|
|
else if(m_vecSelfItemList.empty()) // 벡터에 아무것도 없는 경우
|
|
return;
|
|
else
|
|
info = &m_vecSelfItemList[nPos];
|
|
}
|
|
else
|
|
{
|
|
if(m_vecHisItemList.size() <= nPos)
|
|
return;
|
|
else if(m_vecHisItemList.empty())
|
|
return;
|
|
else
|
|
info = &m_vecHisItemList[nPos];
|
|
}
|
|
|
|
if(GetItemDB().GetGroup(info->Code) == ItemBase::GROUP_SUMMONCARD )
|
|
{
|
|
SMSG_SUMMON_CARD_ITEM_INFO msg;
|
|
msg.level = info->level;
|
|
memcpy(&msg.item_info, info, sizeof (msg.item_info));
|
|
m_pGameManager->ProcMsgAtStatic(&msg);
|
|
}
|
|
}
|
|
break;
|
|
//case KUI_MESSAGE::KSCROLL_SELECT: // 스크롤 선택
|
|
// {
|
|
// int nPos = int(lparam);
|
|
// nPos = max( nPos, 0 );
|
|
|
|
// if( nPos > 0 && nPos%2 == 0 ) nPos += 2;
|
|
// else if( nPos > 0 && nPos%2 != 0 ) nPos += 1;
|
|
//
|
|
// if( ::_stricmp( lpszControlID, "trade_selfscroll" ) == 0 && m_vecSelfItemList.size() > c_nViewItem )
|
|
// RefreshSlot( nPos );
|
|
// else if( ::_stricmp( lpszControlID, "trade_hisscroll" ) == 0 && m_vecHisItemList.size() > c_nViewItem )
|
|
// RefreshSlot( nPos, false );
|
|
// }
|
|
// break;
|
|
}
|
|
|
|
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
void SUITradeWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd )
|
|
{
|
|
SUIWnd::OnNotifyUIWindowOpen(bOpen);
|
|
|
|
//거래창이 자꾸 윈도우 밖으로 숨는 현상을 방지하기 위해서 해상도 별로 체크하여 가운데정도로 고정해준다.
|
|
if( bOpen == true )
|
|
{
|
|
m_pGameManager->StartSound( "ui_popup_window01.wav" );
|
|
|
|
int nScreenHeight( SGameOption().GetResolution_Height() );
|
|
int nScreenWidth( SGameOption().GetResolution_Width() );
|
|
|
|
int nTradeWidth( GetRect().GetWidth() );
|
|
int nTradeHeight( GetRect().GetHeight() );
|
|
|
|
int nEmptyWidthArea(30);
|
|
int nEmptyHeightArea(55);
|
|
|
|
int nMoveX(0);
|
|
if( nScreenWidth/2 < nTradeWidth+nEmptyWidthArea )
|
|
nMoveX = nEmptyWidthArea;
|
|
else nMoveX = nScreenWidth/2 + nTradeWidth;
|
|
|
|
int nMoveY( nScreenHeight/2 + nTradeHeight/2 );
|
|
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MOVE( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, nMoveX, nMoveY ) );
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_EQUIPMENT, false ) ); // servantes 2010.11.17 // 장비창.
|
|
|
|
SetChildShow("static_selectbar_01", false);
|
|
SetChildShow("static_selectbar_02", false);
|
|
|
|
/// 2012.01.04 동시에 거래 요청을 해서, 거래 승인 메세지 박스가 남아 있는 경우에 close 시켜준다 - prodongi
|
|
m_pGameManager->GetGameInterface()->CloseMessgeBoxWithID(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_TRADEJOINCHECK);
|
|
//2012. 2. 20 - marine 열린 파괴창, 수리창, 조합창, 강화창 닫기,
|
|
m_pGameManager->GetGameInterface()->CloseAgainstUi();
|
|
}
|
|
else //servantes 2010.12.22
|
|
{
|
|
if(m_PlayerInfoMgr.GetTradeTarget()) //거래 중이면
|
|
{
|
|
Free();
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INPUTNUMBER, false ) );
|
|
m_PlayerInfoMgr.ChangeState(-1);
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_REQ_OPEN_MSGBOX(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_GENERAL, S(294)/*"거래가 취소되었습니다."*/, false) );
|
|
}
|
|
}
|
|
}
|
|
|
|
void SUITradeWnd::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
if( GetGameOption().IsRejectTrade() )
|
|
{
|
|
SMSG_TRADE* pTradeMsg = ( SMSG_TRADE* )pMsg;
|
|
if( pMsg->nType == MSG_TRADE && pTradeMsg->mode == TS_TRADE::REQUEST_TRADE )
|
|
{
|
|
m_pDisplayInfo->RefectTrade();
|
|
return;
|
|
}
|
|
}
|
|
|
|
switch( pMsg->nType )
|
|
{
|
|
case MSG_TRADE:
|
|
{
|
|
SMSG_TRADE* pTradeMsg = ( SMSG_TRADE* )pMsg;
|
|
if( pTradeMsg->rq_mode )
|
|
{
|
|
m_PlayerInfoMgr.SetTradeTarget( pTradeMsg->target_player, pTradeMsg->target_Name.c_str() );
|
|
return;
|
|
}
|
|
|
|
switch(pTradeMsg->mode)
|
|
{
|
|
case TS_TRADE::REQUEST_TRADE: // 거래 요청이 들어왔을때..
|
|
{
|
|
/// 2011.01.20 - prodongi
|
|
if (rejectIfTaming())
|
|
return ;
|
|
|
|
std::string strMsg = SR( 293, "#@user_name@#", pTradeMsg->target_Name.c_str() ); /*"%s 님의 거래신청을 수락하시겠습니까?"*/
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_REQ_OPEN_MSGBOX(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_TRADEJOINCHECK, strMsg.c_str(), true) );
|
|
|
|
m_PlayerInfoMgr.SetTradeTarget( pTradeMsg->target_player, pTradeMsg->target_Name.c_str() );
|
|
}
|
|
break;
|
|
case TS_TRADE::BEGIN_TRADE: // 거래 시작
|
|
{
|
|
Free();
|
|
InitSlotControls();
|
|
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false) );
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, false) );
|
|
|
|
m_PlayerInfoMgr.SetTradeTarget( pTradeMsg->target_player, pTradeMsg->target_Name.c_str() );
|
|
|
|
SetChildCaption( "panel_category_name_01", CStringUtil::StringFormat( "<font:font_01><size:9><#a57c52><hcenter><vcenter>%s", pTradeMsg->target_Name.c_str()).c_str() );
|
|
SetChildCaption( "panel_category_name_02", CStringUtil::StringFormat( "<font:font_01><size:9><#a57c52><hcenter><vcenter>%s", m_PlayerInfoMgr.GetName()).c_str() );
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, true) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, true) );
|
|
|
|
/*int x = GetRect().right, y = GetRect().bottom-30;
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MOVE( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, x, y ) );*/
|
|
//m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MOVE( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_EQUIPMENT, GetRect().right, GetRect().top ) );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_MOVE( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, GetRect().right, GetRect().top ) );
|
|
|
|
m_PlayerInfoMgr.ChangeState( SPlayerInfoMgr::STATE_TRADE );
|
|
|
|
SetCaptionAd(S(9534));
|
|
m_iCurAd = 0; // 전광판 표시 기본 루프텍스트 중 첫번째 텍스트가 출력되게 설정.
|
|
|
|
/// 2011.01.20 - prodongi
|
|
if (cancelIfTaming(pTradeMsg->target_player, pTradeMsg->target_Name.c_str()))
|
|
return ;
|
|
}
|
|
break;
|
|
case TS_TRADE::CANCEL_TRADE: // 거래 중지
|
|
{
|
|
Free();
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INPUTNUMBER, false ) );
|
|
m_PlayerInfoMgr.ChangeState(-1);
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_REQ_OPEN_MSGBOX(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_GENERAL, S(294)/*"거래가 취소되었습니다."*/, false) );
|
|
}
|
|
break;
|
|
case TS_TRADE::FREEZE_TRADE: // 거래 확인
|
|
SetFreeze( pTradeMsg->target_player );
|
|
break;
|
|
case TS_TRADE::PROCESS_TRADE: // 거래 승인
|
|
{
|
|
Free();
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, false) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INPUTNUMBER, false ) );
|
|
|
|
m_PlayerInfoMgr.ChangeState(-1);
|
|
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_REQ_OPEN_MSGBOX(SIMSG_REQ_OPEN_MSGBOX::MSGBOX_GENERAL, S(279)/*"거래가 성사되었습니다."*/, false) );
|
|
}
|
|
break;
|
|
case TS_TRADE::ADD_GOLD:
|
|
SetGold( pTradeMsg->target_player, count_t( pTradeMsg->item_info.count ) );
|
|
break;
|
|
case TS_TRADE::ADD_ITEM:
|
|
SetItem( pTradeMsg->target_player, pTradeMsg->item_info );
|
|
break;
|
|
case TS_TRADE::REMOVE_ITEM:
|
|
SetItem( pTradeMsg->target_player, pTradeMsg->item_info, true );
|
|
break;
|
|
//////////////////////////////////////////////////////////////////////////
|
|
case TS_TRADE::CONFIRM_TRADE:
|
|
SetConfirm( pTradeMsg->target_player );
|
|
break;
|
|
case TS_TRADE::REJECT_TRADE:
|
|
{
|
|
m_PlayerInfoMgr.SetTradeTarget( pTradeMsg->target_player, pTradeMsg->target_Name.c_str() );
|
|
|
|
// 거래 요청 거절하였다..
|
|
/* if( ::strlen( m_PlayerInfoMgr.GetTargetName() ) > 0 )
|
|
m_pDisplayInfo->SetSysMsg( SYS_MSG_TRADE_REJECT );*/
|
|
}
|
|
break;
|
|
case TS_TRADE::MODIFY_COUNT: // 2011. 10. 4 - marine
|
|
{
|
|
ModifyItem( pTradeMsg->target_player, pTradeMsg->item_info);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
case IMSG_UI_INPUTNUMBER:
|
|
{
|
|
SIMSG_UI_INPUTNUMBER* pInputNumberMsg = (SIMSG_UI_INPUTNUMBER*)pMsg;
|
|
|
|
if( m_InputState == TRADE_STATE::STATE_INPUTMONEY )
|
|
{
|
|
if( pInputNumberMsg->m_nValue <= m_PlayerInfoMgr.GetPlayerInfo().GetGold() && pInputNumberMsg->m_nValue > 0 )
|
|
{
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::ADD_GOLD;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.item_info.count = pInputNumberMsg->m_nValue.getAmount();
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
|
|
m_pGameManager->StartSound( m_pDisplayInfo->GetDragMaterialSound() );
|
|
}
|
|
}
|
|
else if( m_InputState == TRADE_STATE::STATE_SENDITEM )
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo(m_hSelItem);
|
|
if( pSlot && m_vecSelfItemList.size() <= c_nMaxItem && pInputNumberMsg->m_nValue <= pSlot->GetItemCode() )
|
|
{
|
|
if(IsRegisterTradeWnd(m_hSelItem) == false) //2011. 10. 5 - marine
|
|
{
|
|
count_t count = GetValidItemCount( m_hSelItem,pInputNumberMsg->m_nValue ); //2011. 10. 4 -marine 가지고 있는 최대치 확인
|
|
RequestItem( m_hSelItem, count );
|
|
}
|
|
m_pGameManager->StartSound( m_pDisplayInfo->GetDragMaterialSound() );
|
|
}
|
|
}
|
|
else if( m_InputState == TRADE_STATE::STATE_MOVEITEM ) //servantes 2010.10.19
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo(m_hSelItem);
|
|
if(pSlot == NULL)
|
|
break;
|
|
|
|
if( pSlot && m_vecSelfItemList.size() <= c_nMaxItem && pInputNumberMsg->m_nValue <= pSlot->GetItemCode() )
|
|
{
|
|
if(IsRegisterTradeWnd(m_hSelItem) == false) //2011. 10. 5 - marine
|
|
{
|
|
count_t count = GetValidItemCount( m_hSelItem,pInputNumberMsg->m_nValue ); //2011. 10. 4 -marine 가지고 있는 최대치 확인
|
|
RequestItem( m_hSelItem, count );
|
|
}
|
|
|
|
m_pGameManager->StartSound( m_pDisplayInfo->GetDragMaterialSound() );
|
|
m_hSelItem = NULL;
|
|
}
|
|
}
|
|
m_InputState = TRADE_STATE::STATE_NONE;
|
|
}
|
|
break;
|
|
|
|
case IMSG_HOTKEY_EX: //servantes 2010.10.19
|
|
{
|
|
SIMSG_HOTKEY_EX* pHotKey = dynamicCast<SIMSG_HOTKEY_EX*>(pMsg);
|
|
|
|
if( pHotKey->wParam == VK_SHIFT )
|
|
m_bShiftKey = (pHotKey->bUp == 0); //servantes 2010.10.15
|
|
if( pHotKey->wParam == VK_CONTROL ) //servantes 2010.10.15
|
|
m_bControlKey = (pHotKey->bUp == 0);
|
|
if( pHotKey->wParam == VK_MENU )
|
|
{
|
|
bool bPreState = m_bAltKey;
|
|
m_bAltKey = (pHotKey->bUp == 0);
|
|
|
|
if( bPreState != m_bAltKey && IsShow() )
|
|
{
|
|
RefreshSelfSlot( 0 );
|
|
RefreshHisSlot( 0 );
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case IMSG_SET_TRADE:
|
|
{
|
|
SIMSG_SET_TRADE* pData = (SIMSG_SET_TRADE*)pMsg;
|
|
if(pData->m_nValue == 1)
|
|
{
|
|
RequestItem( pData->m_handle, pData->m_nValue );
|
|
}
|
|
else if(pData->m_nValue > 1)
|
|
{
|
|
m_hSelItem = pData->m_handle;
|
|
m_InputState = TRADE_STATE::STATE_MOVEITEM;
|
|
if(pData->m_bForceMove)
|
|
RequestItem( pData->m_handle, pData->m_nValue );
|
|
else
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_REQ_INPUTNUMBER( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_TRADE, pData->m_nValue, SIMSG_UI_REQ_INPUTNUMBER::TYPE_NUMBER ) );
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
void SUITradeWnd::Free()
|
|
{
|
|
if( m_vecSelfItemList.size() > 0 )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecSelfItemList.begin();
|
|
while( it != m_vecSelfItemList.end() )
|
|
it = m_vecSelfItemList.erase(it);
|
|
|
|
m_vecSelfItemList.clear();
|
|
}
|
|
if( m_vecHisItemList.size() > 0 )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecHisItemList.begin();
|
|
while( it != m_vecHisItemList.end() )
|
|
it = m_vecHisItemList.erase(it);
|
|
m_vecHisItemList.clear();
|
|
}
|
|
|
|
m_PlayerInfoMgr.SetTradeTarget( NULL, "" );
|
|
}
|
|
// ===========================
|
|
// 승인
|
|
// ===========================
|
|
void SUITradeWnd::SetFreeze( AR_HANDLE hTarget )
|
|
{
|
|
if( m_PlayerInfoMgr.IsLocalPlayer(hTarget) )
|
|
{
|
|
KUIControlButton* pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_selfok" ));
|
|
if( pButton ) pButton->Disable();
|
|
|
|
KUIControlStatic* pStatic = dynamicCast<KUIControlStatic*>(GetChild( "static_selectbar_01" ));
|
|
if( pStatic ) pStatic->SetShow(true);
|
|
|
|
m_bSelfFreezed = true;
|
|
|
|
SetCaptionAd(S(9536));
|
|
}
|
|
else if( m_PlayerInfoMgr.IsTradeTargetPlayer(hTarget) )
|
|
{
|
|
// KUIControlButton* pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_yourselfcancel" )); // 2011.11.29 - servantes : "trade_yourselfcancel" 컨트롤 nui에 없어서 주석처리
|
|
// if( pButton ) pButton->SetButtonState( KUIControlButton::KBUTTON_DOWN );
|
|
|
|
KUIControlStatic* pStatic = dynamicCast<KUIControlStatic*>(GetChild( "static_selectbar_02" ));
|
|
if( pStatic ) pStatic->SetShow(true);
|
|
|
|
// TODO : 기획 필요
|
|
// m_pDisplayInfo->SetSysMsg( SYS_MSG_TRADE_FREEZE );
|
|
|
|
m_bHisFreezed = true;
|
|
}
|
|
|
|
if( m_bSelfFreezed && m_bHisFreezed )
|
|
{
|
|
SetCaptionAd(S(9537));
|
|
m_dwTime = m_pDisplayInfo->GetCurTime();
|
|
}
|
|
if( m_bSelfFreezed )
|
|
{
|
|
// 숫자 입력 버튼
|
|
KUIControlSimpleButton* pSimpeButton = dynamicCast<KUIControlSimpleButton*>(GetChild( "trade_rpinput_button01" ));
|
|
if( pSimpeButton ) pSimpeButton->Disable();
|
|
}
|
|
}
|
|
void SUITradeWnd::SetConfirm( AR_HANDLE hTarget )
|
|
{
|
|
if( m_PlayerInfoMgr.IsLocalPlayer(hTarget) )
|
|
{
|
|
m_bSelfConfirm = true;
|
|
|
|
// 최종승인 버튼 활성
|
|
KUIControlButton* pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_finalconfirm" ));
|
|
if( pButton ) pButton->Disable();
|
|
}
|
|
else if( m_PlayerInfoMgr.IsTradeTargetPlayer(hTarget) )
|
|
{
|
|
// TODO : 기획 필요
|
|
// m_pDisplayInfo->SetSysMsg( SYS_MSG_TRADE_CONFIRMCHECK );
|
|
m_bHisConfirm = true;
|
|
}
|
|
|
|
if( m_bSelfConfirm && m_bHisConfirm )
|
|
{
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::PROCESS_TRADE;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
}
|
|
|
|
// ===========================
|
|
// 골드
|
|
// ===========================
|
|
|
|
extern std::string getGoldString( money_t nGold, bool bAdddRupy = true );
|
|
extern std::string getGoldStringInTrade( money_t nGold, bool bAdddRupy = true);
|
|
|
|
|
|
void SUITradeWnd::SetGold( AR_HANDLE hTarget, money_t nValue )
|
|
{
|
|
KUIWnd* pWnd = NULL;
|
|
if( m_PlayerInfoMgr.IsLocalPlayer(hTarget) )
|
|
{
|
|
std::string strGold = "<SIZE:17>";
|
|
strGold += getGoldStringInTrade( nValue, false);
|
|
strGold += " "; // 2011. 9 . 6 - marine 수입력기 버튼에 가려서 숫자 뒤에 공간확보함.
|
|
|
|
SetChildShow( "trade_selfgold", nValue.getAmount() > 0 );
|
|
|
|
SetChildCaption( "trade_selfgold", strGold.c_str() );
|
|
}
|
|
else if( m_PlayerInfoMgr.IsTradeTargetPlayer(hTarget) )
|
|
{
|
|
std::string strGold = "<SIZE:17>";
|
|
strGold += getGoldStringInTrade( nValue, false);
|
|
strGold += " "; // 2011. 9. 6 - marine
|
|
|
|
SetChildShow( "trade_hisgold", nValue.getAmount() > 0 );
|
|
SetChildCaption( "trade_hisgold", strGold.c_str() );
|
|
}
|
|
}
|
|
// ===========================
|
|
// 아이템
|
|
// ===========================
|
|
|
|
void SUITradeWnd::SetItem( AR_HANDLE hTarget, TS_ITEM_INFO& rItem, bool bRemove/*=false*/ )
|
|
{
|
|
if( m_PlayerInfoMgr.IsLocalPlayer(hTarget) )
|
|
{
|
|
if( bRemove ) RemoveItem( rItem );
|
|
else AddItem( rItem );
|
|
RefreshSelfSlot(0);
|
|
}
|
|
else if( m_PlayerInfoMgr.IsTradeTargetPlayer(hTarget) )
|
|
{
|
|
if( bRemove ) RemoveItem( rItem, false );
|
|
else AddItem( rItem, false );
|
|
RefreshHisSlot(0);
|
|
}
|
|
}
|
|
|
|
void SUITradeWnd::ModifyItem( AR_HANDLE hTarget, TS_ITEM_INFO& rItem)
|
|
{
|
|
if( m_PlayerInfoMgr.IsLocalPlayer(hTarget) )
|
|
{
|
|
SetModfyItem( rItem );
|
|
RefreshSelfSlot(0);
|
|
}
|
|
else if( m_PlayerInfoMgr.IsTradeTargetPlayer(hTarget) )
|
|
{
|
|
SetModfyItem( rItem, false );
|
|
RefreshHisSlot(0);
|
|
}
|
|
}
|
|
|
|
void SUITradeWnd::SetModfyItem( TS_ITEM_INFO& rItem, bool bSelf )
|
|
{
|
|
// 2011. 10. 4 - marine 거래창에 등록된 리스트중 같은 아이템을 찾아서 수량만 변경해준다.
|
|
if( bSelf )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecSelfItemList.begin();
|
|
std::vector<TS_ITEM_INFO>::iterator it_end = m_vecSelfItemList.end();
|
|
for(; it !=it_end ; ++it )
|
|
{
|
|
TS_ITEM_INFO Item = *it;
|
|
if(Item.handle == rItem.handle)
|
|
{
|
|
Item.count = rItem.count;
|
|
*it = Item;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecHisItemList.begin();
|
|
std::vector<TS_ITEM_INFO>::iterator it_end = m_vecHisItemList.end();
|
|
for(; it !=it_end ; ++it )
|
|
{
|
|
TS_ITEM_INFO Item = *it;
|
|
if(Item.handle == rItem.handle)
|
|
{
|
|
Item.count = rItem.count;
|
|
*it = Item;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
void SUITradeWnd::AddItem( TS_ITEM_INFO& rItem, bool bSelf )
|
|
{
|
|
if( bSelf )
|
|
{
|
|
if(m_vecSelfItemList.size() < c_nMaxItem)
|
|
AddItem(m_vecSelfItemList, rItem);
|
|
}
|
|
else
|
|
{
|
|
if(m_vecHisItemList.size() < c_nMaxItem)
|
|
AddItem(m_vecHisItemList, rItem);
|
|
}
|
|
}
|
|
|
|
void SUITradeWnd::AddItem( std::vector<TS_ITEM_INFO>& ItemList, TS_ITEM_INFO& rItem )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = ItemList.begin();
|
|
while( it != ItemList.end() )
|
|
{
|
|
TS_ITEM_INFO item = (*it);
|
|
if( item.handle == rItem.handle )
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( item.handle ); //servantes 2010.10.21
|
|
if(pSlot == NULL)
|
|
return ;
|
|
|
|
if( GetItemDB().IsJoin(pSlot->GetItemCode(), IsInstanceUnstackable(pSlot)) ) //중첩이 가능한지 검사
|
|
{
|
|
__int64 nCnt = item.count;
|
|
if( count_t(nCnt + rItem.count) > pSlot->GetItemCount())
|
|
(*it).count = (__int64)pSlot->GetItemCount().getAmount();
|
|
else
|
|
(*it).count += rItem.count;
|
|
}
|
|
else
|
|
{
|
|
(*it).count = rItem.count;
|
|
}
|
|
return;
|
|
}
|
|
it++;
|
|
}
|
|
|
|
// 2011. 9. 2 - marine 거래 슬롯개수 보다 많을 때 걸러준다.
|
|
if(ItemList.size() < c_nMaxItem)
|
|
ItemList.push_back(rItem);
|
|
}
|
|
|
|
void SUITradeWnd::RemoveItem( TS_ITEM_INFO& rItem, bool bSelf )
|
|
{
|
|
if( bSelf ) RemoveItem(m_vecSelfItemList, rItem);
|
|
else RemoveItem(m_vecHisItemList, rItem);
|
|
}
|
|
|
|
void SUITradeWnd::RemoveItem( std::vector<TS_ITEM_INFO>& ItemList, TS_ITEM_INFO& rItem )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = ItemList.begin();
|
|
while( it != ItemList.end() )
|
|
{
|
|
TS_ITEM_INFO item = (*it);
|
|
if( item.handle == rItem.handle )
|
|
{
|
|
if( (*it).count <= rItem.count )
|
|
ItemList.erase(it);
|
|
else (*it).count -= rItem.count;
|
|
return;
|
|
}
|
|
it++;
|
|
}
|
|
}
|
|
|
|
// ===========================
|
|
// 스크롤바
|
|
// ===========================
|
|
//void SUITradeWnd::RefreshScrollBar( bool bSelf )
|
|
//{
|
|
// int nCurCount = 0;
|
|
//
|
|
// if( bSelf )
|
|
// {
|
|
// nCurCount = static_cast<int>( m_vecSelfItemList.size() );
|
|
// int nScrollRange = max(nCurCount - c_nViewItem, 0);
|
|
//
|
|
// KUIControlVScroll* pScrollBar = (KUIControlVScroll*)GetChild( "trade_selfscroll" );
|
|
// if( NULL != pScrollBar )
|
|
// {
|
|
// pScrollBar->SetMaxRange( DWORD(nScrollRange)+1 );
|
|
//
|
|
// int nScrollPos = pScrollBar->GetPosition();
|
|
// pScrollBar->SetPosition( nScrollPos );
|
|
// if( nScrollPos > 0 && nScrollPos%2 == 0 ) nScrollPos += 2;
|
|
// if( nScrollPos > 0 && nScrollPos%2 != 0 ) nScrollPos += 1;
|
|
// RefreshSlot( nScrollPos );
|
|
// }
|
|
// }
|
|
// else
|
|
// {
|
|
// nCurCount = static_cast<int>( m_vecHisItemList.size() );
|
|
// int nScrollRange = max(nCurCount - c_nViewItem, 0);
|
|
//
|
|
// KUIControlVScroll* pScrollBar = (KUIControlVScroll*)GetChild( "trade_hisscroll" );
|
|
// if( NULL != pScrollBar )
|
|
// {
|
|
// pScrollBar->SetMaxRange( DWORD(nScrollRange)+1 );
|
|
//
|
|
// int nScrollPos = pScrollBar->GetPosition();
|
|
// pScrollBar->SetPosition( nScrollPos );
|
|
// if( nScrollPos > 0 && nScrollPos%2 == 0 ) nScrollPos += 2;
|
|
// if( nScrollPos > 0 && nScrollPos%2 != 0 ) nScrollPos += 1;
|
|
// RefreshSlot( nScrollPos, false );
|
|
// }
|
|
// }
|
|
//}
|
|
// ===========================
|
|
// 슬롯
|
|
// ===========================
|
|
void SUITradeWnd::InitSlotControls()
|
|
{
|
|
for( int i = 0; i < c_nViewItem; i++ )
|
|
{
|
|
DisableItemSlot(i);
|
|
DisableItemSlot(i, false);
|
|
}
|
|
|
|
SetChildCaption( "trade_selfgold", "" );
|
|
SetChildCaption( "trade_hisgold", "" );
|
|
SetChildCaption( "text_table_01","" );
|
|
|
|
m_bSelfFreezed = false;
|
|
m_bHisFreezed = false;
|
|
m_bConfirmWait = true;
|
|
m_bSelfConfirm = false;
|
|
m_bHisConfirm = false;
|
|
|
|
// 버튼들 모두 정상화
|
|
|
|
// 최종 승인 버튼
|
|
KUIControlButton* pButton = NULL;
|
|
pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_finalconfirm" ));
|
|
if( pButton ) pButton->Disable();
|
|
|
|
KUIControlSimpleButton* pSbutton = dynamicCast<KUIControlSimpleButton*>(GetChild( "trade_rpinput_button01" ));
|
|
if( pSbutton ) pSbutton->Enable();
|
|
|
|
// 남꺼 확인 버튼 disable
|
|
// pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_yourselfcancel" )); // 2011.11.29 - servantes : "trade_yourselfcancel" 컨트롤 nui에 없어서 주석처리
|
|
// if( pButton ) pButton->Disable();
|
|
|
|
// 내꺼 확인 버튼 normal
|
|
pButton = dynamicCast<KUIControlButton*>(GetChild( "trade_selfok" ));
|
|
if( pButton ) pButton->Enable();
|
|
|
|
// RefreshScrollBar(true);
|
|
// RefreshScrollBar(false);
|
|
}
|
|
void SUITradeWnd::RefreshSlot( int nPos, bool bSelf )
|
|
{
|
|
if( bSelf ) RefreshSelfSlot(nPos);
|
|
else RefreshHisSlot(nPos);
|
|
}
|
|
void SUITradeWnd::RefreshSelfSlot( int nPos )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecSelfItemList.begin();
|
|
for( int i = 0; i < c_nViewItem/*nIndex <= 10*/; i++ )
|
|
{
|
|
if( i >= nPos )
|
|
{
|
|
if( it != m_vecSelfItemList.end() && i <= m_vecSelfItemList.size() )
|
|
{
|
|
TS_ITEM_INFO item = (*it);
|
|
SetSelfItem( item, i );
|
|
++it;
|
|
}
|
|
else
|
|
DisableItemSlot( i );
|
|
}
|
|
}
|
|
}
|
|
void SUITradeWnd::RefreshHisSlot( int nPos )
|
|
{
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecHisItemList.begin();
|
|
for( int i = 0; i < c_nViewItem/*nIndex <= 10*/; i++ )
|
|
{
|
|
if( i >= nPos )
|
|
{
|
|
if( it != m_vecHisItemList.end() && i <= m_vecHisItemList.size() )
|
|
{
|
|
TS_ITEM_INFO item = (*it);
|
|
SetHisItem( item, i );
|
|
++it;
|
|
}
|
|
else
|
|
DisableItemSlot( i, false );
|
|
}
|
|
}
|
|
}
|
|
|
|
std::string SUITradeWnd::CutTagCaption(std::string str, char* tag)
|
|
{
|
|
// 2011. 1. 2 - marine 입력된 태그를 찾아서 삭제해준다.. 하나만 됨...
|
|
std::string r = str;
|
|
|
|
std:: string s1 = "<";
|
|
s1 += tag;
|
|
std::string s2 = ">";
|
|
|
|
size_t nPos1 = r.find(s1); //"<tag"위치 찾기
|
|
if(nPos1 == -1)
|
|
return str;
|
|
|
|
size_t nPos2 = r.find_first_of(s2,nPos1); // nPos1 다음의 ">"위치 찾기
|
|
if(nPos2 == -1)
|
|
return str;
|
|
|
|
r.erase(nPos1,nPos2-nPos1+1); // "<tag:xxx>" 잘라내기
|
|
|
|
return r;
|
|
}
|
|
|
|
void SUITradeWnd::SetSelfItem( TS_ITEM_INFO& rItem, int nPos )
|
|
{
|
|
XFlag<int> xFlag;
|
|
xFlag.CopyFrom( &(rItem.Flag) );
|
|
|
|
// 이름
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( rItem.handle );
|
|
if( NULL == pSlot )
|
|
return;
|
|
|
|
// 아이콘
|
|
KUIControlMultiIcon* pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_selfitem%02d", nPos ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
/// 2011.08.03 - prodongi //sun
|
|
ResetMultiIcon( pIcon, 0, 8 );
|
|
if( !setSkillCardIcon(pIcon, pSlot->GetItemCode()) && !setSummonCardIcon( pIcon, pSlot ) )
|
|
pIcon->SetIcon( 0, c_szDEF_SPR_NAME, GetItemDB().GetIconName(rItem.Code) );
|
|
|
|
if( pSlot->GetItemAppearance() )
|
|
pIcon->SetIcon( 4, c_szDEF_SPR_NAME, g_strLookChangeIcon ); //2012. 7. 27 - marine 형상변환표시 아이콘
|
|
|
|
pIcon->SetIcon( 1, c_szDEF_SPR_NAME, xFlag.IsOn( ItemInstance::ITEM_FLAG_CARD ) ? "static_common_useunitcardicon" : NULL );
|
|
|
|
// gmpbigsun( 20130325 ) : 빈카드 표시 제거예정
|
|
// if( GetItemDB().GetGroup( rItem.Code ) == ItemBase::GROUP_SUMMONCARD )
|
|
// {
|
|
// 2012. 1. 18 - marine 크리쳐 빈카드 이미지가 안나와서 추가
|
|
// if (rItem.Flag == 0)
|
|
// {
|
|
// pIcon->SetIcon( 2, c_szDEF_SPR_NAME, g_strEmptyCardIcon);
|
|
// }
|
|
// }
|
|
|
|
XFlag<int> xFlag;
|
|
xFlag.CopyFrom( &rItem.Flag );
|
|
EquipItemAddtionalIconSetter icon_setter( pIcon, rItem.Code, rItem.enhance, rItem.ethereal_durability, xFlag );
|
|
|
|
pIcon->SetLazyTooltip( new rp::KLazyItemTooltip( *m_pDisplayInfo, pSlot, true ) );
|
|
|
|
if( m_bAltKey )
|
|
{
|
|
m_pDisplayInfo->SetComparableEquipItemSubTooltip( pIcon, rItem.Code );
|
|
}
|
|
}
|
|
|
|
if( pSlot )
|
|
{
|
|
//기획팀 요청으로 상대방과 동일한 크기로 색깔만 바뀐다
|
|
std::string strName = m_pDisplayInfo->GetItemName( pSlot->GetItemCode(), true, pSlot->GetEnhance(), pSlot->GetLevel(), pSlot->GetXFlag(), false, 0, false, pSlot->GetRandomOption() );
|
|
strName = CutTagCaption(strName,"size"); // 2011. 1. 2 - marine 폰트 크기가 강제로 들어가는 경우가 있어서 태그를 제거, 혹 아이템 이름의 폰트 사이즈를 다른곳에서 넣어야 한다면 수정되야한다.
|
|
SetChildCaption( CStringUtil::StringFormat( "trade_selfiteminfo%02d", nPos ).c_str(), CStringUtil::StringFormat( "<font:font_01><size:8><#fffff><vcenter>%s", strName.c_str()).c_str() );
|
|
}
|
|
|
|
// 개수
|
|
count_t nCount( 0 );
|
|
if( GetItemDB().IsJoin(rItem.Code, IsInstanceUnstackable(xFlag)) )
|
|
nCount = count_t( max( rItem.count, (__int64)1 ) );
|
|
|
|
SetChildShow( CStringUtil::StringFormat( "trade_selfitemcount%02d", nPos ).c_str(), nCount.getAmount() > 0 );
|
|
|
|
if( nCount.getAmount() )
|
|
SetChildCaption( CStringUtil::StringFormat( "trade_selfitemcount%02d", nPos ).c_str(), CStringUtil::StringFormat( "<right>%s<shadow>%I64d</shadow>", S(6425), nCount.getAmount() ).c_str() );
|
|
}
|
|
void SUITradeWnd::SetHisItem( TS_ITEM_INFO& rItem, int nPos )
|
|
{
|
|
XFlag<int> xFlag;
|
|
xFlag.CopyFrom( &(rItem.Flag) );
|
|
|
|
// 아이콘
|
|
KUIControlMultiIcon* pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_hisitem%02d", nPos ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
unsigned int nEndurancePer = 0;
|
|
// 2010.09.29 - prodongi
|
|
if( rItem.Code == 806808 )
|
|
{
|
|
nEndurancePer = rItem.endurance;
|
|
}
|
|
else
|
|
{
|
|
int nResult = SInventorySlot::GetCrrEndurancePer(&rItem, nEndurancePer);
|
|
if( nResult != SInventorySlot::ENDURANCE_SUCCESS )
|
|
nEndurancePer = nResult;
|
|
}
|
|
|
|
ResetMultiIcon( pIcon, 0, 8 );
|
|
/// 2011.08.03 - prodongi
|
|
if( !setSkillCardIcon(pIcon, rItem.Code) && !setSummonCardIcon( pIcon, rItem.Code, rItem.summon_id, rItem.enhance, rItem.Flag, rItem.ethereal_durability ) )
|
|
{
|
|
pIcon->SetIcon( 0, c_szDEF_SPR_NAME, GetItemDB().GetIconName(rItem.Code) );
|
|
}
|
|
|
|
if( rItem.appearance_code )
|
|
pIcon->SetIcon( 4, c_szDEF_SPR_NAME, g_strLookChangeIcon ); //2012. 7. 27 - marine 형상변환표시 아이콘
|
|
|
|
pIcon->SetIcon( 1, c_szDEF_SPR_NAME, xFlag.IsOn( ItemInstance::ITEM_FLAG_CARD ) ? "static_common_useunitcardicon" : NULL );
|
|
|
|
// gmpbigsun( 20130325 ) : 빈카드 표시 제거예정
|
|
// if( GetItemDB().GetGroup( rItem.Code ) == ItemBase::GROUP_SUMMONCARD )
|
|
// {
|
|
// 2012. 1. 18 - marine 크리쳐 빈카드 이미지가 안나와서 추가
|
|
// if (rItem.Flag == 0)
|
|
// {
|
|
// pIcon->SetIcon( 2, c_szDEF_SPR_NAME, g_strEmptyCardIcon);
|
|
// }
|
|
// }
|
|
|
|
EquipItemAddtionalIconSetter icon_setter( pIcon, rItem.Code, rItem.enhance, rItem.ethereal_durability, xFlag );
|
|
|
|
//tooltip 수정
|
|
//2009-02-05: hunee
|
|
pIcon->SetTooltip( m_pDisplayInfo->GetItemTooltipText( rItem.Code,
|
|
true,
|
|
rItem.enhance,
|
|
rItem.level,
|
|
xFlag,
|
|
rItem.remain_time,
|
|
&rItem.socket[0],
|
|
nEndurancePer,
|
|
rItem.handle,
|
|
0,
|
|
rItem.elemental_effect_type,
|
|
rItem.elemental_effect_remain_time,
|
|
rItem.elemental_effect_attack_point,
|
|
rItem.elemental_effect_magic_point,
|
|
false,
|
|
rItem.ethereal_durability,
|
|
rItem.endurance,
|
|
-1,
|
|
rItem.summon_id,
|
|
false,
|
|
false,
|
|
rItem.appearance_code,
|
|
&rItem.awakenoption,
|
|
&rItem.random_option,
|
|
rItem.enhance_chance,
|
|
rItem.nAdditionalItemEffect // Fraun Sky Accessories 7/12/2025
|
|
).c_str()
|
|
);
|
|
|
|
if( m_bAltKey )
|
|
{
|
|
m_pDisplayInfo->SetComparableEquipItemSubTooltip( pIcon, rItem.Code );
|
|
}
|
|
}
|
|
|
|
// 이름
|
|
KUIWnd* pWnd = GetChild( CStringUtil::StringFormat( "trade_hisiteminfo%02d", nPos ).c_str() );
|
|
if( pWnd )
|
|
{
|
|
std::string strName = m_pDisplayInfo->GetItemName( rItem.Code, true, rItem.enhance, rItem.level, xFlag, false, 0, false, &rItem.random_option );
|
|
strName = CutTagCaption(strName,"size"); // 2011. 1. 2 - marine 폰트 크기가 강제로 들어가는 경우가 있어서 태그를 제거, 혹 아이템 이름의 폰트 사이즈를 다른곳에서 넣어야 한다면 수정되야한다.
|
|
pWnd->SetCaption( CStringUtil::StringFormat( "<font:font_01><size:8><#fffff><center>%s",strName.c_str()).c_str() );
|
|
}
|
|
|
|
// 개수
|
|
count_t nCount( 0 );
|
|
if( GetItemDB().IsJoin(rItem.Code, IsInstanceUnstackable(xFlag)) )
|
|
nCount = count_t( max( rItem.count, (__int64)1 ) );
|
|
|
|
SetChildShow( CStringUtil::StringFormat( "trade_hisitemcount%02d", nPos ).c_str(), nCount.getAmount() > 0 );
|
|
|
|
if( nCount.getAmount() )
|
|
SetChildCaption( CStringUtil::StringFormat( "trade_hisitemcount%02d", nPos ).c_str(), CStringUtil::StringFormat( "<right>%s<shadow>%I64d</shadow>", S(6425), nCount.getAmount() ).c_str() );
|
|
}
|
|
void SUITradeWnd::DisableItemSlot( int nPos, bool bSelf )
|
|
{
|
|
if( bSelf )
|
|
{
|
|
// 아이콘
|
|
KUIControlMultiIcon* pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_selfitem%02d", nPos ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
ResetMultiIcon( pIcon, 0, 8 );
|
|
pIcon->SetIcon( 0, c_szDEF_SPR_NAME, "static_common_itemslot" );
|
|
pIcon->SetIcon( 1, c_szDEF_SPR_NAME, "static_common_itemslot" );
|
|
pIcon->SetTooltip();
|
|
}
|
|
|
|
KUIWnd* pWnd = NULL;
|
|
// 이름
|
|
pWnd = GetChild( CStringUtil::StringFormat( "trade_selfiteminfo%02d", nPos ).c_str() );
|
|
if( pWnd ) pWnd->SetCaption( "" );
|
|
// 개수
|
|
SetChildShow( CStringUtil::StringFormat( "trade_selfitemcount%02d", nPos ).c_str(), false );
|
|
}
|
|
else
|
|
{
|
|
// 아이콘
|
|
KUIControlMultiIcon* pIcon = dynamicCast<KUIControlMultiIcon*>(GetChild( CStringUtil::StringFormat( "trade_hisitem%02d", nPos ).c_str() ));
|
|
if( pIcon )
|
|
{
|
|
ResetMultiIcon( pIcon, 0, 8 );
|
|
pIcon->SetIcon( 0, c_szDEF_SPR_NAME, "static_common_itemslot" );
|
|
pIcon->SetIcon( 1, c_szDEF_SPR_NAME, "static_common_itemslot" );
|
|
pIcon->SetTooltip();
|
|
}
|
|
|
|
// 이름
|
|
KUIWnd* pWnd = GetChild( CStringUtil::StringFormat( "trade_hisiteminfo%02d", nPos ).c_str() );
|
|
if( pWnd ) pWnd->SetCaption( "" );
|
|
// 개수
|
|
SetChildShow( CStringUtil::StringFormat( "trade_hisitemcount%02d", nPos ).c_str(), false );
|
|
}
|
|
}
|
|
void SUITradeWnd::RequestItem( AR_HANDLE hItem, count_t nValue )
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( hItem );
|
|
if( pSlot == NULL || nValue <= 0 ) return;
|
|
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::ADD_ITEM;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.item_info.handle = hItem;
|
|
TradeMsg.item_info.uid = pSlot->GetUID();
|
|
TradeMsg.item_info.count = nValue.getAmount();
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
|
|
count_t SUITradeWnd::GetValidItemCount(AR_HANDLE hItem, count_t nCount)
|
|
{
|
|
count_t ret = nCount;
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( hItem );
|
|
if(pSlot)
|
|
{
|
|
if(pSlot->GetItemCount() < nCount)
|
|
ret = pSlot->GetItemCount();
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
bool SUITradeWnd::IsRegisterTradeWnd(AR_HANDLE hitem)
|
|
{
|
|
// 2011. 10. 5 - marine 등록된 아이템인가?
|
|
bool bIsFind = false;
|
|
std::vector<TS_ITEM_INFO>::iterator it = m_vecSelfItemList.begin();
|
|
for( ; it != m_vecSelfItemList.end() ; ++it)
|
|
{
|
|
TS_ITEM_INFO item = *it;
|
|
if(item.handle == hitem)
|
|
{
|
|
bIsFind = true;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if(bIsFind)
|
|
{
|
|
// 수입력기 닫음
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INPUTNUMBER, false ) );
|
|
// 메세지 박스
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_REQ_OPEN_MSGBOX( SIMSG_REQ_OPEN_MSGBOX::MSGBOX_GENERAL, S(9826)/*"사기거래를 방지하기 위하여 거래창에 들어간 아이템의 개수 재조정은 할 수 없습니다.<br>거래창에서 완전히 빼낸 후에 개수를 조정하십시오.<(version:7.4)>"*/, false ) );
|
|
}
|
|
return bIsFind;
|
|
}
|
|
|
|
void SUITradeWnd::RequestModifyCountItem( AR_HANDLE hItem, count_t nValue )
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( hItem );
|
|
if( pSlot == NULL || nValue <= 0 ) return;
|
|
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::MODIFY_COUNT;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.item_info.handle = hItem;
|
|
TradeMsg.item_info.uid = pSlot->GetUID();
|
|
TradeMsg.item_info.count = nValue.getAmount();
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
|
|
void SUITradeWnd::RequestRemoveItem( AR_HANDLE hItem, count_t nValue )
|
|
{
|
|
SInventorySlot* pSlot = m_InventoryMgr.GetItemInfo( hItem );
|
|
if( pSlot == NULL ) return;
|
|
if( nValue <= 0 )
|
|
nValue = pSlot->GetItemCount();
|
|
|
|
SMSG_TRADE TradeMsg;
|
|
TradeMsg.mode = TS_TRADE::REMOVE_ITEM;
|
|
TradeMsg.rq_mode = true;
|
|
TradeMsg.item_info.handle = hItem;
|
|
TradeMsg.item_info.uid = pSlot->GetUID();
|
|
TradeMsg.item_info.count = nValue.getAmount();
|
|
TradeMsg.target_player = m_PlayerInfoMgr.GetTradeTarget();
|
|
|
|
m_pGameManager->ProcMsgAtStatic( &TradeMsg );
|
|
}
|
|
|
|
/// 2011.05.13 - prodongi
|
|
int SUITradeWnd::GetCtrIndex( const char* pCtrName, bool& self )
|
|
{
|
|
std::string strCtrName( pCtrName );
|
|
|
|
/// self 체크
|
|
int nPos, nTextLen;
|
|
nPos = strCtrName.find("trade_selfitem");
|
|
if (-1 != nPos)
|
|
{
|
|
self = true;
|
|
nTextLen = strlen("trade_selfitem");
|
|
}
|
|
else
|
|
{
|
|
nPos = strCtrName.find("trade_hisitem");
|
|
if (-1 != nPos)
|
|
{
|
|
self = false;
|
|
nTextLen = strlen("trade_hisitem");
|
|
}
|
|
else
|
|
{
|
|
return -1;
|
|
}
|
|
}
|
|
|
|
strCtrName = strCtrName.substr(nTextLen, strCtrName.size()-1);
|
|
int nIndex = ::atoi( strCtrName.c_str() );
|
|
if( nIndex>=0 ) return nIndex;
|
|
|
|
return -1;
|
|
}
|
|
|
|
/// 2011.01.20 - prodongi
|
|
bool SUITradeWnd::rejectIfTaming() const
|
|
{
|
|
SGameWorld* gameWorld = dynamicCast<SGameWorld*>(m_pGameManager->GetActiveGame());
|
|
if (gameWorld)
|
|
{
|
|
if (gameWorld->getIsTaming())
|
|
{
|
|
m_pDisplayInfo->JoinTrade(false);
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/// 2011.01.20 - prodongi
|
|
bool SUITradeWnd::cancelIfTaming(AR_HANDLE targetHandle, char const* targetName) const
|
|
{
|
|
SGameWorld* gameWorld = dynamicCast<SGameWorld*>(m_pGameManager->GetActiveGame());
|
|
if (gameWorld)
|
|
{
|
|
if (gameWorld->getIsTaming())
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false) );
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
/// 2011. 9. 5 - marine
|
|
void SUITradeWnd::SetCaptionAd(const char* pADString)
|
|
{
|
|
if(NULL == pADString)
|
|
return ;
|
|
std::string strCaption = "<font:font_01><#b92c36>";
|
|
strCaption += pADString;
|
|
|
|
m_pEdit_Advertise->SetCaption(strCaption.c_str());
|
|
}
|
|
|
|
// 2011. 9. 5 - marine
|
|
const char* SUITradeWnd::GetCurAd()
|
|
{
|
|
if(m_iCurAd == 0)
|
|
{
|
|
m_iCurAd = 1;
|
|
return S(9535);
|
|
}
|
|
else
|
|
{
|
|
m_iCurAd = 0;
|
|
return S(9534);
|
|
}
|
|
} |