TrinityCore/TrinityCore — pull request #11609 by zengwf (2014-02-15 04:29:07+00:00)
Title: Core/Movement:Fix waypointed creature aggro

In original code, when creature is moving on waypoint(patroling), its homeposition will not be updated unless reaches non-repeating waypoint's destination. This means homeposition is always bound to its spawn position, so creatures with long waypoint path don't aggro even when approaches very near(instance creature is ok because not use this value).

This fix sets creature homepositon to its current position when on waypointed movement.(I think homepositon in code means "OOC return position".) Tested on some creatures(Duskwood emerald dragon, etc.) They can aggro correctly when move in range.