Applied the same treatment to GetWorldObjectsInDist
Honestly no idea why the original idea insisted so much
on using pointers. No more missing null checks or deletes.
SmartAI's "ObjectList" is now a std::vector instead of a std::list
because no where it was being used as an actual list.
Original idea by DDuarte :P
* Added MapGetValuePtr to allow writing `if (Val* v = MapGetValuePtr(map, key))`
* Added utility IteratorPair class with begin/end methods and MapEqualRange for use in range for syntax with multimaps
(cherry picked from commit a1e3b54e07)
- Get rid of fugly void pointers
- Streamlined AI selection code, using Permissible as it should've been instead of harcoded checks on the selector code
- Moved IdleMovementGenerator singleton to factory code
Fixes the following issues:
- Player pets would aggro neutral mobs as soon as they start autocasting (Imp's Firebolt) if they're in react range (due to victim != null, autocast counts as autoattack and sets victim)
- Neutral mobs would randomly evade when aggro switched between targets.
Closes#19768, #19485 and #10921.
(from PR #19814)
- Creatures should no longer get stuck in evade mode following a target if a spell hits the creature just as it's entering evade mode.
- Fixes and closes#4943. Finally.
* Since 2014_03_30_04_world_creature_equip_template.sql,
Caynrus <Shield Merchant> has erroneously been equipped with
item ID 1961 (Monster - Shield, Buckler Wooden) and in wrong hand,
making the item look like a blue & white box ("unobtainium").
Instead of moving the buckler to his off-hand slot,
he gets his 2H Bent Staff (item ID 35) back.
His equipped item was removed in Cataclysm, patch 4.0.3a.
- Update clients whenever target has more than one application of an aura that applies such aurastate
- Update again when one application gets removed
- Fixed Fire and Brimstone computing damage if any warlock applied the Immolate (should only count for own)
Closes#19790
- Changed insert queries to include column names, check columns on dump load
- Modify and search columns by name instead of storing magic offsets
- Fully forward and backward compatible with previous dumps
- Added better logs, C++11-ize code
Fix script so that if player does not sucessfully kill the hardknuckle matriach it does not remain hostile as an invisible mob to players doing damage to players who get in agro range.