fix(Core/GameObjectScript): Environmental damage of burning game objects (#2432)

This commit is contained in:
Stoabrogga
2019-12-07 08:19:24 +01:00
committed by GitHub
parent 412905843a
commit 183a15a661
3 changed files with 119 additions and 0 deletions

View File

@@ -1248,6 +1248,23 @@ namespace acore
bool _disallowGM;
};
class AnyPlayerExactPositionInGameObjectRangeCheck
{
public:
AnyPlayerExactPositionInGameObjectRangeCheck(GameObject const* go, float range) : _go(go), _range(range) {}
bool operator()(Player* u)
{
if (!_go->IsInRange(u->GetPositionX(), u->GetPositionY(), u->GetPositionZ(), _range))
return false;
return true;
}
private:
GameObject const* _go;
float _range;
};
class NearestPlayerInObjectRangeCheck
{
public: