aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Holiver <none@none>2010-08-03 14:39:18 -0300
committerJohn Holiver <none@none>2010-08-03 14:39:18 -0300
commitfeebd3a24a3b1b484202135aa3386a448c9a84be (patch)
tree18d2e27129c055c8a57b0d6f476300ba273fec3b
parent682ebafdc0280859aaa90e0aa898d54e64c23c0b (diff)
Fix a urand limit for Battleground Weights.
--HG-- branch : trunk
-rw-r--r--src/server/game/BattleGrounds/BattleGroundMgr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/BattleGrounds/BattleGroundMgr.cpp b/src/server/game/BattleGrounds/BattleGroundMgr.cpp
index 745b9829573..5cee72e7570 100644
--- a/src/server/game/BattleGrounds/BattleGroundMgr.cpp
+++ b/src/server/game/BattleGrounds/BattleGroundMgr.cpp
@@ -1581,7 +1581,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
if (!Weight)
return NULL;
// Select a random value
- selectedWeight = urand(0, Weight);
+ selectedWeight = urand(0, Weight-1);
// Select the correct bg (if we have in DB A(10), B(20), C(10), D(15) --> [0---A---9|10---B---29|30---C---39|40---D---54])
Weight = 0;