aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Grids/Notifiers
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2017-05-07 21:48:41 +0100
committerTreeston <treeston.mmoc@gmail.com>2017-07-31 21:21:04 +0200
commit59db2eeea0a35028779fd76372ae06cc98c8086f (patch)
treea9532989868948cb309cb8d76a2e76a017fa9246 /src/server/game/Grids/Notifiers
parentd24ce1739a799042d5a164794c09674227c8572c (diff)
Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object - Toggleable spawn groups (with C++/SAI/command options to use them) - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone. - Backward compatibility mode (set via group and for summons) to support creatures/gos that currently don't work well with this (this should be removed once the exceptions are fixed) Fixes and closes #2858 Tags #8661 as fixable. Fixes and closes #13787 Fixes #15222.
Diffstat (limited to 'src/server/game/Grids/Notifiers')
-rw-r--r--src/server/game/Grids/Notifiers/GridNotifiers.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index 897e43d5e03..acbe5e641e8 100644
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -552,6 +552,11 @@ namespace Trinity
: ContainerInserter<Player*>(container),
i_phaseMask(searcher->GetPhaseMask()), i_check(check) { }
+ template<typename Container>
+ PlayerListSearcher(uint32 phaseMask, Container& container, Check & check)
+ : ContainerInserter<Player*>(container),
+ i_phaseMask(phaseMask), i_check(check) { }
+
void Visit(PlayerMapType &m);
template<class NOT_INTERESTED> void Visit(GridRefManager<NOT_INTERESTED> &) { }
@@ -1321,6 +1326,27 @@ namespace Trinity
bool _reqAlive;
};
+ class AnyPlayerInPositionRangeCheck
+ {
+ public:
+ AnyPlayerInPositionRangeCheck(Position const* pos, float range, bool reqAlive = true) : _pos(pos), _range(range), _reqAlive(reqAlive) { }
+ bool operator()(Player* u)
+ {
+ if (_reqAlive && !u->IsAlive())
+ return false;
+
+ if (!u->IsWithinDist3d(_pos, _range))
+ return false;
+
+ return true;
+ }
+
+ private:
+ Position const* _pos;
+ float _range;
+ bool _reqAlive;
+ };
+
class NearestPlayerInObjectRangeCheck
{
public: