diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2018-01-04 04:46:22 +0100 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2018-01-04 04:46:41 +0100 |
| commit | 9f9507e6a1fd50a5ce643a4096c1712700244a61 (patch) | |
| tree | 75829e0efab227ca03b01d4182b17410954e32fc /src/server/game/Maps/Map.cpp | |
| parent | e2451136600bf4c30eb547bd8579f019cfd37a3d (diff) | |
Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174.
- Some strings cleanup
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
| -rw-r--r-- | src/server/game/Maps/Map.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 8c1cf06a4f5..5dac23ddb07 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -3240,7 +3240,7 @@ void Map::ApplyDynamicModeRespawnScaling(WorldObject const* obj, ObjectGuid::Low SpawnGroupTemplateData const* Map::GetSpawnGroupData(uint32 groupId) const { SpawnGroupTemplateData const* data = sObjectMgr->GetSpawnGroupData(groupId); - if (data && data->mapId == GetId()) + if (data && (data->flags & SPAWNGROUP_FLAG_SYSTEM || data->mapId == GetId())) return data; return nullptr; } @@ -3371,11 +3371,12 @@ bool Map::IsSpawnGroupActive(uint32 groupId) const SpawnGroupTemplateData const* const data = GetSpawnGroupData(groupId); if (!data) { - TC_LOG_WARN("maps", "Tried to query state of non-existing spawn group %u on map %u.", groupId, GetId()); + TC_LOG_ERROR("maps", "Tried to query state of non-existing spawn group %u on map %u.", groupId, GetId()); return false; } if (data->flags & SPAWNGROUP_FLAG_SYSTEM) return true; + // either manual spawn group and toggled, or not manual spawn group and not toggled... return (_toggledSpawnGroupIds.find(groupId) != _toggledSpawnGroupIds.end()) != !(data->flags & SPAWNGROUP_FLAG_MANUAL_SPAWN); } |
