aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2018_99_99_99_world.sql12
-rw-r--r--src/common/Utilities/Util.h2
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp4
-rw-r--r--src/server/game/Entities/Creature/CreatureData.h2
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp12
-rw-r--r--src/server/game/Entities/GameObject/GameObjectData.h54
-rw-r--r--src/server/game/Entities/Object/Object.cpp27
-rw-r--r--src/server/game/Entities/Object/Object.h4
-rw-r--r--src/server/game/Entities/Object/ObjectDefines.h49
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp60
-rw-r--r--src/server/worldserver/worldserver.conf.dist6
11 files changed, 188 insertions, 44 deletions
diff --git a/sql/updates/world/master/2018_99_99_99_world.sql b/sql/updates/world/master/2018_99_99_99_world.sql
new file mode 100644
index 00000000000..a3358ef9af0
--- /dev/null
+++ b/sql/updates/world/master/2018_99_99_99_world.sql
@@ -0,0 +1,12 @@
+ALTER TABLE `creature_addon`
+ ADD COLUMN `visibilityDistanceType` TINYINT UNSIGNED NOT NULL AFTER `meleeAnimKit`;
+
+ALTER TABLE `creature_template_addon`
+ ADD COLUMN `visibilityDistanceType` TINYINT UNSIGNED NOT NULL AFTER `meleeAnimKit`;
+
+-- Set right visibility for creatures
+UPDATE `creature_template_addon` SET `visibilityDistanceType`=3 WHERE `entry` IN (1284, 1768, 1853, 1908, 2726, 2748, 2754, 3653, 3654, 3669, 3670, 3671, 3673, 3674, 3886, 3887, 3914, 3936, 3943, 3977, 4274, 4275, 4278, 4279, 4714, 4715, 4716, 4718, 4719, 4829, 4830, 4831, 4832, 4854, 4887, 4968, 5359, 5709, 5710, 5711, 5775, 6109, 6193, 6196, 6235, 6243, 6906, 6907, 6908, 6910, 7023, 7079, 7206, 7228, 7267, 7271, 7272, 7273, 7275, 7291, 7361, 7795, 7797, 7800, 7846, 7977, 7999, 8127, 8197, 8198, 8443, 8923, 8929, 8933, 8983, 9016, 9017, 9018, 9019, 9024, 9025, 9027, 9028, 9029, 9030, 9031, 9032, 9033, 9041, 9042, 9156, 9196, 9236, 9237, 9319, 9499, 9502, 9537, 9543, 9568, 9659, 9736, 9816, 9938, 10076, 10162, 10181, 10184, 10220, 10264, 10268, 10339, 10363, 10415, 10429, 10430, 10435, 10436, 10437, 10438, 10439, 10440, 10502, 10503, 10505, 10508, 10516, 10558, 10584, 10596, 10808, 10809, 10811, 10812, 10813, 10826, 10901, 10942, 10997, 11032, 11143, 11261, 11262, 11352, 11380, 11382, 11467, 11486, 11487, 11488, 11489, 11490, 11496, 11501, 11502, 11517, 11518, 11519, 11520, 11583, 11622, 11658, 11659, 11660, 11661, 11662, 11663, 11664, 11665, 11666, 11667, 11668, 11669, 11671, 11673, 11897, 11978, 11981, 11982, 11983, 11988, 12017, 12018, 12056, 12057, 12076, 12098, 12099, 12100, 12101, 12118, 12119, 12129, 12142, 12143, 12201, 12203, 12206, 12225, 12236, 12237, 12243, 12258, 12259, 12264, 12265, 12397, 12422, 12435, 12457, 12458, 12459, 12460, 12461, 12463, 12464, 12465, 12466, 12467, 12468, 12557, 12804, 12806, 13020, 13161, 13178, 13221, 13256, 13280, 13282, 13419, 13596, 13601, 13738, 13976, 13996, 14020, 14261, 14262, 14263, 14264, 14265, 14302, 14310, 14321, 14322, 14323, 14324, 14325, 14326, 14327, 14349, 14352, 14353, 14354, 14401, 14435, 14449, 14453, 14456, 14507, 14509, 14510, 14515, 14517, 14601, 14605, 14661, 14688, 14834, 14861, 14887, 14888, 14889, 14890, 14943, 14944, 14945, 14946, 14947, 14948, 15122, 15185, 15192, 15203, 15204, 15205, 15223, 15226, 15227, 15228, 15229, 15230, 15231, 15232, 15233, 15234, 15235, 15236, 15237, 15238, 15239, 15240, 15241, 15242, 15243, 15244, 15245, 15246, 15247, 15248, 15249, 15250, 15251, 15252, 15253, 15254, 15255, 15256, 15257, 15258, 15259, 15262, 15263, 15264, 15275, 15276, 15277, 15299, 15300, 15302, 15305, 15311, 15312, 15318, 15319, 15320, 15322, 15323, 15324, 15325, 15326, 15327, 15329, 15330, 15331, 15332, 15333, 15334, 15335, 15336, 15337, 15338, 15339, 15340, 15341, 15343, 15344, 15345, 15346, 15347, 15348, 15355, 15369, 15370, 15385, 15386, 15387, 15388, 15389, 15390, 15391, 15392, 15393, 15428, 15467, 15471, 15472, 15473, 15481, 15491, 15507, 15509, 15510, 15511, 15514, 15516, 15517, 15521, 15527, 15537, 15538, 15543, 15544, 15546, 15550, 15555, 15571, 15589, 15608, 15628, 15667, 15687, 15688, 15689, 15690, 15691, 15712, 15718, 15725, 15726, 15727, 15728, 15740, 15741, 15742, 15743, 15744, 15772, 15773, 15775, 15776, 15778, 15800, 15802, 15809, 15896, 15904, 15910, 15928, 15929, 15930, 15931, 15932, 15934, 15936, 15952, 15953, 15954, 15956, 15957, 15962, 15963, 15973, 15974, 15975, 15976, 15977, 15978, 15979, 15980, 15981, 15984, 15989, 15990, 16011, 16017, 16018, 16020, 16021, 16022, 16024, 16025, 16026, 16027, 16028, 16029, 16034, 16035, 16038, 16039, 16040, 16041, 16059, 16060, 16061, 16062, 16063, 16064, 16065, 16067, 16097, 16098, 16101, 16102, 16103, 16104, 16125, 16126, 16136, 16137, 16142, 16145, 16146, 16151, 16152, 16154, 16156, 16157, 16158, 16163, 16164, 16165, 16167, 16168, 16172, 16179, 16180, 16181, 16193, 16194, 16215, 16216, 16218, 16243, 16244, 16286, 16290, 16363, 16375, 16386, 16398, 16401, 16421, 16431, 16440, 16446, 16447, 16448, 16449, 16451, 16452, 16453, 16457, 16477, 16488, 16505, 16506, 16524, 16531, 16573, 16598, 16604, 16609, 16697, 16775, 16776, 16777, 16778, 16800, 16801, 16802, 16803, 16807, 16808, 16809, 16861, 16887, 16939, 17007, 17030, 17075, 17076, 17225, 17256, 17257, 17258, 17306, 17307, 17308, 17309, 17310, 17367, 17368, 17369, 17377, 17380, 17381, 17388, 17427, 17435, 17451, 17454, 17461, 17462, 17468, 17470, 17521, 17533, 17534, 17535, 17536, 17537, 17543, 17546, 17547, 17548, 17592, 17602, 17603, 17611, 17621, 17622, 17623, 17645, 17646, 17650, 17652, 17653, 17693, 17711, 17719, 17720, 17725, 17767, 17770, 17772, 17796, 17797, 17798, 17808, 17818, 17826, 17830, 17838, 17839, 17842, 17848, 17852, 17862, 17864, 17871, 17876, 17879, 17880, 17881, 17882, 17888, 17890, 17895, 17897, 17898, 17899, 17905, 17906, 17907, 17908, 17916, 17918, 17941, 17942, 17951, 17965, 17968, 17975, 17976, 17977, 17978, 17980, 17991, 18040, 18041, 18061, 18096, 18099, 18100, 18101, 18102, 18105, 18107, 18168, 18192, 18238, 18242, 18256, 18257, 18258, 18259, 18287, 18338, 18341, 18343, 18344, 18351, 18352, 18371, 18373, 18399, 18409, 18411, 18472, 18473, 18478, 18479, 18497, 18528, 18625, 18667, 18707, 18708, 18726, 18728, 18729, 18731, 18732, 18757, 18759, 18769, 18770, 18778, 18780, 18793, 18794, 18796, 18805, 18806, 18829, 18831, 18832, 18834, 18835, 18836, 18847, 18848, 18925, 18928, 18932, 18945, 18946, 19044, 19214, 19215, 19218, 19219, 19220, 19224, 19260, 19291, 19292, 19336, 19358, 19359, 19382, 19389, 19397, 19398, 19399, 19400, 19427, 19433, 19514, 19516, 19551, 19554, 19565, 19568, 19577, 19622, 19710, 19851, 19870, 19872, 19873, 19874, 19875, 19876, 19878, 19918, 19922, 19927, 19934, 19950, 19951, 20031, 20032, 20033, 20034, 20035, 20036, 20037, 20038, 20039, 20040, 20041, 20042, 20043, 20044, 20045, 20046, 20047, 20048, 20049, 20050, 20051, 20052, 20060, 20062, 20063, 20064, 20075, 20129, 20132, 20142, 20216, 20243, 20454, 20555, 20600, 20769, 20776, 20870, 20885, 20886, 20898, 20899, 20900, 20904, 20905, 20908, 20909, 20910, 20911, 20912, 20923, 20977, 21035, 21075, 21091, 21101, 21102, 21104, 21122, 21140, 21148, 21153, 21154, 21159, 21166, 21170, 21174, 21181, 21187, 21212, 21213, 21214, 21215, 21216, 21217, 21219, 21222, 21224, 21225, 21226, 21227, 21228, 21251, 21268, 21269, 21270, 21271, 21272, 21273, 21274, 21315, 21338, 21350, 21351, 21362, 21364, 21404, 21456, 21466, 21467, 21497, 21514, 21648, 21657, 21685, 21686, 21687, 21688, 21689, 21690, 21697, 21698, 21785, 21801, 21806, 21812, 21845, 21857, 21862, 21865, 21873, 21874, 21875, 21913, 21920, 21931, 21932, 21933, 21958, 21964, 21965, 21966, 21976, 21984, 22009, 22035, 22036, 22055, 22056, 22064, 22067, 22077, 22085, 22089, 22112, 22119, 22120, 22122, 22128, 22140, 22146, 22196, 22207, 22210, 22268, 22274, 22290, 22293, 22295, 22296, 22299, 22332, 22335, 22360, 22389, 22404, 22405, 22406, 22409, 22418, 22422, 22448, 22509, 22517, 22841, 22844, 22845, 22846, 22847, 22848, 22849, 22852, 22853, 22854, 22855, 22856, 22859, 22869, 22871, 22873, 22874, 22875, 22876, 22877, 22878, 22879, 22880, 22881, 22882, 22883, 22884, 22885, 22887, 22898, 22910, 22917, 22942, 22945, 22947, 22948, 22949, 22950, 22951, 22952, 22953, 22954, 22956, 22957, 22960, 22961, 22962, 22964, 22973, 22980, 22988, 22996, 22997);
+
+UPDATE `creature_template_addon` SET `visibilityDistanceType`=4 WHERE `entry` IN (90, 392, 832, 1493, 2120, 7024, 14269, 14272, 14824, 22441, 22522, 24019, 24538, 24646, 24647, 24925, 26287, 27447, 27641, 27655, 27656, 27838, 27850, 27881, 27883, 27894, 27992, 27993, 28094, 28312, 28319, 28366, 28586, 29240, 29263, 29308, 29747, 29789, 29790, 30181, 30215, 30246, 30288, 30300, 30476, 30559, 30588, 30589, 30640, 30646, 30649, 30651, 30690, 30699, 30749, 30832, 31047, 31137, 31243, 31400, 31406, 31530, 31565, 31650, 31684, 31702, 31765, 31782, 31811, 31838, 31844, 31869, 32160, 32200, 32254, 32264, 32277, 32305, 32347, 32400, 32473, 32479, 32480, 32482, 32483, 32491, 32511, 32512, 32513, 32518, 32521, 32627, 32629, 32630, 32898, 32906, 32913, 32914, 32915, 32933, 33059, 33060, 33061, 33062, 33063, 33067, 33080, 33090, 33109, 33114, 33139, 33142, 33146, 33167, 33189, 33214, 33216, 33218, 33237, 33264, 33387, 33697, 33814, 33912, 33914, 34006, 34012, 34085, 34086, 34124, 34161, 34164, 34275, 34492, 34494, 34564, 34660, 34776, 34777, 34778, 34793, 34832, 34925, 35069, 35150, 35163, 35335, 35336, 35339, 35377, 35592, 35815, 35827, 35898, 36127, 36140, 36161, 36168, 36231, 36233, 36234, 36283, 36286, 36355, 36356, 36369, 36449, 36510, 36667, 36682, 36689, 36735, 36737, 36804, 36826, 36835, 36846, 36940, 36941, 36966, 37037, 37069, 37126, 37193, 37194, 37203, 37528, 37533, 37534, 37543, 37574, 37804, 37970, 37972, 37973, 38019, 38020, 38021, 38069, 38346, 38368, 38377, 38708, 38806, 38821, 38917, 39039, 39271, 39375, 39382, 39383, 39420, 39607, 39620, 39652, 39661, 39746, 39747, 39751, 39800, 39801, 39802, 39803, 39809, 39810, 39811, 39812, 39813, 39822, 39829, 39830, 39831, 39832, 39859, 39867, 39908, 39913, 39919, 39964, 39966, 40128, 40130, 40178, 40219, 40282, 40309, 40340, 40341, 40370, 40439, 40466, 40484, 40499, 40506, 40600, 40688, 40689, 40785, 40793, 40804, 40805, 40932, 40942, 40999, 41000, 41009, 41010, 41020, 41021, 41022, 41057, 41077, 41083, 41098, 41157, 41270, 41379, 41417, 41418, 41454, 41504, 41548, 41564, 41567, 41568, 41570, 41571, 41574, 41575, 41577, 41582, 41583, 41585, 41587, 41594, 41596, 41597, 41599, 41630, 41632, 41634, 41641, 41642, 41736, 41737, 41738, 41739, 41740, 41741, 41742, 41894, 41895, 41918, 41948, 41955, 41958, 41962, 41963, 41964, 41968, 41969, 41970, 41971, 41972, 41973, 41974, 41975, 41976, 41977, 41978, 41987, 41988, 41997, 41998, 42011, 42016, 42017, 42019, 42020, 42030, 42031, 42036, 42037, 42038, 42055, 42063, 42164, 42181, 42182, 42208, 42215, 42233, 42236, 42261, 42263, 42269, 42305, 42306, 42314, 42317, 42345, 42347, 42363, 42364, 42368, 42369, 42370, 42389, 42393, 42395, 42397, 42398, 42419, 42471, 42551, 42670, 42734, 42807, 42818, 42819, 42820, 42821, 42846, 42847, 42848, 42849, 42992, 42993, 42994, 42995, 42996, 42997, 42998, 43094, 43197, 43217, 43244, 43370, 43409, 43412, 43413, 43414, 43415, 43432, 43433, 43434, 43435, 43450, 43457, 43465, 43466, 43469, 43470, 43473, 43474, 43475, 43476, 43477, 43478, 43496, 43519, 43520, 43641, 43714, 43718, 43734, 43736, 43737, 43744, 43745, 43775, 43781, 43782, 43783, 43784, 43786, 43787, 43788, 43821, 43830, 43831, 43832, 43833, 43834, 43838, 43843, 43864, 43865, 43867, 43908, 43931, 43932, 43933, 44058, 44135, 44136, 44291, 44298, 44367, 44403, 44431, 44434, 44453, 44467, 44471, 44493, 44518, 44534, 44537, 44539, 44641, 44645, 44650, 44652, 44653, 44662, 44687, 44731, 44737, 44764, 44797, 44826, 44828, 44829, 44835, 44885, 44886, 44887, 44888, 44889, 44890, 44891, 44923, 45270, 45275, 45280, 45292, 45301, 45317, 45375, 45376, 45426, 45475, 45479, 45484, 45492, 45532, 45535, 45543, 45561, 45564, 45586, 45643, 45660, 45679, 45680, 45696, 45697, 45764, 45772, 45779, 45790, 45799, 45800, 45803, 45838, 45877, 45886, 45893, 45895, 46003, 46041, 46042, 46052, 46070, 46133, 46134, 46136, 46173, 46191, 46192, 46193, 46194, 46199, 46200, 46201, 46277, 46321, 46345, 46401, 46402, 46416, 46457, 46471, 46484, 46502, 46514, 46515, 46516, 46529, 46531, 46533, 46534, 46535, 46536, 46537, 46538, 46539, 46540, 46541, 46542, 46543, 46544, 46545, 46546, 46547, 46548, 46560, 46596, 46603, 46608, 46657, 46679, 46680, 46719, 46720, 46721, 46722, 46723, 46724, 46725, 46726, 46727, 46728, 46729, 46730, 46731, 46732, 46735, 46746, 46747, 46752, 46774, 46776, 46777, 46778, 46779, 46780, 46781, 46782, 46783, 46784, 46796, 46797, 46798, 46799, 46835, 46842, 46872, 46873, 46875, 46877, 46878, 46879, 46880, 46907, 46949, 47016, 47017, 47019, 47020, 47079, 47092, 47095, 47097, 47100, 47102, 47113, 47114, 47158, 47160, 47186, 47201, 47210, 47221, 47222, 47260, 47287, 47385, 47452, 47455, 47484, 47510, 47513, 47546, 47562, 47594, 47625, 47643, 47656, 47684, 47732, 47743, 47744, 47763, 47766, 47772, 47777, 47789, 47790, 47791, 47792, 47793, 47829, 47867, 47896, 47912, 47916, 47919, 47930, 47959, 47974, 47979, 48011, 48012, 48028, 48029, 48030, 48157, 48168, 48169, 48171, 48193, 48198, 48199, 48202, 48209, 48211, 48214, 48313, 48416, 48428, 48437, 48444, 48462, 48463, 48466, 48486, 48490, 48501, 48517, 48538, 48548, 48560, 48563, 48564, 48575, 48576, 48598, 48697, 48713, 48720, 48739, 48790, 48794, 48796, 48839, 48844, 48858, 48978, 48987, 49111, 49112, 49113, 49170, 49175, 49181, 49183, 49197, 49204, 49209, 49232, 49248, 49351, 49377, 49383, 49412, 49420, 49453, 49459, 49460, 49461, 49462, 49463, 49464, 49466, 49468, 49469, 49470, 49471, 49472, 49485, 49518, 49625, 49641, 49694, 49738, 49818, 49819, 49820, 49841, 49845, 49872, 49873, 49910, 49913, 49914, 49941, 49943, 49947, 49948, 50008, 50038, 50042, 50055, 50056, 50057, 50061, 50062, 50074, 50075, 50076, 50089, 50091, 50245, 50249, 50266, 50298, 50368, 50369, 50416, 50420, 50470, 50472, 50476, 50626, 50629, 50639, 50642, 50658, 50661, 50664, 50665, 50666, 50667, 50673, 50677, 50679, 50680, 50681, 50685, 50686, 50689, 50718, 50719, 50939, 51073, 51075, 51127, 51131, 51140, 51153, 51159, 51173, 51267, 51276, 51336, 51346, 51354, 51355, 51356, 51373, 51374, 51398, 51410, 51412, 51413, 51414, 51415, 51416, 51417, 51418, 51419, 51420, 51421, 51426, 51427, 51438, 51441, 51442, 51443, 51444, 51446, 51452, 51466, 51594, 51609, 52056, 52062, 52151, 52176, 52187, 52407, 52530, 52609, 52665, 52817, 52835, 53009, 53053, 53059, 53066, 53100, 53102, 53110, 53115, 53123, 53154, 53158, 53159, 53160, 53184, 53238, 53239, 53258, 53261, 53349, 53369, 53383, 53391, 53392, 53398, 53400, 53406, 53408, 53422, 53484, 53489, 53493, 53509, 53611, 53647, 53648, 53680, 53681, 53691, 53694, 53695, 53698, 53736, 53740, 53755, 53766, 53784, 53786, 53791, 53832, 53872, 53873, 53874, 53875, 53876, 53879, 53896, 53897, 53898, 53899, 53900, 53905, 53919, 53986, 54020, 54081, 54093, 54097, 54105, 54127, 54143, 54233, 54234, 54235, 54236, 54238, 54239, 54240, 54248, 54299, 54314, 54381, 54382, 54486, 54488, 54489, 54500, 54506, 54508, 54513, 54544, 54548, 54563, 54600, 55059, 55085, 55242, 55265, 55287, 55293, 55327, 55366, 55390, 55391, 55403, 55415, 55416, 55417, 55418, 55502, 55503, 55524, 55532, 55538, 55541, 55542, 55543, 55622, 55651, 55654, 55655, 55656, 55662);
+
+UPDATE `creature_template_addon` SET `visibilityDistanceType`=5 WHERE `entry` IN (229, 13116, 13117, 18733, 20000, 24812, 26310, 28243, 28781, 28859, 30342, 30343, 31253, 32295, 32448, 32487, 32492, 32520, 33108, 33143, 33184, 33186, 33212, 33259, 33287, 33293, 33364, 33365, 33366, 33367, 33369, 33370, 33377, 33388, 33425, 33426, 33453, 33805, 33816, 33846, 34144, 34145, 34295, 34515, 34775, 34802, 34929, 34935, 34944, 35273, 35819, 36171, 36177, 36451, 36494, 36597, 36598, 36612, 36616, 36818, 36819, 36820, 36821, 36838, 36839, 36853, 36878, 36913, 36954, 36955, 36994, 36995, 36996, 36997, 37065, 37215, 37490, 37540, 37554, 37593, 37755, 37927, 38146, 38150, 38557, 38558, 38569, 38757, 38855, 38857, 39123, 39217, 39231, 40655, 40728, 40756, 40781, 40987, 40990, 40995, 41178, 41376, 41550, 41551, 41552, 41766, 42015, 42045, 42098, 42122, 42123, 42144, 42172, 42173, 42196, 42202, 42219, 42229, 42251, 42318, 42408, 42409, 42429, 42454, 42455, 42456, 42457, 42458, 42459, 42460, 42461, 42517, 42550, 42565, 42572, 42593, 42595, 42596, 42666, 42667, 42678, 42735, 42737, 42759, 42760, 42774, 42822, 42844, 42851, 42856, 42979, 42980, 42981, 42982, 42999, 43175, 43359, 43382, 43416, 43467, 43468, 43471, 43472, 43516, 43559, 43620, 43639, 43642, 43643, 43644, 43647, 43890, 43968, 43970, 44139, 44140, 44525, 44526, 44527, 44528, 44529, 44530, 44531, 44532, 44533, 44535, 44536, 44538, 44566, 44581, 44744, 44748, 44842, 45030, 45041, 45042, 45051, 45057, 45092, 45144, 45145, 45160, 45181, 45186, 45213, 45246, 45249, 45252, 45281, 45291, 45316, 45319, 45344, 45350, 45423, 45455, 45504, 45507, 45510, 45511, 45590, 45681, 45686, 45693, 45694, 45710, 45737, 45819, 45870, 45871, 45872, 46097, 46099, 46110, 46111, 46115, 46116, 46120, 46275, 46285, 46286, 46287, 46288, 46290, 46291, 46303, 46361, 46418, 46644, 46646, 46661, 46674, 46692, 46717, 46743, 46753, 46767, 46931, 46965, 47034, 47049, 47066, 47305, 47807, 48005, 48051, 48076, 48079, 48084, 48092, 48097, 48165, 48185, 48190, 48196, 48233, 48554, 48572, 48606, 48700, 48852, 48854, 48855, 48977, 48979, 48983, 48992, 48997, 48999, 49001, 49110, 49127, 49145, 49153, 49154, 49168, 49169, 49171, 49188, 49189, 49190, 49192, 49193, 49194, 49200, 49205, 49207, 49210, 49385, 49427, 49454, 49474, 49526, 49529, 49530, 49531, 49542, 49552, 49553, 49560, 49561, 49604, 49618, 49626, 49627, 49685, 49761, 49846, 49911, 50009, 50067, 50254, 50691, 50693, 50694, 50695, 50696, 50697, 50698, 50699, 50700, 51060, 51065, 51089, 51098, 51114, 51132, 51135, 51144, 51228, 51311, 51315, 51316, 51317, 51318, 51319, 51320, 51321, 51322, 51338, 51340, 51435, 51436, 51479, 51480, 51481, 51482, 51483, 51484, 51485, 51486, 51487, 51597, 51598, 51624, 52409, 52558, 52599, 52659, 52696, 52792, 52811, 52829, 52868, 52869, 52895, 52923, 52949, 52951, 53046, 53047, 53194, 53220, 53226, 53227, 53241, 53242, 53250, 53252, 53255, 53272, 53274, 53277, 53278, 53279, 53280, 53282, 53287, 53295, 53298, 53299, 53305, 53306, 53307, 53311, 53312, 53313, 53314, 53315, 53316, 53317, 53318, 53319, 53320, 53321, 53322, 53323, 53324, 53325, 53326, 53330, 53331, 53332, 53333, 53334, 53335, 53336, 53337, 53338, 53339, 53340, 53341, 53342, 53343, 53344, 53345, 53346, 53390, 53394, 53396, 53397, 53439, 53468, 53505, 53518, 53537, 53560, 53615, 53649, 53652, 53655, 53657, 53660, 53663, 53664, 53665, 53666, 53667, 53668, 53669, 53670, 53676, 53678, 53679, 53682, 53683, 53700, 53701, 53715, 53716, 53723, 53738, 53744, 53772, 53785, 53870, 53920, 53925, 53926, 54192, 54199, 54226, 54258, 54260, 54306, 54313, 54421, 54424, 54429, 54432, 54436, 54437, 54439, 54440, 54858, 54859, 54860, 54861, 54863, 54881, 54937, 54946, 54947, 54956, 54957, 54969, 54986, 54994, 54997, 55000, 55002, 55078, 55082, 55091, 55346, 55393, 55394, 55395, 55400, 55700, 55739, 55971, 56071, 56078, 56087, 56099, 56100, 56101, 56102, 56103, 56126, 56167, 56168, 56173, 56188, 56262, 56263, 56307, 56405, 56471, 56475, 56479, 56570, 56584, 56598, 56620, 56638, 56642, 56699, 56703, 56710, 56724, 56844, 56846, 57201, 57479, 57480, 57686, 57693, 57694, 57695, 57696, 57769, 57798, 57962, 58232, 58418, 59721, 59723, 60140, 60239, 60283, 60285, 60378, 60380, 60491, 60947, 60999, 61177, 62237, 62238, 62239, 62240, 62346, 62465, 62683, 62983, 63748, 63914, 63915, 63991, 63992, 64245, 64308, 64554, 64556, 64603, 64727, 64923, 65219, 65498, 65499, 65500, 65501, 65503, 67272, 67279, 67426, 67531, 67710, 67784, 67788, 67789, 67828, 67831, 67838, 67958, 68105, 68153, 68190, 68191, 68210, 68213, 68214, 68894, 68895, 68896, 68897, 68898, 68899, 68900, 68901, 69018, 69565, 69571, 69645, 70157, 70762, 70893, 70959, 70963, 71110, 71120, 71289, 71371, 72780, 73065);
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index d17e8b83c92..4438bf1863d 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -538,7 +538,7 @@ bool CompareValues(ComparisionType type, T val1, T val2)
}
template<typename E>
-typename std::underlying_type<E>::type AsUnderlyingType(E enumValue)
+constexpr typename std::underlying_type<E>::type AsUnderlyingType(E enumValue)
{
static_assert(std::is_enum<E>::value, "AsUnderlyingType can only be used with enums");
return static_cast<typename std::underlying_type<E>::type>(enumValue);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 2f0df09d488..55e93719dc1 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2360,6 +2360,10 @@ bool Creature::LoadCreaturesAddon()
SetMovementAnimKitId(cainfo->movementAnimKit);
SetMeleeAnimKitId(cainfo->meleeAnimKit);
+ // Check if visibility distance different
+ if (cainfo->visibilityDistanceType != VisibilityDistanceType::Normal)
+ SetVisibilityDistanceOverride(cainfo->visibilityDistanceType);
+
//Load Path
if (cainfo->path_id != 0)
m_path_id = cainfo->path_id;
diff --git a/src/server/game/Entities/Creature/CreatureData.h b/src/server/game/Entities/Creature/CreatureData.h
index d53f59c0273..36715732e48 100644
--- a/src/server/game/Entities/Creature/CreatureData.h
+++ b/src/server/game/Entities/Creature/CreatureData.h
@@ -28,6 +28,7 @@
#include <cmath>
struct ItemTemplate;
+enum class VisibilityDistanceType : uint8;
enum CreatureDifficultyFlags
{
@@ -578,6 +579,7 @@ struct CreatureAddon
uint16 movementAnimKit;
uint16 meleeAnimKit;
std::vector<uint32> auras;
+ VisibilityDistanceType visibilityDistanceType;
};
// Vendors
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 2e15c25baa5..7f07e5f2930 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -400,6 +400,18 @@ bool GameObject::Create(uint32 entry, Map* map, Position const& pos, QuaternionD
}
}
+ // Check if GameObject is Infinite
+ if (goInfo->IsInfiniteGameObject())
+ SetVisibilityDistanceOverride(VisibilityDistanceType::Infinite);
+
+ // Check if GameObject is Gigantic
+ if (goInfo->IsGiganticGameObject())
+ SetVisibilityDistanceOverride(VisibilityDistanceType::Gigantic);
+
+ // Check if GameObject is Large
+ if (goInfo->IsLargeGameObject())
+ SetVisibilityDistanceOverride(VisibilityDistanceType::Large);
+
return true;
}
diff --git a/src/server/game/Entities/GameObject/GameObjectData.h b/src/server/game/Entities/GameObject/GameObjectData.h
index 873e2076ea2..5944f07654a 100644
--- a/src/server/game/Entities/GameObject/GameObjectData.h
+++ b/src/server/game/Entities/GameObject/GameObjectData.h
@@ -850,6 +850,60 @@ struct GameObjectTemplate
default: return 0;
}
}
+
+ bool IsInfiniteGameObject() const
+ {
+ switch (type)
+ {
+ case GAMEOBJECT_TYPE_DOOR: return door.InfiniteAOI != 0;
+ case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.InfiniteAOI != 0;
+ case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.InfiniteAOI != 0;
+ case GAMEOBJECT_TYPE_TRAPDOOR: return trapdoor.InfiniteAOI != 0;
+ case GAMEOBJECT_TYPE_NEW_FLAG: return newflag.InfiniteAOI != 0;
+ default: return false;
+ }
+ }
+
+ bool IsGiganticGameObject() const
+ {
+ switch (type)
+ {
+ case GAMEOBJECT_TYPE_DOOR: return door.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_BUTTON: return button.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_QUESTGIVER: return questgiver.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_CHEST: return chest.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_GENERIC: return generic.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_TRAP: return trap.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_SPELL_FOCUS: return spellFocus.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_GOOBER: return goober.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_SPELLCASTER: return spellCaster.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_FLAGSTAND: return flagStand.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_FLAGDROP: return flagDrop.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_CONTROL_ZONE: return controlZone.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY: return dungeonDifficulty.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_TRAPDOOR: return trapdoor.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_NEW_FLAG: return newflag.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_CAPTURE_POINT: return capturePoint.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_GARRISON_SHIPMENT: return garrisonShipment.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_UI_LINK: return UILink.GiganticAOI != 0;
+ case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.GiganticAOI != 0;
+ default: return false;
+ }
+ }
+
+ bool IsLargeGameObject() const
+ {
+ switch (type)
+ {
+ case GAMEOBJECT_TYPE_CHEST: return chest.LargeAOI != 0;
+ case GAMEOBJECT_TYPE_GENERIC: return generic.LargeAOI != 0;
+ case GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY: return dungeonDifficulty.LargeAOI != 0;
+ case GAMEOBJECT_TYPE_GARRISON_SHIPMENT: return garrisonShipment.LargeAOI != 0;
+ case GAMEOBJECT_TYPE_ARTIFACT_FORGE: return artifactForge.LargeAOI != 0;
+ case GAMEOBJECT_TYPE_GATHERING_NODE: return gatheringNode.LargeAOI != 0;
+ default: return false;
+ }
+ }
};
// From `gameobject_template_addon`
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 9d0645842d4..392d418a3e7 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -51,6 +51,16 @@
#include "WorldSession.h"
#include <G3D/Vector3.h>
+constexpr float VisibilityDistances[AsUnderlyingType(VisibilityDistanceType::Max)] =
+{
+ DEFAULT_VISIBILITY_DISTANCE,
+ VISIBILITY_DISTANCE_TINY,
+ VISIBILITY_DISTANCE_SMALL,
+ VISIBILITY_DISTANCE_LARGE,
+ VISIBILITY_DISTANCE_GIGANTIC,
+ MAX_VISIBILITY_DISTANCE
+};
+
Object::Object()
{
m_objectTypeId = TYPEID_OBJECT;
@@ -1615,6 +1625,15 @@ void WorldObject::setActive(bool on)
}
}
+void WorldObject::SetVisibilityDistanceOverride(VisibilityDistanceType type)
+{
+ ASSERT(type < VisibilityDistanceType::Max);
+ if (GetTypeId() == TYPEID_PLAYER)
+ return;
+
+ m_visibilityDistanceOverride = VisibilityDistances[AsUnderlyingType(type)];
+}
+
void WorldObject::CleanupsBeforeDelete(bool /*finalCleanup*/)
{
if (IsInWorld())
@@ -2061,7 +2080,9 @@ float WorldObject::GetGridActivationRange() const
float WorldObject::GetVisibilityRange() const
{
- if (isActiveObject() && !ToPlayer())
+ if (IsVisibilityOverridden() && !ToPlayer())
+ return *m_visibilityDistanceOverride;
+ else if (isActiveObject() && !ToPlayer())
return MAX_VISIBILITY_DISTANCE;
else
return GetMap()->GetVisibilityRange();
@@ -2073,7 +2094,9 @@ float WorldObject::GetSightRange(const WorldObject* target) const
{
if (ToPlayer())
{
- if (target && target->isActiveObject() && !target->ToPlayer())
+ if (target && target->IsVisibilityOverridden() && !target->ToPlayer())
+ return *target->m_visibilityDistanceOverride;
+ else if (target && target->isActiveObject() && !target->ToPlayer())
return MAX_VISIBILITY_DISTANCE;
else if (ToPlayer()->GetCinematicMgr()->IsOnCinematic())
return DEFAULT_VISIBILITY_INSTANCE;
diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h
index fb05d7cc747..211cb5e221c 100644
--- a/src/server/game/Entities/Object/Object.h
+++ b/src/server/game/Entities/Object/Object.h
@@ -26,6 +26,7 @@
#include "MovementInfo.h"
#include "ObjectDefines.h"
#include "ObjectGuid.h"
+#include "Optional.h"
#include "PhaseShift.h"
#include "Position.h"
#include "SharedDefines.h"
@@ -572,6 +573,8 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
bool isActiveObject() const { return m_isActive; }
void setActive(bool isActiveObject);
+ bool IsVisibilityOverridden() const { return m_visibilityDistanceOverride.is_initialized(); }
+ void SetVisibilityDistanceOverride(VisibilityDistanceType type);
void SetWorldObject(bool apply);
bool IsPermanentWorldObject() const { return m_isWorldObject; }
bool IsWorldObject() const;
@@ -604,6 +607,7 @@ class TC_GAME_API WorldObject : public Object, public WorldLocation
protected:
std::string m_name;
bool m_isActive;
+ Optional<float> m_visibilityDistanceOverride;
const bool m_isWorldObject;
ZoneScript* m_zoneScript;
diff --git a/src/server/game/Entities/Object/ObjectDefines.h b/src/server/game/Entities/Object/ObjectDefines.h
index 34bfdd036a3..00b7557c120 100644
--- a/src/server/game/Entities/Object/ObjectDefines.h
+++ b/src/server/game/Entities/Object/ObjectDefines.h
@@ -21,22 +21,39 @@
#include "Define.h"
-#define CONTACT_DISTANCE 0.5f
-#define INTERACTION_DISTANCE 5.0f
-#define ATTACK_DISTANCE 5.0f
-#define INSPECT_DISTANCE 28.0f
-#define TRADE_DISTANCE 11.11f
-#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects
-#define SIGHT_RANGE_UNIT 50.0f
-#define DEFAULT_VISIBILITY_DISTANCE 90.0f // default visible distance, 90 yards on continents
-#define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards
-#define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards
-
-#define DEFAULT_WORLD_OBJECT_SIZE 0.388999998569489f // player size, also currently used (correctly?) for any non Unit world objects
-#define DEFAULT_COMBAT_REACH 1.5f
-#define MIN_MELEE_REACH 2.0f
-#define NOMINAL_MELEE_RANGE 5.0f
-#define MELEE_RANGE (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2) //center to center for players
+#define CONTACT_DISTANCE 0.5f
+#define INTERACTION_DISTANCE 5.0f
+#define ATTACK_DISTANCE 5.0f
+#define INSPECT_DISTANCE 28.0f
+#define TRADE_DISTANCE 11.11f
+#define MAX_VISIBILITY_DISTANCE SIZE_OF_GRIDS // max distance for visible objects
+#define SIGHT_RANGE_UNIT 50.0f
+#define VISIBILITY_DISTANCE_GIGANTIC 400.0f
+#define VISIBILITY_DISTANCE_LARGE 200.0f
+#define VISIBILITY_DISTANCE_NORMAL 100.0f
+#define VISIBILITY_DISTANCE_SMALL 50.0f
+#define VISIBILITY_DISTANCE_TINY 25.0f
+#define DEFAULT_VISIBILITY_DISTANCE VISIBILITY_DISTANCE_NORMAL // default visible distance, 100 yards on continents
+#define DEFAULT_VISIBILITY_INSTANCE 170.0f // default visible distance in instances, 170 yards
+#define DEFAULT_VISIBILITY_BGARENAS 533.0f // default visible distance in BG/Arenas, roughly 533 yards
+
+#define DEFAULT_WORLD_OBJECT_SIZE 0.388999998569489f // player size, also currently used (correctly?) for any non Unit world objects
+#define DEFAULT_COMBAT_REACH 1.5f
+#define MIN_MELEE_REACH 2.0f
+#define NOMINAL_MELEE_RANGE 5.0f
+#define MELEE_RANGE (NOMINAL_MELEE_RANGE - MIN_MELEE_REACH * 2) //center to center for players
+
+enum class VisibilityDistanceType : uint8
+{
+ Normal = 0,
+ Tiny = 1,
+ Small = 2,
+ Large = 3,
+ Gigantic = 4,
+ Infinite = 5,
+
+ Max
+};
enum TempSummonType
{
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index db98243a5f1..8ad7d0b14ae 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -588,8 +588,8 @@ void ObjectMgr::LoadCreatureTemplateAddons()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8 9
- QueryResult result = WorldDatabase.Query("SELECT entry, path_id, mount, bytes1, bytes2, emote, aiAnimKit, movementAnimKit, meleeAnimKit, auras FROM creature_template_addon");
+ // 0 1 2 3 4 5 6 7 8 9 10
+ QueryResult result = WorldDatabase.Query("SELECT entry, path_id, mount, bytes1, bytes2, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_template_addon");
if (!result)
{
@@ -612,16 +612,17 @@ void ObjectMgr::LoadCreatureTemplateAddons()
CreatureAddon& creatureAddon = _creatureTemplateAddonStore[entry];
- creatureAddon.path_id = fields[1].GetUInt32();
- creatureAddon.mount = fields[2].GetUInt32();
- creatureAddon.bytes1 = fields[3].GetUInt32();
- creatureAddon.bytes2 = fields[4].GetUInt32();
- creatureAddon.emote = fields[5].GetUInt32();
- creatureAddon.aiAnimKit = fields[6].GetUInt16();
- creatureAddon.movementAnimKit = fields[7].GetUInt16();
- creatureAddon.meleeAnimKit = fields[8].GetUInt16();
-
- Tokenizer tokens(fields[9].GetString(), ' ');
+ creatureAddon.path_id = fields[1].GetUInt32();
+ creatureAddon.mount = fields[2].GetUInt32();
+ creatureAddon.bytes1 = fields[3].GetUInt32();
+ creatureAddon.bytes2 = fields[4].GetUInt32();
+ creatureAddon.emote = fields[5].GetUInt32();
+ creatureAddon.aiAnimKit = fields[6].GetUInt16();
+ creatureAddon.movementAnimKit = fields[7].GetUInt16();
+ creatureAddon.meleeAnimKit = fields[8].GetUInt16();
+ creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[9].GetUInt8());
+
+ Tokenizer tokens(fields[10].GetString(), ' ');
uint8 i = 0;
creatureAddon.auras.resize(tokens.size());
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
@@ -679,6 +680,13 @@ void ObjectMgr::LoadCreatureTemplateAddons()
creatureAddon.meleeAnimKit = 0;
}
+ if (creatureAddon.visibilityDistanceType >= VisibilityDistanceType::Max)
+ {
+ TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) has invalid visibilityDistanceType (%u) defined in `creature_template_addon`.",
+ entry, AsUnderlyingType(creatureAddon.visibilityDistanceType));
+ creatureAddon.visibilityDistanceType = VisibilityDistanceType::Normal;
+ }
+
++count;
}
while (result->NextRow());
@@ -1064,8 +1072,8 @@ void ObjectMgr::LoadCreatureAddons()
{
uint32 oldMSTime = getMSTime();
- // 0 1 2 3 4 5 6 7 8 9
- QueryResult result = WorldDatabase.Query("SELECT guid, path_id, mount, bytes1, bytes2, emote, aiAnimKit, movementAnimKit, meleeAnimKit, auras FROM creature_addon");
+ // 0 1 2 3 4 5 6 7 8 9 10
+ QueryResult result = WorldDatabase.Query("SELECT guid, path_id, mount, bytes1, bytes2, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_addon");
if (!result)
{
@@ -1096,15 +1104,16 @@ void ObjectMgr::LoadCreatureAddons()
TC_LOG_ERROR("sql.sql", "Creature (GUID " UI64FMTD ") has movement type set to WAYPOINT_MOTION_TYPE but no path assigned", guid);
}
- creatureAddon.mount = fields[2].GetUInt32();
- creatureAddon.bytes1 = fields[3].GetUInt32();
- creatureAddon.bytes2 = fields[4].GetUInt32();
- creatureAddon.emote = fields[5].GetUInt32();
- creatureAddon.aiAnimKit = fields[6].GetUInt16();
- creatureAddon.movementAnimKit = fields[7].GetUInt16();
- creatureAddon.meleeAnimKit = fields[8].GetUInt16();
+ creatureAddon.mount = fields[2].GetUInt32();
+ creatureAddon.bytes1 = fields[3].GetUInt32();
+ creatureAddon.bytes2 = fields[4].GetUInt32();
+ creatureAddon.emote = fields[5].GetUInt32();
+ creatureAddon.aiAnimKit = fields[6].GetUInt16();
+ creatureAddon.movementAnimKit = fields[7].GetUInt16();
+ creatureAddon.meleeAnimKit = fields[8].GetUInt16();
+ creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[9].GetUInt8());
- Tokenizer tokens(fields[9].GetString(), ' ');
+ Tokenizer tokens(fields[10].GetString(), ' ');
uint8 i = 0;
creatureAddon.auras.resize(tokens.size());
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
@@ -1162,6 +1171,13 @@ void ObjectMgr::LoadCreatureAddons()
creatureAddon.meleeAnimKit = 0;
}
+ if (creatureAddon.visibilityDistanceType >= VisibilityDistanceType::Max)
+ {
+ TC_LOG_ERROR("sql.sql", "Creature (GUID: " UI64FMTD ") has invalid visibilityDistanceType (%u) defined in `creature_addon`.",
+ guid, AsUnderlyingType(creatureAddon.visibilityDistanceType));
+ creatureAddon.visibilityDistanceType = VisibilityDistanceType::Normal;
+ }
+
++count;
}
while (result->NextRow());
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index cfcde52c061..65c386abd66 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -2022,15 +2022,15 @@ Visibility.GroupMode = 1
# Visibility.Distance.Instances
# Visibility.Distance.BGArenas
# Description: Visibility distance to see other players or gameobjects.
-# Visibility on continents on retail ~90 yards. In BG/Arenas ~533.
+# Visibility on continents on retail ~100 yards. In BG/Arenas ~533.
# For instances default ~170.
# Max limited by grid size: 533.33333
# Min limit is max aggro radius (45) * Rate.Creature.Aggro
-# Default: 90 - (Visibility.Distance.Continents)
+# Default: 100 - (Visibility.Distance.Continents)
# 170 - (Visibility.Distance.Instances)
# 533 - (Visibility.Distance.BGArenas)
-Visibility.Distance.Continents = 90
+Visibility.Distance.Continents = 100
Visibility.Distance.Instances = 170
Visibility.Distance.BGArenas = 533