mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Entities/Unit: Nuke Map::ForceRespawn from orbit, with the following implications:
- .npc respawn no longer causes stupid things to happen (Fixes #23014) - ::DeleteFromDB methods on Creature and GameObject rewritten to be as sensible as such a colossally stupid method can ever be. They're static now. - .npc delete and .gobj delete ported to new argument handling, and rewritten as per above. They can no longer crash the server when used in instances, too. Yay for that. - Adjusted various dusty cobwebbed hacks around the core (why does waypoint visualization use permanent spawns *shudder*) to still work too.
This commit is contained in:
@@ -3173,9 +3173,9 @@ void Map::DoRespawn(SpawnObjectType type, ObjectGuid::LowType spawnId, uint32 gr
|
||||
}
|
||||
}
|
||||
|
||||
void Map::Respawn(RespawnInfo* info, bool force, SQLTransaction dbTrans)
|
||||
void Map::Respawn(RespawnInfo* info, SQLTransaction dbTrans)
|
||||
{
|
||||
if (!force && !CheckRespawn(info))
|
||||
if (!CheckRespawn(info))
|
||||
{
|
||||
if (info->respawnTime)
|
||||
SaveRespawnTime(info->type, info->spawnId, info->entry, info->respawnTime, info->gridId, true, true, dbTrans);
|
||||
@@ -3192,11 +3192,11 @@ void Map::Respawn(RespawnInfo* info, bool force, SQLTransaction dbTrans)
|
||||
DoRespawn(type, spawnId, gridId);
|
||||
}
|
||||
|
||||
void Map::Respawn(std::vector<RespawnInfo*>& respawnData, bool force, SQLTransaction dbTrans)
|
||||
void Map::Respawn(std::vector<RespawnInfo*>& respawnData, SQLTransaction dbTrans)
|
||||
{
|
||||
SQLTransaction trans = dbTrans ? dbTrans : CharacterDatabase.BeginTransaction();
|
||||
for (RespawnInfo* info : respawnData)
|
||||
Respawn(info, force, trans);
|
||||
Respawn(info, trans);
|
||||
if (!dbTrans)
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user