aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Battlefield/Battlefield.cpp
diff options
context:
space:
mode:
authorr00ty-tc <r00ty-tc@users.noreply.github.com>2017-05-07 21:48:41 +0100
committerTreeston <treeston.mmoc@gmail.com>2017-07-31 21:21:04 +0200
commit59db2eeea0a35028779fd76372ae06cc98c8086f (patch)
treea9532989868948cb309cb8d76a2e76a017fa9246 /src/server/game/Battlefield/Battlefield.cpp
parentd24ce1739a799042d5a164794c09674227c8572c (diff)
Dynamic Creature/Go spawning:
- True blizzlike creature spawn/respawn behavior - new creature = new object - Toggleable spawn groups (with C++/SAI/command options to use them) - Custom feature: dynamic spawn rate scaling. Accelerates respawn rate based on players in the zone. - Backward compatibility mode (set via group and for summons) to support creatures/gos that currently don't work well with this (this should be removed once the exceptions are fixed) Fixes and closes #2858 Tags #8661 as fixable. Fixes and closes #13787 Fixes #15222.
Diffstat (limited to 'src/server/game/Battlefield/Battlefield.cpp')
-rw-r--r--src/server/game/Battlefield/Battlefield.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp
index 27e83185e27..92b78216cb0 100644
--- a/src/server/game/Battlefield/Battlefield.cpp
+++ b/src/server/game/Battlefield/Battlefield.cpp
@@ -776,18 +776,15 @@ Creature* Battlefield::SpawnCreature(uint32 entry, Position const& pos)
return nullptr;
}
- float x, y, z, o;
- pos.GetPosition(x, y, z, o);
-
Creature* creature = new Creature();
- if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, x, y, z, o))
+ if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, pos))
{
TC_LOG_ERROR("bg.battlefield", "Battlefield::SpawnCreature: Can't create creature entry: %u", entry);
delete creature;
return nullptr;
}
- creature->SetHomePosition(x, y, z, o);
+ creature->SetHomePosition(pos);
// Set creature in world
map->AddToMap(creature);