You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did an exhaustive verification of all the code related to StatList (basically because my intention is to expand some sections, but before doing so I must verify that all the vanilla code works perfectly).
The testing was carried out in 3 phases:
I checked all the functions together in the same HOOK (Exactly the same from the D2Moo code). The result was bad (obviously) since there were endless errors when starting a game. After this result I started the second phase.
I checked the code from the latest D2Moo update (with the massive changes) and compared it to the code I used previously (with the first version). In this phase I rechecked all the code with its changes, and the result was exactly the same. Negative, only this time I noticed corrected functions and functions with helpers (which did not exist before). For this reason, when exposing phase 3 of my tests, I included a partial result when using the Helper functions, but I am not 100% sure of their correct operation, however 50% of them work well at first glance. And regarding the rest of the functions, I did a third test to analyze them one by one.
In this phase, I did an individual test and changed the syntax of some functions (for my convenience, but the result is theoretically the same). This phase is the most extensive and consists of trying to repair what I can and report everything I got (with my corrections).
Here I got the following result:
29 Wrong Functions (Short functions that depend on these long functions I don't consider "wrong" because they are literally the same function.)
77 functions that work fine (within my limited, but extreme tests).
A function I could not verify in any way that I have no idea where or when it is executed (in D2Game and D2Client).
Also, I proposed some names for the unknown functions and some changes to other functions (although the latter is not important). And, Most of the improvements, I made were control for IFs (if you use pUnit->pStatListEx I added if pUnit and other things like that). I did this because some functions just fixed like this
I clarify that there are also functions that internally call the functions that "do not work", this is because I did a complete stability test, I added vanilla PTRS in each function and I was verifying one by one (its structure, loops and other characteristics). That is why there are functions that "work". This is an attempt to isolate the error.
And one last clarification regarding the Names: I mean "new name" with respect to the first name they had, some I updated them with the Name you gave them and others I invented them.
Work Functions:
10470 - STATLIST_AllocStatList
10471 - STATLIST_GetOwnerType (The result if pUnit is NULL is 6) (In D2Game it is common to use these values)
10472 - STATLIST_GetOwnerGUID (The result if pUnit is NULL is -1 not 0) (In D2Game it is common to use these values)
11304 - STATLIST_GetBaseStatsCount
11305 - STATLIST_GetFullStatsCountFromUnit
10478 - STATLIST_SetState
10479 - STATLIST_GetState
10528 - STATLIST_SetExpireFrame
10529 - STATLIST_GetExpireFrame
10467 - STATLIST_GetStatFromStatListByStatID
11264 - STATLIST_SetSkillId
11265 - STATLIST_GetSkillId
11266 - STATLIST_SetSkillLevel
11267 - STATLIST_GetSkillLevel
10534 - (NEW NAME) STATLIST_SetFlag100Unknown
10530 - STATLIST_CheckStatlistFlagDMGRed
10477 - STATLIST_SetStatRemoveCallback
10482 - STATLIST_GetStatListFromFlag (Improvement FLAG change (nFlag & pStatList->dwFlags) to (pStatList->dwFlags & nFlag))
10481 - STATLIST_GetStatListFromUnitAndFlag (Improvement control IF FLAG change (nFlag & pStatList->dwFlags) to (pStatList->dwFlags & nFlag))
10484 - STATLIST_GetStatListFromUnitStateAndFlag (Improvement control if and Flags change (nFlag & pStatList->dwFlags) to (pStatList->dwFlags & nFlag))
10535 - STATLIST_GetOwner (Corrected flag (pUnit->pStatListEx->dwFlags & STATLIST_DYNAMIC) to ~(pUnit->pStatListEx->dwFlags & STATLIST_DYNAMIC)) - In this function you can notice the error if it is patched as it is extracted from D2Moo, the Weapons do not add the damage to the character until you position the cursor over it, with this improvement this is corrected.
10512 - (New Name) STATLIST_FindStatAndCallBack (In this function I was especially careful with the order of the control if, otherwise it did not work - if (pUnit1 && pUnit1->pStatListEx && STATLIST_IsExtended(pUnit1->pStatListEx) && !STATLIST_FindStatFromArrayID(&pUnit1->pStatListEx->ModStats, nStatId << 16))
10511 - STATLIST_FreeModStats
11268 - STATLIST_GetFullStatsDataFromUnit
11243 - STATLIST_GetBaseStatsData
10519 - 10520 - STATLIST_GetUnitStatUnsigned - STATLIST_GetUnitStatSigned (Theoretically they are exactly the same functions. Since Blizzard uses 10519 to extract 80% of the Game Stats (including those that can have negative numbers like Resistances in Hell), I removed the return uint32_t and left it int (the old type) because int casts as uint32_t, int32_t , int8_t int16_t, uint8_t and uint16_t alike. Without this change these functions do not work properly).
10532 - (New Name) STATLIST_GetStatUnsigned_Layer0
11248 - (New Name) STATLIST_GetUnitStatInLayer0Control
11270 - (New Name) STATLIST_CheckAndCopyStatToBufferEX (Improvement Control IF)
10480 - STATLIST_GetStatListFromUnitAndState (Improvement control IF)
10563 - STATLIST_AreUnitsAligned (Improvement control IF)
10562 - STATLIST_GetUnitAlignment
10521 - STATLIST_GetUnitBaseStat (Improvement Control IF)
10522 - STATLIST_GetUnitStatBonus (Improvement Control IF and Simplify)
10527 - STATLIST_FreeStatListEx (Improvement Control IF)
10526 - STATLIST_AllocStatListEx (Improvement Control IF)
10515 - (New Name) STATLIST_CleanStatesAndStatListEx (Improvement control IF and Clean)
10485 - STATLIST_FreeStatList
10469 - (New Name) STATLIST_Delete (Improvement control IF and Clean)
10516 - (New Name) STATLIST_UpdateStatListsExpiration (Improvement Control IF)
10483 - STATLIST_GetStatListFromUnitStateOrFlag (Improvement Control IF)
0x6FDB8A90 - (New Name) STATLIST_STATES_GetStatFlags
0x6FDB8AC0 - (New Name) STATLIST_STATES_GetListGfxFlags
0x6FDB6300 - STATLIST_FindStatIndex (Improvement Control IF)
0x6FDB6920 - STATLIST_FindStatFromArrayID (Improvement Control IF)
0x6FDB8190 - (New Name) STATLIST_GetStatListExFromState
0x6FDB63E0 - (New Name) STATLIST_GetTotalStat (Improvement Control IF)
0x6FDB7050 - (New Name) STATLIST_FreeStatListImpl (Improvement control IF)
0x6FDB6A30 - (New Name) STATLIST_RemoveStat
0x6FDB9C50 - (New Name) STATLIST_CopyStatToBufferEX
0x6FDB6340 - (New Name) STATLIST_GetBaseStatVal (Improvement Control IF)
0x6FDB8900 - (New Name) STATLIST_STATES_ToggleState (Improvement Control IF and Clean)
Functions that exclusively depend on wrong functions to Work:
10531 - STATLIS_GoSetStatInStatListLayer0 (depends on 10463 STATLIST_SetStat)
11295 - STATLIST_SetBaseStat2 (depends on 11294 STATLIST_SetBaseStat)
11273 - (New Name) STATLIST_CheckAndGetNewValueFromStatID (Improvement control IF and depends on 0x6FDB5830 STATLIST_GetNewValueFromStatID)
10514 - (New Name) STATLIST_ClampStaminaManaHP (depends on 10464 STATLIST_AddStat)
10524 - STATLIST_ExpireUnitStatlist (depends on 0x6FDB6E30 STATLIST_ExpireStatListEx)
10574 - (New Name) STATLIST_SetOrRemoveStatListFromStateID (Improvement control IF and Clean, and depends on 0x6FDB6E30 STATLIST_ExpireStatListEx and 10475 STATLIST_AddPostStatToStatList)
10474 - STATLIST_ExpireStatList (depends on 0x6FDB6E30 STATLIST_ExpireStatListEx)
0x6FDB7690 - (New Name) STATLIST_InsertStatModOrFail (depends on 0x6FDB6970 STATLIST_InsertStatOrFail)
WRONG functions:
10513 - (New Name) STATLIST_FindStatAndCallBackEx
10523 - STATLIST_MergeStatLists
11274 - (New Name) STATLIST_MergeStatListTRUE
11275 - (New Name) STATLIST_MergeStatListFALSE
10463 - STATLIST_SetStat
11294 - (New Name) STATLIST_SetBaseStat
10517 - STATLIST_SetUnitStat
10573 - STATLIST_MergeBaseStats
10464 - STATLIST_AddStat (Improvement Clean)
10465 - STATLIST_SetStatIfListIsValid
10518 - STATLIST_AddUnitStat
10468 - STATLIST_RemoveAllStats
10475 - (New Name) STATLIST_AddPostStatToStatList
10525 - (New Name) STATLIST_MergeStatListFromUnitToUnit
0x6FDB6970 - (New Name) STATLIST_InsertStatOrFail
0x6FDB6C10 - (New Name) STATLIST_SetStatProcess
0x6FDB6E30 - (New Name) STATLIST_ExpireStatListEx
0x6FDB5830 - (New Name) STATLIST_GetNewValueFromStatID (The error you have is curious. Make Missiles Invisible)
0x6FDB6AB0 - (New Name) STATLIST_UpdateUnitStat (Wrong DIV BY ZERO)
0x6FDB64A0 - (New Name) STATLIST_UpdateUnitNewStat
HELPER Functions:
Work Functions:
STATLIST_IsExtended - Improvement Control IF
BITMANIP_SetBitsValueForMask
STATLIST_StatListExCast - Improvement Control IF
STATLIST_ApplyMinValue - Improvement Control IF and __fastcall
STATLIST_GetStatUnsigned
STATLIST_CopyStatsData - Improvement Control IF
STATLIST_ClampStat - Improvement Control IF (depends on 10464 STATLIST_AddStat)
Wrong Functions:
STATLIST_FindStatInsertionIndex
STATLIST_InsertStat
STATLIST_GetOrInsertStat
STATLIST_NotifyUnitOfStatValueChange
STATLIST_SetUnitStatNewValue
ComputeStatPercentage
STATLIST_MergeStatListWithBool
The text was updated successfully, but these errors were encountered:
I did an exhaustive verification of all the code related to StatList (basically because my intention is to expand some sections, but before doing so I must verify that all the vanilla code works perfectly).
The testing was carried out in 3 phases:
Also, I proposed some names for the unknown functions and some changes to other functions (although the latter is not important). And, Most of the improvements, I made were control for IFs (if you use pUnit->pStatListEx I added if pUnit and other things like that). I did this because some functions just fixed like this
I clarify that there are also functions that internally call the functions that "do not work", this is because I did a complete stability test, I added vanilla PTRS in each function and I was verifying one by one (its structure, loops and other characteristics). That is why there are functions that "work". This is an attempt to isolate the error.
And one last clarification regarding the Names: I mean "new name" with respect to the first name they had, some I updated them with the Name you gave them and others I invented them.
Work Functions:
Functions that exclusively depend on wrong functions to Work:
WRONG functions:
HELPER Functions:
Work Functions:
Wrong Functions:
The text was updated successfully, but these errors were encountered: