#include "SunClientPrecompiledHeader.h" #ifdef _NA_008121_20150318_EQUIPMENT_EVOLUTION_SYSTEM #include "uiEquipmentEvolutionDialog.h" #include "uiEquipmentEvolutionMan.h" #include "GlobalFunc.h" #include "SCItemSlot.h" #include "uiToolTipMan/uiToolTipMan.h" #include "CursorChangeTransact.h" #include "Mouse.h" #include "MouseHandler.h" #include "SoundEffect.h" #include "ItemManager.h" #include "AwakeningInfoParser.h" #include "GlobalFunc.h" #include "uiGuideSystemMan/uiGuideSystemMan.h" WzID uiEquipmentEvolutionDialog::wz_id_[kControl_Size] = { StrToWzID("B002"), StrToWzID("B000"), StrToWzID("B003"), StrToWzID("B999"), StrToWzID("B005"), StrToWzID("B006"), StrToWzID("S008"), StrToWzID("S002"), StrToWzID("S003"), StrToWzID("B001"), }; uiEquipmentEvolutionDialog::uiEquipmentEvolutionDialog(InterfaceManager* ui_manager) : uiBase( ui_manager ), equip_item_pos_(INVALID_SLOT_POS), additive_item_pos_(INVALID_SLOT_POS), prediction_item_pos_(INVALID_SLOT_POS) { } uiEquipmentEvolutionDialog::~uiEquipmentEvolutionDialog(void) { } void uiEquipmentEvolutionDialog::Init( CDrawBase* draw_base ) { uiBase::Init(draw_base); RegisterControlPosition(StrToWzID("B002"), kControl_Button_B002); RegisterControlPosition(StrToWzID("B000"), kControl_Button_B000); RegisterControlPosition(StrToWzID("B003"), kControl_Button_B003); RegisterControlPosition(StrToWzID("B999"), kControl_Button_B999); RegisterControlPosition(StrToWzID("B005"), kControl_Button_B005); RegisterControlPosition(StrToWzID("B006"), kControl_Button_B006); RegisterControlPosition(StrToWzID("S008"), kControl_Text_S008); RegisterControlPosition(StrToWzID("S002"), kControl_Text_S002); RegisterControlPosition(StrToWzID("S003"), kControl_Text_S003); RegisterControlPosition(StrToWzID("B001"), kControl_Button_B001); slot_container_[EQUIPMENT_EVOLUTION_SLOT].Initialize(1, SI_EQUIPMENT_EVOLUTION); slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].Initialize(1, SI_EQUIPMENT_EVOLUTION); slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].Initialize(1, SI_EQUIPMENT_EVOLUTION); m_packetStatus = PACKET_STATUS_NONE; CCtrlStaticWZ* static_control_ptr = static_cast(GetControlWZ(GetControlID_byPosition(kControl_Text_S008))); if ( static_control_ptr ) { static_control_ptr->SetTextWZ(_T("")); } static_control_ptr = static_cast(GetControlWZ(GetControlID_byPosition(kControl_Text_S002))); if ( static_control_ptr ) { static_control_ptr->SetTextWZ(_T("")); } static_control_ptr = static_cast(GetControlWZ(GetControlID_byPosition(kControl_Text_S003))); if ( static_control_ptr ) { static_control_ptr->SetTextWZ(_T("")); } RECT rc = {0, }; if ( draw_base ) { for ( int i = 0; i < 3; ++i ) { description_ftext_render_[i].Init(draw_base, rc); } } TCHAR format_string[INTERFACE_STRING_LENGTH] = {0, }; g_InterfaceManager.GetInterfaceString(3972, format_string); if ( description_ftext_parser_.Parser(format_string, description_ftext_sentence_) ) { description_ftext_render_[0].ClearSentence(); description_ftext_render_[0].Append(description_ftext_sentence_); description_ftext_sentence_.Release(); } g_InterfaceManager.GetInterfaceString(3974, format_string); if ( description_ftext_parser_.Parser(format_string, description_ftext_sentence_) ) { description_ftext_render_[1].ClearSentence(); description_ftext_render_[1].Append(description_ftext_sentence_); description_ftext_sentence_.Release(); } g_InterfaceManager.GetInterfaceString(3975, format_string); if ( description_ftext_parser_.Parser(format_string, description_ftext_sentence_) ) { description_ftext_render_[2].ClearSentence(); description_ftext_render_[2].Append(description_ftext_sentence_); description_ftext_sentence_.Release(); } } void uiEquipmentEvolutionDialog::Release() { for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].Release(); } } void uiEquipmentEvolutionDialog::OnShowWindow( BOOL is_show ) { if ( is_show ) { g_InterfaceManager.ShowWindow( InterfaceManager::DIALOG_EQUIP, TRUE ); keyMsg msg; ZeroMemory(&msg, sizeof(msg)); msg.dwType = eDoType_Equipment_Evolution_Dialog; msg.wParam = IM_EQUIPMENT_EVOLUTION_MANAGER::EQUIPMENT_EVOLUTION_DIALOG; msg.DoSomething = GlobalFunc::DoShowWindowEx; g_KeyQueueManager.PushBack(msg); } else { InitEquipmentEvolutionSlotContainer(); EvolutionResultClear(); g_InterfaceManager.ShowWindow( InterfaceManager::DIALOG_EQUIP, FALSE ); g_KeyQueueManager.DeleteMsg(eDoType_Equipment_Evolution_Dialog); for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].Clear(); } m_packetStatus = PACKET_STATUS_NONE; } } void uiEquipmentEvolutionDialog::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 uiEquipmentEvolutionDialog::NetworkProc( MSG_BASE* recv_packet ) { } void uiEquipmentEvolutionDialog::OnUpdateSolarDialog() { UpdateFtextRenderRectSetting(); for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].Update(); } UpdateTooltip(); } void uiEquipmentEvolutionDialog::OnRenderSolarDialog() { for ( int i = 0; i < 3; ++i ) { description_ftext_render_[i].Render(); } for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].Render(); } } bool uiEquipmentEvolutionDialog::OnLButtonClick( SI_MESSAGE* message ) { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_EVOLUTION) ) { return false; } DWORD control_position = GetControlPosition_byID( message->dwCtrlID ); switch ( control_position ) { case kControl_Button_B002: case kControl_Button_B000: { if ( MouseHandler::Instance()->IsExistItemAtHand() ) { MouseHandler::MouseItem* mouse_item = MouseHandler::Instance()->GetMouseItem(); if ( mouse_item ) { OnEquipmentEvolutionItem_Click( (POSTYPE)control_position, mouse_item->m_fromSlotIdx, mouse_item->m_fromPos ); } MouseHandler::Instance()->RollbackItemAtHand(); } } break; case kControl_Button_B003: { if ( MouseHandler::Instance()->IsExistItemAtHand() ) { MouseHandler::Instance()->RollbackItemAtHand(); } } break; case kControl_Button_B999: { ShowInterface( FALSE ); } break; case kControl_Button_B005: { Evolution(); } break; case kControl_Button_B006: { ShowInterface( FALSE ); } break; case kControl_Button_B001: { OpenTutorialGuid(); } break; } return true; } bool uiEquipmentEvolutionDialog::OnRButtonClick( SI_MESSAGE* message ) { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_EVOLUTION) ) { return false; } DWORD control_position = GetControlPosition_byID( message->dwCtrlID ); switch ( control_position ) { case kControl_Button_B002: { EvolutionResultClear(); InitEquipmentEvolutionSlotContainer(); } break; case kControl_Button_B000: { DeActiveAdditiveSlot(); DeActivePredictionSlot(); if (SCItemSlot* item = ItemManager::Instance()->GetInventoryItem(additive_item_pos_)) { item->SetLock(false); } additive_item_pos_ = INVALID_SLOT_POS; } break; case kControl_Button_B003: { // no operator } break; } return true; } bool uiEquipmentEvolutionDialog::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_B002; 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_B002 ); if ( SCItemSlot* item = slot_container_[pos].GetSlotItem(0) ) { m_MouseOverObject.eMouseOverType = eMOUSE_OVER_SLOT; m_MouseOverObject.pSlot = item; } } } } return true; } CControlWZ* uiEquipmentEvolutionDialog::getControl( POSTYPE pos ) { assert( pos >= 0 && pos < kControl_Size ); return GetControlWZ( wz_id_[pos] ); } void uiEquipmentEvolutionDialog::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 uiEquipmentEvolutionDialog::OnEquipmentEvolutionItem_Click( const POSTYPE& equipment_evolution_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_evolution_slot_index ) { case EQUIPMENT_EVOLUTION_SLOT: { if ( PermitEquipmentCheck(item) == true ) { if ( equip_item_pos_ != INVALID_SLOT_POS ) { SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem( equip_item_pos_ ); if ( equip_item ) { equip_item->SetLock(false); } EvolutionResultClear(); InitEquipmentEvolutionSlotContainer(); } equip_item_pos_ = from_container_position; EvolutionResultSetting(); result = true; } } break; case EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT: { if ( equip_item_pos_ != INVALID_SLOT_POS ) { if ( PermitAdditiveCheck(item) == true ) { if ( additive_item_pos_ != INVALID_SLOT_POS ) { SCItemSlot* additive_item = ItemManager::Instance()->GetInventoryItem( additive_item_pos_ ); if ( additive_item ) { additive_item->SetLock(false); } } additive_item_pos_ = from_container_position; ActiveAdditiveSlot(); ActivePredictionSlot(); result = true; } } else { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 3070 : ÁøÈ­ ÇÒ ¾ÆÀÌÅÛÀ» ¸ÕÀú µî·ÏÇØ ÁÖ¼¼¿ä GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(3070)); return; } } break; } if ( result == true ) { item->SetLock(true); } } } } void uiEquipmentEvolutionDialog::InitEquipmentEvolutionSlotContainer() { 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 ( 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; } if ( prediction_item_pos_ != INVALID_SLOT_POS ) { item_slot = ItemManager::Instance()->GetInventoryItem(prediction_item_pos_); if ( item_slot ) { item_slot->SetLock(false); } prediction_item_pos_ = INVALID_SLOT_POS; } for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].RemoveSlot(0); } } void uiEquipmentEvolutionDialog::OnEquipmentEvolutionItem_InventoryRightClick( const SLOTIDX from_container_index, const POSTYPE from_container_position ) { POSTYPE equipment_evolution_slot_index = INVALID_SLOT_POS; if ( equip_item_pos_ == INVALID_SLOT_POS ) { equipment_evolution_slot_index = EQUIPMENT_EVOLUTION_SLOT; } else if ( additive_item_pos_ == INVALID_SLOT_POS ) { equipment_evolution_slot_index = EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT; } if ( equipment_evolution_slot_index == INVALID_SLOT_POS ) { return; } bool result = false; if ( MouseHandler::Instance()->ItemEquipmentEvolution_InventoryRightClick( from_container_index, SI_EQUIPMENT_EVOLUTION, from_container_position, 0) ) { if ( SCItemSlot* item = ItemManager::Instance()->GetInventoryItem( from_container_position ) ) { switch ( equipment_evolution_slot_index ) { case EQUIPMENT_EVOLUTION_SLOT: { if ( PermitEquipmentCheck(item) == true ) { equip_item_pos_ = from_container_position; EvolutionResultSetting(); result = true; } } break; case EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT: { if ( PermitAdditiveCheck(item) == true ) { additive_item_pos_ = from_container_position; ActiveAdditiveSlot(); ActivePredictionSlot(); result = true; } } break; } if ( result == true ) { item->SetLock(true); } } } } void uiEquipmentEvolutionDialog::EvolutionResultSetting() { if ( equip_item_pos_ == INVALID_SLOT_POS ) { return; } SCItemSlot* item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); if ( item == NULL ) { return; } // Àåºñ ½½·Ô ¼ÂÆÃ slot_container_[EQUIPMENT_EVOLUTION_SLOT].SetSlotItem(0, *item, getControl(kControl_Button_B002)); // ÷°¡Á¦ ½½·Ô ¼ÂÆÃ CODETYPE additive_item_code = AwakeningInfoParser::Instance()->GetEvolutionAdditiveItemCode(item->GetCode()); SCItemSlot tempSlot; tempSlot.SetCode((SLOTCODE)additive_item_code); BYTE additive_item_count = AwakeningInfoParser::Instance()->GetEvolutionAdditiveCount(item->GetCode()); tempSlot.SetNum(additive_item_count); slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B000)); slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].SetSlotRenderState_DeActive(0); // °á°ú Àåºñ ½½·Ô ¼ÂÆÃ tempSlot.SetNum(1); CODETYPE prediction_item_code = AwakeningInfoParser::Instance()->GetResultEvolutionItemCode(item->GetCode()); tempSlot.SetCode((SLOTCODE)prediction_item_code); slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].SetSlotItem(0, tempSlot, getControl(kControl_Button_B003)); slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].SetSlotRenderState_DeActive(0); } void uiEquipmentEvolutionDialog::EvolutionResultClear() { for ( int i = EQUIPMENT_EVOLUTION_SLOT; i < EQUIPMENT_EVOLUTION_SLOT_MAX; ++i ) { slot_container_[i].RemoveSlot(0); } } void uiEquipmentEvolutionDialog::ActiveAdditiveSlot() { if ( slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].GetSlotItem(0) != NULL ) { slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].SetSlotRenderState_Active(0); } } void uiEquipmentEvolutionDialog::DeActiveAdditiveSlot() { if ( slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].GetSlotItem(0) != NULL ) { slot_container_[EQUIPMENT_EVOLUTION_ADDICTIVE_SLOT].SetSlotRenderState_DeActive(0); } } void uiEquipmentEvolutionDialog::ActivePredictionSlot() { if ( slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].GetSlotItem(0) != NULL ) { slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].SetSlotRenderState_Active(0); } } void uiEquipmentEvolutionDialog::DeActivePredictionSlot() { if ( slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].GetSlotItem(0) != NULL ) { slot_container_[EQUIPMENT_EVOLUTION_PREDICTION_SLOT].SetSlotRenderState_DeActive(0); } } bool uiEquipmentEvolutionDialog::PermitEquipmentCheck( const SCItemSlot* item ) { if ( item == NULL ) { return false; } RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitEvolutionEquipmentCheck(*item); if ( result_code != RC::RC_ITEM_SUCCESS ) { ResultCodeProc( result_code ); return false; } return true; } bool uiEquipmentEvolutionDialog::PermitAdditiveCheck( const SCItemSlot* item ) { if ( item == NULL ) { return false; } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); if ( equip_item == NULL ) { return false; } RC::eITEM_RESULT result_code = AwakeningInfoParser::Instance()->PermitEvolutionAdditiveCheck(*equip_item, *item); if ( result_code != RC::RC_ITEM_SUCCESS ) { ResultCodeProc( result_code ); return false; } return true; } void uiEquipmentEvolutionDialog::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_EVOLUTION_SUCCESS: { // 5963 : ÁøÈ­¿¡ ¼º°øÇÏ¿´½À´Ï´Ù. string_index = 5963; } break; case RC::RC_EQUIPMENT_EVOLUTION_FAIL: { // 5964 : ÁøÈ­¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù. string_index = 5964; } break; case RC::RC_EQUIPMENT_EVOLUTION_INVALID_EQUIP_INFO: { // 3961 : Àåºñ Á¤º¸¸¦ ¾Ë ¼ö ¾ø½À´Ï´Ù. string_index = 3961; } break; case RC::RC_EQUIPMENT_EVOLUTION_ITEM_CAN_NOT_EVOLUTION: { // 5959 : ÁøÈ­ ÇÒ ¼ö ¾ø´Â ÀåºñÀÔ´Ï´Ù. string_index = 5959; } break; case RC::RC_EQUIPMENT_EVOLUTION_DOES_NOT_MATCH_ADDITIVE: { // 5960 : ÷°¡Á¦ ¾ÆÀÌÅÛÀ» È®ÀÎÇØ ÁÖ¼¼¿ä string_index = 5960; } break; case RC::RC_EQUIPMENT_EVOLUTION_DOES_NOT_MATCH_ADDITIVE_AMOUT: { // 3960 : ¼ö·®ÀÌ ¸ÂÁö ¾Ê½À´Ï´Ù. string_index = 3960; } break; case RC::RC_EQUIPMENT_EVOLUTION_DOES_NOT_MATCH_AWAKENING_GRADE: { // 5968 : °¢¼º ÃÖ°í·¹º§¿¡ µµ´ÞÇÏÁö ¾Ê¾Æ ÁøÈ­ ÇÒ ¼ö ¾ø½À´Ï´Ù. string_index = 5968; } break; } if ( string_index > 0 ) { g_InterfaceManager.GetInterfaceString(string_index, temp_string); GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, temp_string); } } void uiEquipmentEvolutionDialog::Evolution() { if ( equip_item_pos_ == INVALID_SLOT_POS || additive_item_pos_ == INVALID_SLOT_POS ) { // Áß¾Ó ¸Þ½ÃÁö Ãâ·Â // 5988 : ÁøÈ­ Á¶°Ç¿¡ ¸¸Á·ÇÏÁö ¸øÇÏ¿© ÁøÈ­¸¦ ÁøÇà ÇÒ ¼ö ¾ø½À´Ï´Ù. GlobalFunc::OutputMsg_Error(eOUTPUT_MSG_CENTER_SHOW, g_InterfaceManager.GetInterfaceString(5988)); return; } SCItemSlot* equip_item = ItemManager::Instance()->GetInventoryItem(equip_item_pos_); if ( equip_item == NULL ) { return; } CODETYPE prediction_item_code = AwakeningInfoParser::Instance()->GetResultEvolutionItemCode(equip_item->GetCode()); TCHAR equip_name_string[64] = {0, }; TCHAR prediction_name_string[64] = {0, }; TCHAR format_string[INTERFACE_STRING_LENGTH] = {0, }; TCHAR result_string[INTERFACE_STRING_LENGTH] = {0, }; g_InterfaceManager.GetItemName( equip_item->GetCode(), equip_name_string ); g_InterfaceManager.GetItemName( prediction_item_code, prediction_name_string ); // 3969 : %s¸¦ %s·Î ÁøÈ­ÇϽðڽÀ´Ï±î? g_InterfaceManager.GetInterfaceString(3969, format_string); Snprintf(result_string, INTERFACE_STRING_LENGTH-1, format_string, equip_name_string, prediction_name_string); GlobalFunc::ConfirmMessage(result_string, 0, Callback_SendPacketItemEvolutionSyn); } void uiEquipmentEvolutionDialog::Callback_SendPacketItemEvolutionSyn( uiSystemMessage::ButtonIndex button_index ) { uiEquipmentEvolutionDialog* dialog = GET_CAST_DIALOG(uiEquipmentEvolutionDialog, IM_EQUIPMENT_EVOLUTION_MANAGER::EQUIPMENT_EVOLUTION_DIALOG); if ( dialog ) { dialog->SendPacketItemEvolutionSyn(button_index == uiSystemMessage::kConfirm_Button); } } void uiEquipmentEvolutionDialog::SendPacketItemEvolutionSyn( const bool& is_send_packet ) { if ( is_send_packet == false ) { return; } if (!BIT_CHECK(m_packetStatus, PACKET_STATUS_EVOLUTION)) { MSG_CG_ITEM_EVOLUTION_SYN packet; packet.equip_item_pos = equip_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_EVOLUTION ); } } } void uiEquipmentEvolutionDialog::RemoveBitCheck() { if ( BIT_CHECK(m_packetStatus, PACKET_STATUS_EVOLUTION) ) { BIT_REMOVE( m_packetStatus, PACKET_STATUS_EVOLUTION ); } } void uiEquipmentEvolutionDialog::ResetEvolutionDialog() { InitEquipmentEvolutionSlotContainer(); EvolutionResultClear(); RemoveBitCheck(); } void uiEquipmentEvolutionDialog::UpdateFtextRenderRectSetting() { RECT rc = {0, }; CControlWZ* ctl = getControl(kControl_Text_S008); if ( ctl ) { rc = ctl->GetSizeRect(); description_ftext_render_[0].SetRect(rc); } ctl = getControl(kControl_Text_S002); if ( ctl ) { rc = ctl->GetSizeRect(); description_ftext_render_[1].SetRect(rc); } ctl = getControl(kControl_Text_S003); if ( ctl ) { rc = ctl->GetSizeRect(); description_ftext_render_[2].SetRect(rc); } } void uiEquipmentEvolutionDialog::ResultCodeSoundProc( const RC::eITEM_RESULT& result_code ) { eUI_SOUND_INDEX index = UI_SOUND_DEFAULT_CLICK; if ( result_code == RC::RC_EQUIPMENT_EVOLUTION_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 uiEquipmentEvolutionDialog::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, 6009); } } #endif // _NA_008121_20150318_EQUIPMENT_EVOLUTION_SYSTEM