World of Warcraft has a game mechanism that grants you XP for exploring new areas (sometimes called regions, sub-regions, zones, or sub-zones).
Gained XP depends on area level from AreaTable.dbc If the player is within 5 levels of the area level, then the player gains Base XP.
Base XP has no known formula yet, but this table has been gathered from gameplay:
Area Lvl | Base XP | Area Lvl | Base XP | Area Lvl | Base XP | ||
---|---|---|---|---|---|---|---|
0 | 0 | 24 | 195 | 48 | 440 | ||
1 | 5 | 25 | 200 | 49 | 455 | ||
2 | 15 | 26 | 210 | 50 | 470 | ||
3 | 25 | 27 | 220 | 51 | 490 | ||
4 | 35 | 28 | 230 | 52 | 510 | ||
5 | 45 | 29 | 240 | 53 | 530 | ||
6 | 55 | 30 | 245 | 54 | 540 | ||
7 | 65 | 31 | 250 | 55 | 560 | ||
8 | 70 | 32 | 255 | 56 | 580 | ||
9 | 80 | 33 | 265 | 57 | 600 | ||
10 | 85 | 34 | 270 | 58 | 620 | ||
11 | 90 | 35 | 275 | 59 | 640 | ||
12 | 90 | 36 | 280 | 60 | 660 | ||
13 | 90 | 37 | 285 | 61 | 970 | ||
14 | 100 | 38 | 285 | 62 | 1000 | ||
15 | 105 | 39 | 300 | 63 | 1050 | ||
16 | 115 | 40 | 315 | 64 | 1080 | ||
17 | 125 | 41 | 330 | 65 | 1100 | ||
18 | 135 | 42 | 345 | 66 | 1130 | ||
19 | 145 | 43 | 360 | 67 | 1160 | ||
20 | 155 | 44 | 375 | 68 | 1200 | ||
21 | 165 | 45 | 390 | 69 | 1230 | ||
22 | 175 | 46 | 405 | 70 | 1250 | ||
23 | 185 | 47 | 420 | - | - |
From this table you can write function GetBaseXP(area_level) which returns Base XP
If the player is more than 5 levels below the area level then the player gains less XP:
percent = 100-(((player_level-area_level)-5)*5) if percent < 0 percent = 0 if percent > 100 percent = 100 XP = (GetBaseXP(area_level) * percent) / 100
If the player is more 5 levels above the area level then the player also gains less XP:
XP = GetBaseXP(player_level+5)