Beiträge von Ira™

    The archive contains only one header file(debug.hpp):

    So it's useless, and I didn't get the point why we need this.

    Like remix said, do you heard about debug logging?


    Just download the files again.


    • You can see the backtrace Live( You can see when the function it's called)
    • You can see real values of the function arguments/ it's much easy to debug
    • You don't need format aguments
    • Let's say you write a system, a complex system. You want to see when function X call function Y. See the real values send by packets.. You can add a DEBUG_TRACE print and evrything will be print intro putty console.


    Just read again the topic. For me is very usefull when debugging and developing new feaures.


    It's a live backtrace :)



    Instead of setting breakoints you can use the DEBUG_TRACE, and see the way of all codes. Directly in putty.
    PS:I have added a GIF.

    Hi, I was bored to always use sys_err when troubleshooting systems and problems.
    So I decided to write a printer




    METIN2_DEBUG_TRACE

    C: char.cpp
    1. void CHARACTER::Destroy()
    2. {
    3. METIN2_DEBUG_TRACE("CHARACTER::Destroy");


    When the Destroy function is called, DEBUG_TRACE will print that text intro the putty console.
    In this way you can see if your function is really called and when is called.

    • Debug_Trace can't have arguments


    METIN2_DEBUG_TRACE_ARGS

    C
    1. void CClientManager::SendShps(DWORD pid)
    2. {
    3. METIN2_DEBUG_TRACE_ARGS("CClientManager::SendShops", pid);
    • It's same as DEBUG_TRACE but you can add arguments.
    • This will print intro Putty console the CClientManager::SendShops and the pid number.


    METIN2_DEBUG_SAY


    C
    1. void CHARACTER::Destroy()
    2. {
    3. METIN2_DEBUG_SAY() << "It works one line ";
    4. METIN2_DEBUG_SAY() << "It works two line:";
    • Say it's same as these two, but you can add it more times in a function body (debug_trace and debug_trace_args can be added just one in a function)


    Bitte melden Sie sich an, um dieses Bild zu sehen.
    Here i used to debug some login issues.


    Bitte melden Sie sich an, um diesen Link zu sehen.


    Good luck with developing,. :love::thumbup::thumbup:
    For any issue message me.

    Updated the Launcher seeling section.

    • Added the price
    • Added feature list
    • Added more information

    You can request any features for launcher when do you wish. I'll try to do as fast as possible.


    Bitte melden Sie sich an, um diesen Link zu sehen.

    In this update :

    • Official root 2018 (I have removed all systems added, to make it clean and compatible with my sources)
    • Added intro serverfiles official UI stuff( these icons for guild menu e.t.c)


    • I started to rewrite the whole affect system. 40% done.. Many of you complained about lags. When affect system will be done, it will contain a README helping you to upgrade systems.. and so on
    • I started to rewrite the whole DBManager class : Here you can download the inital commit, is not so much but you can make an ideea about the coding/skills/ :)Bitte melden Sie sich an, um diesen Link zu sehen.


    :)
    Soon the price for source will increase.

    Apparently, you use my old source. My sincere advice is not to use that version. You will see when you open the server why I advised you that.



    That version has a lot of crashes. And two critical bug
    xD

    Er ist ein Troll? 8o


    Du hast recht mit einigen Dingen.


    Aber wie ich es dir schon gesagt habe. In der Standard-Metin2-Quelle gibt es kein Paket, das die Strukturen bearbeitet hat.
    Das einzige Paket, das ich gefunden habe, ist View Equip. In dem Client war equips[16];, und auf dem Server war equips[WEAR_MAX_NUM]


    Das ist die einzige Struktur, die gefickt wird.


    Auch alle Kopfzeilennummern sind korrekt.



    Und wie ich Ihnen sagte, sind diese Fehler zufällig. Vertrau mir, es ist egal, ob du diesen Header gefunden hast. Ist wahrscheinlich ein falsches Ergebnis.


    Wenn der Typ, der das Thema angefangen hat, ein Idiot ist und nicht weiß, wie man eine gute Frage stellt, ist das nicht unser Problem.
    Wenn Sie eine gute Antwort bekommen wollen, dann stellen Sie eine gute Frage.




    Wenn er weiß, dass er Änderungen vorgenommen hat, sollte er nicht herkommen und fragen. Weil niemand ein Zauberer ist, um zu wissen, was er getan hat. Ich spreche über Themenstarter.



    EDIT :


    Es gibt 2 Arten von Paketen.


    - Static sized
    - Dynamic sized


    Informieren Sie sich über statische und dynamische Pakete, bevor Sie sprechen.


    You have no idea, these errors are caused randomly. Maybe because of a poor user's network, or perhaps because the entire metin2 network is a shit.


    Some packets are not sent correctly, some of the packets are not checked correctly.


    And I encountered this problem when I had an internet connection of 22kb / s. Whiteshark says the packets were sent late / were not sent completely / missing bits.



    Of course, it can also be caused by a change made by the user. But this is not the case here.

    I wrote these codes a long time ago. I have not used them since years.






    Replace all :

    Code
    1. s_adwEterPackKey
    2. s_adwEterPackSecurityKey


    with

    C
    1. s_adwEterPackKey()
    2. s_adwEterPackSecurityKey()


    Do not expect to be a mega protection. Only so-called hackers will not be able to find the keys with the hexEditor.
    As you can see in the topic title, just hide keys in hex.

    New defines available

    Code
    1. #define ENABLE_GUILD_RANKING this define will enable a list in game with the guild rankings (require server define also)
    2. #define ENABLE_NEW_CURRENCY_WON
    3. this define will enable new curency won beside gold (equire server define also)
    4. #define DISABLE_COLLISION_IN_SAFEZONE this define let players walk through all players and shops when they are in safezone
    • Refactor: I've rewritten the whole buffer system using boost::asio::streambuf, still in testings(Now the buffers are unlimited)
    • I've removed all the DLL from client. Bitte melden Sie sich an, um diesen Link zu sehen.
    • Refactor: Rewritten the BLEND_ITEM using modern coding. Only c++
    • Refactor: I have replaced all primitive types int, unsinged int, char with new c++11 fixed types: int32_t, int64_t
    • Source server cand be compiled on both amd64 and i386 directly. Without a jail etc
    • Yang limit can easy be removed with just one line changing. In extern/include/typedef.h you will find this line using GoldType = int64_t


    In the next update i will add:

    • Soul bind system
    • Guild safebox
    • Advanced auction system.



    Each system it's tested by 10 of my customers and works without any problem.

    There is an incredible amount of boilerplate.
    Bitte melden Sie sich an, um diesen Link zu sehen.


    with C++17 you can use fold expressions


    C
    1. template<typename ... X>
    2. auto sum(X ... tp) {
    3. return (tp + ...);
    4. }



    If you want to be sure that an empty sum will also compile you can do this:


    C
    1. template<typename ... X>
    2. auto sum(X ... tp) {
    3. return (tp + ... + 0);
    4. }





    Also your code prevents a basic usage of max, for instance:



    C
    1. unsigned int U = 5u;
    2. int i = 7;
    3. std::cout << "max(" << U << ", " << i << ") = " << utils::Max(U, i);


    Will result in


    Code
    1. error: non-const lvalue reference to type 'unsigned int' cannot bind to a value of unrelated type 'int' return (static_cast(first) > static_cast(second)) ? static_cast(first) : static_cast(second)
    2. note: in instantiation of function template specialization 'utils::Max' requested here std::cout << "max(" << u << ", " << i << ") = " << utils::Max(u, i);
    3. error: non-const lvalue reference to type 'unsigned int' cannot bind to a value of unrelated type 'int' return (static_cast(first) > static_cast(second)) ? static_cast(first) : static_cast(second)



    You have many containers that don't have operator[] A std::list is out of scope your max function for a reason. The semnatics for a std::map can surprise too, since anyone with basic knoweldege of STL will cosidr const std::pair<key, T> TO BE the element type

    "I have replaced mysql encryption, initially it was md5 now is aes. AES_ENCRYPT ("password", "secret key") // Even if they are able to steal the database, they won't be able to decrypt the passwords online without the secret key."


    That sounds incredibly dumb. You're not supposed to encrypt the passwords, you're supposed to hash them.
    If you want to replace MD5 with something better use bcrypt or argon or sha2 or whatever. But HASH them, don't encrypt them.

    This stuff I did about a couple of days after I recovered my data from a bad HDD, I had a damaged HDD for 8 months. I had all the data there, and I rushed.


    At the time I used the resources available without much work. It's just a few changes to QUERY. Which can be done in about 10 seconds. I think it's better than nothing, for now.


    As soon as I finish the requests made by my current clients, I will remove this shit and I will hash the password.