Skip to content

Commit 7e67dec

Browse files
committed
Update IsInRange2d and 3d for core changes
1 parent 1025849 commit 7e67dec

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

methods/TrinityCore/WorldObjectMethods.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,15 @@ namespace LuaWorldObject
981981
float minrange = E->CHECKVAL<float>(4);
982982
float maxrange = E->CHECKVAL<float>(5);
983983

984+
#if ELUNA_EXPANSION == EXP_RETAIL
985+
Position pos;
986+
pos.m_positionX = x;
987+
pos.m_positionY = y;
988+
989+
E->Push(obj->IsInRange2d(&pos, minrange, maxrange));
990+
#else
984991
E->Push(obj->IsInRange2d(x, y, minrange, maxrange));
992+
#endif
985993
return 1;
986994
}
987995

@@ -1005,7 +1013,16 @@ namespace LuaWorldObject
10051013
float minrange = E->CHECKVAL<float>(5);
10061014
float maxrange = E->CHECKVAL<float>(6);
10071015

1016+
#if ELUNA_EXPANSION == EXP_RETAIL
1017+
Position pos;
1018+
pos.m_positionX = x;
1019+
pos.m_positionY = y;
1020+
pos.m_positionZ = z;
1021+
1022+
E->Push(obj->IsInRange3d(&pos, minrange, maxrange));
1023+
#else
10081024
E->Push(obj->IsInRange3d(x, y, z, minrange, maxrange));
1025+
#endif
10091026
return 1;
10101027
}
10111028

0 commit comments

Comments
 (0)