project-topaz / topaz

Server emulator for FFXI
Other
161 stars 223 forks source link

Auras: Fill in logic for mob-based auras #1502

Closed zach2good closed 4 years ago

zach2good commented 4 years ago

I affirm:

Not yet tested, will have time at the weekend.

Side note; iterating a mob's enmity container suuuuuucks.

            for (auto [idx, entry] : *PMob->PEnmityContainer->GetEnmityList())
            {
                CBattleEntity* PTarget = entry.PEnmityOwner;
ibm2431 commented 4 years ago

Wondering if some genericism with var names / loops might result in us being able to combine the logic for the four branches into one, with the if check just determining which list is getting iterated.

zach2good commented 4 years ago

I was thinking the same thing, maybe a "generate lists" section, and then "iterate lists" after

zach2good commented 4 years ago

Another option is for me to make EnmityList iterable, but I'm sure I'll fight EnmityContainer and friends another time