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

Closes #27623
This commit is contained in:
ModoX
2022-01-17 17:02:44 +01:00
parent 3346366b0e
commit d342be8c79
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -18111,7 +18111,7 @@ bool Player::LoadFromDB(ObjectGuid guid, CharacterDatabaseQueryHolder* holder)
SetRaidDifficultyID(CheckLoadedRaidDifficultyID(fields.raidDifficulty));
SetLegacyRaidDifficultyID(CheckLoadedLegacyRaidDifficultyID(fields.legacyRaidDifficulty));
#define RelocateToHomebind(){ instanceId = 0; WorldRelocate(m_homebind); }
#define RelocateToHomebind(){ mapId = m_homebind.GetMapId(); instanceId = 0; WorldRelocate(m_homebind); }
_LoadGroup(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOAD_GROUP));
+7
View File
@@ -84,6 +84,13 @@ SpellDestination::SpellDestination(Position const& pos)
_transportOffset.Relocate(0, 0, 0, 0);
}
SpellDestination::SpellDestination(WorldLocation const& loc)
{
_position.WorldRelocate(loc);
_transportGUID.Clear();
_transportOffset.Relocate(0, 0, 0, 0);
}
SpellDestination::SpellDestination(WorldObject const& wObj)
{
_transportGUID = wObj.GetTransGUID();
+1
View File
@@ -304,6 +304,7 @@ struct TC_GAME_API SpellDestination
SpellDestination();
SpellDestination(float x, float y, float z, float orientation = 0.0f, uint32 mapId = MAPID_INVALID);
SpellDestination(Position const& pos);
SpellDestination(WorldLocation const& loc);
SpellDestination(WorldObject const& wObj);
void Relocate(Position const& pos);