Fritt 5 Report post Posted April 15, 2020 (edited) Copying this Thread of @Angelix so we can Fix both Server / Client Source together ( CO Src ) Hello community of pkoDev, some time ago we got our hands on the source code for the game we love and have been creating unique stuff for years. Many (including myself) are completely useless when trying to build and make a functional application out of the Chinese sources so not many people were using them. Now, thanks to the Sheep Squad (KONG, Billy, Wrexor, Mii, Foxseiz & Snre3n), they have released the source code for the server-side applications and a client. We have to thank them for it, since this improves the community as a whole and now you start seeing a few servers popping up. While they're functional, there have been comments about them having some minor issues, which we as a community can come together to fix as a public source code. This thread is created thanks to KONG for giving the idea and is not to bring any other issue/dramas that showed up in the other thread. This thread's only purpose is to identify issues/improvements and share the code that can fix and/or improve the code, therefore: Anyone is allowed to post anything they might have found, even if they don't have an immediate fix for it. Anyone is allowed to contribute fixes to other people's issues and their own. Anyone is allowed to contribute improvements to existing code. If any issue fix and/or improvement is shared and you can make the code better, feel free to contribute! Note1: This thread is not about fixing the directories, missing files or compiling source code itself, that's explained on the original release thread. Note2: This is my first time doing a thread like this, so if I'm missing anything to add, let me know! So for as posting something, lets follow the example stated by KONG. For Bug Reports, follow this: Bug Title: Bug Description: How to replicate: Status (pending / close / open): Author (whoever that fixes it): For Architecture Improvements, follow: Title: Refactor to MVC design pattern Reason: scalability and maintainability Approach: For Game (Client-Side) Improvements, follow this: Title: Reason: Improve existing guild functions Approach: SQL table, Open-closed, etc Concerns: concurrency, race, etc For Server (Server-Side) Improvements, follow this: Title: Reason: Improve existing guild functions Approach: SQL table, Open-closed, etc Concerns: concurrency, race, etc Please try posting the actual fixes, if you can, try explaining what was done so the rest of people reading the thread can learn if they're interested. Avoid just posting the whole file like "here's the fixes inside my functions.lua" and posting your 20K line file, try posting just the fixes/changes. Edited April 16, 2020 by Fritt 1 Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 15, 2020 (edited) Clean list of the bug reports so you can directly go to the comment that you're interested in.Bug Reports and Status:Level Requirement on Trade Window / CLOSEDGuild Crashes Client / OPENHair NPC / Exchanger NPC Crash Client / CLOSEDItem Price on Invertory / CLOSED Guild Exp and Stats / OPEN Switch Item Flood Crashes all people Clients on the range / OPENCharacter Disappears when relogged / CLOSEDBank PIN Value / CLOSEDShip Upgrade / CLOSEDFlood buttons/exp/guild color/ addexpguild / OPENPet Skills / CLOSED Discord or Vip - there is no nickname in the message / CLOSEDMovement Bug / OPEN Edited June 23, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 15, 2020 (edited) Clean list of the architecture improvements so you can directly go to the comment that you're interested in. Architecture Improvements: Edited April 15, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 15, 2020 (edited) Clean list of the game improvements so you can directly go to the comment that you're interested in. Game Improvements: Edited April 15, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 15, 2020 (edited) Clean list of the Server improvements so you can directly go to the comment that you're interested in. Server-Side Improvements: Edited April 15, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 15, 2020 Bug Title: Level Requirement on Trade Window Bug Description: Missing Level Requirement until you purchase the item How to replicate: Visit any NPC that Sells Items and Hover your mouse into the item Status (pending / close / open): CLOSED Author (whoever that fixes it): Fritt Client Source - UIItemCommand.cpp Find: PUSH_HINT( g_oLangRec.GetString(628), _ItemData.sNeedLv, pAttr->get(ATTR_LV)>=_ItemData.sNeedLv ? GENERIC_COLOR : VALID_COLOR ); and replace with: sprintf( buf, g_oLangRec.GetString(628), _pItem->sNeedLv, pAttr->get(ATTR_LV)>=_pItem->sNeedLv ? GENERIC_COLOR : VALID_COLOR ); PushHint( buf, GENERIC_COLOR ); 1 Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted April 15, 2020 I suggest opening a repo. It is nice to diff the versions through commits. Also nice for some Continuous Integration (see Jenkins and CircleCI) and proper versioning of automated builds. It is good indicator to see how Dev builds and Prod builds are behaving Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 16, 2020 3 hours ago, Maridyri said: @Fritt, @KONG Hello friend! And the fact that the characters disappear after re-entering or exiting the game does not bother anyone? 13 hours ago, Fritt said: Note1: This thread is not about fixing the directories, missing files or compiling source code itself, that's explained on the original release thread. Lets keep this thread clean only for inside bugs. @KONG i can test those but idk how to make a repo, tho i think sharing fixes here on this way we all can see the fixed code when we replace and know how it works, if each developer contributes with atleast 1 fix we can have it fixed, so lets see if anyone will. Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 16, 2020 (edited) Bug Title: Guild Crashes Client Bug Description: Creating Guild Crashes Client or by Disband & Create How to replicate: Go to npc on icicle and try create a guild, once its done your client will crash, it even crashes when you disband an old guild and create a new one! Status: OPEN Author (whoever that fixes it): Edited April 16, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 16, 2020 Bug Title: Hair NPC / Exchanger NPC Crash Client Bug Description: Hair NPC / Exchanger NPC Crashes the client when hovering items How to replicate: Check Hair NPC and click around it and your client will crash, if you allow Exchanger NPC to hover items it will crash your client when you view those items! Status: OPEN Author (whoever that fixes it): Quote Share this post Link to post Share on other sites
JaR 7 Report post Posted April 16, 2020 17 hours ago, Fritt said: Bug Title: Level Requirement on Trade Window Bug Description: Missing Level Requirement until you purchase the item How to replicate: Visit any NPC that Sells Items and Hover your mouse into the item Status (pending / close / open): CLOSED Author (whoever that fixes it): Fritt Client Source - UIItemCommand.cpp Find: PUSH_HINT( g_oLangRec.GetString(628), _ItemData.sNeedLv, pAttr->get(ATTR_LV)>=_ItemData.sNeedLv ? GENERIC_COLOR : VALID_COLOR ); and replace with: sprintf( buf, g_oLangRec.GetString(628), _pItem->sNeedLv, pAttr->get(ATTR_LV)>=_pItem->sNeedLv ? GENERIC_COLOR : VALID_COLOR ); PushHint( buf, GENERIC_COLOR ); It's Work, but If your Character Level is below the item Level Requirement, the Text is not Red. So, just Copy from other Code. Find: PUSH_HINT( g_oLangRec.GetString(628), _ItemData.sNeedLv, pAttr->get(ATTR_LV)>=_ItemData.sNeedLv ? GENERIC_COLOR : VALID_COLOR ); then, Replace with: PUSH_HINT( g_oLangRec.GetString(628), _pItem->sNeedLv, pAttr->get(ATTR_LV)>=_pItem->sNeedLv ? GENERIC_COLOR : VALID_COLOR ); 1 1 Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 16, 2020 Bug Title: Item Price on Invertory Bug Description: Item Price on inventory is not divided by 2 which means it shows same Trade Value as you see at NPC How to replicate: Visit any npc and buy any item, the Trade Value of that item will be same even after you purchase it! Status: OPEN Author (whoever that fixes it): Quote Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted April 16, 2020 Bug Title: Item Price on Invertory Bug Description: Item Price on inventory is not divided by 2 which means it shows same Trade Value as you see at NPC How to replicate: Visit any npc and buy any item, the Trade Value of that item will be same even after you purchase it! Status: CLOSED Author (whoever that fixes it):.... open UIItemCommand.cpp and search for: sprintf( buf, g_oLangRec.GetString(674), StringSplitNum( isMain ? _nPrice / 2 : _nPrice ) ); replace with sprintf( buf, g_oLangRec.GetString(674), StringSplitNum( _ItemData.sNum != 0 ? _nPrice / 2 : _nPrice ) ); 1 1 Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 16, 2020 (edited) Bug Title: Switch item flood crashes all people clients on the range Bug Description: Switching Items can flood and will crashes all people clients on the range How to replicate: Stay near some players and Switch items using F-Skills for fast switches Status: OPEN Author (whoever that fixes it): Edited April 16, 2020 by Fritt Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 17, 2020 Bug Title: Hair NPC / Exchanger NPC Crash Client Bug Description: Hair NPC / Exchanger NPC Crashes the client when hovering items How to replicate: Check Hair NPC and click around it and your client will crash, if you allow Exchanger NPC to hover items it will crash your client when you view those items! Status: CLOSED Author: Fritt Open UIGuiData.cpp and search for: Quote CItemObj* pLastObj = NULL; DWORD dwLastObjColor = 0; bool CGuiData::SetHintItem( CItemObj* pObj ){ if( pObj && pObj->HasHint() ){ pLastObj = pObj; if(pObj->GetColor()!=4294901760){ dwLastObjColor = pObj->GetColor(); pObj->SetColor((DWORD)0xffaaaaaa); } _pHintItem = pObj; return true; } else { if(pLastObj && pLastObj->GetColor()!=4294901760) { pLastObj->SetColor(dwLastObjColor); pLastObj = NULL; } _pHintItem = NULL; return false; } } Replace it with: Quote bool CGuiData::SetHintItem(CItemObj* pObj) { if (pObj && pObj->HasHint()) { _pHintItem = pObj; return true; } else { _pHintItem = NULL; return false; } 1 Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 19, 2020 Bug Title: Guild Exp and Stats Bug Description: Guild exp and states on disband function do not reset in GroupServer How to replicate: Guild exp and States on disband function do not reset in groupserver , which is when create new guild will take old points of the disbanded guild Status: OPEN Author (whoever that fixes it): Quote Share this post Link to post Share on other sites
TaTaFernada 0 Report post Posted April 19, 2020 I'm having the following error on my client I'm not sure how but sometimes it crashes and gives me this error in the logs 04-17 19:08:29SC_ChaBeginSeeAccess Violation The thread attempted to read from or write to a virtual address for which it does not have the appropriate access (0) : MindPower3D_D8R.dll at MindPower::MPCharacter::MPCharacter() d:\stuff for sell\client src for sell\client\src\character.cpp(1337) : Game.exe at CCharacter::setGuildCircle() d:\stuff for sell\client src for sell\client\src\netprotocol.cpp(574) : Game.exe at stNetActorCreate::SetValue() d:\stuff for sell\client src for sell\client\src\netprotocol.cpp(638) : Game.exe at stNetActorCreate::CreateCha() d:\stuff for sell\client src for sell\client\src\packetcmd_sc.cpp(614) : Game.exe at SC_ChaBeginSee() d:\stuff for sell\client src for sell\client\src\netif.cpp(61) : Game.exe at NetIF::HandlePacketMessage() c:\corsairsonline\client\common\server\sdk\src\packetqueue.cpp(182) : Game.exe at dbc::PKQueue::PeekPacket() d:\stuff for sell\client src for sell\client\src\gameappinterface.cpp(204) : Game.exe at CGameApp::Run() d:\stuff for sell\client src for sell\client\src\main.cpp(465) : Game.exe at WinMain() f:\vs70builds\3077\vc\crtbld\crt\src\crt0.c(251) : Game.exe at WinMainCRTStartup() Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 20, 2020 @TaTaFernada Give us more info about how you getting crash, how to replicate that? Quote Share this post Link to post Share on other sites
JaR 7 Report post Posted April 20, 2020 @Halk did you get bug Character disappear? If yes, tell me how to fix it please Quote Share this post Link to post Share on other sites
Fritt 5 Report post Posted April 20, 2020 (edited) 1 hour ago, Halk said: @Fritt This is due to an error in the lua client files. Here is the proof What you showing here, has nothing to do with what i said above. Ex: increase stats of ur guild and go disband the guild, when you create the new guild with ur same account/char the stats will appear on the new guild aswell, they doesn't get reset! 2nd ex: when you create a guild the client crashes also when you disband and create a guild it crashes aswell! 1 hour ago, Halk said: But this is really a bug. I never had this problem, the problem is your client Crashes if you open it, also client crashes when you allow Hover into Exchanger NPC and when you go to view those the client crashes aswell. But this crashes is fixed with the code i sent above, its not the best code but it works. Edited April 20, 2020 by Fritt Quote Share this post Link to post Share on other sites
JaR 7 Report post Posted April 20, 2020 (edited) 1 hour ago, Halk said: But this is really a bug. You not have Hairstyling Voucher in your Inventory Edited April 20, 2020 by JaR Quote Share this post Link to post Share on other sites
Falonne 2 Report post Posted April 20, 2020 Normaly you cant even access to the function if you do not have the hair voucher. Quote Share this post Link to post Share on other sites
mkhzaleh 131 Report post Posted April 20, 2020 Quote CItemObj* pLastObj = NULL; DWORD dwLastObjColor = 0; bool CGuiData::SetHintItem( CItemObj* pObj ){ if( pObj && pObj->HasHint() ){ pLastObj = pObj; if(pObj->GetColor()!=4294901760){ dwLastObjColor = pObj->GetColor(); pObj->SetColor((DWORD)0xffaaaaaa); } _pHintItem = pObj; return true; } else { if(pLastObj && pLastObj->GetColor()!=4294901760) { pLastObj->SetColor(dwLastObjColor); pLastObj = NULL; } _pHintItem = NULL; return false; } } you guys didn't bother to read what missing in code just replaced to clean one lol this is the fix simply 3 Quote Share this post Link to post Share on other sites
1g0rS1lv4 68 Report post Posted April 21, 2020 I don't know if anyone else had this problem, after a while of online server, being giving error to create character, says that the nickname already exists but it does not exist in the database. I don't know how to replicate it happened to me a few times, at random times. Quote Being better than others is for those who are weak; what matters is to be true to yourself. Share this post Link to post Share on other sites
JaR 7 Report post Posted April 21, 2020 (edited) del Edited April 21, 2020 by JaR Quote Share this post Link to post Share on other sites