mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 11:43:18 -04:00
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
This commit is contained in:
@@ -2288,7 +2288,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
map = targets.front()->GetMap();
|
||||
|
||||
if (map)
|
||||
map->RemoveRespawnTime(SpawnObjectType(e.action.respawnData.spawnType), e.action.respawnData.spawnId, true);
|
||||
map->Respawn(SpawnObjectType(e.action.respawnData.spawnType), e.action.respawnData.spawnId);
|
||||
else
|
||||
TC_LOG_ERROR("sql.sql", "SmartScript::ProcessAction: Entry %d SourceType %u, Event %u - tries to respawn by spawnId but does not provide a map", e.entryOrGuid, e.GetScriptType(), e.event_id);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user