no one fixes this anyway #closed
thanks for your thread, but how about this how can i fix this?Quote:
Well, since it was leaked and no reason to sell it anymore cause dem leechers, I shall release some small fixes.
First of all, thanks to Meher for leaking some of my edits thinking it'd hurt the server which he was fired at.
V19 Proplang
If you dont switch the fonts to the new style, you will have to do what I did in iTheme for Secret room and Guild stuff or else you'll crash when the text comes up. Happens because the font would be null
Langman.cpp
Langman.hCode:BOOL CLangMan::Load( LPCTSTR lpszFileName ) { CScanner s; if (!s.Load(lpszFileName, TRUE)) { return FALSE; } DWORD dwLang = s.GetNumber(); DWORD a, r, g, b; while (s.tok != FINISHED) { if (dwLang > LANG_MAX) { break; } PLANG_DATA pData = &m_aLangData[dwLang]; s.GetToken(); s.GetToken(); //path lstrcpy(pData->szPath, s.token); s.GetToken(); s.GetToken(); //szFileName lstrcpy(pData->szFileName, s.token); s.GetToken(); //szTitle lstrcpy(pData->szTitle, s.token); s.GetToken(); s.GetToken(); //szFontFirst lstrcpy(pData->font.lfCaption.szFontFirst, s.token); s.GetToken(); s.GetToken(); s.GetToken(); //szFontSecond lstrcpy(pData->font.lfCaption.szFontSecond, s.token); s.GetToken(); pData->font.lfCaption.nDivTitle = s.GetNumber(); // nDivTitle pData->font.lfCaption.nDivCaption = s.GetNumber(); // nDivCaption pData->font.fdLang.charset = s.GetNumber(); // charset pData->font.fdLang.wCodePage = s.GetNumber(); // wCodePage s.GetToken(); s.GetToken(); lstrcpy(pData->font.fdLang.faceNT, s.token); //faceNT s.GetToken(); s.GetToken(); s.GetToken(); lstrcpy(pData->font.fdLang.face9x, s.token); //face9x s.GetToken(); #ifdef __V19_FILE_FORMAT int nFontcount = s.GetNumber(); for (int i = 0; i < nFontcount; ++i) { //Font s.GetToken(); s.GetToken(); lstrcpy(pData->font.afi[i].szFont, s.token); s.GetToken(); //Size pData->font.afi[i].nSize = s.GetNumber(); //Color a = s.GetNumber(); r = s.GetNumber(); g = s.GetNumber(); b = s.GetNumber(); pData->font.afi[i].dwColor = D3DCOLOR_ARGB(a, r, g, b); a = s.GetNumber(); r = s.GetNumber(); g = s.GetNumber(); b = s.GetNumber(); pData->font.afi[i].dwBgColor = D3DCOLOR_ARGB(a, r, g, b); //outline pData->font.afi[i].nOutLine = s.GetNumber(); //flags pData->font.afi[i].dwFlags = s.GetNumber(); } #else /*old*/ s.GetToken(); s.GetToken(); //szFont0 lstrcpy(pData->font.afi[0].szFont, s.token); s.GetToken(); s.GetToken(); s.GetToken(); // szFont1 lstrcpy(pData->font.afi[1].szFont, s.token); s.GetToken(); s.GetToken(); s.GetToken(); // szFont2 lstrcpy(pData->font.afi[2].szFont, s.token); s.GetToken(); s.GetToken(); s.GetToken(); // szFont3 lstrcpy(pData->font.afi[3].szFont, s.token); s.GetToken(); a = s.GetNumber(); // dwBgColor3_a r = s.GetNumber(); // dwBgColor3_r g = s.GetNumber(); // dwBgColor3_g b = s.GetNumber(); // dwBgColor3_b pData->font.afi[3].dwBgColor = D3DCOLOR_ARGB(a, r, g, b); pData->font.afi[3].nOutLine = s.GetNumber(); // nOutLine3 pData->font.afi[3].dwFlags = s.GetNumber(); // dwFlags3 s.GetToken(); s.GetToken(); // szFont4 lstrcpy(pData->font.afi[4].szFont, s.token); s.GetToken(); a = s.GetNumber(); // dwBgColor4_a r = s.GetNumber(); // dwBgColor4_r g = s.GetNumber(); // dwBgColor4_g b = s.GetNumber(); // dwBgColor4_b pData->font.afi[4].dwBgColor = D3DCOLOR_ARGB(a, r, g, b); pData->font.afi[4].nOutLine = s.GetNumber(); // nOutLine4 pData->font.afi[4].dwFlags = s.GetNumber(); // dwFlags4 s.GetToken(); s.GetToken(); // szFont5 lstrcpy(pData->font.afi[5].szFont, s.token); s.GetToken(); a = s.GetNumber(); // dwBgColor5_a r = s.GetNumber(); // dwBgColor5_r g = s.GetNumber(); // dwBgColor5_g b = s.GetNumber(); // dwBgColor5_b pData->font.afi[5].dwBgColor = D3DCOLOR_ARGB(a, r, g, b); pData->font.afi[5].nOutLine = s.GetNumber(); // nOutLine5 pData->font.afi[5].dwFlags = s.GetNumber(); // dwFlags5 //#ifdef __NO_SUB_LANG s.GetNumber(); // dwFontSize //#endif // __NO_SUB_LANG dwLang = s.GetNumber(); // dwLang #endif dwLang = s.GetNumber(); } return TRUE; }
Code:typedef struct _FONT_INFO { TCHAR szFont[32]; DWORD dwColor; DWORD dwBgColor; DWORD nOutLine; DWORD dwFlags; #ifdef __V19_FILE_FORMAT short nSize; #endif } FONT_INFO; typedef struct _NEUZFONT { LANGFONT lfCaption; //caption FONT_DATA fdLang; //language #ifdef __V19_FILE_FORMAT FONT_INFO afi[10]; //"gulim9", "gulim8", "gulim13", "Arial Black9", "FontWorld", "gulim20" #else FONT_INFO afi[6]; #endif } NEUZFONT;
CTheme::LoadTheme
itheme.hCode:#ifdef __V19_FILE_FORMAT CString szwew; FONT_INFO wew; for (int i = 0; i < 10; ++i) { szwew.Format("font%d", i); wew = pLangData->font.afi[i]; pFont = new CD3DFont(wew.szFont, wew.nSize); pFont->m_dwColor = wew.dwColor; pFont->m_dwBgColor = wew.dwBgColor; pFont->m_nOutLine = wew.nOutLine; pFont->m_dwFlags = wew.dwFlags; m_mapFont.SetAt(szwew, pFont); } #else pFont = new CD3DFont( pLangData->font.afi[0].szFont, 9 ); pFont->m_dwColor = 0xffffffff; m_mapFont.SetAt( _T( "gulim9"), pFont ); pFont = new CD3DFont( pLangData->font.afi[1].szFont, 8 ); m_mapFont.SetAt( _T( "gulim8"), pFont ); pFont = new CD3DFont( pLangData->font.afi[2].szFont, 13 ); m_mapFont.SetAt( _T( "gulim13"), pFont ); pFont = new CD3DFont( pLangData->font.afi[3].szFont, 9); pFont->m_nOutLine = pLangData->font.afi[3].nOutLine; pFont->m_dwColor = 0xffffffff; pFont->m_dwBgColor = pLangData->font.afi[3].dwBgColor; m_mapFont.SetAt( _T( "Arial Black9"), pFont ); pFont = new CD3DFont( pLangData->font.afi[4].szFont, 9); pFont->m_nOutLine = pLangData->font.afi[4].nOutLine; pFont->m_dwColor = 0xffffffff; pFont->m_dwBgColor = pLangData->font.afi[4].dwBgColor; m_mapFont.SetAt( _T( "FontWorld"), pFont ); pFont = new CD3DFont( pLangData->font.afi[5].szFont, 15 ); pFont->m_nOutLine = pLangData->font.afi[5].nOutLine; pFont->m_dwColor = 0xffffffff; pFont->m_dwBgColor = pLangData->font.afi[5].dwBgColor; pFont->m_dwFlags = pLangData->font.afi[5].dwFlags; m_mapFont.SetAt( _T( "gulim20"), pFont ); #if __VER >= 12 // __SECRET_ROOM pFont = new CD3DFont( pLangData->font.afi[2].szFont, 11, D3DFONT_BOLD ); pFont->m_nOutLine = 1; m_mapFont.SetAt( _T( "gulim11"), pFont ); pFont = new CD3DFont( pLangData->font.afi[2].szFont, 9, D3DFONT_BOLD ); pFont->m_nOutLine = 1; m_mapFont.SetAt( _T( "gulim9_2"), pFont ); #endif //__SECRET_ROOM #endif #ifdef __V19_FILE_FORMAT for (int i = 0; i < 10; ++i) { szwew.Format("font%d", i); m_mapFont.Lookup(szwew, (void*&)m_pFonts[i]); //Temp fix before changing all the fonts. if (i == 4) { m_mapFont.Lookup(szwew, (void*&)m_pFontWorld); } //fontworld if (i == 5) { m_mapFont.Lookup(szwew, (void*&)m_pFontCaption); }//FontCaption } #else m_mapFont.Lookup( _T("FontWorld"), (void*&)m_pFontWorld ); m_mapFont.Lookup( _T("gulim20"), (void*&)m_pFontCaption ); m_mapFont.Lookup( _T("gulim13"), (void*&)m_pFontGuildCombatText ); #if __VER >= 12 // __SECRET_ROOM m_mapFont.Lookup( _T("gulim11"), (void*&)m_pFontSRMyGiuld ); m_mapFont.Lookup( _T("gulim9_2"), (void*&)m_pFontSRGiuld ); #endif //__SECRET_ROOM #endif
Code:#ifdef __V19_FILE_FORMAT CD3DFont* m_pFonts[10]; #endif
Taskbar + Actionslot
CUserTaskBar::SetNextSkill( CUser *pUser )
CWndTaskBar_HUD::Process()Code:if( m_nUsedSkillQueue == 0 ) { if( m_tmCoolDown > clock() ) { OnEndSkillQueue(pUser); return 0; } if (pUser->IsSMMode(SM_ACTPOINT)) { m_tmCoolDown = clock() + SEC(9); } else { m_tmCoolDown = clock() + SEC(18); } }
CWndNewSkillSlot::OnLButtonUpCode:if (g_bKeyTable[VK_OEM_3]) // ~ to scroll like retail { g_bKeyTable[VK_OEM_3] = 0; ScrollTaskBars(); }
addCode:if (PtInRect(SlotCustom->rect, point)) { if (clock() < m_tmCoolDown || m_bStopCoolDown) { return; } if (g_WndMng.m_pWndTaskBar->m_nExecute == 0) { if ((g_WndMng.m_pWndTaskBar->m_nUsedSkillQueue == 0) && (m_nActionSlot > 0)) { g_WndMng.m_pWndWorld->m_dwNextSkill = NEXTSKILL_ACTIONSLOT; } } }
CWndNewSkillSlot::OnDropIconCode:void CWndNewSkillSlot::OnRButtonDown( UINT nFlags, CPoint point) { SlotCustom = GetWndCtrl(WIDC_CUSTOM1); LPSHORTCUT pShortcut = NULL; CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y); CT_Rect[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34); CT_Rect[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34); CT_Rect[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34); CT_Rect[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34); CT_Rect[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34); CT_Rect[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34); for (int i = 0; i < 6; i++) { if (SlotCustom->rect.PtInRect(point)) { &CWndBase::OnRButtonDown; } if (PtInRect(CT_Rect[i], point)) { CRect rect = CT_Rect[i]; ClientToScreen(&point); ClientToScreen(&rect); m_pSelectShortcut = m_pSlotQueue[i]; SetCapture(); } } } void CWndNewSkillSlot::OnRButtonUp(UINT nFlags, CPoint point ) { //may bug out if (m_pSelectShortcut != NULL) { if (m_pSelectShortcut->m_dwShortcut == SHORTCUT_SKILL) { g_WndMng.m_pWndTaskBar->RemoveSkillQueue(m_pSlotQueue[m_pSelectShortcut->m_dwIndex]->m_dwIndex); m_pSelectShortcut = m_pSlotQueue[0]; } } ReleaseCapture(); } void CWndNewSkillSlot::OnRButtonDblClk(UINT nFlags, CPoint point) { for (int i = 0; i < 6; i++) { g_WndMng.m_pWndTaskBar->RemoveSkillQueue(m_pSlotQueue[i]->m_dwIndex); } }
CWndTaskBarInterface::OnLButtonUpCode://lpShortcut->Empty(); < remove
WndTaskBarInterface::ProcessCode:if( pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() && pShortcut->m_dwData != 2 ) { if (pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN) { CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT); if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown) { return; } else { if (g_WndMng.m_pWndTaskBar->m_nExecute == 0) g_WndMng.ObjectExecutor(pShortcut); } } g_WndMng.ObjectExecutor( pShortcut ); }
WndTaskBarInterface::ProcessCode:CWndRegVend* pWndRegVend = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_SELL); CWndRegVend* pWndVendorBuy = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_BUY); if (pWndRegVend || pWndVendorBuy) { return CWndBase::Process(); }
Skill cooldown time fixCode:} if (m_pSlotItem[i]->m_dwShortcut == SHORTCUT_SKILLFUN) { CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT); if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown) { return CWndBase::Process(); } if (g_WndMng.m_pWndTaskBar->m_nExecute != 0) { return CWndBase::Process(); } }
CWndTaskBarInterface : public CWndNeuzCode:void CWndTaskBarInterface::OnDraw(C2DRender* p2DRender) { if (IsValidObj(g_pPlayer)) { CPoint point; DWORD dwCur = g_tmCurrent; if (m_GlobalShortcut.IsEmpty() == FALSE) { for (int i = 0; i < MAX_SLOT_ITEM; i++) { DWORD dwColor = D3DCOLOR_ARGB(15, 20, 0, 200); CRect Rectskill = wndCtrl[i]->rect; switch (m_GlobalShortcut.m_dwShortcut) { case SHORTCUT_APPLET: case SHORTCUT_ITEM: case SHORTCUT_MOTION: p2DRender->RenderFillRect(Rectskill, dwColor); p2DRender->RenderFillRect(Rectskill, dwColor); break; case SHORTCUT_SKILL: if (m_GlobalShortcut.m_dwType == 0) { DWORD dwSkill = g_pPlayer->GetSkill(0, m_GlobalShortcut.m_dwId)->dwSkill; DWORD dwComboStyleSrc = prj.GetSkillProp(dwSkill)->dwComboStyle; if (dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL) p2DRender->RenderFillRect(Rectskill, dwColor); p2DRender->RenderFillRect(Rectskill, dwColor); } else p2DRender->RenderFillRect(Rectskill, dwColor); break; case SHORTCUT_SKILLFUN: p2DRender->RenderFillRect(Rectskill, dwColor); break; } } } for (int i = 0; i < MAX_SLOT_ITEM; i++) { if (!m_bCtrlVisible[i]) continue; point = CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top); LPSHORTCUT lpShortcut = m_pSlotItem[i]; if (!lpShortcut->IsEmpty()) { if (lpShortcut->m_pTexture) p2DRender->RenderTexture(point, lpShortcut->m_pTexture); if (lpShortcut->m_dwShortcut == SHORTCUT_ITEM) { CItemBase* pItemBase = g_pPlayer->GetItemId(lpShortcut->m_dwId); CItemElem* pItemElem = (CItemElem*)pItemBase; if (pItemElem) { if (pItemElem->GetProp()->dwPackMax > 1) { CD3DFont* pOldFont = p2DRender->GetFont(); p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndNewTitle1); TCHAR szTemp[32]; _stprintf(szTemp, "%d", g_pPlayer ? g_pPlayer->m_Inventory.GetItemCount(pItemElem->m_dwItemId) : 0); CSize size = m_p2DRender->m_pFont->GetTextExtent(szTemp); p2DRender->TextOut(point.x + 31 - size.cx, point.y + 31 - size.cy + 4, szTemp, 0xFFEAC117); p2DRender->SetFont(pOldFont); // p2DRender->TextOut(point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xAA3364AC); } DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup(pItemElem->GetProp()); if (dwGroup) { DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime(dwGroup); // À̺¥Æ® Á¾·á ½Ã°¢ if (dwEnd != 0 && dwEnd > dwCur) { DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase(dwGroup); // À̺¥Æ® ½ÃÀÛ ½Ã°¢ RenderRadar(p2DRender, point, dwCur - dwBase, dwEnd - dwBase); } } } else { ItemProp* pItemProp = prj.GetItemProp(lpShortcut->m_dwItemId); if (pItemProp && pItemProp->dwPackMax > 1) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é? { DWORD dwId = g_pPlayer->m_Inventory.Find(lpShortcut->m_dwItemId); if (dwId != NULL_ID) // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é? { lpShortcut->m_dwId = dwId; g_DPlay.SendAddAppletTaskBar(i, lpShortcut); } else { lpShortcut->Empty(); g_DPlay.SendRemoveAppletTaskBar(i); } } else { lpShortcut->Empty(); g_DPlay.SendRemoveAppletTaskBar(i); } } } else if (lpShortcut->m_dwShortcut == SHORTCUT_APPLET) { AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc(lpShortcut->m_dwId); if (pAppletFunc && pAppletFunc->m_cHotkey) { CPoint ptHotkey(point.x + 8, point.y - 9); DRAW_HOTKEY(p2DRender, ptHotkey, pAppletFunc->m_cHotkey); } } else if (lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù. { RenderCollTime(point, lpShortcut->m_dwId, p2DRender); } #if __VER >= 12 // __LORD else if (lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL) { RenderLordCollTime(point, lpShortcut->m_dwId, p2DRender); } #endif else if (lpShortcut->m_dwShortcut == SHORTCUT_MOTION) { if (lpShortcut->m_dwId == MOT_BASE_ESCAPE) { ItemProp* pItem = prj.GetItemProp(g_AddSMMode.dwSMItemID[SM_ESCAPE]); if (pItem && g_pPlayer) { CTimeSpan ct(g_pPlayer->m_dwSMTime[SM_ESCAPE]); if (ct.GetTotalSeconds()) { point.y -= 1; point.x += 1; RenderRadar(m_p2DRender, point, (DWORD)(pItem->dwCircleTime - ct.GetTotalSeconds()), pItem->dwCircleTime); } } } } else if (lpShortcut->m_dwShortcut == SHORTCUT_SKILLFUN) { CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT); if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown) { // float fPercent = (float)dwValue / (float)dwDivisor; // int nDrawIndex = (fPercent * 127); // dwvalue * 127 / dwValue m_SkillSL->m_tmStartCoolDown // m_SkillSL->m_tmCoolDown (18) * 127 RenderRadar(m_p2DRender, point, DWORD(m_SkillSL->m_tmCoolDown), m_SkillSL->m_tmStartCoolDown); } } } } } for (int i = 0; i < 10; i++) { if (!m_bCtrlVisible[i]) continue; if (slot1[i] != NULL) { slot1[i]->Render(p2DRender, CPoint(wndCtrl[i]->rect.left - 3, wndCtrl[i]->rect.top - 3)); } if ((m_USEFIRE[i] != NULL) && (!m_pSlotItem[i]->IsEmpty())) { m_USEFIRE[i]->Render(p2DRender, CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top), m_USEFireALPHA[i]); } } }
CWndNewSkillSlot : public CWndNeuzCode:#if __VER >= 12 // __LORD void RenderLordCollTime(CPoint pt, DWORD dwSkillId, C2DRender* p2DRender); #endif
CDPClient::OnUseSkillCode:virtual void OnRButtonUp(UINT nFlags, CPoint point); virtual void OnRButtonDown(UINT nFlags, CPoint point); virtual void OnRButtonDblClk(UINT nFlags, CPoint point);
Code:if( clock() > m_SkillSL->m_tmCoolDown ) { if (pMover->IsSMMode(SM_ACTPOINT)) { m_SkillSL->m_tmCoolDown = clock() + SEC(9); } else { m_SkillSL->m_tmCoolDown = clock() + SEC(18); } m_SkillSL->m_tmStartCoolDown = clock(); m_SkillSL->RotateCoolDownEffect = 0; }
Navigator -> Uses __NAV_FIX defines
Limits Navigator size to the proper flyff size.
CWndBase::WindowProc
CWndNavigator::CWndNavigator()Code:if(m_nResizeDir #ifdef __NAV_FIX && GetWndId() != APP_NAVIGATOR #endif )
CWndNavigator::OnInitialUpdate()Code:innerRect = CRect(15, 15, 145, 145);
CWndNavigator::InitializeCode:AddWndStyle(WBS_NODRAWFRAME); m_wndPlace.Create("", 0, CRect(rectClient.left + 22, 14, rectClient.left + 40, 32), this, 100000); //P m_wndZoomIn.Create("", 0, CRect(rectClient.left + 1, 105, rectClient.left + 21, 123), this, 100005); //+ // 110 m_wndZoomOut.Create("", 0, CRect(rectClient.left + 10, 120, rectClient.left + 28, 139), this, 100006); //- m_wndClose.Create("", 0, CRect(rectClient.left + 125, 14, rectClient.left + 143, 32), this, 100007); //X m_wndHelp.Create("", 0, CRect(rectClient.left + 140, 28, rectClient.left + 158, 46), this, WTBID_HELP); //? pTexturebg = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "alphacircle.tga"), 0xffff00ff, TRUE);//alpha mask texture pTexback = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "map.tga"), 0xffff00ff, TRUE);//background
Code:CRect rectWindow = m_pWndRoot->GetWindowRect(); CRect rect(0, 0, 162, 182); m_texNavObjs.LoadScript(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "Navigator.inc")); m_texArrow.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "ImgNavArrow.bmp"), 0xffff00ff); m_texNavPos.LoadScript(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "NavPosition.inc")); ZeroMemory(&m_billboard, sizeof(m_billboard)); m_billboard.rect.SetRect(0, 0, m_texArrow.m_size.cx, m_texArrow.m_size.cy); m_billboard.ptCenter = CPoint(m_texArrow.m_size.cx / 2, m_texArrow.m_size.cy / 2); m_billArrow.InitDeviceObjects(g_Neuz.m_pd3dDevice, &m_billboard, &m_texArrow); m_billArrow.RestoreDeviceObjects(); m_GuildCombatTextureMask.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_WORLD_GUILDCOMBAT, "WdGuildWar_Mask.dds"), 0); CRect nRectz = m_rectClient; CPoint pPointz = (nRectz.right - (rect.right + 30), nRectz.top); SetTitle("Navigator"); return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), dwWndId, 0, /*CPoint(780, 130)*/ pPointz, pWndParent);CWndNeuz::InitDialogCode:#ifndef __MAP_V19 //Shouldnt resize void CWndNavigator::SetWndRect(CRect rectWnd, BOOL bOnSize) { AdjustMinRect(&rectWnd, 16 * 6, 16 * 7); AdjustMaxRect(&rectWnd, 16 * 12, 16 * 13); CWndNeuz::SetWndRect(rectWnd, bOnSize); } in .h #ifndef __MAP_V19 virtual void SetWndRect( CRect rectWnd, BOOL bOnSize = TRUE ); #endif #endif
CWndNeuz::OnSetCursorCode:#ifdef __NAV_FIX if (dwWID == APP_NAVIGATOR) rect = CRect(ptLeftTop.x, ptLeftTop.y, ptLeftTop.x + 162, ptLeftTop.y + 182); #endif
Code:{ #ifdef __NAV_FIX if (GetWndId() != APP_NAVIGATOR) #endif {
Chat Resize Fix for v19
CWndChat::SetWndRect
Code:AdjustMinRect(&rectWnd, 16 * 18, 16 * 3);
Market with AddMenu_Teleport
Uses the new Character_inc params, AddMenu_teleport and ForceMenu
BOOL CMover::DoUseSkill
CWndWorld::OnCommandCode:#ifdef __MARKET if (pWorld && pWorld->GetID() == WI_WORLD_MARKET) { ((CUser*)this)->AddDefinedText(TID_GAME_NEVERKILLSTOP); return FALSE; } #endif
CWndWorld::ShowMoverMenuCode:#ifdef __MARKET #ifndef __V19_FILE_FORMAT case MMI_MARKETJOIN: g_DPlay.SendHdr( PACKETTYPE_MARKET_ENTER ); break; case MMI_MARKETEXIT: g_DPlay.SendHdr( PACKETTYPE_MARKET_EXIT ); break; #else case MMI_MARKETJOIN: g_DPlay.SendMMITeleport(pFocusMover->m_szCharacterKey, MMI_MARKETJOIN); break; case MMI_MARKETEXIT: g_DPlay.SendMMITeleport(pFocusMover->m_szCharacterKey, MMI_MARKETEXIT); break; #endif #endif //__MARKET
DpClient.cppCode:#ifdef __V19_FILE_FORMAT if( 1 < nCount || lpCharacter->ForceMenu == true) #else if( 1 < nCount) #endif
DpClient.hCode:#ifdef __V19_FILE_FORMAT void CDPClient::SendMMITeleport(TCHAR* wew, DWORD MMI) { BEFORESENDSOLE(ar, PACKETTYPE_MMITELEPORT, DPID_UNKNOWN); ar.WriteString(wew); ar << MMI; SEND(ar, this, DPID_SERVERPLAYER); } #endif
DpSrvr.cppCode:#ifdef __V19_FILE_FORMAT void SendMMITeleport(TCHAR* wew, DWORD MMI); #endif
CDPSrvr::OnPVendorOpenCode:#ifdef __V19_FILE_FORMAT ON_MSG(PACKETTYPE_MMITELEPORT, &CDPSrvr::OnMMITeleport); #endif
DpSrvr.cppCode:#ifdef __MARKET if (pUser->GetWorld() && pUser->GetWorld()->GetID() != WI_WORLD_MARKET) { pUser->AddDefinedText(TID_GAME_FAIL_TO_OPEN_SHOP); return; } #endif //__MARKET
CHARACTER::Clear()Code:#ifdef __V19_FILE_FORMAT void CDPSrvr::OnMMITeleport(CAr &ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long) { CUser* pUser = g_UserMng.GetUser(dpidCache, dpidUser); if (IsValidObj(pUser)) { TCHAR wew[32]; ar.ReadString(wew, 32); DWORD mmi; ar >> mmi; LPCHARACTER lpChar = prj.GetCharacter(wew); if (lpChar) { if (!CNpcChecker::GetInstance()->IsCloseNpc(mmi, pUser->GetWorld(), pUser->GetPos())) { return; } MenuTeleportData p; bool isTele = false; for (std::vector<MenuTeleportData>::iterator it = lpChar->menuTeleport.begin(); it != lpChar->menuTeleport.end(); ++it) { if (it->dwMMI == mmi) { p.dwMMI = mmi; p.vTelePos = it->vTelePos; p.dwId = it->dwId; isTele = true; } } if (isTele) { pUser->REPLACE(g_uIdofMulti, p.dwId, p.vTelePos, REPLACE_NORMAL, nDefaultLayer); } } } } #endif
CProject::LoadCharacter( LPCTSTR szFileName )Code:#ifdef __V19_FILE_FORMAT menuTeleport.clear(); ForceMenu = false; #endif
Project.hCode:#ifdef __V19_FILE_FORMAT else if (script.Token == "AddMenu_Teleport") { MenuTeleportData p; script.GetToken(); int nMMI = script.GetNumber(); lpCharacter->m_abMoverMenu[nMMI] = TRUE; p.dwMMI = nMMI; script.GetToken(); p.dwId = script.GetNumber();; script.GetToken(); D3DXVECTOR3 vPos(0.0f, 0.0f, 0.0f); vPos.x = script.GetFloat(); script.GetToken(); vPos.z = script.GetFloat(); p.vTelePos = vPos; script.GetToken(); lpCharacter->menuTeleport.push_back(p); } else if (script.Token == "SetForceMenu") { lpCharacter->ForceMenu = true; } #endif
typedef struct tagCHARACTERCode:#ifdef __V19_FILE_FORMAT struct MenuTeleportData{ DWORD dwMMI; DWORD dwId; D3DXVECTOR3 vTelePos; }; #endif
Code:#ifdef __V19_FILE_FORMAT std::vector<MenuTeleportData> menuTeleport; bool ForceMenu; #endif
TargetInformation
Changed so it opens from AppletFunc so it stores the user's location in the regdata. What needs to be done is a chat fix.
CWorld::SetObjFocus( CObj* pObj, BOOL bSend )
FuncAppletCode:if( g_WndMng.GetWndBase( APP_TARGETINFORNATION ) && g_WndMng.m_pWndMonInfo->m_pMover != pMoverTarget ) { g_WndMng.m_pWndMonInfo = (CWndMonsterInformation*)g_WndMng.CreateApplet(APP_TARGETINFORNATION); g_WndMng.m_pWndMonInfo->SetMonster(pMoverTarget); } else if( g_WndMng.GetWndBase( APP_TARGETINFORNATION ) == NULL ) { g_WndMng.m_pWndMonInfo = (CWndMonsterInformation*)g_WndMng.CreateApplet(APP_TARGETINFORNATION); g_WndMng.m_pWndMonInfo->SetMonster(pMoverTarget); }
CWndMgr::AddAllApplet()Code:#include "WndMonsterInformation.h" DECLAREAPPLET(AppMain_WndMonInfo, new CWndMonsterInformation);
Code:AddAppletFunc(AppMain_WndMonInfo, APP_TARGETINFORNATION, _T("WndMonInfo"), _T("Icon_Navigator.dds"), GETTEXT(TID_TIP_NAVIGATOR), 0);
WndMonsterInformation.cpp
WndMonsterinformation.hCode:#include "WndMonsterInformation.h" #include "stdafx.h" #include "resData.h" #include "DPClient.h" #include "WndManager.h" #include "defineText.h" extern CDPClient g_DPlay; CWndMonsterInformation::CWndMonsterInformation() { m_pMover = g_pPlayer; m_nHPWidth = -1; m_nMPWidth = -1; m_pVBHPGauge = NULL; m_pVBMPGauge = NULL; m_bVBHPGauge = TRUE; m_bVBMPGauge = TRUE; m_nDigit1 = 0; m_nDigit2 = 0; m_nDigit3 = 0; m_nType = 0; bIsAMonster = FALSE; } void CWndMonsterInformation::SetMonster(CMover* pMover) { m_pMover = pMover; std::string texture; if (pMover->IsPlayer() || pMover->IsPeaceful()) texture = "WndTargetInfornation02.tga"; else texture = "WndTargetInfornation.tga"; this->SetTexture(D3DDEVICE, MakePath(DIR_THEME, texture.c_str()), 1); SetTextures(); } CWndMonsterInformation::~CWndMonsterInformation() { DeleteDeviceObjects(); } void CWndMonsterInformation::SerializeRegInfo(CAr& ar, DWORD& dwVersion) { CWndNeuz::SerializeRegInfo(ar, dwVersion); if (ar.IsLoading()) { // if (dwVersion != 0) // ar >> m_size.cx >> m_size.cy; } else { dwVersion = 1; // ar << m_size.cx << m_size.cy; } } void CWndMonsterInformation::SetTextures() { if (m_pMover == NULL || m_pMover->IsDie() || m_pMover->IsDelete()) return; std::string job; if (m_pMover->IsPlayer()) { m_nType = 1; switch (m_pMover->GetJob()) { case JOB_VAGRANT: job = "JobVagrant.tga"; break; case JOB_MERCENARY: job = "JobMercenary.tga"; break; case JOB_ASSIST: job = "JobAssist.tga"; break; case JOB_MAGICIAN: job = "JobMagician.tga"; break; case JOB_ACROBAT: job = "JobAcrobat.tga"; break; case JOB_BLADE: job = "JobBlade.tga"; break; case JOB_KNIGHT: job = "JobKnight.tga"; break; case JOB_RINGMASTER: job = "JobRingmaster.tga"; break; case JOB_BILLPOSTER: job = "JobBillposter.tga"; break; case JOB_ELEMENTOR: job = "JobElementor.tga"; break; case JOB_PSYCHIKEEPER: job = "JobPsychikeeper.tga"; break; case JOB_RANGER: job = "JobRanger.tga"; break; case JOB_JESTER: job = "JobJester.tga"; break; case JOB_BLADE_MASTER: job = "JobBladeMaster.tga"; break; case JOB_KNIGHT_MASTER: job = "JobKnightMaster.tga"; break; case JOB_RINGMASTER_MASTER: job = "JobRingmasterMaster.tga"; break; case JOB_BILLPOSTER_MASTER: job = "JobBillposterMaster.tga"; break; case JOB_ELEMENTOR_MASTER: job = "JobElementorMaster.tga"; break; case JOB_PSYCHIKEEPER_MASTER: job = "JobPsychikeeperMaster.tga"; break; case JOB_RANGER_MASTER: job = "JobRangerMaster.tga"; break; case JOB_JESTER_MASTER: job = "JobJesterMaster.tga"; break; case JOB_BLADE_HERO: job = "JobBladeHero.tga"; break; case JOB_KNIGHT_HERO: job = "JobKnightHero.tga"; break; case JOB_RINGMASTER_HERO: job = "JobRingmasterHero.tga"; break; case JOB_BILLPOSTER_HERO: job = "JobBillposterHero.tga"; break; case JOB_ELEMENTOR_HERO: job = "JobElementorHero.tga"; break; case JOB_PSYCHIKEEPER_HERO: job = "JobPsychikeeperHero.tga"; break; case JOB_RANGER_HERO: job = "JobRangerHero.tga"; break; case JOB_JESTER_HERO: job = "JobJesterHero.tga"; break; case JOB_STORMBLADE_HERO: job = "JobStormbladeHero.tga"; break; case JOB_LORDTEMPLER_HERO: job = "JobLordTemplerHero.tga"; break; case JOB_FORCEMASTER_HERO: job = "JobForcemasterHero.tga"; break; case JOB_FLORIST_HERO: job = "JobFloristHero.tga"; break; case JOB_ELEMENTORLORD_HERO: job = "JobElementorlordHero.tga"; break; case JOB_MENTALIST_HERO: job = "JobMentalistHero.tga"; break; case JOB_WINDLURKER_HERO: job = "JobWindlurkerHero.tga"; break; case JOB_CRACKSHOOTER_HERO: job = "JobCrackshooterHero.tga"; break; } m_texFront.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, job.c_str()), 0xffff00ff, TRUE); } else if ((m_pMover->IsNPC() && m_pMover->IsPeaceful()) || m_pMover->GetProp()->dwClass == RANK_GUARD) { m_nType = 2; m_texFront.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "JobNPC.tga"), 0xffff00ff, TRUE); } else { m_nType = 3; switch (m_pMover->GetProp()->eElementType) { case SAI79::FIRE: job = "eElementTypeRed01.tga"; break; case SAI79::WATER: job = "eElementTypeBlue01.tga"; break; case SAI79::ELECTRICITY: job = "eElementTypeYellow01.tga"; break; case SAI79::WIND: job = "eElementTypeGreen01.tga"; break; case SAI79::EARTH: job = "eElementTypePurple01.tga"; break; default: job = "eElementTypeWhite01.tga"; break; } m_texBack.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, job.c_str()), 0xffff00ff, TRUE); //level int nLevel = m_pMover->GetProp()->dwLevel; if (nLevel > 99) { m_nDigit1 = nLevel / 100; nLevel %= 100; } if (nLevel > 9) { m_nDigit2 = nLevel / 10; nLevel %= 10; } m_nDigit3 = nLevel; CString str; if (m_nDigit1 != 0) { str.Format("TargetNum%d.tga", m_nDigit1); m_texDigit1.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, str.GetString()), 0xffff00ff, TRUE); } if (m_nDigit2 != 0 || m_nDigit1 != 0) { str.Format("TargetNum%d.tga", m_nDigit2); m_texDigit2.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, str.GetString()), 0xffff00ff, TRUE); } str.Format("TargetNum%d.tga", m_nDigit3); m_texDigit3.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, str.GetString()), 0xffff00ff, TRUE); //Minimages CString szFileName; switch (m_pMover->GetProp()->dwAreaColor) { case AREA_NORMAL: szFileName = "RanBlue"; break; case AREA_DUNGEON: szFileName = "RanRed"; break; case AREA_CASH: szFileName = "RanPurple"; break; case AREA_INSTANCE: szFileName = "RanRed"; break; default: szFileName = "RanBlue"; break; } CString szFile; szFile.Format("%s01.tga", szFileName); m_texDanger[0].LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, szFile.GetString()), 0xffff00ff, TRUE); szFile.Format("%s02.tga", szFileName); m_texDanger[1].LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, szFile.GetString()), 0xffff00ff, TRUE); szFile.Format("%s03.tga", szFileName); m_texDanger[2].LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, szFile.GetString()), 0xffff00ff, TRUE); m_nDangerNum = (m_pMover->GetProp()->dwClass > 6 || m_pMover->GetProp()->dwClass < 1 ? 1 : m_pMover->GetProp()->dwClass); } CWndStatic* pWndStatic1 = (CWndStatic*)GetDlgItem(WIDC_STATIC1); CWndStatic* pWndStatic2 = (CWndStatic*)GetDlgItem(WIDC_STATIC2); pWndStatic1->SetVisible(FALSE); pWndStatic2->SetVisible(FALSE); } void CWndMonsterInformation::OnInitialUpdate() { if (m_pMover == NULL || m_pMover->IsDie() || m_pMover->IsDelete()) return; CWndNeuz::OnInitialUpdate(); RestoreDeviceObjects(); m_texGauHp.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "Targetgauge01.tga"), 0xffff00ff, TRUE); m_texGauMp.LoadTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, "Targetgauge02.tga"), 0xffff00ff, TRUE); SetTextures(); CRect rectRoot = m_pWndRoot->GetLayoutRect(); CPoint point(rectRoot.left, rectRoot.top); Move(point); } void CWndMonsterInformation::OnDraw(C2DRender* p2DRender) { LPDIRECT3DDEVICE9 pd3dDevice = p2DRender->m_pd3dDevice; pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, TRUE); pd3dDevice->SetRenderState(D3DRS_ZENABLE, TRUE); pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW); pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); pd3dDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); pd3dDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_ARGB(255, 255, 255, 255)); if (m_pMover == NULL || m_pMover->IsDie() || m_pMover->IsDelete()) { return; } CRect rectBack; if (m_nType == 3) { rectBack = GetWndCtrl(WIDC_CUSTOM3)->rect; m_texBack.Render(p2DRender, CPoint(rectBack.left, rectBack.top), 255); } CRect rectM; if (m_nType == 3) rectM = GetWndCtrl(WIDC_CUSTOM4)->rect; else rectM = GetWndCtrl(WIDC_STATIC2)->rect; if (m_nType == 3) { int nRect[6] = { WIDC_CUSTOM10, WIDC_CUSTOM9, WIDC_CUSTOM8, WIDC_CUSTOM6, WIDC_CUSTOM5, WIDC_CUSTOM7 }; for (int i = 0; i<6; i++) { if (i >= m_nDangerNum) break; CRect rectRan = GetWndCtrl(nRect[i])->rect; if (i == 0 || i == 5) m_texDanger[0].Render(p2DRender, rectRan.TopLeft(), 255); else if (i == 1 || i == 4) m_texDanger[1].Render(p2DRender, rectRan.TopLeft(), 255); else m_texDanger[2].Render(p2DRender, rectRan.TopLeft(), 255); } int countDigits = 0; if (m_nDigit2 != 0 || m_nDigit1 != 0) countDigits++; if (m_nDigit1 != 0) countDigits++; CPoint tempPoint = CPoint(rectM.left + (rectM.Width() / 2), rectM.top + (rectM.Height() / 2) - (16 / 2)); if (countDigits == 2) { m_texDigit1.Render(p2DRender, CPoint(tempPoint.x - (10 / 2) - 10, tempPoint.y)); m_texDigit2.Render(p2DRender, CPoint(tempPoint.x - (10 / 2), tempPoint.y)); m_texDigit3.Render(p2DRender, CPoint(tempPoint.x - (10 / 2) + 10, tempPoint.y)); } else if (countDigits == 1) { m_texDigit2.Render(p2DRender, CPoint(tempPoint.x - (10), tempPoint.y)); m_texDigit3.Render(p2DRender, CPoint(tempPoint.x, tempPoint.y)); } else m_texDigit3.Render(p2DRender, CPoint(tempPoint.x - (10 / 2), tempPoint.y)); } else m_texFront.Render(p2DRender, CPoint(rectM.left, rectM.top), 255); CRect lpHP = GetWndCtrl(WIDC_CUSTOM1)->rect; CRect lpMP = GetWndCtrl(WIDC_CUSTOM2)->rect; if (m_pMover) { MakeGaugeVertex(); if (m_bVBHPGauge) m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBHPGauge, &m_texGauHp); if (m_bVBMPGauge) m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBMPGauge, &m_texGauMp); } if (lpHP.PtInRect(m_ptMouse)) { /* if (g_pPlayer->IsAuthHigher(AUTH_GAMEMASTER)) { CString strHP; CPoint ptCenter(lpHP.left + lpHP.Width() / 2, lpHP.top + lpHP.Height() / 2); strHP.Format("%d/%d", m_pMover->GetHitPoint(), m_pMover->GetMaxHitPoint()); CSize szText = p2DRender->m_pFont->GetTextExtent(strHP); ptCenter.x -= szText.cx / 2; ptCenter.y -= szText.cy / 2; p2DRender->TextOut(ptCenter.x, ptCenter.y, strHP); }*/ } CString szName; if (m_pMover->IsPlayer()) szName.Format("%s", m_pMover->GetName()); else { if (m_pMover->GetCharacter()) szName.Format("%s", m_pMover->GetCharacter()->m_strName); else szName.Format("%s", m_pMover->GetProp()->szName); } CSize sizeTitle = p2DRender->m_pFont->GetTextExtent(szName); CRect rectNAME = GetWindowRect(); CD3DFont* pOldFont = p2DRender->GetFont(); p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndNewTitle); DWORD dwColor = 0xffffffff; if (m_pMover->m_bActiveAttack) { dwColor = 0xffff0000; } p2DRender->TextOut(72, 6, szName, 0xffffffff); p2DRender->SetFont(pOldFont); } HRESULT CWndMonsterInformation::RestoreDeviceObjects() { CWndBase::RestoreDeviceObjects(); if (m_pVBHPGauge == NULL) { g_Neuz.m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2)* 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBHPGauge, NULL); g_Neuz.m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2)* 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBMPGauge, NULL); m_nHPWidth = -1; m_nMPWidth = -1; } m_texGauHp.SetInvalidate(g_Neuz.m_pd3dDevice); m_texGauMp.SetInvalidate(g_Neuz.m_pd3dDevice); return S_OK; } HRESULT CWndMonsterInformation::InvalidateDeviceObjects() { CWndBase::InvalidateDeviceObjects(); SAFE_RELEASE(m_pVBHPGauge); SAFE_RELEASE(m_pVBMPGauge); m_texGauHp.Invalidate(); m_texGauMp.Invalidate(); m_texBack.Invalidate(); m_texFront.Invalidate(); m_texDifficult.Invalidate(); m_texDigit1.Invalidate(); m_texDigit2.Invalidate(); m_texDigit3.Invalidate(); for (int i = 0; i<3; i++) m_texDanger[i].Invalidate(); return S_OK; } HRESULT CWndMonsterInformation::DeleteDeviceObjects() { CWndBase::DeleteDeviceObjects(); return InvalidateDeviceObjects(); } void CWndMonsterInformation::MakeGaugeVertex() { LPWNDCTRL lpHP = GetWndCtrl(WIDC_CUSTOM1); LPWNDCTRL lpMP = GetWndCtrl(WIDC_CUSTOM2); if (m_pMover) { CRect rectG = GetClientRect(); CRect rectTemp; int nWidthClient = lpHP->rect.Width(); int nWidth; // HP //m_pMover->GetHitPoint() nWidth = (int)((__int64)nWidthClient * (__int64)m_pMover->GetHitPoint() / (__int64)m_pMover->GetMaxHitPoint()); if (m_nHPWidth != nWidth) { m_nHPWidth = nWidth; rectG = lpHP->rect; rectTemp = rectG; rectTemp.right = rectTemp.left + nWidth; ClientToScreen(rectTemp); m_bVBHPGauge = m_pTheme->MakeGaugeVertex(g_Neuz.m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBHPGauge, &m_texGauHp); } if (m_pMover->IsPlayer()) nWidth = nWidthClient * m_pMover->GetManaPoint() / m_pMover->GetMaxManaPoint(); else nWidth = nWidthClient; if (m_nMPWidth != nWidth) { m_nMPWidth = nWidth; rectG = lpMP->rect; rectTemp = rectG; rectTemp.right = rectTemp.left + nWidth; ClientToScreen(rectTemp); m_bVBMPGauge = m_pTheme->MakeGaugeVertex(g_Neuz.m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBMPGauge, &m_texGauMp); } } } BOOL CWndMonsterInformation::Initialize(CWndBase* pWndParent, DWORD dwWndId) { return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_TARGETINFORNATION, (WBS_MOVE | WBS_SOUND));// , CPoint(0, 0), pWndParent); } void CWndMonsterInformation::OnSize(UINT nType, int cx, int cy) { CWndNeuz::OnSize(nType, cx, cy); } void CWndMonsterInformation::SetWndRect(CRect rectWnd, BOOL bOnSize) { m_nHPWidth = -1; m_nMPWidth = -1; CWndNeuz::SetWndRect(rectWnd, bOnSize); }
CWndNeuz::InitDialogCode:class CWndMonsterInformation : public CWndNeuz { public: CMover * m_pMover; CTexture* m_pTexPetStatusBg; CItemElem* m_pPetElem; int m_nType; int m_nHPWidth; int m_nMPWidth; BOOL bIsAMonster; CTexture* NPCTexture; CTexture* JobTexture; BOOL m_bVBHPGauge; BOOL m_bVBMPGauge; LPDIRECT3DVERTEXBUFFER9 m_pVBHPGauge; LPDIRECT3DVERTEXBUFFER9 m_pVBMPGauge; CTexture m_texGauHp; CTexture m_texGauMp; CTexture m_texBack; CTexture m_texBack2; CTexture m_texFront; CTexture m_texDifficult; int m_nDigit1; CTexture m_texDigit1; int m_nDigit2; CTexture m_texDigit2; int m_nDigit3; CTexture m_texDigit3; CTexture m_texDanger[3]; int m_nDangerNum; vector< multimap<DWORD, BUFFSKILL> > m_pBuffTexture; CWndMonsterInformation(); virtual ~CWndMonsterInformation(); virtual void SerializeRegInfo(CAr& ar, DWORD& dwVersion); virtual BOOL Initialize( CWndBase* pWndParent = NULL, DWORD dwWndId = MB_OK ); virtual void OnSize(UINT nType, int cx, int cy); virtual void OnInitialUpdate(); virtual void OnDraw( C2DRender* p2DRender ); virtual void SetWndRect( CRect rectWnd, BOOL bOnSize ); HRESULT RestoreDeviceObjects(); HRESULT InvalidateDeviceObjects(); HRESULT DeleteDeviceObjects(); void MakeGaugeVertex(); void SetTextures(); void SetMonster(CMover* pMover); };
Code:/* //Remove if( dwWID == APP_TARGETINFORNATION ) //v19 { CMover *pMover = ((CWndMonsterInformation*)this)->m_pMover; if( pMover->IsPlayer() || pMover->IsNPC() == pMover->IsPeaceful() || pMover->GetProp()->dwClass == RANK_GUARD ) lpWndApplet->strTexture = "WndTargetInfornation02.tga"; else lpWndApplet->strTexture = "WndTargetInfornation.tga"; }*/
Private Message Type Box
CWndMessage::OnDraw
Code:CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem(WIDC_EDIT); if (pWndEdit->m_wndScrollBar.GetScrollPos() != pWndEdit->m_wndScrollBar.GetMaxScrollPos()) pWndEdit->m_wndScrollBar.SetMaxScrollPos();
Party Text
SubLootDropMobParty
Code:CString wew; wew.Format("%s has received: %s", pGetUser->GetName(), pItemBase->GetProp()->szName); ((CUser*)pMember)->AddText(wew);