Core/Quests: Dont immediately update object visibility at PhaseShift and wait for the AI Hooks to be called in Player::RewardQuest

Port From (https://github.com/TrinityCore/TrinityCore/commit/b5886f6a2d1756357a9240703306e9efc82771d7)
This commit is contained in:
hondacrx
2023-01-30 10:14:03 -05:00
parent 5c2fae99dd
commit 69a413006c
3 changed files with 65 additions and 56 deletions
+3 -2
View File
@@ -353,7 +353,7 @@ namespace Game
UpdateVisibilityIfNeeded(obj, true, changed);
}
public static void OnConditionChange(WorldObject obj)
public static bool OnConditionChange(WorldObject obj, bool updateVisibility = true)
{
PhaseShift phaseShift = obj.GetPhaseShift();
PhaseShift suppressedPhaseShift = obj.GetSuppressedPhaseShift();
@@ -457,7 +457,8 @@ namespace Game
unit.RemoveNotOwnSingleTargetAuras(true);
}
UpdateVisibilityIfNeeded(obj, true, changed);
UpdateVisibilityIfNeeded(obj, updateVisibility, changed);
return changed;
}
public static void SendToPlayer(Player player, PhaseShift phaseShift)