#include "SunClientPrecompiledHeader.h" #ifdef _NA_002935_20110704_ITEM_SCORE #include "OtherPlayerEquipmentContainer.h" #include "ItemUnitRenderer.h" #include "ObjectManager.h" #include "EnduranceDialog.h" #include "InterfaceManager.h" #include "Hero.h" #include "InventoryDialog.h" #include "GlobalFunc.h" #include "AppearanceManager.h" #include "uiToolTipMan/uiToolTipMan.h" #include "MouseHandler.h" #include "Mouse.h" #include "CursorChangeTransact.h" #include "ItemScoreParser.h" OtherPlayerEquipmentContainer::OtherPlayerEquipmentContainer(InterfaceManager* ui_manager) : uiBase(ui_manager), item_unit_renderer_(NULL) { } OtherPlayerEquipmentContainer::~OtherPlayerEquipmentContainer() { Release(); } VOID OtherPlayerEquipmentContainer::Release() { SAFE_RELEASENDELETE(item_unit_renderer_); } VOID OtherPlayerEquipmentContainer::Init(CDrawBase* draw_base) { uiBase::Init(draw_base); is_pc_room_to_target_ = false; item_score_ = 0; InitItemRender(); } VOID OtherPlayerEquipmentContainer::OnShowWindow( BOOL val ) { if (val) { keyMsg msg; ZeroMemory(&msg,sizeof(msg)); msg.dwType=eDoType_OtherPlayerEquipment_Dialog; msg.wParam= IM_INVENTORY_MANAGER::OTHER_PLAYER_EQUIP_DLG; msg.DoSomething=OtherPlayerEquipmentContainer::ESCKeyProcess; g_KeyQueueManager.PushBack(msg); } else { //±âÁ¸ ½½·Ô Áö¿ò FlushUnitDraw(); g_KeyQueueManager.DeleteMsg(eDoType_OtherPlayerEquipment_Dialog); } } VOID OtherPlayerEquipmentContainer::OnRenderSolarDialog() { if (item_unit_renderer_ && g_InterfaceManager.IsShowDialog(IM_INVENTORY_MANAGER::OTHER_PLAYER_EQUIP_DLG)) { item_unit_renderer_->Render(); } //ij¸¯ÅÍ Ãâ·Â Object* target_object = g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY); Player* player = static_cast(target_object); if (player != NULL) { RECT rect_size; CControlWZ *control_pointer = getControl(EQUIP_CHARACTER_VIEW); if (control_pointer) { rect_size = control_pointer->GetSizeRect(); } else { GetDialogWZ()->GetClientRect(&rect_size); } int rect_width = rect_size.right - rect_size.left; int rect_height = rect_size.bottom - rect_size.top; float mesh_width = 1.0f; float mesh_height = 1.0f; // ij¸¯ÅÍÀÇ Å°¸¦ ±¸Çغ¸·Á Çϳª ¹«½¼ÁþÀ»Çصµ ¼Ò¿ëÀ̾ø¾ú´Ù. if (player->GetBasePart()) { WzBoundingVolume bounding_volume = player->GetBasePart()->GetBoundingVolume(); switch(bounding_volume.m_eBvType) { case BVT_AABB: mesh_height = bounding_volume.m_aabb.m_wvMax.y - bounding_volume.m_aabb.m_wvMin.y; mesh_width = bounding_volume.m_aabb.m_wvMax.x - bounding_volume.m_aabb.m_wvMin.x; break; case BVT_SPHERE: mesh_height = (bounding_volume.m_BvSphere.m_wvCenter.z + bounding_volume.m_BvSphere.m_fRadius) * 1.2f; mesh_width = bounding_volume.m_BvSphere.m_fRadius; break; } } // ÇöÀç BoundingBox¸¦ ±¸ÇÒ¼ö¾ø¾î ij¸¯ÅÍÀÇ Å°¸¦ ±¸ÇÒ¼ö¾ø´õ. // ij¸¯ÅÍÀÇ Å°¸¦ ÇϵåÄÚµùÇÑ´Ù. switch(player->GetClass()) { case eCHAR_BERSERKER: mesh_height = 2.0f; mesh_width = 1.2f; break; case eCHAR_DRAGON: mesh_height = 1.8f; mesh_width = 1.2f; break; case eCHAR_VALKYRIE: mesh_height = 1.7f; mesh_width = 1.0f; break; case eCHAR_SHADOW: mesh_height = 1.7f; mesh_width = 1.0f; break; case eCHAR_MAGICIAN: mesh_height = 1.7f; mesh_width = 1.0f; break; case eCHAR_MYSTIC: //_NA_004965_20120613_NEW_CHARACTER_MYSTIC mesh_height = 1.7f; mesh_width = 1.0f; break; case eCHAR_HELLROID: //_NA_000000_20130812_NEW_CHARACTER_HELLROID mesh_height = 1.7f; mesh_width = 1.0f; break; case eCHAR_WITCHBLADE: //_NA_007514_20140828_NEW_CHARACTER_WITCHBLADE mesh_height = 1.7f; mesh_width = 1.0f; break; } if(player->IsTransForm())//º¯½Å ÁßÀ϶§ { mesh_height = 2.2f; mesh_width = 1.2f; } //º¯½ÅÀÌ Ç®·ÈÁö¸¸ ¾ÆÁ÷ ij¸¯ÅÍ·Î º¹¿øµÇÁö ¾Ê¾ÒÀ»¶§ if((player->IsTransForm() == FALSE) && (player->GetTransformData().GetTransFormProcessType() != TRANSFORM_PROCESS_NONE) && (player->GetTransformData().GetOldTransFormType())) { mesh_height = 2.2f; mesh_width = 1.2f; } // ºäÆ÷Æ®´Â ¹Ýµå½Ã g_InterfaceManager.CalcuateViewPortWithRect·Î »ý¼ºÇؾßÇÔ RECT rect_viewport; rect_viewport = g_InterfaceManager.CalcuateViewPortWithRect(rect_size); player->SetShow(TRUE); g_InterfaceManager.RenderObjectOnRect(player,rect_viewport,mesh_width,mesh_height); player->SetShow(FALSE); } //¾ÆÀÌÅÛ ÆòÁ¡À» Ãâ·ÂÇÑ´Ù. DrawItemScore(); if ( this->m_MouseOverObject.eMouseOverType != eMOUSE_OVER_MAX) { if ( eMOUSE_OVER_SLOT == m_MouseOverObject.eMouseOverType ) { uiToolTipMan* ui_manager = GET_DIALOG_MANAGER(uiToolTipMan, UIMAN_TOOLTIP); if(ui_manager != NULL) { if (is_pc_room_to_target_ == true) { ui_manager->RegisterTooltipItem(m_MouseOverObject.pSlot, FALSE, kItemOtherEquipPcRoomEnable); //LimitStatCompositeTypeÀ» ¸Å°³º¯¼öÀÇ ¿ëµµ·Î »ç¿ëÇÑ´Ù. ui_manager->SetTooltipDialogID(GetDialogKey()); } else { ui_manager->RegisterTooltipItem(m_MouseOverObject.pSlot, FALSE, kItemOtherEquipPcRoomDisable); //LimitStatCompositeTypeÀ» ¸Å°³º¯¼öÀÇ ¿ëµµ·Î »ç¿ëÇÑ´Ù. ui_manager->SetTooltipDialogID(GetDialogKey()); } if( GetAsyncKeyState( VK_CONTROL ) & 0x8000 ) { uiToolTipMan* ui_manager2 = (uiToolTipMan*)g_InterfaceManager.GetUserInterfaceManager(UIMAN_TOOLTIP2); if(ui_manager2) { ui_manager2->RegisterHeroItemInfoTooltipFromSlot(m_MouseOverObject.pSlot); } } } MouseHandler::MOUSE_STATE mouse_state = MouseHandler::Instance()->GetMouseState(); if(MouseHandler::GUILD_WITHDRAW != mouse_state && MouseHandler::GUILD_DEPOSIT != mouse_state && MouseHandler::WITHDRAW != mouse_state && MouseHandler::DEPOSIT != mouse_state) { CursorChangeTransact::Instance()->ChangeTranaction( MouseCursor::eMouseCursor_Cursor_Cancle); } } } int mouse_x = Mouse::Instance()->GetMouseX(); int mouse_y = Mouse::Instance()->GetMouseY(); // ½ºÅµÃ³¸® // ÀÎÅÍÆäÀ̽º¿¡¼­ Dialog ¹ÙÅÁ¿¡¼­´Â Mouse Over°¡ ¿ÀÁö ¾Ê´Â´Ù. BOOL mouse_over = FALSE; for (POSTYPE position = EQUIP_SLOT_START; position < EQUIP_SLOT_END; ++position) { CControlWZ * control = getControl(position); if (control == NULL) { continue; } RECT rect = control->GetSizeRect(); if (rect.left <= mouse_x && rect.right >= mouse_x) { if (rect.top <= mouse_y && rect.bottom >= mouse_y) { mouse_over = TRUE; } } } #ifdef _NA_000000_20130114_RENEWER_UI #else for (POSTYPE pos = EQUIP_SCORE_START; pos < EQUIP_SCORE_END; ++pos) { CControlWZ* control = getControl(pos); if (control == NULL) { continue; } RECT rect = control->GetSizeRect(); if (rect.left <= mouse_x && rect.right >= mouse_x) { if (rect.top <= mouse_y && rect.bottom >= mouse_y) { mouse_over = TRUE; } } } #endif//#ifdef _NA_000000_20130114_RENEWER_UI if (mouse_over == NULL) { m_MouseOverObject.eMouseOverType = eMOUSE_OVER_MAX; } else { RenderTooltip(GetDialogKey()); } } void OtherPlayerEquipmentContainer::DrawItemScore() { #ifdef _NA_000000_20130114_RENEWER_UI CControlWZ* title_control = getControl(EQUIP_TXT_TITLE); if ( title_control== NULL ) { return; } item_score_ = item_score_ > 99999 ? 99999 : item_score_; //ÇöÀç ½ºÆ®¸µID¸¦ ¹Þ¾Æ¿Â´Ù. DWORD TextID= title_control->GetTextID(); TCHAR notice_message[INTERFACE_STRING_LENGTH]; memset(notice_message,0,sizeof(TCHAR)*INTERFACE_STRING_LENGTH); //ÀåºñÆòÁ¡Àº ÃÖ´ë 99999ÀÓ. TCHAR notice_Score[6]; sprintf(notice_Score,"%d",item_score_); g_InterfaceManager.GetInterfaceStringFormat(notice_message,INTERFACE_STRING_LENGTH, TextID,notice_Score); title_control->SetTextWZA(notice_message); #else CControlWZ* number_control = getControl(EQUIP_SCORE_NUMBER1); if (number_control) { RECT first_position = number_control->GetSizeRect(); g_InterfaceManager.RenderDrawItemScore(first_position, item_score_); } #endif//#ifdef _NA_000000_20130114_RENEWER_UI } VOID OtherPlayerEquipmentContainer::MessageProc(SI_MESSAGE* message_pointer) { switch(message_pointer->eResultMsg) { case RT_MSG_LBUTTONCLICK: { POSTYPE position = getCtrlIDToPos(message_pointer->dwCtrlID); if (position == EQUIP_EXIT) { ShowInterface(FALSE); } } break; default: { SolarDialog::MessageProc(message_pointer); } break; } } VOID OtherPlayerEquipmentContainer::MouseOver_MsgProc(SI_MESSAGE* message_pointer) { switch(message_pointer->eResultMsg) { case RT_MSG_MOUSEOVER: { POSTYPE position = getCtrlIDToPos(message_pointer->dwCtrlID); if (EQUIP_SLOT_START <= position && EQUIP_SLOT_END > position) { POSTYPE relative_pos = GetRealSlotPos(position); if (relative_pos >= GetMaxSlotNum()) { // À߸øµÈ ½½·Ô À§Ä¡¸¦ ÂüÁ¶ÇÒ·Á°íÇÑ´Ù ¸®ÅÏ. return; } if (IsEmpty(relative_pos) == FALSE) { m_iTooltipStringCode = 0; SCSlot & slot = GetSlot(relative_pos); m_MouseOverObject.eMouseOverType = eMOUSE_OVER_SLOT; m_MouseOverObject.pSlot = &slot; } else { m_iTooltipStringCode = getTooltipString(position); m_MouseOverObject.eMouseOverType = eMOUSE_OVER_MAX; } } #ifdef _NA_002935_20110704_ITEM_SCORE #ifdef _NA_000000_20130114_RENEWER_UI #else else if ((EQUIP_SCORE_START <= position) && (EQUIP_SCORE_END > position)) { // 11478 : Àåºñ ÆòÁ¡ m_iTooltipStringCode = 11478; m_MouseOverObject.eMouseOverType = eMOUSE_OVER_MAX; } #endif//#ifdef _NA_000000_20130114_RENEWER_UI #endif //_NA_002935_20110704_ITEM_SCORE else { m_iTooltipStringCode = 0; m_MouseOverObject.eMouseOverType = eMOUSE_OVER_MAX; } } break; } } RC::eSLOT_INSERT_RESULT OtherPlayerEquipmentContainer::InsertSlot(POSTYPE position, SCSlot& slot) { RC::eSLOT_INSERT_RESULT insert_slot_result = EquipmentContainer::InsertSlot(position, slot); if (insert_slot_result != RC::RC_INSERT_SLOT_SUCCESS) { return insert_slot_result; } // 3D ¸ðµ¨¸µ Render CControlWZ* ctrl_pointer = getControl(position); RECT rect = ctrl_pointer->GetSizeRect(); SCSlot& real_slot = GetSlot(position); if(item_unit_renderer_) { item_unit_renderer_->AddItemUnit( real_slot.GetSerial(), real_slot.GetCode(), &rect, &real_slot, ctrl_pointer); } else { assert(item_unit_renderer_); } Player* player = static_cast(g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY)); if (player) { SCSlotContainer* slot_container = player->GetSlotContainer(SI_EQUIPMENT); if (slot_container) { slot_container->InsertSlot(position,slot); } } return insert_slot_result; } BOOL OtherPlayerEquipmentContainer::DeleteSlot(POSTYPE position, SCSlot* slot_out) { // render unit ¸¦ ¸ÕÀú Áö¿î´Ù. SCSlot& slot = GetSlot(position); if(item_unit_renderer_) { item_unit_renderer_->RemoveItemUnit(slot.GetSerial()); } else { assert(item_unit_renderer_); } // ½Ã¸®¾ó Restore´Â EquipmentContainer ¿¡¼­ ÇÑ´Ù. EquipmentContainer::DeleteSlot(position, slot_out); Player* player = static_cast(g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY)); if (player) { SCSlotContainer *slot_container = player->GetSlotContainer(SI_EQUIPMENT); if (slot_container) { slot_container->DeleteSlot(position, NULL); } } return TRUE; } VOID OtherPlayerEquipmentContainer::ReFreshRenderSlot() { ItemUnitRenderer::RenderUnit* render_unit = NULL; RECT slot_rect; CControlWZ* ctrl_pointer = NULL; for (int i = 0; i < GetMaxSlotNum(); ++i) { SCSlot& slot = SCSlotContainer::GetSlot(i); if (slot.GetSerial()) { if ((i >= m_TabNum) && (i < m_TabNum + EQUIP_SLOT_END)) { // º¸¿©Áà¾ßÇÒ ¸ñ·Ï if(item_unit_renderer_ == NULL) { continue; } render_unit = item_unit_renderer_->GetItemUnit(slot.GetSerial()); if (render_unit == NULL) { ctrl_pointer = getControl(GetRelativeSlotPos(i)); slot_rect = ctrl_pointer->GetSizeRect(); item_unit_renderer_->AddItemUnit( slot.GetSerial(), slot.GetCode(), &slot_rect, &slot, ctrl_pointer); } if (render_unit) { render_unit->SetShow(TRUE); } } } } } VOID OtherPlayerEquipmentContainer::FlushUnitDraw() { if (item_unit_renderer_ == NULL) { return; } for (int i = 0; i < GetMaxSlotNum(); ++i) { if(IsEmpty(i) == FALSE) { DeleteSlot(i, NULL); } } } VOID OtherPlayerEquipmentContainer::InitItemRender() { if (item_unit_renderer_ == NULL) { item_unit_renderer_ = new ItemUnitRenderer; item_unit_renderer_->Init(uiBase::GetDrawBase(), GetMaxSlotNum()); } } VOID OtherPlayerEquipmentContainer::SetEquipmentContainer(Player* player) { if (player == NULL) { return; } //´ë»óÀÌ pc¹æÀÎÁö¸¦ ÀúÀåÇØµÒ is_pc_room_to_target_ = !!(player->GetPCBangMode()); #ifdef _NA_000000_20130114_RENEWER_UI #else //â Á¦¸ñ¿¡ ¾ÆÀ̵ð Ç¥½Ã CControlWZ* title_control = getControl(EQUIP_TXT_TITLE); if (title_control) { title_control->SetTextWZ(player->GetName()); } #endif//#ifdef _NA_000000_20130114_RENEWER_UI Object* object_pointer = g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY); Player* other_player = static_cast(object_pointer); if (other_player == NULL) { //â ³»ÀÇ Ä³¸¯ÅÍ »ý¼º DWORD class_code = player->GetClass(); ClassCodeEx class_code_ex; class_code_ex.class_type = player->GetClass(); class_code_ex.gender = player->GetGender(); class_code = class_code_ex.class_code; other_player = static_cast(g_ObjectManager.Add( OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY, PLAYER_OBJECT, class_code, FALSE)); } else { if(other_player->IsTransForm())//º¯½Å ÁßÀ϶§ { UnTransForm(player); } APPEARANCEINFO parts_info; ZeroMemory(&parts_info, sizeof(parts_info)); other_player->SetClass(player->GetClass()); other_player->SetGender(player->GetGender()); //ÆÄÃ÷ °»½Å (»À´ë±îÁö) other_player->RefreshAppearRender(TRUE); } //ij½¬ ½½·Ô ¼³Á¤ ChargeItemExtendSlot(player->GetCharInfo()->m_ExtraEquipCashSlotCount); //ij¸¯ÅÍ ¸ð½À ¼³Á¤ if (other_player != NULL) { WzVector vec_camera_from, vec_camera_to, m_wvZ; SetVector(&vec_camera_from, 0.0, 0.0, 0.0); SetVector(&vec_camera_to, 0.0, 100.0, 0.0); SetVector(&m_wvZ, 0.0, 0.0, 1.0); other_player->SetDirection(vec_camera_from, vec_camera_to,TRUE); WzVector pos; pos.x = 0.0f; pos.y = 0.0f; pos.z = -100.0f; other_player->SetPosition(pos); CLIENT_CHARACTER_PART part; ZeroMemory(&part,sizeof(part)); part.m_byClass = player->GetClass(); part.m_bySlot =0; other_player->SetClientChar(part); other_player->SetAnimation("N002", TRUE); other_player->SetColor(WzColor_RGBA(255,255,255,255)); other_player->SetShow(TRUE); //Á÷Á¢ ±×¸±°ÍÀÓ other_player->SetFreeMove(TRUE); other_player->ProcessAnimation(0); other_player->SetPartVariation( PLAYER_VARIATION_FACE, player->GetPartVariation(PLAYER_VARIATION_FACE) ); other_player->SetPartVariation( PLAYER_VARIATION_HAIR, player->GetPartVariation(PLAYER_VARIATION_HAIR) ); other_player->HideHelmet(player->IsHideHelmet(),FALSE); #ifdef _NA_000000_20120420_EQUIPMENTS_VISIBLE_WING other_player->HideWing(player->IsHideWing(),FALSE); #endif//_NA_000000_20120420_EQUIPMENTS_VISIBLE_WING #ifdef _NA_008185_20150402_COSTUME_ITEM_FOR_NPC other_player->SetCostumeItemCode( player->GetCostumeItemCode() ); #endif//_NA_008185_20150402_COSTUME_ITEM_FOR_NPC #ifdef _NA_008633_20160104_ADD_DECORATECOSTUME other_player->SetDecorateCostumeItemCode( player->GetDecorateCostumeItemCode() ); #endif // _NA_008633_20160104_ADD_DECORATECOSTUME EQUIP_ITEM_INFO out; player->GetEquipItemTotalInfo(out); other_player->SetEquipItemTotalInfo(out); if(player->IsTransForm())//º¯½Å ÁßÀ϶§ { TransForm(player); } other_player->RefreshAppearRender(); other_player->SetShow(FALSE); other_player->SetShadowDraw(FALSE); } if (IsVisibleWindow() == TRUE) { //±âÁ¸ ½½·Ô Áö¿ò FlushUnitDraw(); } EquipmentContainer* equipment_container = player->GetEquipmentContainer(); if (equipment_container != NULL) { //Á¡¼ö ³Ö±â item_score_ = player->GetItemScore(); //½½·Ô ³Ö±â for (POSTYPE index = 0; index < equipment_container->GetMaxSlotNum(); ++index) { SCSlot& slot = equipment_container->GetSlot(index); if (slot.GetCode() > 0) { InsertSlot(index, slot); } } ReFreshRenderSlot(); } } void OtherPlayerEquipmentContainer::ESCKeyProcess(DWORD wparam,DWORD lparam) { OtherPlayerEquipmentContainer* dialog = GET_CAST_DIALOG(OtherPlayerEquipmentContainer, IM_INVENTORY_MANAGER::OTHER_PLAYER_EQUIP_DLG); if (dialog) { dialog->ShowInterface(FALSE); } } void OtherPlayerEquipmentContainer::TransForm(Player* player) { Object* target_object = g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY); Player* dialog_player = static_cast(target_object); if(dialog_player && player) { dialog_player->GetTransformData().SetTransFormResourceCode(player->GetTransformData().GetTransFormResourceCode()); dialog_player->GetTransformData().SetTransFormType(player->GetTransformData().GetTransFormType()); dialog_player->GetTransformData().SetTransFormProcessType(TRANSFORM_PROCESS_TRANSFORM); dialog_player->GetTransformData().SetAppearanceKind(player->GetTransformData().GetAppearanceKind()); dialog_player->TransForm(); dialog_player->SetAnimation("N002", TRUE); } } void OtherPlayerEquipmentContainer::UnTransForm(Player* player) { Object* target_object = g_ObjectManager.GetObject(OTHER_PLAYER_EQUIPMENT_CHARACTER_KEY); Player* dialog_player = static_cast(target_object); if(dialog_player && player) { //°­Á¦·Î º¯½Å ÇØÁ¦ dialog_player->GetTransformData().SetTransFormType(eTRANSFORM_TYPE_NONE); dialog_player->GetTransformData().SetAppearanceKind(APPEARANCEINFO::PLAYER); dialog_player->GetTransformData().SetTransFormProcessType(TRANSFORM_PROCESS_UNTRANSFORM); dialog_player->UnTransForm(); dialog_player->GetTransformData().SetTransFormProcessType(TRANSFORM_PROCESS_NONE); dialog_player->SetAnimation("N002", TRUE); } } CControlWZ* OtherPlayerEquipmentContainer::getControl(POSTYPE at_pos) { assert(at_pos < EQUIP_MAX); return GetControlWZ(m_wzId[at_pos]); } VOID OtherPlayerEquipmentContainer::getControlPos(POSTYPE at_pos, RECT& rect_out) { CControlWZ* control = getControl(at_pos); rect_out = control->GetSizeRect(); } VOID OtherPlayerEquipmentContainer::ChargeItemExtendSlot(int extend_count) { // »ó´ë¹æÀÇ Ä³½¬ È®Àå ½½·Ô Á¤º¸¸¦ º¸À̵µ·Ï ¼³Á¤ÇÑ´Ù. (ÄÁÅÙÃ÷¿¡ ¿µÇâÀÌ ¾ø°í Á¶±ÝÀÌ¶óµµ ¼­¹öÀÇ ºÎÇϸ¦ ÁÙÀ̱â À§ÇÔ) extend_count = 2; CCtrlButtonWZ* charge_slot4 = static_cast(getControl(EQUIP_CHARGE4)); CCtrlButtonWZ* charge_slot5 = static_cast(getControl(EQUIP_CHARGE5)); if( !charge_slot4 || !charge_slot5 ) return; charge_slot4->EnableWindowWZ(FALSE); charge_slot5->EnableWindowWZ(FALSE); charge_slot4->ShowWindowWZ(WZ_HIDE); charge_slot5->ShowWindowWZ(WZ_HIDE); CControlWZ* charge_image4 = getControl(EQUIP_PIC_CHARGE4); assert(charge_image4); CControlWZ* charge_image5 = getControl(EQUIP_PIC_CHARGE5); assert(charge_image5); if( !charge_image4 || !charge_image5) return; charge_image4->ShowWindowWZ(WZ_HIDE); charge_image5->ShowWindowWZ(WZ_HIDE); if( extend_count >= 1) { charge_slot4->EnableWindowWZ(TRUE); charge_slot4->ShowWindowWZ(WZ_SHOW); charge_image4->ShowWindowWZ(WZ_SHOW); } if( extend_count >= 2) { charge_slot5->EnableWindowWZ(TRUE); charge_slot5->ShowWindowWZ(WZ_SHOW); charge_image5->ShowWindowWZ(WZ_SHOW); } } #endif //_NA_002935_20110704_ITEM_SCORE