Scripts/Commands: Fix some quirkiness and potential crashes with live DB modification commands (npc move and npc delete), which are horrible and should be deleted anyway.
Port From (https://github.com/TrinityCore/TrinityCore/commit/f15b4f5043799b3a580c8577ad4466135ca9ae38)
This commit is contained in:
@@ -1477,6 +1477,11 @@ namespace Game.Entities
|
|||||||
trans.Append(stmt);
|
trans.Append(stmt);
|
||||||
|
|
||||||
DB.World.CommitTransaction(trans);
|
DB.World.CommitTransaction(trans);
|
||||||
|
|
||||||
|
// then delete any active instances of the creature
|
||||||
|
var range = GetMap().GetCreatureBySpawnIdStore().LookupByKey(m_spawnId);
|
||||||
|
foreach (var creature in range)
|
||||||
|
creature.AddObjectToRemoveList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsInvisibleDueToDespawn()
|
public override bool IsInvisibleDueToDespawn()
|
||||||
|
|||||||
Reference in New Issue
Block a user