aboutsummaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorRat <none@none>2010-05-04 12:16:45 +0200
committerRat <none@none>2010-05-04 12:16:45 +0200
commit3516be7cf90973c35b4ebaa27aa13b36dc1b1329 (patch)
treef85acb2521c87e58a767da43a3618b5e35546e9f /src/game
parentafc7106e85faa6eb304cea87997f676a1ad0cfd6 (diff)
use DB speeds for battleground creatures
fixes moving cannons, if you set speeds to 0 in DB for them --HG-- branch : trunk
Diffstat (limited to 'src/game')
-rw-r--r--src/game/BattleGround.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 6c32021538f..ee6cc5c4765 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -1616,7 +1616,15 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f
pCreature->SetHomePosition(x, y, z, o);
- //pCreature->SetDungeonDifficulty(0);
+ CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(entry);
+ if (!cinfo)
+ {
+ sLog.outErrorDb("BattleGround::AddCreature: entry %u does not exist.", entry);
+ return NULL;
+ }
+ //force using DB speeds
+ pCreature->SetSpeed(MOVE_WALK, cinfo->speed_walk);
+ pCreature->SetSpeed(MOVE_RUN, cinfo->speed_run);
map->Add(pCreature);
m_BgCreatures[type] = pCreature->GetGUID();