Core/Spells: Using hearthstone will teleport caster to map again

Port From (https://github.com/TrinityCore/TrinityCore/commit/d342be8c79a126ef01db9423484449d3ba7d97c7)
This commit is contained in:
hondacrx
2022-02-27 13:43:49 -05:00
parent ebf58d4dfc
commit 6a2110d548
2 changed files with 13 additions and 1 deletions
+6 -1
View File
@@ -2773,7 +2773,12 @@ namespace Game.Entities
SetRaidDifficultyID(CheckLoadedRaidDifficultyID(raidDifficulty));
SetLegacyRaidDifficultyID(CheckLoadedLegacyRaidDifficultyID(legacyRaidDifficulty));
var RelocateToHomebind = new Action(() => { instance_id = 0; Relocate(homebind); });
var RelocateToHomebind = new Action(() =>
{
mapId = homebind.GetMapId();
instance_id = 0;
Relocate(homebind);
});
_LoadGroup(holder.GetResult(PlayerLoginQueryLoad.Group));
+7
View File
@@ -7874,6 +7874,13 @@ namespace Game.Spells
TransportGUID = ObjectGuid.Empty;
}
public SpellDestination(WorldLocation loc) : this()
{
Position.WorldRelocate(loc);
TransportGUID.Clear();
TransportOffset.Relocate(0, 0, 0, 0);
}
public SpellDestination(WorldObject wObj) : this()
{
TransportGUID = wObj.GetTransGUID();