[Affect Lag Fix] Weaponry Sura's Dispel and Healing Power Shaman's Heal

  • Hello, pretty sure every single one of you knows about the Dispel and Heal Lag problem that has been around since always.
    This little modification will fix both these problems completely.


    Problem:
    The RemoveAffect function calls ComputePoints() (Complete rearrange of all the player stats and equip parts, one of the heaviest checks).
    The correct function to use is RefreshAffect() which does its job pretty fine!
    But that's not the only problem: Based on the current code, that function would get called every single time an affect gets removed or added, while it should only get called once, at the end of the process.


    Solution: We could make new functions for those 2 special flags (REMOVE_BAD_AFFECT and REMOVE_GOOD_AFFECT), but in order to keep things simple for you guys, i'll simply "dynamicize" the RemoveAffect function.


    1. go to char_affect.cpp:


    2: go to char.h:


    This way, we applied a simple boolean value arg to the RemoveAffect function, which will get set to true by default.
    By setting it to false like this:


    RemoveAffect(affectLUL, false);


    We are basically saying the game to not Rearrange the points when affectLUL gets removed.
    Now we will use a cycle to do that for every affect like usual, and we will rearrange of the points just once, at the end of the process, like it should be.


    Done!


    Comparison:


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

    My Lua Questing service:

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

    26 Mal editiert, zuletzt von Syreldar ()

  • Syreldar

    Hat den Titel des Themas von „[Affect Lag Fix] Weaponry Sura's Dispel and Healing Power Shaman's Heal Lag Bug“ zu „[Affect Lag Fix] Weaponry Sura's Dispel and Healing Power Shaman's Heal“ geändert.
  • Dieses Thema enthält 35 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.