diff --git a/Source/Game/Achievements/CriteriaHandler.cs b/Source/Game/Achievements/CriteriaHandler.cs index 53117ad0c..64416239c 100644 --- a/Source/Game/Achievements/CriteriaHandler.cs +++ b/Source/Game/Achievements/CriteriaHandler.cs @@ -286,9 +286,9 @@ namespace Game.Achievements case CriteriaType.LearnTradeskillSkillLine: { uint spellCount = 0; - foreach (var spell in referencePlayer.GetSpellMap()) + foreach (var (spellId, _) in referencePlayer.GetSpellMap()) { - var bounds = Global.SpellMgr.GetSkillLineAbilityMapBounds(spell.Key); + var bounds = Global.SpellMgr.GetSkillLineAbilityMapBounds(spellId); foreach (var skill in bounds) { if (skill.SkillLine == criteria.Entry.Asset) diff --git a/Source/Game/Chat/Commands/CharacterCommands.cs b/Source/Game/Chat/Commands/CharacterCommands.cs index f170f7a63..8ac5f9b06 100644 --- a/Source/Game/Chat/Commands/CharacterCommands.cs +++ b/Source/Game/Chat/Commands/CharacterCommands.cs @@ -730,7 +730,7 @@ namespace Game.Chat } [CommandNonGroup("levelup", RBACPermissions.CommandLevelup)] - static bool LevelUp(CommandHandler handler, StringArguments args) + static bool HandleLevelUpCommand(CommandHandler handler, StringArguments args) { string nameStr; string levelStr; diff --git a/Source/Game/Chat/Commands/TeleCommands.cs b/Source/Game/Chat/Commands/TeleCommands.cs index 53c609380..40bb0c1b8 100644 --- a/Source/Game/Chat/Commands/TeleCommands.cs +++ b/Source/Game/Chat/Commands/TeleCommands.cs @@ -206,7 +206,7 @@ namespace Game.Chat WorldLocation loc = new(result.Read(0), result.Read(2), result.Read(3), result.Read(4), 0.0f); uint zoneId = result.Read(1); - Player.SavePositionInDB(loc, zoneId, targetGuid, null); + Player.SavePositionInDB(loc, zoneId, targetGuid); } } @@ -258,7 +258,7 @@ namespace Game.Chat handler.SendSysMessage(CypherStrings.TeleportingTo, nameLink, handler.GetCypherString(CypherStrings.Offline), tele.name); Player.SavePositionInDB(new WorldLocation(tele.mapId, tele.posX, tele.posY, tele.posZ, tele.orientation), - Global.MapMgr.GetZoneId(PhasingHandler.EmptyPhaseShift, tele.mapId, tele.posX, tele.posY, tele.posZ), targetGuid, null); + Global.MapMgr.GetZoneId(PhasingHandler.EmptyPhaseShift, tele.mapId, tele.posX, tele.posY, tele.posZ), targetGuid); } return true; diff --git a/Source/Game/Maps/Map.cs b/Source/Game/Maps/Map.cs index ff418bea1..a7bb9254e 100644 --- a/Source/Game/Maps/Map.cs +++ b/Source/Game/Maps/Map.cs @@ -4142,11 +4142,15 @@ namespace Game.Maps { if (summoner != null && smoothPhasingInfo.ReplaceObject.HasValue) { - SmoothPhasingInfo originalSmoothPhasingInfo = smoothPhasingInfo; - originalSmoothPhasingInfo.ReplaceObject = summon.GetGUID(); - summoner.GetOrCreateSmoothPhasing().SetViewerDependentInfo(privateObjectOwner, originalSmoothPhasingInfo); + WorldObject replacedObject = Global.ObjAccessor.GetWorldObject(summoner, smoothPhasingInfo.ReplaceObject.Value); + if (replacedObject != null) + { + SmoothPhasingInfo originalSmoothPhasingInfo = smoothPhasingInfo; + originalSmoothPhasingInfo.ReplaceObject = summon.GetGUID(); + replacedObject.GetOrCreateSmoothPhasing().SetViewerDependentInfo(privateObjectOwner, originalSmoothPhasingInfo); - summon.SetDemonCreatorGUID(privateObjectOwner); + summon.SetDemonCreatorGUID(privateObjectOwner); + } } summon.GetOrCreateSmoothPhasing().SetSingleInfo(smoothPhasingInfo);