diff --git a/src/game/Cell.h b/src/game/Cell.h index 5fb430b1ad..802c7bd8c4 100644 --- a/src/game/Cell.h +++ b/src/game/Cell.h @@ -168,6 +168,7 @@ struct TRINITY_DLL_DECL Cell template void Visit(const CellLock &, TypeContainerVisitor &visitor, Map &m, const WorldObject &obj, float radius) const; template void Visit(const CellLock &, TypeContainerVisitor &visitor, Map &, float radius, float x_off, float y_off) const; + static CellArea CalculateCellArea(const WorldObject &obj, float radius); static CellArea CalculateCellArea(float x, float y, float radius); private: diff --git a/src/game/CellImpl.h b/src/game/CellImpl.h index 9dae6eeedc..4e206b7a1e 100644 --- a/src/game/CellImpl.h +++ b/src/game/CellImpl.h @@ -140,6 +140,11 @@ inline int CellHelper(const float radius) return (int)ceilf(radius/SIZE_OF_GRID_CELL); } +inline CellArea Cell::CalculateCellArea(const WorldObject &obj, float radius) +{ + return Cell::CalculateCellArea(obj.GetPositionX(), obj.GetPositionY(), radius); +} + inline CellArea Cell::CalculateCellArea(float x, float y, float radius) { if(radius <= 0.0f)