#include "SunClientPrecompiledHeader.h" #ifdef _NA_008121_20150311_EQUIPMENT_AWAKENING_SYSTEM #include "uiEquipmentAwakeningDialog.h" #include "uiEquipmentAwakeningMan.h" #include "InterfaceManager.h" #include "GlobalFunc.h" #include "MouseHandler.h" #include "ItemManager.h" #include "SCItemSlot.h" #include "uiToolTipMan/uiToolTipMan.h" #include "CursorChangeTransact.h" #include "SoundEffect.h" #include "Mouse.h" #include "AwakeningInfoParser.h" #include "ItemInfoParser.h" #include "uiGuideSystemMan/uiGuideSystemMan.h" #include "InventoryDialog.h" WzID uiEquipmentAwakeningDialog::wz_id_[kControl_Size] = { StrToWzID("B000"), StrToWzID("B002"), StrToWzID("B003"), StrToWzID("B999"), StrToWzID("T004"), StrToWzID("S001"), StrToWzID("S004"), StrToWzID("S007"), StrToWzID("S017"), StrToWzID("S016"), StrToWzID("P001"), StrToWzID("P008"), StrToWzID("P009"), StrToWzID("P010"), StrToWzID("P017"), StrToWzID("P020"), StrToWzID("B005"), StrToWzID("B006"), StrToWzID("B001"), }; uiEquipmentAwakeningDialog::uiEquipmentAwakeningDialog(InterfaceManager* ui_manager) : uiBase( ui_manager ), ui_equipment_awakening_manager_(NULL), item_unit_renderer_(NULL), equip_item_pos_(INVALID_SLOT_POS), material_item_pos_(INVALID_SLOT_POS), additive_item_pos_(INVALID_SLOT_POS) { } uiEquipmentAwakeningDialog::~uiEquipmentAwakeningDialog(void) { } void uiEquipmentAwakeningDialog::Init( CDrawBase* draw_base ) { uiBase::Init(draw_base); RegisterControlPosition(StrToWzID("B000"), kControl_Button_B000); RegisterControlPosition(StrToWzID("B002"), kControl_Button_B002); RegisterControlPosition(StrToWzID("B003"), kControl_Button_B003); RegisterControlPosition(StrToWzID("B999"), kControl_Button_B999); RegisterControlPosition(StrToWzID("T004"), kControl_Text_T004); RegisterControlPosition(StrToWzID("S001"), kControl_Text_S001); RegisterControlPosition(StrToWzID("S004"), kControl_Text_S004); RegisterControlPosition(StrToWzID("S007"), kControl_Text_S007); RegisterControlPosition(StrToWzID("S017"), kControl_Text_S017); RegisterControlPosition(StrToWzID("S016"), kControl_Text_S016); RegisterControlPosition(StrToWzID("P001"), kControl_Picture_P001); RegisterControlPosition(StrToWzID("P008"), kControl_Picture_P008); RegisterControlPosition(StrToWzID("P009"), kControl_Picture_P009); RegisterControlPosition(StrToWzID("P010"), kControl_Picture_P010); RegisterControlPosition(StrToWzID("P017"), kControl_Picture_P017); RegisterControlPosition(StrToWzID("P020"), kControl_Picture_P020); RegisterControlPosition(StrToWzID("B005"), kControl_Button_B005); RegisterControlPosition(StrToWzID("B006"), kControl_Button_B006); RegisterControlPosition(StrToWzID("B001"), kControl_Button_B001); ui_equipment_awakening_manager_ = GET_DIALOG_MANAGER(uiEquipmentWakeupMan, UIMAN_EQUIPMENT_WAKEUP); slot_container_[EQUIPMENT_EQUIP_SLOT].Initialize( 1, SI_EQUIPMENT_AWAKENING ); slot_container_[EQUIPMENT_MATERIAL_SLOT].Initialize( 1, SI_EQUIPMENT_AWAKENING ); slot_container_[EQUIPMENT_ADDITIVE_SLOT].Initialize( 1, SI_EQUIPMENT_AWAKENING ); RECT rc = {0, }; if ( draw_base ) { equipment_awakening_first_render_.Init(draw_base, rc); equipment_awakening_second_render_.Init(draw_base, rc); material_first_render_.Init(draw_base, rc); material_second_render_.Init(draw_base, rc); additive_first_render_.Init(draw_base, rc); additive_second_render_.Init(draw_base, rc); } m_packetStatus = PACKET_STATUS_NONE; } void uiEquipmentAwakeningDialog::Release() { for ( int i = EQUIPMENT_EQUIP_SLOT; i < EQUIPMENT_AWAKENING_SLOT_MAX; ++i ) { slot_container_[i].Release(); } } void uiEquipmentAwakeningDialog::MessageProc( SI_MESSAGE* message ) { if ( IsLock() ) return; if ( GetMan() == NULL ) return; switch ( message->eResultMsg ) { case RT_MSG_LBUTTONCLICK: { OnLButtonClick( message ); } break; case RT_MSG_RBUTTONCLICK: { OnRButtonClick( message ); } break; case RT_MSG_MOUSEOVER: { OnMouseOver( message ); } break; default: SolarDialog::MessageProc( message ); break; } } void uiEquipmentAwakeningDialog::NetworkProc( MSG_BASE* recv_packet ) { } void uiEquipmentAwakeningDialog::OnUpdateSolarDialog() { for ( int i = EQUIPMENT_EQUIP_SLOT; i < EQUIPMENT_AWAKENING_SLOT_MAX; ++i ) { slot_container_[i].Update(); } UpdateTooltip(); UpdateFtextRenderRectSetting(); } void uiEquipmentAwakeningDialog::OnRenderSolarDialog() { for ( int i = EQUIPMENT_EQUIP_SLOT; i < EQUIPMENT_AWAKENING_SLOT_MAX; ++i ) { slot_container_[i].Render(); } if ( equip_item_pos_ != INVALID_SLOT_POS ) { equipment_awakening_first_render_.Render(); equipment_awakening_second_render_.Render(); } if ( material_item_pos_ != INVALID_SLOT_POS ) { material_first_render_.Render(); material_second_render_.Render(); } additive_first_render_.Render(); additive_second_render_.Render(); } void uiEquipmentAwakeningDialog::OnShowWindow( BOOL is_show ) { if ( is_show ) { g_InterfaceManager.ShowWindow( InterfaceManager::DIALOG_EQUIP, TRUE ); keyMsg msg; ZeroMemory(&msg, sizeof(msg)); msg.dwType = eDoType_Equipment_Awakening_Dialog; msg.wParam = IM_EQUIPMENT_AWAKENING_MANAGER::EQUIPMENT_AWAKENING_DIALOG; msg.DoSomething = GlobalFunc::DoShowWindowEx; g_KeyQueueManager.PushBack(msg); // °áÁ¤È­ »óÅÂÀÏ ¶§´Â ÇØÁ¦. if (MouseHandler::Instance()->GetMouseState() == MouseHandler::CRYSTALIZATION) { MouseHandler::Instance()->RemoveMouseState(MouseHandler::CRYSTALIZATION); g_KeyQueueManager.DeleteMsg(eDoType_Crystalization); MouseHandler::Instance()->RollbackItemAtHand(); } InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->HideWindowProcess(); inventory_dialog_ptr->ImpossibleAwakeningItemIonDeActiveRender(); } MouseHandler::Instance()->SetMouseState(MouseHandler::AWAKENING); } else { InitEquipmentAwakeningSlotContainer(); InitFtextRender(); EquipmentAwakeningSlotClearSetting(); MaterialSlotClearSetting(); AdditiveSlotClearSetting(); g_InterfaceManager.ShowWindow( InterfaceManager::DIALOG_EQUIP, FALSE ); g_KeyQueueManager.DeleteMsg(eDoType_Equipment_Awakening_Dialog); for ( int i = EQUIPMENT_EQUIP_SLOT; i < EQUIPMENT_AWAKENING_SLOT_MAX; ++i ) { slot_container_[i].Clear(); } m_packetStatus = PACKET_STATUS_NONE; InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->RevertAwakeningItemIconDeActiveRender(); } MouseHandler::Instance()->RemoveMouseState(MouseHandler::AWAKENING); } } bool uiEquipmentAwakeningDialog::OnLButtonClick( SI_MESSAGE* message ) { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_AWAKENING) ) { return false; } DWORD control_position = GetControlPosition_byID( message->dwCtrlID ); switch ( control_position ) { case kControl_Button_B000: case kControl_Button_B002: case kControl_Button_B003: { if ( MouseHandler::Instance()->IsExistItemAtHand() ) { MouseHandler::MouseItem* mouse_item = MouseHandler::Instance()->GetMouseItem(); if ( mouse_item ) { OnEquipmentAwakeningItem_Click( (POSTYPE)control_position, mouse_item->m_fromSlotIdx, mouse_item->m_fromPos ); } MouseHandler::Instance()->RollbackItemAtHand(); } } break; case kControl_Button_B999: { ShowInterface( FALSE ); } break; case kControl_Button_B005: { Awakening(); } break; case kControl_Button_B006: { ShowInterface( FALSE ); } break; case kControl_Button_B001: { OpenTutorialGuid(); } break; } return true; } bool uiEquipmentAwakeningDialog::OnRButtonClick( SI_MESSAGE* message ) { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_AWAKENING) ) { return false; } bool is_change = false; DWORD control_position = GetControlPosition_byID( message->dwCtrlID ); switch ( control_position ) { case kControl_Button_B000: { EquipmentAwakeningSlotClearSetting(); MaterialSlotClearSetting(); AdditiveSlotClearSetting(); is_change = true; } break; case kControl_Button_B002: { MaterialSlotClearSetting(); AdditiveSlotClearSetting(); is_change = true; } break; case kControl_Button_B003: { AdditiveSlotClearSetting(); is_change = true; } break; } if ( is_change == true ) { InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->RevertAwakeningItemIconDeActiveRender(); inventory_dialog_ptr->ImpossibleAwakeningItemIonDeActiveRender(); } } return true; } bool uiEquipmentAwakeningDialog::OnMouseOver( SI_MESSAGE* message ) { m_MouseOverObject.eMouseOverType = eMOUSE_OVER_MAX; int mx = Mouse::Instance()->GetMouseX(); int my = Mouse::Instance()->GetMouseY(); for ( POSTYPE pos = kControl_Button_B000; pos <= kControl_Button_B003; ++pos ) { if ( CControlWZ* ctl = getControl( pos ) ) { RECT rc = ctl->GetSizeRect(); if( rc.left <= mx && rc.right >= mx && rc.top <= my && rc.bottom >= my) { int slotPos = ( pos - kControl_Button_B000 ); if( SCItemSlot* item = slot_container_[pos].GetSlotItem(0) ) { m_MouseOverObject.eMouseOverType = eMOUSE_OVER_SLOT; m_MouseOverObject.pSlot = item; } } } } return true; } void uiEquipmentAwakeningDialog::OnEquipmentAwakeningItem_InventoryRightClick(const SLOTIDX from_container_index, const POSTYPE from_container_position ) { POSTYPE equipment_wakeup_slot_index = INVALID_SLOT_POS; if ( equip_item_pos_ == INVALID_SLOT_POS ) { equipment_wakeup_slot_index = EQUIPMENT_EQUIP_SLOT; } else if ( material_item_pos_ == INVALID_SLOT_POS ) { equipment_wakeup_slot_index = EQUIPMENT_MATERIAL_SLOT; } else if ( additive_item_pos_ == INVALID_SLOT_POS ) { equipment_wakeup_slot_index = EQUIPMENT_ADDITIVE_SLOT; } if ( equipment_wakeup_slot_index == INVALID_SLOT_POS ) { return; } bool result = false; if ( MouseHandler::Instance()->ItemEquipmentAwakening_InventoryRightClick( from_container_index, SI_EQUIPMENT_AWAKENING, from_container_position, 0) ) { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( from_container_position ) ) { switch ( equipment_wakeup_slot_index ) { case EQUIPMENT_EQUIP_SLOT: { if ( PermitEquipmentCheck(item) == true ) { equip_item_pos_ = from_container_position; EquipmentInfoSetting(); result = true; } } break; case EQUIPMENT_MATERIAL_SLOT: { if ( PermitMaterialCheck(item) == true ) { material_item_pos_ = from_container_position; MaterialInfoSetting(); result = true; } #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD #else else { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5958 : Àç·á·Î »ç¿ë ÇÒ ¾ÆÀÌÅÛÀ» ¸ÕÀú µî·ÏÇØ ÁÖ¼¼¿ä. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5958)); return; } #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD } break; case EQUIPMENT_ADDITIVE_SLOT: { if ( PermitAdditiveCheck(item) == true ) { additive_item_pos_ = from_container_position; AdditiveInfoSetting(); result = true; } else { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 3994 : °¢¼º ÷°¡Á¦ ¾ÆÀÌÅÛÀ» µî·ÏÇϼ¼¿ä. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(3994)); return; } } break; } if ( result == true ) { #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD if ( equipment_wakeup_slot_index != EQUIPMENT_ADDITIVE_SLOT && equipment_wakeup_slot_index != EQUIPMENT_MATERIAL_SLOT ) #else if ( equipment_wakeup_slot_index != EQUIPMENT_ADDITIVE_SLOT ) #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD { slot_container_[equipment_wakeup_slot_index].SetSlotItem(0, *item, getControl(equipment_wakeup_slot_index)); slot_container_[equipment_wakeup_slot_index].GetSlotItem(0)->SetLock(false); } InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->RevertAwakeningItemIconDeActiveRender(); inventory_dialog_ptr->ImpossibleAwakeningItemIonDeActiveRender(); } item->SetLock(true); } } } } void uiEquipmentAwakeningDialog::OnEquipmentAwakeningItem_Click( const POSTYPE& equipment_wakeup_slot_index, const SLOTIDX from_container_index, const POSTYPE from_container_position ) { bool result = false; if ( MouseHandler::Instance()->ItemEquipmentAwakening_InventoryRightClick( from_container_index, SI_EQUIPMENT_AWAKENING, from_container_position, 0) ) { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( from_container_position ) ) { switch ( equipment_wakeup_slot_index ) { case EQUIPMENT_EQUIP_SLOT: { if ( PermitEquipmentCheck(item) == true ) { if ( equip_item_pos_ != INVALID_SLOT_POS ) { // ÀÌ¹Ì ¾ÆÀÌÅÛÀÌ ÀÖÀ» °æ¿ì LockÀ» ÇØÁ¦ SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); if ( equip_item ) { equip_item->SetLock(false); } // Àüü Ŭ¸®¾î EquipmentAwakeningSlotClearSetting(); MaterialSlotClearSetting(); AdditiveSlotClearSetting(); MaterialInfoSetting(); } equip_item_pos_ = from_container_position; EquipmentInfoSetting(); result = true; } } break; case EQUIPMENT_MATERIAL_SLOT: { if ( equip_item_pos_ != INVALID_SLOT_POS ) { if ( PermitMaterialCheck(item) == true ) { if ( material_item_pos_ != INVALID_SLOT_POS ) { #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD MaterialSlotClearSetting(); #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD // ÀÌ¹Ì ¾ÆÀÌÅÛÀÌ ÀÖÀ» °æ¿ì LockÀ» ÇØÁ¦ SCItemSlot* material_item = ItemManager::Instance()->GetInventoryItem(material_item_pos_); if ( material_item ) { material_item->SetLock(false); } AdditiveInfoSetting(); } material_item_pos_ = from_container_position; MaterialInfoSetting(); result = true; } } else { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5957 : °¢¼º ÇÒ ¾ÆÀÌÅÛÀ» ¸ÕÀú µî·ÏÇØ ÁÖ¼¼¿ä GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5957)); return; } } break; case EQUIPMENT_ADDITIVE_SLOT: { if ( material_item_pos_ != INVALID_SLOT_POS ) { if ( PermitAdditiveCheck(item) == true ) { if ( additive_item_pos_ != INVALID_SLOT_POS ) { // ÀÌ¹Ì ¾ÆÀÌÅÛÀÌ ÀÖÀ» °æ¿ì LockÀ» ÇØÁ¦ SCItemSlot* addictive_item = ItemManager::Instance()->GetInventoryItem(additive_item_pos_); if ( addictive_item ) { addictive_item->SetLock(false); } } additive_item_pos_ = from_container_position; AdditiveInfoSetting(); result = true; } } else { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5958 : Àç·á·Î »ç¿ë ÇÒ ¾ÆÀÌÅÛÀ» ¸ÕÀú µî·ÏÇØ ÁÖ¼¼¿ä. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5958)); return; } } break; } if ( result == true ) { // ÷°¡Á¦ ¾ÆÀÌÅÛÀÌ ¾Æ´Ñ °æ¿ì¿¡¸¸ ½½·Ô Ãß°¡ if ( equipment_wakeup_slot_index != EQUIPMENT_ADDITIVE_SLOT ) { slot_container_[equipment_wakeup_slot_index].SetSlotItem(0, *item, getControl(equipment_wakeup_slot_index)); slot_container_[equipment_wakeup_slot_index].GetSlotItem(0)->SetLock(false); } InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->RevertAwakeningItemIconDeActiveRender(); inventory_dialog_ptr->ImpossibleAwakeningItemIonDeActiveRender(); } item->SetLock(true); } } } } CControlWZ* uiEquipmentAwakeningDialog::getControl( POSTYPE pos ) { assert( pos >= 0 && pos < kControl_Size ); return GetControlWZ( wz_id_[pos] ); } void uiEquipmentAwakeningDialog::UpdateTooltip() { uiToolTipMan* ui_tooltip_manager = static_cast(g_InterfaceManager.GetUserInterfaceManager( UIMAN_TOOLTIP ) ); if ( m_MouseOverObject.eMouseOverType == eMOUSE_OVER_SLOT ) { if ( ui_tooltip_manager ) { assert( m_MouseOverObject.pSlot ); ui_tooltip_manager->RegisterTooltipItem( m_MouseOverObject.pSlot, FALSE, kLimitStatCompositeNormal ); ui_tooltip_manager->SetTooltipDialogID(GetDialogKey()); } CursorChangeTransact::Instance()->ChangeTranaction( MouseCursor::eMouseCursor_Cursor_Cancle ); } } void uiEquipmentAwakeningDialog::InitEquipmentAwakeningSlotContainer() { SCItemSlot* item_slot = NULL; if ( equip_item_pos_ != INVALID_SLOT_POS ) { item_slot = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); if ( item_slot ) { item_slot->SetLock(false); } equip_item_pos_ = INVALID_SLOT_POS; } if ( material_item_pos_ != INVALID_SLOT_POS ) { item_slot = ItemManager::Instance()->GetInventoryItem(material_item_pos_); if ( item_slot ) { item_slot->SetLock(false); } material_item_pos_ = INVALID_SLOT_POS; } if ( additive_item_pos_ != INVALID_SLOT_POS ) { item_slot = ItemManager::Instance()->GetInventoryItem(additive_item_pos_); if ( item_slot ) { item_slot->SetLock(false); } additive_item_pos_ = INVALID_SLOT_POS; } for ( int i = EQUIPMENT_EQUIP_SLOT; i < EQUIPMENT_AWAKENING_SLOT_MAX; ++i ) { slot_container_[i].RemoveSlot(0); } } void uiEquipmentAwakeningDialog::InitFtextRender() { equipment_awakening_first_render_.ClearSentence(); equipment_awakening_second_render_.ClearSentence(); material_first_render_.ClearSentence(); material_second_render_.ClearSentence(); additive_first_render_.ClearSentence(); additive_second_render_.ClearSentence(); } void uiEquipmentAwakeningDialog::UpdateFtextRenderRectSetting() { RECT rc = {0, }; CControlWZ* ctl = getControl(kControl_Picture_P001); if ( ctl ) { rc = ctl->GetSizeRect(); equipment_awakening_first_render_.SetRect(rc); } ctl = getControl(kControl_Picture_P008); if ( ctl ) { rc = ctl->GetSizeRect(); equipment_awakening_second_render_.SetRect(rc); } ctl = getControl(kControl_Picture_P009); if ( ctl ) { rc = ctl->GetSizeRect(); material_first_render_.SetRect(rc); } ctl = getControl(kControl_Picture_P010); if ( ctl ) { rc = ctl->GetSizeRect(); material_second_render_.SetRect(rc); } ctl = getControl(kControl_Picture_P017); if ( ctl ) { rc = ctl->GetSizeRect(); additive_first_render_.SetRect(rc); } ctl = getControl(kControl_Picture_P020); if ( ctl ) { rc = ctl->GetSizeRect(); additive_second_render_.SetRect(rc); } } void uiEquipmentAwakeningDialog::EquipmentInfoSetting() { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ) ) { TCHAR buf[256] = {0, }; // ¾ÆÀÌÅÛ À̸§ g_InterfaceManager.GetItemName( item->GetCode(), buf, sizeof(buf) ); TCHAR awakening_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR max_awakening_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR awakening_format_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR awakening_result_string[INTERFACE_STRING_LENGTH] = {0, }; // 3988 : °¢¼º·¹º§ (%s/%s) g_InterfaceManager.GetInterfaceString(3988, awakening_format_string); _itoa(item->GetAwakening(), awakening_string, 10); _itoa(MAX_AWAKENING_GRADE, max_awakening_string, 10); Snprintf(awakening_result_string, INTERFACE_STRING_LENGTH-1, awakening_format_string, awakening_string, max_awakening_string); TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; Snprintf(result_string, INTERFACE_STRING_LENGTH-1, _T("%s %s"), buf, awakening_result_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { equipment_awakening_first_render_.ClearSentence(); equipment_awakening_first_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } CControlWZ* ctl = getControl( kControl_Picture_P001 ); CControlWZ* text_ctl = getControl( kControl_Text_T004 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_first_render_.SetRect(rc); } ZeroMemory(result_string, INTERFACE_STRING_LENGTH-1); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { equipment_awakening_second_render_.ClearSentence(); equipment_awakening_second_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } ctl = getControl( kControl_Picture_P008 ); text_ctl = getControl( kControl_Text_S001 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_second_render_.SetRect(rc); } #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD AllRoundMaterialInfo temp_allround_material_info; if (AwakeningInfoParser::Instance()->GetAllRoundMaterialInfo_First(item->GetCode(), temp_allround_material_info) == false) { return; } SCItemSlot tempSlot; tempSlot.SetCode( (SLOTCODE)temp_allround_material_info.allround_material_code ); tempSlot.SetNum( temp_allround_material_info.allround_material_count ); slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B002) ); slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotRenderState_DeActive(0); #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD } } void uiEquipmentAwakeningDialog::MaterialInfoSetting() { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( material_item_pos_ ) ) { TCHAR buf[256] = {0, }; // ¾ÆÀÌÅÛ À̸§ g_InterfaceManager.GetItemName( item->GetCode(), buf, sizeof(buf) ); TCHAR awakening_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR max_awakening_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR awakening_format_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR awakening_result_string[INTERFACE_STRING_LENGTH] = {0, }; const BASE_ITEMINFO* material_info = ItemInfoParser::Instance()->GetItemInfo(item->GetCode()); // ¸¸´É Àç·á°¡ ¾Æ´Ï¶ó´Â °Í. if ( material_info && material_info->m_wType != eITEMTYPE_AWAKENING_ALLROUND_MATERIAL ) { // 3988 : °¢¼º·¹º§ (%s/%s) g_InterfaceManager.GetInterfaceString(3988, awakening_format_string); _itoa(item->GetAwakening(), awakening_string, 10); _itoa(MAX_AWAKENING_GRADE, max_awakening_string, 10); Snprintf(awakening_result_string, INTERFACE_STRING_LENGTH-1, awakening_format_string, awakening_string, max_awakening_string); } TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; Snprintf(result_string, INTERFACE_STRING_LENGTH-1, _T("%s %s"), buf, awakening_result_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { material_first_render_.ClearSentence(); material_first_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ); const AwakeningInfo* awakening_info = AwakeningInfoParser::Instance()->FindData(equip_item->GetCode()); if ( awakening_info == NULL ) { return; } BYTE material_awakening = 0; if ( material_info && material_info->m_wType == eITEMTYPE_AWAKENING_ALLROUND_MATERIAL ) { material_awakening = material_info->m_iOptionValue[0]; } else { material_awakening = item->GetAwakening() + 1; } BYTE result_awakening_level = equip_item->GetAwakening() + material_awakening; BYTE additive_number = awakening_info->additive_count; // ÷°¡Á¦ ¼ö·® if ( result_awakening_level > MAX_AWAKENING_GRADE ) { result_awakening_level = MAX_AWAKENING_GRADE; } if ( result_awakening_level > awakening_info->awake_permit_level ) { result_awakening_level = awakening_info->awake_permit_level; } std::map::const_iterator iter; iter = awakening_info->awakening_level_info_map.find(result_awakening_level); DWORD level_info = iter->second; DWORD option_param = level_info; _itoa(result_awakening_level, awakening_string, 10); TCHAR option_param_string[INTERFACE_STRING_LENGTH] = {0, }; _itoa(option_param, option_param_string, 10); // 3985 : %s·¹º§ °¢¼ºÈ¿°ú : %s g_InterfaceManager.GetInterfaceString(3985, awakening_format_string); Snprintf(awakening_result_string, INTERFACE_STRING_LENGTH-1, awakening_format_string, awakening_string, option_param_string); Snprintf(result_string, INTERFACE_STRING_LENGTH-1, _T("%s"), awakening_result_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { equipment_awakening_second_render_.ClearSentence(); equipment_awakening_second_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } CControlWZ* ctl = getControl( kControl_Picture_P009 ); CControlWZ* text_ctl = getControl( kControl_Text_S004 ); if ( ctl && text_ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_first_render_.SetRect(rc); } // 3984 : Àç·á·Î »ç¿ë ½Ã °¢¼º·¹º§ %s¸¦ »ó½Â½ÃÄÑ ÁÝ´Ï´Ù. g_InterfaceManager.GetInterfaceString(3984, awakening_format_string); _itoa(result_awakening_level - equip_item->GetAwakening(), awakening_string, 10); Snprintf(result_string, INTERFACE_STRING_LENGTH-1, awakening_format_string, awakening_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { material_second_render_.ClearSentence(); material_second_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } // 3983 : °¢¼º ÷°¡Á¦´Â °¢¼º·¹º§ÀÌ »ó½ÂµÇ´Â ¼öÄ¡¸¸Å­ ÇÊ¿äÇÕ´Ï´Ù. g_InterfaceManager.GetInterfaceString(3983, result_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { additive_first_render_.ClearSentence(); additive_first_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } ctl = getControl( kControl_Picture_P017 ); text_ctl = getControl( kControl_Text_S017 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_first_render_.SetRect(rc); } additive_second_render_.ClearSentence(); ctl = getControl( kControl_Picture_P020 ); text_ctl = getControl( kControl_Text_S016 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_second_render_.SetRect(rc); } SCItemSlot tempSlot; #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD int material_num = AwakeningInfoParser::Instance()->GetAllRoundMaterialNum(awakening_info->item_code, item->GetCode()); tempSlot.SetCode( (SLOTCODE)item->GetCode() ); if (material_num != 0) { tempSlot.SetNum(material_num); } slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B002) ); slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotRenderState_Active(0); #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD tempSlot.SetCode( (SLOTCODE)awakening_info->additive_item_code ); tempSlot.SetNum( additive_number ); slot_container_[EQUIPMENT_ADDITIVE_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B003) ); slot_container_[EQUIPMENT_ADDITIVE_SLOT].SetSlotRenderState_DeActive(0); ctl = getControl( kControl_Picture_P010 ); text_ctl = getControl( kControl_Text_S007 ); if ( ctl && text_ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; equipment_awakening_second_render_.SetRect(rc); } } } void uiEquipmentAwakeningDialog::AdditiveInfoSetting() { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( additive_item_pos_ ) ) { CControlWZ* ctl = getControl( kControl_Picture_P017 ); CControlWZ* text_ctl = getControl( kControl_Text_S017 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; additive_first_render_.SetRect(rc); } additive_second_render_.ClearSentence(); ctl = getControl( kControl_Picture_P020 ); text_ctl = getControl( kControl_Text_S016 ); if ( ctl ) { text_ctl->ShowWindowWZ(WZ_HIDE); RECT rc = ctl->GetSizeRect(); rc.right = rc.left + rc.right; rc.bottom = rc.top + rc.bottom; additive_second_render_.SetRect(rc); } slot_container_[EQUIPMENT_ADDITIVE_SLOT].SetSlotRenderState_Active(0); } } void uiEquipmentAwakeningDialog::EquipmentAwakeningSlotClearSetting() { SCItemSlot* item = NULL; item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; equipment_awakening_first_render_.ClearSentence(); equipment_awakening_second_render_.ClearSentence(); CControlWZ* text_ctl = getControl( kControl_Text_T004 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } text_ctl = getControl( kControl_Text_S001 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } equip_item_pos_ = INVALID_SLOT_POS; if ( item ) { item->SetLock(false); } slot_container_[EQUIPMENT_EQUIP_SLOT].RemoveSlot(0); } void uiEquipmentAwakeningDialog::MaterialSlotClearSetting() { SCItemSlot* item = NULL; item = ItemManager::Instance()->GetInventoryItem(material_item_pos_); material_first_render_.ClearSentence(); material_second_render_.ClearSentence(); equipment_awakening_second_render_.ClearSentence(); CControlWZ* text_ctl = getControl( kControl_Text_S004 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } text_ctl = getControl( kControl_Text_S007 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } material_item_pos_ = INVALID_SLOT_POS; if ( item ) { item->SetLock(false); } slot_container_[EQUIPMENT_MATERIAL_SLOT].RemoveSlot(0); #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD if (equip_item_pos_ != INVALID_SLOT_POS) { SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ); if( item ) { AllRoundMaterialInfo material_info; if (AwakeningInfoParser::Instance()->GetAllRoundMaterialInfo_First(item->GetCode(), material_info) == true) { SCItemSlot tempSlot; tempSlot.SetCode((SLOTCODE)material_info.allround_material_code); tempSlot.SetNum(material_info.allround_material_count); slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B002) ); slot_container_[EQUIPMENT_MATERIAL_SLOT].SetSlotRenderState_DeActive(0); } } } #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD } void uiEquipmentAwakeningDialog::AdditiveSlotClearSetting() { SCItemSlot* item = NULL; item = ItemManager::Instance()->GetInventoryItem(additive_item_pos_); if ( material_item_pos_ == INVALID_SLOT_POS ) { additive_first_render_.ClearSentence(); additive_second_render_.ClearSentence(); CControlWZ* text_ctl = getControl( kControl_Text_S017 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } text_ctl = getControl( kControl_Text_S016 ); if ( text_ctl ) { text_ctl->ShowWindowWZ(WZ_SHOW); } } else { TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; // 3983 : °¢¼º ÷°¡Á¦´Â °¢¼º·¹º§ÀÌ »ó½ÂµÇ´Â ¼öÄ¡¸¸Å­ ÇÊ¿äÇÕ´Ï´Ù. g_InterfaceManager.GetInterfaceString(3983, result_string); if ( equipment_awakening_ftext_parser_.Parser(result_string, equipment_awakening_ftext_sentence_)) { additive_first_render_.ClearSentence(); additive_first_render_.Append(equipment_awakening_ftext_sentence_); equipment_awakening_ftext_sentence_.Release(); } } additive_item_pos_ = INVALID_SLOT_POS; if ( material_item_pos_ == INVALID_SLOT_POS ) { slot_container_[EQUIPMENT_ADDITIVE_SLOT].RemoveSlot(0); } else { slot_container_[EQUIPMENT_ADDITIVE_SLOT].SetSlotRenderState_DeActive(0); } if ( item ) { item->SetLock(false); } #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD slot_container_[EQUIPMENT_ADDITIVE_SLOT].RemoveSlot(0); #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD } bool uiEquipmentAwakeningDialog::PermitEquipmentCheck( const SCItemSlot* item ) { if ( item == NULL ) { return false; } RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitEquipmentCheck(*item); if ( result_code != RC::RC_ITEM_SUCCESS ) { ResultCodeProc( result_code ); return false; } return true; } bool uiEquipmentAwakeningDialog::PermitMaterialCheck( const SCItemSlot* item ) { if ( item == NULL ) { return false; } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ); if ( equip_item == NULL ) { return false; } #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitMaterialCheck(equip_item->GetCode(), item->GetCode(), item->GetNum()); #else RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitMaterialCheck(equip_item->GetCode(), item->GetCode()); #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD if ( result_code != RC::RC_ITEM_SUCCESS ) { ResultCodeProc( result_code ); return false; } return true; } bool uiEquipmentAwakeningDialog::PermitAdditiveCheck( const SCItemSlot* item ) { if ( item == NULL ) { return false; } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ); if ( equip_item == NULL ) { return false; } SCItemSlot* material_item = ItemManager::Instance()->GetInventoryItem( material_item_pos_ ); if ( material_item == NULL ) { return false; } RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitAdditiveCheck(*equip_item, *material_item, *item); if ( result_code != RC::RC_ITEM_SUCCESS ) { ResultCodeProc( result_code ); return false; } return true; } void uiEquipmentAwakeningDialog::ResultCodeProc( const RC::eITEM_RESULT& result_code ) { TCHAR temp_string[INTERFACE_STRING_LENGTH] = {0, }; int string_index = 0; switch ( result_code ) { case RC::RC_EQUIPMENT_AWAKENING_SUCCESS: { // 5961 : °¢¼º¿¡ ¼º°øÇÏ¿´½À´Ï´Ù. string_index = 5961; } break; case RC::RC_EQUIPMENT_AWAKENING_FAIL: { // 5962 : °¢¼º¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù. string_index = 5962; } break; case RC::RC_EQUIPMENT_AWAKENING_EQUIP_EXCEEDED_PERMIT_LEVEL: { // 5967 : Á¦ÇÑ °¢¼º ·¹º§¿¡ µµ´ÞÇÑ ¾ÆÀÌÅÛ ÀÔ´Ï´Ù. string_index = 5967; } break; case RC::RC_EQUIPMENT_AWAKENING_EQUIP_MAX_LEVEL: { // 5966 : ÇØ´ç ¾ÆÀÌÅÛÀº ÀÌ¹Ì °¢¼º ÃÖ°í·¹º§ÀÔ´Ï´Ù. string_index = 5966; } break; case RC::RC_EQUIPMENT_AWAKENING_DOES_NOT_MATCH_ADDITIVE: { // 3959 : ÷°¡Á¦ ¾ÆÀÌÅÛÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù. string_index = 3959; } break; case RC::RC_EQUIPMENT_AWAKENING_DOES_NOT_MATCH_ADDITIVE_AMOUNT: { // 3960 : ¼ö·®ÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù. string_index = 3960; } break; case RC::RC_EQUIPMENT_AWAKENING_DOES_NOT_MATCH_MATERIAL: { // 5985 : Àç·á·Î »ç¿ë ÇÒ ¼ö ¾ø´Â ¾ÆÀÌÅÛÀÔ´Ï´Ù. string_index = 5985; } break; #ifdef _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD case RC::RC_EQUIPMENT_AWAKENING_DOES_NOT_MATCH_MATERIAL_AMOUNT: { // 3958 : Àç·áÀÇ ¼ö·®À» È®ÀÎÇØ ÁÖ¼¼¿ä. string_index = 3958; } break; #endif // _NA_008536_20151030_AWAKENING_MATERIAL_AMOUNT_ADD case RC::RC_EQUIPMENT_AWAKENING_INVALID_EQUIP_INFO: { // 3961 : Àåºñ Á¤º¸¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù. string_index = 3961; } break; case RC::RC_EQUIPMENT_AWAKENING_INVALID_MATERIAL_INFO: { // 3962 : Àç·á Á¤º¸¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù. string_index = 3962; } break; case RC::RC_EQUIPMENT_AWAKENING_INVALID_AWAKENING_INFO: { // 3966 : °¢¼º Á¤º¸¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù. string_index = 3966; } break; } if ( string_index > 0 ) { g_InterfaceManager.GetInterfaceString(string_index, temp_string); GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, temp_string); } } void uiEquipmentAwakeningDialog::Callback_SendPacketItemAwakeningSyn( uiSystemMessage::ButtonIndex button_index ) { uiEquipmentAwakeningDialog* dialog = GET_CAST_DIALOG(uiEquipmentAwakeningDialog, IM_EQUIPMENT_AWAKENING_MANAGER::EQUIPMENT_AWAKENING_DIALOG); if ( dialog ) { dialog->SendPacketItemAwakeningSyn(button_index == uiSystemMessage::kConfirm_Button); } } void uiEquipmentAwakeningDialog::SendPacketItemAwakeningSyn( bool is_send_packet ) { if ( is_send_packet == false ) { return; } if (!BIT_CHECK(m_packetStatus, PACKET_STATUS_AWAKENING)) { MSG_CG_ITEM_AWAKENING_SYN packet; packet.equip_item_pos = equip_item_pos_; packet.material_item_pos = material_item_pos_; packet.additive_item_pos = additive_item_pos_; BOOL ret = GlobalFunc::SendPacket( CI_GAMESERVERIDX, &packet, sizeof ( packet ) ); if ( ret ) { BIT_ADD( m_packetStatus, PACKET_STATUS_AWAKENING ); } } } void uiEquipmentAwakeningDialog::RemoveBitCheck() { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_AWAKENING) ) { BIT_REMOVE( m_packetStatus, PACKET_STATUS_AWAKENING ); } } void uiEquipmentAwakeningDialog::Awakening() { if ( equip_item_pos_ == INVALID_SLOT_POS || material_item_pos_ == INVALID_SLOT_POS || additive_item_pos_ == INVALID_SLOT_POS ) { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5987 : °¢¼º Á¶°Ç¿¡ ¸¸Á·ÇÏÁö ¸øÇÏ¿© °¢¼ºÀ» ÁøÇà ÇÒ ¼ö ¾ø½À´Ï´Ù. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5987)); return; } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); SCItemSlot* material_item = ItemManager::Instance()->GetInventoryItem(material_item_pos_); const AwakeningInfo* equip_info = AwakeningInfoParser::Instance()->FindData(equip_item->GetCode()); const BASE_ITEMINFO* material_info = ItemInfoParser::Instance()->GetItemInfo(material_item->GetCode()); if ( equip_item == NULL || material_item == NULL || equip_info == NULL || material_info == NULL ) { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5987 : °¢¼º Á¶°Ç¿¡ ¸¸Á·ÇÏÁö ¸øÇÏ¿© °¢¼ºÀ» ÁøÇà ÇÒ ¼ö ¾ø½À´Ï´Ù. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5987)); return; } BYTE material_awakening = 0; if ( material_info && material_info->m_wType == eITEMTYPE_AWAKENING_ALLROUND_MATERIAL ) { material_awakening = material_info->m_iOptionValue[0]; } else { material_awakening = material_item->GetAwakening() + 1; } BYTE result_awakening_level = equip_item->GetAwakening() + material_awakening; if ( result_awakening_level > MAX_AWAKENING_GRADE ) { result_awakening_level = MAX_AWAKENING_GRADE; } if ( result_awakening_level > equip_info->awake_permit_level ) { result_awakening_level = equip_info->awake_permit_level; } TCHAR level_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR format_string[INTERFACE_STRING_LENGTH] = {0, }; _itoa(result_awakening_level, level_string, 10); TCHAR item_name[64] = {0, }; TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; // 3963 : %s¸¦ %s·¹º§·Î °¢¼ºÇϽðڽÀ´Ï±î? g_InterfaceManager.GetInterfaceString(3963, format_string); // ¾ÆÀÌÅÛ À̸§ g_InterfaceManager.GetItemName( equip_item->GetCode(), item_name ); Snprintf(result_string, INTERFACE_STRING_LENGTH-1, format_string, item_name, level_string); GlobalFunc::ConfirmMessage(result_string, 0, Callback_SendPacketItemAwakeningSyn); } void uiEquipmentAwakeningDialog::ResetAwakeningDialog() { RemoveBitCheck(); InitEquipmentAwakeningSlotContainer(); InitFtextRender(); EquipmentAwakeningSlotClearSetting(); MaterialSlotClearSetting(); AdditiveSlotClearSetting(); InventoryDialog* inventory_dialog_ptr = static_cast(GET_DIALOG( IM_INVENTORY_MANAGER::INVEN_DLG )); if (inventory_dialog_ptr) { inventory_dialog_ptr->RevertAwakeningItemIconDeActiveRender(); inventory_dialog_ptr->ImpossibleAwakeningItemIonDeActiveRender(); } } void uiEquipmentAwakeningDialog::ResultCodeSoundProc( const RC::eITEM_RESULT& result_code ) { eUI_SOUND_INDEX index = UI_SOUND_DEFAULT_CLICK; if ( result_code == RC::RC_EQUIPMENT_AWAKENING_SUCCESS ) { index = UI_SOUND_COMPOSE_ENCHANT_SUCCESS; } else if ( result_code != 0 ) { index = UI_SOUND_COMPOSE_ENCHANT_FAIL; } if ( index != UI_SOUND_DEFAULT_CLICK ) { // »ç¿îµå Ãâ·Â g_SoundEffect.PlayUI( index ); } } void uiEquipmentAwakeningDialog::OpenTutorialGuid() { uiGuideSystemMan* ui_guide_system_manager = GET_DIALOG_MANAGER(uiGuideSystemMan, UIMAN_GUIDE_SYSTEM); if ( ui_guide_system_manager ) { ui_guide_system_manager->OpenGuideInfoDialog(); ui_guide_system_manager->OpenGuideDialog(uiGuideSystemMan::kDialogType_Information, 6008); } } uiEquipmentAwakeningDialog::AWAKENING_MODE uiEquipmentAwakeningDialog::GetAwakeningUIMode() { if ( equip_item_pos_ == INVALID_SLOT_POS ) { return AWAKENING_MODE_EQUIPMENT; } if ( material_item_pos_ == INVALID_SLOT_POS ) { return AWAKENING_MODE_MATERIAL; } if ( additive_item_pos_ == INVALID_SLOT_POS ) { return AWAKENING_MODE_ADDITIVE; } return AWAKENING_MODE_COMPLETE; } #endif // _NA_008121_20150311_EQUIPMENT_AWAKENING_SYSTEM