diff options
| author | megamage <none@none> | 2009-05-30 22:15:05 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-30 22:15:05 -0500 |
| commit | 8d1f4f9ea0beb503e2a3014abb95263e501ef1c5 (patch) | |
| tree | 41d48951c315129dee817befa40d4dab90d3fd14 /src/game/BattleGround.cpp | |
| parent | b5778357d9d8c5fb10da5d99c46b48250578cb49 (diff) | |
*Provide another way to implement dynamic spawns. Now a creature will call its zonescript before spawn to determine the spawned entry. This can be used to implement zones such as wintergrasp with less data requirement (only need to know the entry of counterpart creatures, not require spawn points)
*Use zonescript as basic class of opvp script and dugeon script (can also be used for bg)
*Store zonescript in worldobject.
*Add door for sapphiron.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
| -rw-r--r-- | src/game/BattleGround.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index acb3f25ae31..a995157786f 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1490,22 +1490,13 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f return NULL; Creature* pCreature = new Creature; - if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, teamval)) + if (!pCreature->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), map, PHASEMASK_NORMAL, entry, teamval, x, y, z, o)) { sLog.outError("Can't create creature entry: %u",entry); delete pCreature; return NULL; } - pCreature->Relocate(x, y, z, o); - - if (!pCreature->IsPositionValid()) - { - sLog.outError("Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY()); - delete pCreature; - return NULL; - } - pCreature->SetHomePosition(x, y, z, o); //pCreature->SetDungeonDifficulty(0); |
