diff options
author | Rat <none@none> | 2010-05-04 12:16:45 +0200 |
---|---|---|
committer | Rat <none@none> | 2010-05-04 12:16:45 +0200 |
commit | 3516be7cf90973c35b4ebaa27aa13b36dc1b1329 (patch) | |
tree | f85acb2521c87e58a767da43a3618b5e35546e9f | |
parent | afc7106e85faa6eb304cea87997f676a1ad0cfd6 (diff) |
use DB speeds for battleground creatures
fixes moving cannons, if you set speeds to 0 in DB for them
--HG--
branch : trunk
-rw-r--r-- | src/game/BattleGround.cpp | 10 |
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(); |