Jump to content
Forgot your email address? ×
×
×
  • Create New...

Helia01

Premium
  • Posts

    159
  • Joined

  • Last visited

  • Days Won

    8

Helia01 last won the day on September 18

Helia01 had the most liked content!

7 Followers

About Helia01

Informations

  • Gender
    Female
  • Country
    Russia
  • Nationality
    Russian

Recent Profile Visitors

2620 profile views

Helia01's Achievements

Rising Star

Rising Star (9/14)

  • Reacting Well
  • Very Popular Rare
  • Dedicated Rare
  • First Post
  • Collaborator

Recent Badges

527

Reputation

1

Community Answers

  1. It is better to do it where it is really necessary. For example, in the bonus viewing panel.
  2. 245411metin2-python3-helia01.png

     

    After 10 hours of work, we have python 3

  3. m_DamageQueue.remove_if([](CInstanceBase::SEffectDamage sed){ return ((CPythonCharacterManager::instance().IsDeadVID(sed.dwAttackerVID) || CPythonPlayer::Instance().NEW_GetMainActorPtr()->IsDead()) && (sed.flag != DAMAGE_POISON) && sed.bSelf); }); it's a good idea. It would be nice if you showed examples of how you would fix this problem. Perhaps your method will really be much better. A comparison is needed.
  4. This can happen if you update only the client version DevIL and forget to update the library on the server side.
  5. I tried to use the function int CPythonApplication::CheckDeviceState() { CGraphicDevice::EDeviceState e_deviceState = m_grpDevice.GetDeviceState(); switch (e_deviceState) { case CGraphicDevice::DEVICESTATE_NULL: return DEVICE_STATE_FALSE; case CGraphicDevice::DEVICESTATE_BROKEN: return DEVICE_STATE_SKIP; case CGraphicDevice::DEVICESTATE_NEEDS_RESET: // <-- Looks good? if (!m_grpDevice.Reset()) return DEVICE_STATE_SKIP; break; } return DEVICE_STATE_OK; } After resizing, the device does not return the DEVICESTATE_NEEDS_RESET status Then I tried to implement it in this stupid way. //UserInterface/PythonApplication.cpp bool CPythonApplication::ResetDevice() { return m_grpDevice.Reset(); } //UserInterface/PythonSystem.cpp void CPythonSystem::SetWidth(DWORD width) { m_Config.width = width; } void CPythonSystem::SetHeight(DWORD height) { m_Config.height = height; } //UserInterface/PythonApplicationEvent.cpp void CPythonApplication::OnSizeChange(int width, int height) { //Check change size... if (width > 0 && height > 0 && m_pySystem.GetWidth() != width && m_pySystem.GetHeight() != height) { TraceError("CPythonApplication::OnSizeChange(width: %d, height: %d)", width, height); bool reset_status = CPythonApplication::ResetDevice(); TraceError("reset_status: %d", reset_status); if (reset_status) { bool Windowed = CPythonSystem::Instance().IsWindowed() ? 1 : 0; m_pySystem.SetWidth(width); m_pySystem.SetHeight(height); //UI::CWindowManager::Instance().SetScreenSize(width, height); if (!CreateDevice(m_pySystem.GetWidth(), m_pySystem.GetHeight(), Windowed, m_pySystem.GetBPP(), m_pySystem.GetFrequency())) { TraceError("Error create device!"); return; } TraceError("CreateDevice success!"); } } } /* In syserr 0926 01:21:08609 :: CPythonApplication::OnSizeChange(width: 1079, height: 686) 0926 01:21:08609 :: reset_status: 1 0926 01:21:08854 :: CreateDevice success! */ Since I do not know how to do it correctly, I only know the minimal theory. I try a wide variety of ideas. Apparently, this is done much more difficult than we think... I get two possible options in my tests. 1. It is possible to reset the device and create a new one. (for example, in the login and password entry menu). Then I get just a black screen. 2. The device cannot be reset (directly in the game). Sorry if I'm writing some stupid code. (never worked with directx) I believe that it is better to try something at least than to ignore this topic.
  6. I want to make this game better, and I'm very glad that many people are also interested in it I hope even more people will respond to this post.
  7. Hi, m2dev! The game cannot change the screen resolution in real time (as is done in most new games). I started trying to implement this function, but I do not know how to change the screen resolution correctly. //UserInterface/PythonApplication.cpp //Original code. unsigned __GetWindowMode(bool windowed) { if (windowed) return WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; return WS_POPUP; } //Change code unsigned __GetWindowMode(bool windowed) { if (windowed) return WS_TILEDWINDOW; return WS_POPUP; } In fact, the developers of this game laid the foundation for changing the resolution in real time. This is understandable if you open the file: UserInterface/PythonApplicationProcedure.cpp and find the function: //UserInterface/PythonApplicationProcedure.cpp //seacrh function: LRESULT CPythonApplication::WindowProcedure(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam) //We should be interested in this section case WM_SIZE: switch (wParam) { case SIZE_RESTORED: case SIZE_MAXIMIZED: { RECT rcWnd; GetClientRect(&rcWnd); UINT uWidth=rcWnd.right-rcWnd.left; UINT uHeight=rcWnd.bottom-rcWnd.left; m_grpDevice.ResizeBackBuffer(uWidth, uHeight); } break; } if (wParam==SIZE_MINIMIZED) m_isMinimizedWnd=true; else m_isMinimizedWnd=false; OnSizeChange(short(LOWORD(lParam)), short(HIWORD(lParam))); break; case WM_EXITSIZEMOVE: { RECT rcWnd; GetClientRect(&rcWnd); UINT uWidth=rcWnd.right-rcWnd.left; UINT uHeight=rcWnd.bottom-rcWnd.left; m_grpDevice.ResizeBackBuffer(uWidth, uHeight); OnSizeChange(short(LOWORD(lParam)), short(HIWORD(lParam))); } break; //UserInterface/PythonApplicationEvent.cpp (We should be interested in the function: OnSizeChange) void CPythonApplication::OnSizeChange(int width, int height) { //Here it is necessary to implement a change in the size of GUI and etc... } If you leave everything in this form, then changing the screen resolution will be incorrect. The game will simply stretch the contents of the window to our screen resolution. This is not what it should be. It looks ugly. Please tell me how to properly handle the change in screen resolution in real time in the function: OnSizeChange?
  8. after adding this fix, you can analyze the sysser file by fail2ban + pf
  9. Russian hackers are to blame for everything (nope). This will not help in this situation.
  10. //EterLib/MSWindow.h //after void GetWindowRect(RECT* prc); //add this bool GetWindowRect(HWND hWnd, LPRECT lpRect); //EterLib/MSWindow.cpp //after void CMSWindow::GetWindowRect(RECT* prc) {...} //add this bool CMSWindow::GetWindowRect(HWND hWnd, LPRECT lpRect) { return ::GetWindowRect(hWnd, lpRect); } //UserInterface/PythonApplication.cpp //under unsigned __GetWindowMode(bool windowed) {...} //add this int CPythonApplication::getTaskBarHeight() { RECT rect{}; HWND taskBar = FindWindow("Shell_traywnd", NULL); if (taskBar && GetWindowRect(taskBar, &rect)) { return rect.bottom - rect.top; } } //now you can use this function int taskbarSize = getTaskBarHeight(); I have windows 10 The standard size of the taskbar is 40. Every time we raise the taskbar up, 41 is added. It works strangely. 40 81 122 163 204 etc...
  11. //open char_battle.cpp //In function void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead) search this: if (IsRevive() == false && HasReviverInParty() == true) { m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(3)); } else { m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(10)); } // replace with this: m_pkDeadEvent = event_create(dead_event, pEventInfo, bImmediateDead ? 1 : PASSES_PER_SEC(1)); And compare the result again. You can rewrite this part of the code as you want. I showed a quick and stupid example. However, this will fix your situation. I rewrote some of the code, now the code is more secure. // UserInterface/InstanceBaseEffect.cpp //Old version void CInstanceBase::ProcessRemoveOldDamage() { CInstanceBase * pMainInstance = CPythonPlayer::Instance().NEW_GetMainActorPtr(); std::list<SEffectDamage>::iterator it; for (it = m_DamageQueue.begin(); it != m_DamageQueue.end(); ++it) { if ((CPythonCharacterManager::instance().IsDeadVID(it->dwAttackerVID) || pMainInstance->IsDead()) && (it->flag != DAMAGE_POISON || it->flag != DAMAGE_BLEEDING || it->flag != DAMAGE_FIRE) && it->bSelf) { m_DamageQueue.erase(it); } } } //New version void CInstanceBase::ProcessRemoveOldDamage() { if (m_DamageQueue.empty()) return; m_DamageQueue.remove_if([](CInstanceBase::SEffectDamage sed){ return ((CPythonCharacterManager::instance().IsDeadVID(sed.dwAttackerVID) || CPythonPlayer::Instance().NEW_GetMainActorPtr()->IsDead()) && (sed.flag != DAMAGE_POISON || sed.flag != DAMAGE_BLEEDING || sed.flag != DAMAGE_FIRE) && sed.bSelf); }); } //In function void CInstanceBase::ProcessDamage() remove this CInstanceBase * pMainInstance = CPythonPlayer::Instance().NEW_GetMainActorPtr(); DWORD dwVictimVID = sDamage.dwVictimVID; DWORD dwAttackerVID = sDamage.dwAttackerVID; if ((CPythonCharacterManager::instance().IsDeadVID(dwAttackerVID) || pMainInstance->IsDead()) && (flag != DAMAGE_POISON || flag != DAMAGE_BLEEDING || flag != DAMAGE_FIRE) && bSelf) return; The tutorial has already been updated.
  12. i made small changes (now the removal of damage when your character died works correctly.)
  13. Hey m2dev You summon a lot of monsters, they attack your character and then you kill or purge monsters, but the damage still continues to be shown visually. Is this a familiar situation? In addition, the damage is shown visually even after the death of the character... I love this game. I haven't seen a fix for this problem, let's try to fix this sh.. [Hidden Content] I'm not saying that this is an ideal solution. If you have any ideas, please write comments. Best regards, Masha
  14. It is very important to know when your team members will get tired.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.