ok,
Looks good. I got this in, untested, so grab the next build with it mentioned in the changelog and test it for me.
I made a few changes.
- I fixed an iterator delete bug, you cannot remove an element from any STL container and expect the iterator which pointed to that element to stay valid. Each container has its own erase-while-iterating rules and trick.
- I also changed it from a list to a set, just to ensure uniqueness.
- I moved everything up into Mob so in theory charmed players would exhibit the same behavior. (plus it made the next comment easier)
- Its bad form to name two timers the same thing when they have different purposes, it confused me for a while. Your NPC forget check timer was also somewhat unnescesary (as well as being in a bad spot, that code gets called very rapidly, and your slower timer should be burried inside other shorter timers so it dosent get checked so often.) Because of this, I just eliminated it, and moved the "look for people who got up" code into the AI scan area timer (where we look for people to aggro, which had the same duration).
|