diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2019-07-15 17:14:58 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-16 01:33:09 +0100 |
| commit | eee950cdd7bcbe9443a53ea5c4cce35444a503f7 (patch) | |
| tree | eba357353a54d8a6dc308e0a4c732f6459eb1bee /src/server/scripts | |
| parent | d5e58cef694d3db65f0a27b93099ae4e517685a4 (diff) | |
Core/Misc: Various dynspawn cleanup and refactors split off from pooling rewrite:
- Map::RemoveRespawnTime(SpawnObjectType, LowType, doRespawn) split into Map::Respawn and Map::RemoveRespawnTime, without the extra boolean
- Map::RemoveRespawnTime(RespawnInfo*) merged into Map::DeleteRespawnInfo(RespawnInfo*) and is now private
- Map::DeleteRespawnInfo(void) renamed to Map::UnloadAllRespawnInfos to properly describe what it does
- Map::ProcessRespawns now actually saves the delayed respawn time to DB if the respawn was delayed
- Map::AddRespawnInfo now takes const reference, and returns success as a boolean
- Map::AddRespawnInfo no longer offers an unused "replace" parameter
- Map::DeleteRespawnInfo no longer offers a variety of unused private overloads
- Map::SaveRespawnTime no longer offers a tantalizing writeDB parameter. Parameter is now called "startup" to properly describe what it does.
- Map::SaveRespawnInfoDB now takes RespawnInfo reference instead of all the various fields. Still public because compatibility mode. QQ.
- Map::GetWorldObjectBySpawnId sanitized
- Map::GetXRespawnTime methods sanitized to all go through Map::GetRespawnTime
(cherry picked from commit d60082ae866d77a12a9e6d09dfce27fc1cb5df90)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 793b4f02838..bfb45069900 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1983,7 +1983,7 @@ public: uint32 const gridId = Trinity::ComputeGridCoord(player->GetPositionX(), player->GetPositionY()).GetId(); for (RespawnInfo* info : data) if (info->gridId == gridId) - player->GetMap()->RemoveRespawnTime(info, true); + player->GetMap()->Respawn(info->type, info->spawnId); } return true; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp index a5878777142..19a71ccf656 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_thaddius.cpp @@ -337,8 +337,8 @@ struct boss_thaddius : public BossAI me->SetReactState(REACT_PASSIVE); // @todo these guys should really be moved to a summon group - this is merely a hack to make them work in dynamic_spawning - instance->instance->RemoveRespawnTime(SPAWN_TYPE_CREATURE, 130958, true); // Stalagg - instance->instance->RemoveRespawnTime(SPAWN_TYPE_CREATURE, 130959, true); // Feugen + instance->instance->Respawn(SPAWN_TYPE_CREATURE, 130958); // Stalagg + instance->instance->Respawn(SPAWN_TYPE_CREATURE, 130959); // Feugen } void UpdateAI(uint32 diff) override |
