Untitled


SUBMITTED BY: Guest

DATE: Dec. 27, 2013, 1:01 a.m.

FORMAT: Text only

SIZE: 44.2 kB

HITS: 829

  1. #include "StdAfx.h"
  2. #include "AdminMessageDisplay.h"
  3. #include "BasicChat.h"
  4. #include "BasicInfoView.h"
  5. #include "BasicQuickSkillSlot.h"
  6. #include "BasicVarTextBox.h"
  7. #include "BlockProgramAlarm.h"
  8. #include "CommonWeb.h"
  9. #include "DxGlobalStage.h"
  10. #include "DxInputString.h"
  11. #include "GameTextControl.h"
  12. #include "GLGaeaClient.h"
  13. #include "GLPartyClient.h"
  14. #include "InnerInterface.h"
  15. #include "InventoryWindow.h"
  16. #include "ItemShopWindowWeb.h"
  17. #include "MapMoveDisplay.h"
  18. #include "ModalCallerID.h"
  19. #include "ModalWindow.h"
  20. #include "NameDisplayMan.h"
  21. #include "PrivateMarketWindow.h"
  22. #include "QuestAlarm.h"
  23. #include "QuestWindow.h"
  24. #include "RANPARAM.h"
  25. #include "RebirthDialogue.h"
  26. #include "ShopItemSearchWindow.h"
  27. #include "ItemSearchResultWindow.h"
  28. #include "MapRequireCheck.h"
  29. #include "SkillTrayTab.h"
  30. #include "SystemMessageWindow.h"
  31. #include "UILeftTopGroup.h"
  32. #include "UITextControl.h"
  33. #include "s_CHttpPatch.h"
  34. #include "ItemMixWindow.h"
  35. #include "GatherGauge.h"
  36. #include "CdmRankingDisplay.h"
  37. #include "BasicQuickSkillWindow.h"
  38. #include "BasicQuickSkillWindowNew.h"
  39. #include "SkillTrayTabNew.h"
  40. #include "CharacterWindow.h"
  41. #include "../EngineUILib/GUInterface/UIKeyCheck.h"
  42. #ifdef _DEBUG
  43. #define new DEBUG_NEW
  44. #endif
  45. #define CHAT_MACRO_SIZE 10
  46. CInnerInterface& CInnerInterface::GetInstance()
  47. {
  48. static CInnerInterface Instance;
  49. return Instance;
  50. }
  51. const float CInnerInterface::fMENU_LIFTUP = 90.0f;
  52. const int CInnerInterface::nOUTOFRANGE = -1;
  53. CInnerInterface::CInnerInterface () :
  54. m_emConflictReqType ( EMCONFT_ONE ),
  55. m_ConflictReqID ( GAEAID_NULL ),
  56. m_bPartyStateBack ( FALSE ),
  57. m_bBlockProgramFound ( false ),
  58. m_dwEventQuestID ( NATIVEID_NULL().dwID ),
  59. m_dwEventQuestStep ( UINT_MAX ),
  60. m_bBlockProgramAlarm ( false ),
  61. m_bITEM_INFO_EX_DISPLAY_MODE ( false ),
  62. m_bCHANNEL ( false ),
  63. m_bFirstVNGainSysCall ( true ),
  64. m_bTabReserve ( false ),
  65. state ( -1 ),
  66. m_bItemShopLoad ( false ),
  67. SkillTabClose ( FALSE ),
  68. SkillTabOpen ( FALSE )
  69. {
  70. ResetControl();
  71. }
  72. CInnerInterface::~CInnerInterface ()
  73. {
  74. }
  75. void CInnerInterface::ResetControl()
  76. {
  77. m_pSimpleHP = NULL;
  78. m_pBusWindow = NULL;
  79. m_pMiniMap = NULL;
  80. m_pChat = NULL;
  81. m_pQuestWindow = NULL;
  82. m_pQuestAlarm = NULL;
  83. m_pFriendWindow = NULL;
  84. m_pSkillWindowToTray = NULL;
  85. m_pInventoryWindow = NULL;
  86. m_pPartyWindow = NULL;
  87. m_pTradeWindow = NULL;
  88. m_pPtoPWindow = NULL;
  89. m_pDamageDisplayMan = NULL;
  90. m_pTargetInfoDisplay = NULL;
  91. m_pNameDisplayMan = NULL;
  92. m_pDialogueWindow = NULL;
  93. m_pMarketWindow = NULL;
  94. m_pStorageWindow = NULL;
  95. m_pItemMove = NULL;
  96. m_pBlockProgramAlarm = NULL;
  97. //m_pItemBankWindow = NULL;
  98. m_pVNGainSysInventory = NULL;
  99. m_pTradeInventoryWindow = NULL;
  100. m_pHeadChatDisplayMan = NULL;
  101. m_pAdminMessageDisplay = NULL;
  102. m_pConftModalWindow = NULL;
  103. m_pPartyModalWindow = NULL;
  104. m_pConftDisplayMan = NULL;
  105. m_pInfoDisplay = NULL;
  106. m_pMapMoveDisplay = NULL;
  107. m_pWaitServerDisplay = NULL;
  108. m_pAcademyConftDisplay = NULL;
  109. m_pLargeMapWindow = NULL;
  110. m_pStorageChargeCard = NULL;
  111. m_pRebirthDialogue = NULL;
  112. m_pPrivateMarketWindow = NULL;
  113. m_pPrivateMarketMake = NULL;
  114. m_pPrivateMarketSellWindow = NULL;
  115. m_pPrivateMarketShowMan = NULL;
  116. m_pClubWindow = NULL;
  117. m_pSubMasterSet = NULL;
  118. m_pClubMake = NULL;
  119. m_pSystemMessageWindow = NULL;
  120. m_pQuestionItemDisplay = NULL;
  121. m_pInfoDisplayEx = NULL;
  122. m_pClubStorageWindow = NULL;
  123. m_pConftConfirm = NULL;
  124. m_pBasicInfoView = NULL;
  125. m_pUILeftTopGroup = NULL;
  126. m_pSkillTrayTab = NULL;
  127. m_pSkillTrayTabNew = NULL;
  128. m_pBasicQuickSkillSlot = NULL;
  129. m_pCountMsgWindow = NULL;
  130. m_pGameMenu = NULL;
  131. m_pQBoxButton = NULL;
  132. m_pItemRebuildWindow = NULL; // ITEMREBUILD_MARK
  133. //m_pRebuildInventoryWindow = NULL;
  134. m_pPetRebirthDialogue = NULL; // monster7j
  135. m_pGambleBox = NULL;
  136. m_pGambleSelectBox = NULL;
  137. m_pGambleAgainBox = NULL;
  138. m_pGambleResultOddBox = NULL;
  139. m_pGambleResultEvenBox = NULL;
  140. m_pPetWindow = NULL;
  141. m_pCharacterWindow = NULL;
  142. m_pModalWindow = NULL;
  143. m_pSystemMessageWindowDummy = NULL;
  144. m_pMapMoveDisplayDummy = NULL;
  145. m_pBlockProgramAlarmDummy = NULL;
  146. m_pLeftTopGroupDummy = NULL;
  147. m_pBasicInfoViewDummy = NULL;
  148. m_pBasicPotionTrayDummy = NULL;
  149. m_pQuestAlarmDummy = NULL;
  150. m_pKeySettingWindow = NULL;
  151. m_pChatMacroWindow = NULL;
  152. m_pBonusTimeGauge = NULL;
  153. m_pBonusTimeDisplay = NULL;
  154. m_pQuestHelper = NULL;
  155. m_pVehicleWindow = NULL;
  156. m_pThaiCCafeMark = NULL;
  157. m_pItemGarbageWindow = NULL;
  158. m_pGarbageInventoryWindow = NULL;
  159. m_pItemShopIconMan = NULL;
  160. m_pNameDisplayMan = NULL;
  161. m_pShopItemSearchWindow = NULL;
  162. m_pItemSearchResultWindow = NULL;
  163. m_pAttendanceBookWindow = NULL;
  164. m_pClubBattleModalWindow = NULL;
  165. m_pMapRequireCheckWindow = NULL;
  166. m_pTaxiWindow = NULL;
  167. m_bFirstVNGainSysCall = true;
  168. m_fItemBankDelay = 5.0f;
  169. m_pItemMixWindow = NULL;
  170. m_pItemMixInvenWindow = NULL;
  171. m_pGatherGauge = NULL;
  172. m_pCdmRankingDisplay = NULL;
  173. pButton = NULL;
  174. }
  175. HRESULT CInnerInterface::OneTimeSceneInit ()
  176. {
  177. switch ( RANPARAM::emSERVICE_TYPE )
  178. {
  179. case EMSERVICE_DEFAULT:
  180. case EMSERVICE_KOREA:
  181. case EMSERVICE_FEYA:
  182. case EMSERVICE_MALAYSIA_CN:
  183. case EMSERVICE_MALAYSIA_EN:
  184. case EMSERVICE_JAPAN:
  185. case EMSERVICE_THAILAND:
  186. case EMSERVICE_CHINA:
  187. case EMSERVICE_INDONESIA:
  188. case EMSERVICE_PHILIPPINES:
  189. case EMSERVICE_VIETNAM:
  190. case EMSERVICE_GLOBAL:
  191. m_bCHANNEL = true;
  192. break;
  193. default:
  194. m_bCHANNEL = false;
  195. break;
  196. };
  197. return S_OK;
  198. }
  199. HRESULT CInnerInterface::FrameMove ( LPDIRECT3DDEVICEQ pd3dDevice, float fElapsedTime )
  200. {
  201. GASSERT( pd3dDevice );
  202. // Å»°Í µô·¹ÀÌ ÃøÁ¤
  203. m_fVehicleDelay += fElapsedTime;
  204. // ¹«Á¶°Ç ¾È º¸ÀÌ°Ô ¸¸µê.
  205. // »ç¿ë½Ã¿¡ Update()¿¡¼­ ÄÑ°í µ¿ÀÛ.
  206. HideGroup ( INFO_DISPLAY );
  207. HideGroup ( INFO_DISPLAY_EX );
  208. ResetTargetInfo (); // Ÿ°Ù Á¤º¸Ã¢ ¸®¼Â
  209. ResetCharMoveBlock (); // ij¸¯ÅÍ ¿òÁ÷ÀÓ Àá±Ý Ç®±â
  210. ResetSnapItem (); // ¾ÆÀÌÅÛ ½º³À ¸®¼Â
  211. ResetFirstItemSlot (); // ¾ÆÀÌÅÛ½½·Ô ºÙ±â ¸®¼Â
  212. m_bUSING_INFO_DISPLAY = false;
  213. // ¾ÆÀÌÅÛ ¹ðũâ µô·¹ÀÌ ÃøÁ¤
  214. if( !IsVisibleGroup( INVENTORY_WINDOW ) && m_fItemBankDelay < 5.0f )
  215. {
  216. m_fItemBankDelay += fElapsedTime;
  217. }
  218. bool bKEYBOARD_BLOCK = false;
  219. if( IsVisibleGroup ( MODAL_WINDOW ) ||
  220. IsVisibleGroup ( REBIRTH_DIALOGUE ) ||
  221. //IsVisibleGroup ( HELP_WINDOW ) || // À¥ ºê¶ó¿ìÀú¿ë, ¾ÆÁ÷ »ç¿ë ¾ÈÇÔ ( ÁØÇõ )
  222. IsVisibleGroup ( ITEMSHOP_WINDOW ) ||
  223. DXInputString::GetInstance().IsOn () )
  224. {
  225. bKEYBOARD_BLOCK = true;
  226. }
  227. // WebBrowser°¡ ¹ÝÅõ¸íÀÌ Áö¿øµÇÁö ¾ÊÀ¸¹Ç·Î
  228. // ÇÊ¿äÇÑ »óȲ¿¡¼­´Â HELP_WINDOW¸¦ ´Ý´Â´Ù ( ÁØÇõ )
  229. if( CCommonWeb::Get()->GetCreate() )
  230. {
  231. if( IsVisibleGroup ( MODAL_WINDOW ) ||
  232. IsVisibleGroup ( REBIRTH_DIALOGUE ) ||
  233. IsVisibleGroup( ESC_MENU ) )
  234. {
  235. HideGroup( HELP_WINDOW );
  236. HideGroup( ITEMSHOP_WINDOW );
  237. }
  238. }
  239. if ( !bKEYBOARD_BLOCK ) UpdateShortcutBefore ();
  240. HRESULT hr = S_OK;
  241. hr = CUIMan::FrameMove ( pd3dDevice, fElapsedTime );
  242. if ( FAILED ( hr ) ) return hr;
  243. if( IsOpenWindowToMoveBlock() )
  244. {
  245. SetCharMoveBlock ();
  246. }
  247. UpdateStatus ();
  248. if ( !m_bUSING_INFO_DISPLAY ) RESET_INFO ();
  249. if ( !bKEYBOARD_BLOCK ) UpdateShortcutAfter ();
  250. if ( IsExclusiveControl() ) SetCharMoveBlock ();
  251. int LB = (int)DxInputDevice::GetInstance().GetMouseState(DXMOUSE_LEFT);
  252. if ( (LB & DXKEY_UP) || (LB & DXKEY_DUP) )
  253. {
  254. ResetExclusiveControl();
  255. }
  256. MoveBasicInfoWindow ();
  257. if ( SkillTabClose )
  258. {
  259. UIRECT rcGlobalPos = m_pSkillTrayTab->GetGlobalPos();
  260. m_pBasicQuickSkillWindow->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  261. }
  262. if ( SkillTabOpen )
  263. {
  264. UIRECT rcGlobalPos = m_pBasicQuickSkillWindow->GetGlobalPos();
  265. m_pSkillTrayTab->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  266. }
  267. if ( SkillTabCloseNew )
  268. {
  269. UIRECT rcGlobalPos = m_pSkillTrayTabNew->GetGlobalPos();
  270. m_pBasicQuickSkillWindowNew->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  271. }
  272. if ( SkillTabOpenNew )
  273. {
  274. UIRECT rcGlobalPos = m_pBasicQuickSkillWindowNew->GetGlobalPos();
  275. m_pSkillTrayTabNew->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  276. }
  277. if ( RotateSkillTab )
  278. {
  279. UIRECT rcGlobalPos = m_pSkillTrayTab->GetGlobalPos();
  280. m_pSkillTrayTabNew->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  281. }
  282. if ( RotateSkillTabNew )
  283. {
  284. UIRECT rcGlobalPos = m_pSkillTrayTabNew->GetGlobalPos();
  285. m_pSkillTrayTab->SetGlobalPos( D3DXVECTOR2( rcGlobalPos.left , rcGlobalPos.top ) );
  286. }
  287. CUIFocusContainer::UICONTROL_FOCUSLIST focus_list = GetFocusList()->GetFocusList();
  288. CUIFocusContainer::UICONTROL_FOCUSLIST_RITER riter = focus_list.rbegin ();
  289. CUIFocusContainer::UICONTROL_FOCUSLIST_RITER riter_end = focus_list.rend ();
  290. bool bBasicChatBoxShow = false;
  291. for ( ; riter != riter_end; ++riter )
  292. {
  293. UIGUID cID = riter->cID;
  294. if ( BASIC_INFO_VIEW == cID )
  295. {
  296. if ( bBasicChatBoxShow )
  297. {
  298. if ( !GetChat()->IsCHAT_BEGIN() )
  299. {
  300. GetFocusList()->InsertAfter ( BASIC_CHAT_BOX, BASIC_INFO_VIEW, riter->pUIControl );
  301. }
  302. }
  303. break;
  304. }
  305. else if ( BASIC_CHAT_BOX == cID )
  306. {
  307. bBasicChatBoxShow = true;
  308. }
  309. }
  310. {
  311. GLCharacter* pCharacter = GLGaeaClient::GetInstance().GetCharacter ();
  312. Actor& actor = pCharacter->GetActorMove ();
  313. if ( actor.PathIsActive () ) m_vCharDir = actor.Movement ();
  314. }
  315. {
  316. if ( IsVisibleGroup ( INFO_DISPLAY_EX ) )
  317. {
  318. UIRECT rcGlobalPos = m_pInfoDisplay->GetGlobalPos();
  319. UIRECT rcGlobalPosEx = m_pInfoDisplayEx->GetGlobalPos();
  320. float x = rcGlobalPos.right + 2.0f;
  321. float y = min(rcGlobalPos.top,rcGlobalPosEx.top);
  322. const long lResolution = GetResolution ();
  323. WORD X_RES = HIWORD ( lResolution );
  324. WORD Y_RES = LOWORD ( lResolution );
  325. if ( X_RES < x + rcGlobalPosEx.sizeX )
  326. {
  327. x = X_RES - rcGlobalPosEx.sizeX;
  328. m_pInfoDisplay->SetGlobalPos(D3DXVECTOR2(x-2.0f-rcGlobalPos.sizeX,y));
  329. m_pInfoDisplayEx->SetGlobalPos(D3DXVECTOR2(x,y));
  330. }
  331. else
  332. {
  333. m_pInfoDisplay->SetGlobalPos(D3DXVECTOR2(rcGlobalPos.left,y));
  334. m_pInfoDisplayEx->SetGlobalPos(D3DXVECTOR2(x,y));
  335. }
  336. }
  337. }
  338. if( IsVisibleGroup ( SUMMON_POSION_DISPLAY ) )
  339. {
  340. GLSummonClient *pMySummon = GLGaeaClient::GetInstance().GetSummonClient();
  341. if( !pMySummon || !pMySummon->IsVALID() )
  342. {
  343. HideGroup ( SUMMON_POSION_DISPLAY );
  344. }
  345. }
  346. return hr;
  347. }
  348. void CInnerInterface::UpdateShortcutBefore ()
  349. {
  350. {
  351. if ( !m_pNameDisplayMan ) return ;
  352. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_LMENU, DXKEY_PRESSED ) )
  353. {
  354. for (int i= 0; i < CHAT_MACRO_SIZE; ++i){
  355. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_1+i, DXKEY_DOWN ) )
  356. {
  357. AddChatMacro(i);
  358. break;
  359. }
  360. }
  361. }
  362. if( RANPARAM::bNAME_DISPLAY )
  363. {
  364. if( IsVisibleGroup( NAME_DISPLAY_MAN ) )
  365. {
  366. if( m_pNameDisplayMan->GetNameType() != NAME_DISPLAY_MOBCHAR )
  367. {
  368. HideGroup( NAME_DISPLAY_MAN );
  369. m_pNameDisplayMan->SetNameType( NAME_DISPLAY_MOBCHAR );
  370. ShowGroupBottom( NAME_DISPLAY_MAN );
  371. }
  372. }
  373. else
  374. {
  375. m_pNameDisplayMan->SetNameType( NAME_DISPLAY_MOBCHAR );
  376. ShowGroupBottom( NAME_DISPLAY_MAN );
  377. }
  378. return ;
  379. }
  380. HideGroup ( NAME_DISPLAY_MAN );
  381. if ( UIKeyCheck::GetInstance()->Check ( DIK_LMENU, DXKEY_PRESSED ) )
  382. {
  383. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_ITEMMONEY );
  384. ShowGroupBottom ( NAME_DISPLAY_MAN );
  385. }
  386. else if ( UIKeyCheck::GetInstance()->Check ( DIK_LCONTROL, DXKEY_PRESSED ) )
  387. {
  388. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_MOBCHAR );
  389. ShowGroupBottom ( NAME_DISPLAY_MAN );
  390. }
  391. else if ( UIKeyCheck::GetInstance()->Check ( DIK_LSHIFT, DXKEY_PRESSED ) )
  392. {
  393. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_ALL );
  394. ShowGroupBottom ( NAME_DISPLAY_MAN );
  395. }
  396. else
  397. {
  398. // BEGIN : CLUB CONFT SETTING
  399. const EMCONFT_TYPE emTYPE = GLGaeaClient::GetInstance().GetCharacter()->GetConfting().emTYPE;
  400. if ( emTYPE == EMCONFT_GUILD )
  401. {
  402. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_CLUB_CONFT );
  403. ShowGroupBottom ( NAME_DISPLAY_MAN );
  404. return ;
  405. }
  406. // ÆÄƼ
  407. GLPARTY_CLIENT *pMaster = GLPartyClient::GetInstance().GetMaster(); // ¸¶½ºÅÍ
  408. if ( pMaster )
  409. {
  410. GLCharacter *pMyCharacter = GLGaeaClient::GetInstance().GetCharacter();
  411. if ( pMyCharacter->GetConfting().IsCONFRONTING() ) // ÆÄƼ ´ë·Ã ÁßÀΰ¡?
  412. {
  413. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_PARTY_CONFT );
  414. }
  415. else // ÆÄƼ ±¸¼º µÈ °æ¿ì
  416. {
  417. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_PARTY );
  418. }
  419. ShowGroupBottom ( NAME_DISPLAY_MAN );
  420. }
  421. else
  422. {
  423. // ¹«Á¶°Ç »Ñ¸²
  424. m_pNameDisplayMan->SetNameType ( NAME_DISPLAY_DEFAULT );
  425. ShowGroupBottom ( NAME_DISPLAY_MAN );
  426. }
  427. }
  428. }
  429. }
  430. void CInnerInterface::UpdateShortcutAfter ()
  431. {
  432. if ( UIKeyCheck::GetInstance()->Check ( DIK_ESCAPE, DXKEY_DOWN ) )
  433. {
  434. bool bALLHIDE = true;
  435. // NOTE
  436. // µ¿½Ã¿¡ µÎ °÷¿¡¼­ FocusList¿¡
  437. // Á¢±ÙÇÒ °¡´É¼ºÀÌ ¾ø´Ù´Â °¡Á¤ÀÌ ÀÖ¾î¾ß ÇÑ´Ù.
  438. // À§ÇèÇϱº ¤Ñ.¤Ñ
  439. CUIFocusContainer::UICONTROL_FOCUSLIST list = GetFocusList()->GetFocusList ();
  440. CUIFocusContainer::UICONTROL_FOCUSLIST_RITER riter = list.rbegin ();
  441. CUIFocusContainer::UICONTROL_FOCUSLIST_RITER riter_end = list.rend ();
  442. for ( ; riter != riter_end; ++riter )
  443. {
  444. bool bAnotherProcess = false;
  445. UIGUID cID = riter->cID;
  446. if ( IsVisibleGroup ( cID ) &&
  447. cID != BASIC_CHAT_BOX &&
  448. cID != BASIC_INFO_VIEW &&
  449. cID != QUICK_SKILL_TRAY_TAB_WINDOW &&
  450. cID != QUICK_SKILL_TRAY_TAB_NEW_WINDOW &&
  451. cID != BASIC_QUICK_SKILL_WINDOW &&
  452. cID != BASIC_QUICK_SKILL_NEW_WINDOW &&
  453. cID != PRIVATE_MARKET_SHOW_MAN &&
  454. cID != MINIMAP)
  455. {
  456. if ( cID == INVENTORY_WINDOW || cID == MARKET_WINDOW ||
  457. cID == STORAGE_WINDOW || cID == CLUB_STORAGE_WINDOW )
  458. {
  459. SetMarketWindowClose ();
  460. SetStorageWindowClose ();
  461. SetClubStorageWindowClose ();
  462. }
  463. else if ( cID == TRADEINVENTORY_WINDOW )
  464. {
  465. if ( IsVisibleGroup ( TRADE_WINDOW ) )
  466. {
  467. SetTradeWindowCloseReq ();
  468. }
  469. else if ( IsVisibleGroup ( PRIVATE_MARKET_WINDOW ) )
  470. {
  471. if ( m_pPrivateMarketWindow->IsOPENER () )
  472. {
  473. DoModal ( ID2GAMEINTEXT("PRIVATE_MARKET_QUIT"), MODAL_QUESTION, YESNO, MODAL_PRIVATE_MARKET_QUIT );
  474. }
  475. else
  476. {
  477. SetPrivateMarketClose ();
  478. }
  479. bAnotherProcess = true;
  480. }
  481. }
  482. else if ( cID == TRADE_WINDOW )
  483. {
  484. SetTradeWindowCloseReq ();
  485. }
  486. else if ( cID == MINIPARTY_WINDOW )
  487. {
  488. ShowGroupBottom ( MINIPARTY_OPEN );
  489. // #ifdef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  490. // UpdatePotionTrayPosition();
  491. // #endif
  492. }
  493. else if ( cID == PRIVATE_MARKET_WINDOW )
  494. {
  495. if ( m_pPrivateMarketWindow->IsOPENER () )
  496. {
  497. DoModal ( ID2GAMEINTEXT("PRIVATE_MARKET_QUIT"), MODAL_QUESTION, YESNO, MODAL_PRIVATE_MARKET_QUIT );
  498. }
  499. else
  500. {
  501. SetPrivateMarketClose ();
  502. }
  503. bAnotherProcess = true;
  504. }
  505. else if( cID == ITEM_REBUILD_WINDOW || cID == REBUILDINVENTORY_WINDOW ) // ITEMREBUILD_MARK
  506. {
  507. CloseItemRebuildWindow();
  508. }
  509. else if( cID == ITEM_GARBAGE_WINDOW || cID == GARBAGEINVENTORY_WINDOW ) // ÈÞÁöÅë
  510. {
  511. CloseItemGarbageWindow();
  512. }
  513. else if( cID == ITEM_MIX_WINDOW || cID == ITEM_MIX_INVEN_WINDOW ) // ¾ÆÀÌÅÛ Á¶ÇÕ
  514. {
  515. CloseItemMixWindow();
  516. }
  517. else if( cID == GAMBLE_DIALOGUE || cID == GAMBLE_SELECT_DIALOGUE ||
  518. cID == GAMBLE_AGAIN_DIALOGUE || cID == GAMBLE_ANIMATION_DIALOGUE ||
  519. cID == GAMBLE_RESULT_EVEN_DIALOGUE || cID == GAMBLE_RESULT_ODD_DIALOGUE )
  520. {
  521. HideGroup( INVENTORY_WINDOW );
  522. GLCharacter* pCharacter = GLGaeaClient::GetInstance().GetCharacter();
  523. if( pCharacter )
  524. {
  525. pCharacter->ReqMGameOddEvenCancel();
  526. }
  527. }
  528. else if ( cID == QUEST_WINDOW )
  529. {
  530. m_pQuestWindow->SET_SHOW_PAGE ( CQuestWindow::QUEST_LIST );
  531. bAnotherProcess = true;
  532. /*int nPage = m_pQuestWindow->GET_SHOW_PAGE ();
  533. switch ( nPage )
  534. {
  535. case CQuestWindow::QUEST_STEP:
  536. {
  537. m_pQuestWindow->SET_SHOW_PAGE ( CQuestWindow::QUEST_MAIN );
  538. bAnotherProcess = true;
  539. }
  540. break;
  541. case CQuestWindow::QUEST_MAIN:
  542. {
  543. m_pQuestWindow->SET_SHOW_PAGE ( CQuestWindow::QUEST_LIST );
  544. bAnotherProcess = true;
  545. }
  546. break;
  547. } */
  548. }
  549. else if ( cID == WAITSERVER_DISPLAY || cID == REBIRTH_DIALOGUE || cID == MAP_REQUIRE_CHECK )
  550. {
  551. bAnotherProcess = true;
  552. }
  553. else if ( (MODAL_WINDOW + 1) <= cID )
  554. {
  555. // CLOSE_MODAL ( cID, false );
  556. bAnotherProcess = true;
  557. }
  558. if ( !bAnotherProcess )
  559. {
  560. HideGroup ( cID );
  561. }
  562. bALLHIDE = false;
  563. break;
  564. }
  565. }
  566. if ( bALLHIDE )
  567. {
  568. if ( !IsVisibleGroup ( ESC_MENU ) )
  569. ShowGroupFocus ( ESC_MENU );
  570. }
  571. }
  572. // Tab Key ¿¹¾àÁßÀ̶ó¸é
  573. if ( m_bTabReserve )
  574. {
  575. if ( !GLGaeaClient::GetInstance().GetCharacter()->IsACTION(GLAT_SKILL) )
  576. {
  577. GLGaeaClient::GetInstance().GetCharacter()->ReqSlotChange();
  578. m_bTabReserve = false;
  579. }
  580. }
  581. else
  582. {
  583. if ( UIKeyCheck::GetInstance()->Check( DIK_TAB, DXKEY_DOWN ) )
  584. {
  585. EMCHARCLASS emClass = GLGaeaClient::GetInstance().GetCharacter()->m_emClass;
  586. if( emClass&GLCC_EXTREME_M || emClass&GLCC_EXTREME_W )
  587. {
  588. // // ½ºÅ³ »ç¿ëÁßÀ¸·Î ½ÇÆÐÇϸé Tab Key ¿¹¾à
  589. if ( E_FAIL == GLGaeaClient::GetInstance().GetCharacter()->ReqSlotChange() )
  590. m_bTabReserve = true;
  591. }
  592. }
  593. }
  594. if ( IsVisibleGroup ( ESC_MENU ) ) return ;
  595. if ( IsVisibleGroup ( HELP_WINDOW ) ) return ;
  596. if ( IsVisibleGroup ( ITEMSHOP_WINDOW ) ) return ;
  597. if ( IsVisibleGroup ( KEY_SETTING_WINDOW ) ) return ;
  598. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_V, DXKEY_DOWN ) )
  599. {
  600. if ( GLTradeClient::GetInstance().Valid() ) return;
  601. GLCharacter* const pCharacter = GLGaeaClient::GetInstance().GetCharacter ();
  602. if ( pCharacter->m_sVehicle.IsActiveValue() && m_fVehicleDelay < 1.0f )
  603. {
  604. PrintMsgText ( NS_UITEXTCOLOR::NEGATIVE, ID2GAMEINTEXT("VEHICLE_SET_FB_DELAY") );
  605. return;
  606. }
  607. pCharacter->ReqSetVehicle( !pCharacter->m_bVehicle ); // È°¼º ºñÈ°¼º
  608. m_fVehicleDelay = 0.0f;
  609. }
  610. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_LMENU, DXKEY_PRESSED ) )
  611. {
  612. for (int i= 0; i < CHAT_MACRO_SIZE; ++i){
  613. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_1+i, DXKEY_DOWN ) )
  614. {
  615. return ;
  616. }
  617. }
  618. }
  619. GLCharacter* const pCharacter = GLGaeaClient::GetInstance().GetCharacter ();
  620. if ( pCharacter )
  621. {
  622. // Äü ½ºÅ³
  623. for( int i = 0; i < QUICK_SKILL_SLOT_MAX; ++i)
  624. {
  625. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::SkillSlot[i], DXKEY_DOWN ) )
  626. {
  627. INT nIndex = m_pSkillTrayTab->GetTabIndex() * QUICK_SKILL_SLOT_MAX + i;
  628. pCharacter->ReqSkillRunSet( nIndex );
  629. }
  630. }
  631. }
  632. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_INVEN], DXKEY_DOWN ) )
  633. {
  634. if ( !IsVisibleGroup ( INVENTORY_WINDOW ) && !IsVisibleGroup ( TRADEINVENTORY_WINDOW ))
  635. {
  636. ShowGroupFocus( INVENTORY_WINDOW );
  637. m_pInventoryWindow->INVENTORY();
  638. state = 0;
  639. }
  640. else
  641. {
  642. if ( state == 0) // Current inventory
  643. {
  644. HideGroup ( INVENTORY_WINDOW );
  645. state = -1;
  646. }
  647. else if ( state == 1) // Current itembank
  648. {
  649. m_pInventoryWindow->INVENTORY();
  650. state = 0;
  651. }
  652. }
  653. }
  654. ////#ifdef _RELEASED // ¼Òȯ¼ö ³»ºÎ¿¡¼­¸¸ µÇ°Ô ¸·À½
  655. // if ( GLCONST_CHAR::wENABLE_SUMMON > 0 )
  656. // {
  657. // if ( UIKeyCheck::GetInstance()->CheckSimple( DIK_SLASH, DXKEY_DOWN ) )
  658. // {
  659. // //GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(2,2));
  660. // EMCHARCLASS emClass = GLGaeaClient::GetInstance().GetCharacter()->m_emClass;
  661. // if( emClass&GLCC_EXTREME_M || emClass&GLCC_EXTREME_W )
  662. // {
  663. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_EXTREME_MID,GLCONST_CHAR::wSUMMON_EXTREME_SID));
  664. // }
  665. // else if( emClass&GLCC_FIGHTER_M || emClass&GLCC_FIGHTER_W )
  666. // {
  667. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_BRAWLER_MID,GLCONST_CHAR::wSUMMON_BRAWLER_SID));
  668. // }
  669. // else if( emClass&GLCC_ARMS_M || emClass&GLCC_ARMS_W )
  670. // {
  671. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_SWORDSMAN_MID,GLCONST_CHAR::wSUMMON_SWORDSMAN_SID));
  672. // }
  673. // else if( emClass&GLCC_ARCHER_W || emClass&GLCC_ARCHER_M )
  674. // {
  675. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_ARCHER_MID,GLCONST_CHAR::wSUMMON_ARCHER_SID));
  676. // }
  677. // else if( emClass&GLCC_SPIRIT_W || emClass&GLCC_SPIRIT_M )
  678. // {
  679. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_SHAMMAN_MID,GLCONST_CHAR::wSUMMON_SHAMMAN_SID));
  680. // }
  681. // //add class
  682. // else if( emClass&GLCC_SCIENCE_W || emClass&GLCC_SCIENCE_M )
  683. // {
  684. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_SCIENCE_MID,GLCONST_CHAR::wSUMMON_SCIENCE_SID));
  685. // }
  686. // else if( emClass&GLCC_ASSASIN_W || emClass&GLCC_ASSASIN_M )
  687. // {
  688. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_ASSASIN_MID,GLCONST_CHAR::wSUMMON_ASSASIN_SID));
  689. // }
  690. // else if( emClass&GLCC_TESTING_W || emClass&GLCC_TESTING_M )
  691. // {
  692. // GLGaeaClient::GetInstance().ReqUseSummon(SNATIVEID(GLCONST_CHAR::wSUMMON_TESTING_MID,GLCONST_CHAR::wSUMMON_TESTING_SID));
  693. // }
  694. // }
  695. // }
  696. ////#endif
  697. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_SKILL], DXKEY_DOWN ) )
  698. {
  699. if ( !IsVisibleGroup ( SKILL_WINDOW ) )
  700. ShowGroupFocus ( SKILL_WINDOW );
  701. else
  702. HideGroup ( SKILL_WINDOW );
  703. }
  704. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_PARTY], DXKEY_DOWN ) )
  705. {
  706. if ( !IsVisibleGroup ( PARTY_WINDOW ) )
  707. ShowGroupFocus ( PARTY_WINDOW );
  708. else
  709. HideGroup ( PARTY_WINDOW );
  710. }
  711. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_CHAR], DXKEY_DOWN ) )
  712. {
  713. if ( !IsVisibleGroup ( CHARACTER_WINDOW ) )
  714. ShowGroupFocus ( CHARACTER_WINDOW );
  715. else
  716. HideGroup ( CHARACTER_WINDOW );
  717. }
  718. if ( UIKeyCheck::GetInstance()->CheckSimple ( RANPARAM::MenuShotcut[SHOTCUT_MAP], DXKEY_DOWN ) )
  719. {
  720. if ( !IsVisibleGroup ( LARGEMAP_WINDOW ) )
  721. ShowGroupFocus ( LARGEMAP_WINDOW );
  722. else
  723. HideGroup ( LARGEMAP_WINDOW );
  724. }
  725. if ( UIKeyCheck::GetInstance()->CheckSimple ( RANPARAM::MenuShotcut[SHOTCUT_CLUB], DXKEY_DOWN ) )
  726. {
  727. if ( !IsVisibleGroup ( CLUB_WINDOW ) )
  728. ShowGroupFocus ( CLUB_WINDOW );
  729. else
  730. HideGroup ( CLUB_WINDOW );
  731. }
  732. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_QUEST], DXKEY_DOWN ) )
  733. {
  734. if ( !IsVisibleGroup ( QUEST_WINDOW ) )
  735. {
  736. if ( NATIVEID_NULL().dwID == m_dwEventQuestID )
  737. {
  738. ShowGroupFocus ( QUEST_WINDOW );
  739. REFRESH_QUEST_WINDOW ();
  740. }
  741. else
  742. {
  743. SetQuestWindowOpen ( m_dwEventQuestID );
  744. }
  745. }
  746. else
  747. {
  748. HideGroup ( QUEST_WINDOW );
  749. }
  750. }
  751. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_HELP], DXKEY_DOWN) )
  752. {
  753. if ( !IsVisibleGroup ( HELP_WINDOW ) )
  754. {
  755. HideGroup ( ITEMSHOP_WINDOW );
  756. ShowGroupFocus ( HELP_WINDOW );
  757. }
  758. else
  759. {
  760. HideGroup ( HELP_WINDOW );
  761. }
  762. }
  763. //#if defined ( CH_PARAM ) || defined ( TH_PARAM ) || defined( PH_PARAM ) || defined ( JP_PARAM ) || defined( _RELEASED ) // Çʸ®ÇÉ ¾ÆÀÌÅÛ¼¥
  764. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_ITEMSHOP], DXKEY_DOWN) )
  765. {
  766. if ( !IsVisibleGroup ( ITEMSHOP_WINDOW ) )
  767. {
  768. // ItemShopAuth
  769. if ( ItemShopAuth() )
  770. {
  771. ShowGroupFocus ( ITEMSHOP_WINDOW );
  772. }
  773. HideGroup ( HELP_WINDOW );
  774. }
  775. else
  776. {
  777. HideGroup ( ITEMSHOP_WINDOW );
  778. }
  779. }
  780. // ItemShopAuth
  781. ItemShopVisible();
  782. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_FRIEND], DXKEY_DOWN ) )
  783. {
  784. if ( IsVisibleGroup ( FRIEND_WINDOW ) ) HideGroup ( FRIEND_WINDOW );
  785. else ShowGroupFocus ( FRIEND_WINDOW );
  786. }
  787. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_ITEMBANK], DXKEY_DOWN ) )
  788. {
  789. if ( !IsVisibleGroup ( INVENTORY_WINDOW ))
  790. {
  791. SetItemBankWindowOpen ();
  792. }
  793. else
  794. {
  795. if (state == 0) // Current inventory
  796. {
  797. m_pInventoryWindow->INVENTORY_BANK();
  798. m_pInventoryWindow->InitItemBank();
  799. state = 1;
  800. }
  801. else if (state == 1) //Current itembank
  802. {
  803. HideGroup ( INVENTORY_WINDOW );
  804. state = -1;
  805. }
  806. }
  807. }
  808. /*if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_VIETNAMGAINSYS], DXKEY_DOWN ) )
  809. {
  810. if ( IsVisibleGroup ( VNGAINSYS_WINDOW ) ) HideGroup ( VNGAINSYS_WINDOW );
  811. else SetVNGainSysWindowOpen();
  812. }*/
  813. if ( UIKeyCheck::GetInstance()->Check ( RANPARAM::MenuShotcut[SHOTCUT_CHATMACRO], DXKEY_DOWN ) )
  814. {
  815. if ( IsVisibleGroup ( CHATMACRO_WINDOW ) )
  816. {
  817. HideGroup ( CHATMACRO_WINDOW );
  818. }
  819. else
  820. {
  821. GetChatMacro();
  822. ShowGroupFocus ( CHATMACRO_WINDOW );
  823. }
  824. }
  825. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_LMENU, DXKEY_PRESSED ) )
  826. {
  827. if ( UIKeyCheck::GetInstance()->CheckSimple ( DIK_F4, DXKEY_DOWN ) )
  828. {
  829. DoModal ( ID2GAMEINTEXT("CLOSE_GAME"), MODAL_QUESTION, OKCANCEL, MODAL_CLOSEGAME );
  830. }
  831. }
  832. //#ifndef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  833. /* if( UIKeyCheck::GetInstance()->Check ( DIK_GRAVE, DXKEY_DOWN ) ||
  834. UIKeyCheck::GetInstance()->Check ( DIK_Y, DXKEY_DOWN ) )
  835. {
  836. if ( IsVisibleGroup ( QUICK_SKILL_TRAY_OPEN_BUTTON ) )
  837. {
  838. HideGroup ( QUICK_SKILL_TRAY_OPEN_BUTTON );
  839. ShowGroupBottom ( QUICK_SKILL_TRAY_TAB_WINDOW );
  840. }
  841. else
  842. {
  843. HideGroup ( QUICK_SKILL_TRAY_TAB_WINDOW );
  844. ShowGroupBottom ( QUICK_SKILL_TRAY_OPEN_BUTTON );
  845. }
  846. }*/
  847. //#endif
  848. if( UIKeyCheck::GetInstance()->Check( DIK_F1, DXKEY_DOWN ) )
  849. {
  850. m_pSkillTrayTab->SetTabIndex( 0 );
  851. m_pSkillTrayTab->SetTabTextIndex( 0 );
  852. m_pSkillTrayTabNew->SetTabIndex( 0 );
  853. m_pSkillTrayTabNew->SetTabTextIndex( 0 );
  854. }
  855. if( UIKeyCheck::GetInstance()->Check( DIK_F2, DXKEY_DOWN ) )
  856. {
  857. m_pSkillTrayTab->SetTabIndex( 1 );
  858. m_pSkillTrayTab->SetTabTextIndex( 1 );
  859. m_pSkillTrayTabNew->SetTabIndex( 1 );
  860. m_pSkillTrayTabNew->SetTabTextIndex( 1 );;
  861. }
  862. if( UIKeyCheck::GetInstance()->Check( DIK_F3, DXKEY_DOWN ) )
  863. {
  864. m_pSkillTrayTab->SetTabIndex( 2 );
  865. m_pSkillTrayTab->SetTabTextIndex( 2 );
  866. m_pSkillTrayTabNew->SetTabIndex( 2 );
  867. m_pSkillTrayTabNew->SetTabTextIndex( 2 );
  868. }
  869. if( UIKeyCheck::GetInstance()->Check( DIK_F4, DXKEY_DOWN ) )
  870. {
  871. m_pSkillTrayTab->SetTabIndex( 3 );
  872. m_pSkillTrayTab->SetTabTextIndex( 3 );
  873. m_pSkillTrayTabNew->SetTabIndex( 3 );
  874. m_pSkillTrayTabNew->SetTabTextIndex( 3 );
  875. }
  876. //Remodified by JerMTheSLayer Added Pet Tab Link Function 12|15|13
  877. if( UIKeyCheck::GetInstance()->Check( RANPARAM::MenuShotcut[SHOTCUT_PET], DXKEY_DOWN ) )
  878. {
  879. if( GLGaeaClient::GetInstance().GetPetClient()->IsVALID() )
  880. {
  881. if ( GLTradeClient::GetInstance().Valid() ) return;
  882. if ( IsVisibleGroup( PET_WINDOW ) ) HideGroup ( CHARACTER_WINDOW );// Fix Hide Window by JermTheSlayer 12|15|13 - 8:50PM PH Time
  883. else ShowGroupFocus( CHARACTER_WINDOW );
  884. m_pCharacterWindow->SetVisiblePage (2) ;
  885. }
  886. }
  887. if( UIKeyCheck::GetInstance()->Check( RANPARAM::MenuShotcut[SHOTCUT_SUMMON], DXKEY_DOWN ) )
  888. {
  889. if( GLGaeaClient::GetInstance().GetSummonClient()->IsVALID() )
  890. {
  891. if ( GLTradeClient::GetInstance().Valid() ) return;
  892. if ( IsVisibleGroup( SUMMON_WINDOW ) ) HideGroup ( SUMMON_WINDOW );
  893. else ShowGroupFocus( SUMMON_WINDOW );
  894. }
  895. }
  896. //Remodified by JerMTheSLayer Added Vehicle Tab Link Function 12|15|13
  897. if( UIKeyCheck::GetInstance()->Check( DIK_N, DXKEY_DOWN ) )
  898. {
  899. if( GLGaeaClient::GetInstance().GetCharacter()->m_sVehicle.IsActiveValue() )
  900. {
  901. if ( GLTradeClient::GetInstance().Valid() ) return;
  902. if ( IsVisibleGroup( VEHICLE_WINDOW ) ) HideGroup ( CHARACTER_WINDOW ); // Fix Hide Window by JermTheSlayer 12|15|13 - 8:50PM PH Time
  903. else ShowGroupFocus( CHARACTER_WINDOW );
  904. m_pCharacterWindow->SetVisiblePage (1) ;
  905. }
  906. }
  907. }
  908. void CInnerInterface::SetInventoryPage()
  909. {
  910. m_pInventoryWindow->INVENTORY();
  911. state = 0;
  912. }
  913. void CInnerInterface::UpdateStatus ()
  914. {
  915. GLCharacter* const pCharacter = GLGaeaClient::GetInstance().GetCharacter();
  916. if ( IsVisibleGroup ( SYSTEM_MESSAGE_WINDOW ) )
  917. {
  918. UIRECT rcGlobalPos = m_pSystemMessageWindowDummy->GetGlobalPos ();
  919. //rcGlobalPos.top += fMENU_LIFTUP;
  920. m_pSystemMessageWindow->SetGlobalPos ( rcGlobalPos );
  921. }
  922. if ( IsBlockProgramAlarm () )
  923. {
  924. if ( !IsVisibleGroup ( BLOCK_PROGRAM_ALARM ) )
  925. {
  926. UIRECT rcGlobalPos = m_pBlockProgramAlarmDummy->GetGlobalPos ();
  927. rcGlobalPos.top += float((rand()%200) - 100);
  928. rcGlobalPos.left += float((rand()%200) - 100);
  929. m_pBlockProgramAlarm->SetGlobalPos ( rcGlobalPos );
  930. GetPositionKeeper()->SetPosition ( BLOCK_PROGRAM_ALARM, rcGlobalPos );
  931. ShowGroupFocus ( BLOCK_PROGRAM_ALARM );
  932. }
  933. }
  934. else
  935. {
  936. HideGroup ( BLOCK_PROGRAM_ALARM );
  937. }
  938. // ij¸¯ÅÍ »ýÁ¸ »óÅ ȮÀÎ
  939. if ( pCharacter->IsDie () )
  940. {
  941. if ( !IsVisibleGroup ( REBIRTH_DIALOGUE ) )
  942. {
  943. bool bItemRebirth = (pCharacter->ISREVIVE ())?true:false;
  944. bool bAutoRebirth = false;
  945. bool bCantUseRebirth = FALSE;
  946. // ±ÍÈ¥ÁÖ Äð ŸÀÓ Ã¼Å©
  947. if ( bItemRebirth )
  948. {
  949. SITEM* pITEM = pCharacter->GET_SLOT_ITEMDATA(SLOT_NECK);
  950. if ( pITEM && pCharacter->IsCoolTime( pITEM->sBasicOp.sNativeID ) )
  951. {
  952. bItemRebirth = FALSE;
  953. }
  954. }
  955. if( pCharacter->IsRestartPossible() == FALSE )
  956. {
  957. bItemRebirth = FALSE;
  958. bCantUseRebirth = TRUE;
  959. }
  960. if ( bItemRebirth )
  961. {
  962. // ¼Ò¸ð¼º ±ÍÈ¥ÁÖÀ̸é ÀÚµ¿ ±ÍÈ¥ÁÖ »ç¿ë
  963. SITEM* pITEM = pCharacter->GET_SLOT_ITEMDATA(SLOT_NECK);
  964. if ( pITEM && !pITEM->ISINSTANCE() ) bAutoRebirth = true;
  965. }
  966. m_pRebirthDialogue->SET_ITEMREBIRTH ( bItemRebirth, bAutoRebirth, bCantUseRebirth );
  967. m_pRebirthDialogue->SetCallerID ( MODAL_REBIRTH );
  968. ShowGroupFocus ( REBIRTH_DIALOGUE, true );
  969. ShowGroupFocus ( BASIC_CHAT_BOX, true );
  970. }
  971. }
  972. else
  973. {
  974. HideGroup ( REBIRTH_DIALOGUE, true );
  975. if ( IsGateOpen () )
  976. {
  977. // ¸¸¾à ¸Ê À̸§ÀÌ ¾ø´Ù¸é, À̵¿ÇÒ ¼ö ¾ø´Ù.
  978. if ( m_pMapMoveDisplay )
  979. {
  980. CString strMapName = pCharacter->DetectGateToMapName();
  981. m_pMapMoveDisplay->SetMapName ( strMapName + ID2GAMEINTEXT ( "MAPMOVE_MESSAGE" ) );
  982. UIRECT rcGlobalPos = m_pMapMoveDisplayDummy->GetGlobalPos ();
  983. rcGlobalPos.top -= fMENU_LIFTUP;
  984. m_pMapMoveDisplay->SetGlobalPos ( rcGlobalPos );
  985. if ( strMapName.GetLength () ) ShowGroupFocus ( MAPMOVE_DISPLAY );
  986. else HideGroup ( MAPMOVE_DISPLAY );
  987. }
  988. }
  989. else
  990. {
  991. HideGroup ( MAPMOVE_DISPLAY );
  992. }
  993. }
  994. // ½ºÇÙ, ¿ÀÅä ÇÁ·Î¼¼½º üũ
  995. if ( IsBlockProgramFound () )
  996. {
  997. if ( !IsVisibleGroup ( WAITSERVER_DISPLAY ) )
  998. DoModal ( ID2GAMEINTEXT("BLOCK_PROGRAM_FOUND"), MODAL_INFOMATION, OK, MODAL_CLOSEGAME );
  999. }
  1000. if ( !DxGlobalStage::GetInstance().IsEmulator() ) //³×Æ®¿öÅ© ¿¬°áÀÌ ²÷¾îÁø °æ¿ì
  1001. {
  1002. if ( !DxGlobalStage::GetInstance().IsSTATE( DxGlobalStage::EM_CHANGE ) )
  1003. {
  1004. if ( !DxGlobalStage::GetInstance().GetNetClient()->IsOnline() )
  1005. {
  1006. if ( !IsVisibleGroup ( WAITSERVER_DISPLAY ) )
  1007. DoModal ( ID2GAMEINTEXT("PLAYINTERFACE_5"), MODAL_INFOMATION, OK, MODAL_CLOSEGAME );
  1008. }
  1009. }
  1010. }
  1011. if ( m_pAdminMessageDisplay )
  1012. {
  1013. if ( IsVisibleGroup ( ADMIN_MESSAGE_DISPLAY ) )
  1014. {
  1015. if ( m_pAdminMessageDisplay->GetLifeTime () < 0.0f )
  1016. {
  1017. HideGroup ( ADMIN_MESSAGE_DISPLAY );
  1018. }
  1019. }
  1020. }
  1021. //if ( m_pSimpleMessageMan )
  1022. //{
  1023. //if ( IsVisibleGroup ( SIMPLE_MESSAGE_MAN ) )
  1024. //{
  1025. // if ( m_pSimpleMessageMan->GetLifeTime () < 0.0f )
  1026. // {
  1027. // HideGroup ( SIMPLE_MESSAGE_MAN );
  1028. // }
  1029. //}
  1030. // }
  1031. BOOL bPartyState = FALSE;
  1032. GLPARTY_CLIENT *pMaster = GLPartyClient::GetInstance().GetMaster(); // ¸¶½ºÅÍ
  1033. if ( pMaster )
  1034. {
  1035. bPartyState = TRUE;
  1036. }
  1037. if ( bPartyState != m_bPartyStateBack )
  1038. {
  1039. if ( GLPARTY_CLIENT *pMaster = GLPartyClient::GetInstance().GetMaster() )
  1040. {
  1041. ShowGroupFocus ( MINIPARTY_WINDOW );
  1042. HideGroup ( MINIPARTY_OPEN );
  1043. }
  1044. else
  1045. {
  1046. ShowGroupBottom ( MINIPARTY_OPEN );
  1047. HideGroup ( MINIPARTY_WINDOW );
  1048. }
  1049. m_bPartyStateBack = bPartyState;
  1050. // #ifdef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  1051. // UpdatePotionTrayPosition();
  1052. // #endif
  1053. }
  1054. UpdateStateQuestAlarm ();
  1055. UpdateStateSimpleHP ();
  1056. if ( IsVisibleGroup ( ACADEMY_CONFT_DISPLAY ) || IsVisibleGroup ( SYSTEM_MESSAGE_WINDOW ) )
  1057. {
  1058. HideGroup ( SIMPLE_MESSAGE_MAN );
  1059. }
  1060. else
  1061. {
  1062. if ( RANPARAM::bSHOW_TIP )
  1063. {
  1064. ShowGroupBottom ( SIMPLE_MESSAGE_MAN, true );
  1065. }
  1066. else
  1067. {
  1068. HideGroup ( SIMPLE_MESSAGE_MAN, true );
  1069. }
  1070. }
  1071. }
  1072. void CInnerInterface::MoveBasicInfoWindow ()
  1073. {
  1074. CUIControl * pControl(NULL);
  1075. //#ifdef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  1076. // pControl = m_pBasicQuickSkillSlot;
  1077. //#else
  1078. pControl = m_pUILeftTopGroup;
  1079. //#endif
  1080. if ( !pControl ) return;
  1081. const UIRECT& rcBasicInfoViewDummy = m_pBasicInfoViewDummy->GetGlobalPos ();
  1082. const UIRECT& rcLeftTopGroupDummy = m_pLeftTopGroupDummy->GetGlobalPos ();
  1083. const UIRECT& rcBasicInfoView = m_pBasicInfoView->GetGlobalPos ();
  1084. const UIRECT& rcLeftTopGroup = pControl->GetGlobalPos ();
  1085. const D3DXVECTOR2 vLeftTopGroup ( rcLeftTopGroup.left, rcLeftTopGroup.top );
  1086. const D3DXVECTOR2 vLeftTopGroupDummy ( rcLeftTopGroupDummy.left, rcLeftTopGroupDummy.top );
  1087. const D3DXVECTOR2 vBasicInfoViewDummy (rcBasicInfoViewDummy.left,rcBasicInfoViewDummy.top);
  1088. const D3DXVECTOR2 vBasicInfoView (rcBasicInfoView.left,rcBasicInfoView.top);
  1089. const D3DXVECTOR2 vDist = vBasicInfoViewDummy - vBasicInfoView;
  1090. const float fDist = D3DXVec2LengthSq ( &vDist );
  1091. if ( fDist > 900.0f ) // ÄÁÆ®·ÑÀÌ ¶³¾îÁ³³ª?
  1092. {
  1093. if ( vBasicInfoViewDummy != vLeftTopGroup ) pControl->SetGlobalPos ( vBasicInfoViewDummy );
  1094. }
  1095. else
  1096. {
  1097. if ( vLeftTopGroupDummy != vLeftTopGroup ) pControl->SetGlobalPos ( vLeftTopGroupDummy );
  1098. if ( vBasicInfoViewDummy != vBasicInfoView ) m_pBasicInfoView->SetGlobalPos( vBasicInfoViewDummy );
  1099. }
  1100. }
  1101. void CInnerInterface::BasicInfoViewDoubleClick()
  1102. {
  1103. CUIControl * pControl(NULL);
  1104. //#ifdef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  1105. // pControl = m_pBasicQuickSkillSlot;
  1106. //#else
  1107. pControl = m_pUILeftTopGroup;
  1108. //#endif
  1109. const UIRECT& rcBasicInfoViewDummy = m_pBasicInfoViewDummy->GetGlobalPos ();
  1110. const UIRECT& rcLeftTopGroupDummy = m_pLeftTopGroupDummy->GetGlobalPos ();
  1111. const D3DXVECTOR2 vLeftTopGroupDummy ( rcLeftTopGroupDummy.left, rcLeftTopGroupDummy.top );
  1112. const D3DXVECTOR2 vBasicInfoViewDummy (rcBasicInfoViewDummy.left,rcBasicInfoViewDummy.top);
  1113. pControl->SetGlobalPos ( vLeftTopGroupDummy );
  1114. m_pBasicInfoView->SetGlobalPos( vBasicInfoViewDummy );
  1115. }
  1116. //************************************
  1117. // Method: IsOpenWindowToMoveBlock
  1118. // FullName: CInnerInterface::IsOpenWindowToMoveBlock
  1119. // Access: public
  1120. // Returns: BOOL
  1121. // Qualifier:
  1122. //************************************
  1123. BOOL CInnerInterface::IsOpenWindowToMoveBlock()
  1124. {
  1125. // ¿©±â¿¡ Ãß°¡µÇ´Â ÄÁÆ®·ÑÀº ¹ÝµíÀÌ InitDeviceObjects¿¡¼­ »ý¼º½Ã SetVisibleSingle( FALSE )¸¦ ÇØÁà¾ß ÇÑ´Ù.
  1126. if( IsVisibleGroup( TRADE_WINDOW ) ||
  1127. IsVisibleGroup( TRADEINVENTORY_WINDOW ) ||
  1128. IsVisibleGroup( MARKET_WINDOW ) ||
  1129. IsVisibleGroup( STORAGE_WINDOW ) ||
  1130. // IsVisibleGroup( ITEMBANK_WINDOW ) ||
  1131. IsVisibleGroup( MAP_REQUIRE_CHECK ) ||
  1132. IsVisibleGroup( REBIRTH_DIALOGUE ) ||
  1133. IsVisibleGroup( DIALOGUE_WINDOW ) ||
  1134. IsVisibleGroup( CLUB_STORAGE_WINDOW ) ||
  1135. IsVisibleGroup( PRIVATE_MARKET_MAKE ) ||
  1136. IsVisibleGroup( GAMBLE_DIALOGUE ) ||
  1137. IsVisibleGroup( GAMBLE_SELECT_DIALOGUE ) ||
  1138. IsVisibleGroup( GAMBLE_AGAIN_DIALOGUE ) ||
  1139. IsVisibleGroup( GAMBLE_ANIMATION_DIALOGUE ) ||
  1140. IsVisibleGroup( GAMBLE_RESULT_EVEN_DIALOGUE ) ||
  1141. IsVisibleGroup( GAMBLE_RESULT_ODD_DIALOGUE ) ||
  1142. IsVisibleGroup( ITEM_REBUILD_WINDOW ) ||
  1143. IsVisibleGroup( REBUILDINVENTORY_WINDOW ) || // ITEMREBUILD_MARK
  1144. IsVisibleGroup( ITEM_GARBAGE_WINDOW ) ||
  1145. IsVisibleGroup( GARBAGEINVENTORY_WINDOW ) || // ÈÞÁöÅë
  1146. IsVisibleGroup( ITEMSHOP_WINDOW ) ||
  1147. IsVisibleGroup( ITEM_SHOP_SEARCH_WINDOW ) ||
  1148. IsVisibleGroup( ITEM_SEARCH_RESULT_WINDOW ) || // ¾ÆÀÌÅÛ °Ë»ö â
  1149. IsVisibleGroup( PETSKIN_MIX_IMAGE_WINDOW ) ||
  1150. IsVisibleGroup( ITEM_MIX_WINDOW ) ||
  1151. IsVisibleGroup( ITEM_MIX_INVEN_WINDOW ) )
  1152. {
  1153. return TRUE;
  1154. }
  1155. else
  1156. {
  1157. return FALSE;
  1158. }
  1159. }
  1160. /*
  1161. #ifdef CH_PARAM // Áß±¹ ÀÎÅÍÆäÀ̽º º¯°æ
  1162. void CInnerInterface::UpdatePotionTrayPosition()
  1163. {
  1164. m_pUILeftTopGroup->SetGlobalPos( m_pBasicPotionTrayDummy->GetGlobalPos() );
  1165. m_pQuestAlarm->SetGlobalPos( m_pQuestAlarmDummy->GetGlobalPos() );
  1166. BOOL bVisibleQuest = IsVisibleGroup( QUEST_ALARM);
  1167. BOOL bVisibleMini = IsVisibleGroup( MINIPARTY_OPEN );
  1168. if( bVisibleQuest && bVisibleMini ) return;
  1169. UIRECT rcDummy = m_pUILeftTopGroup->GetGlobalPos();
  1170. rcDummy.left += 41; // Äù½ºÆ®, ¹Ì´ÏÆÄƼ ¹öÆ°ÀÇ °¡·Î Å©±â°¡ 41
  1171. rcDummy.right = rcDummy.left + rcDummy.sizeX;
  1172. m_pUILeftTopGroup->SetGlobalPos( rcDummy );
  1173. CUIControl * pUIControl(NULL);
  1174. if( !bVisibleQuest && !bVisibleMini )
  1175. {
  1176. pUIControl = m_pUILeftTopGroup;
  1177. }
  1178. else if( !bVisibleMini )
  1179. {
  1180. pUIControl = m_pQuestAlarm;
  1181. }
  1182. if( pUIControl != NULL )
  1183. {
  1184. rcDummy = pUIControl->GetGlobalPos();
  1185. rcDummy.left += 41;
  1186. rcDummy.right = rcDummy.left + rcDummy.sizeX;
  1187. pUIControl->SetGlobalPos( rcDummy );
  1188. }
  1189. }
  1190. #endif
  1191. */
  1192. void CInnerInterface::SetArmSwap( BOOL bSwap )
  1193. {
  1194. //m_pInventoryWindow->SetArmSwapTabButton( bSwap );
  1195. }
  1196. bool CInnerInterface::ItemShopAuth ()
  1197. {
  1198. // ItemShopAuth
  1199. #if defined ( JP_PARAM )
  1200. if ( m_bItemShopLoad ) return false;
  1201. GLCharacter* pChar = GLGaeaClient::GetInstance().GetCharacter();
  1202. if ( !pChar ) return false;
  1203. CString strData = "";
  1204. strData.Format( "%s?id=%s& uuid=%s", RANPARAM::ItemShopAddress, pChar->m_szUID, RANPARAM::GETJAPANUUID() );
  1205. CCommonWeb::Get()->Navigate( CCommonWeb::ITEMSHOP_ID, strData, true );
  1206. CCommonWeb::Get()->ReSetCompleteLoad( CCommonWeb::ITEMSHOP_ID );
  1207. m_bItemShopLoad = true;
  1208. // ·Îµù ¿Ï·á ¸Þ¼¼Áö°¡ ¿Ã¶§±îÁö ±â´Ù¸°´Ù.
  1209. return false;
  1210. #endif
  1211. return true;
  1212. }
  1213. void CInnerInterface::ItemShopVisible()
  1214. {
  1215. // ItemShopAuth
  1216. #if defined ( JP_PARAM )
  1217. if ( m_bItemShopLoad )
  1218. {
  1219. if ( CCommonWeb::Get()->IsCompleteLoad( CCommonWeb::ITEMSHOP_ID ) )
  1220. {
  1221. ShowGroupFocus ( ITEMSHOP_WINDOW );
  1222. HideGroup ( HELP_WINDOW );
  1223. m_bItemShopLoad = false;
  1224. }
  1225. }
  1226. #endif
  1227. return;
  1228. }
  1229. void CInnerInterface::SetItemMixResult( CString strMsg, bool bSuccess, bool bFail )
  1230. {
  1231. m_pItemMixWindow->SetItemMixResult( strMsg, bSuccess, bFail );
  1232. }
  1233. void CInnerInterface::SET_GATHER_GAUGE( DWORD dwGaeaID, float fTime )
  1234. {
  1235. m_pGatherGauge->SetTime( fTime );
  1236. m_pGatherGauge->SetMaterial ( dwGaeaID );
  1237. }
  1238. void CInnerInterface::VisibleCDMRanking( bool bVisible )
  1239. {
  1240. if ( bVisible )
  1241. {
  1242. HideGroup( QUEST_HELPER_DISPLAY );
  1243. ShowGroupBottom ( CDM_RANKING_DISPLAY );
  1244. }
  1245. else
  1246. {
  1247. HideGroup( CDM_RANKING_DISPLAY );
  1248. ShowGroupBottom ( QUEST_HELPER_DISPLAY );
  1249. }
  1250. }
  1251. void CInnerInterface::RefreashCDMRanking()
  1252. {
  1253. if ( m_pCdmRankingDisplay && m_pCdmRankingDisplay->IsVisible() )
  1254. m_pCdmRankingDisplay->RefreashCdmRanking();
  1255. }

comments powered by Disqus