diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 2 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Maps/Map.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.cpp | 14 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index d8fbd109af9..810d9b5d7ea 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -1063,7 +1063,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u if (!targets) break; - std::set<uint32> const& phases = GetPhasesForGroup(e.action.ingamePhaseGroup.id); + std::set<uint32> const& phases = GetPhasesForGroup(e.action.ingamePhaseGroup.groupId); for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr) for (auto phase : phases) diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 47100088f2f..af24298c60d 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -1029,7 +1029,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) } case SMART_ACTION_SET_INGAME_PHASE_GROUP: { - uint32 phaseGroup = e.action.ingamePhaseGroup.id; + uint32 phaseGroup = e.action.ingamePhaseGroup.groupId; uint32 apply = e.action.ingamePhaseGroup.apply; if (apply != 0 && apply != 1) diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index c086eb48263..3dbc4e99e52 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2557,7 +2557,7 @@ void Map::SendUpdateTransportVisibility(Player* player, std::set<uint32> const& continue; if (player->IsInPhase(*i) && !Trinity::Containers::Intersects(previousPhases.begin(), previousPhases.end(), (*i)->GetPhases().begin(), (*i)->GetPhases().end())) - (*i)->BuildCreateUpdateBlockForPlayer(&transData); + (*i)->BuildCreateUpdateBlockForPlayer(&transData, player); else if (!player->IsInPhase(*i)) (*i)->BuildOutOfRangeUpdateBlock(&transData); } diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 48d4333ee03..94295878c4f 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1609,9 +1609,6 @@ void AuraEffect::HandlePhase(AuraApplication const* aurApp, uint8 mode, bool app std::set<uint32> const& oldPhases = target->GetPhases(); target->SetInPhase(GetMiscValueB(), false, apply); - if (target->IsInWorld()) - target->GetMap()->SendUpdateTransportVisibility(target, oldPhases); - // call functions which may have additional effects after chainging state of unit // phase auras normally not expected at BG but anyway better check if (apply) @@ -1621,7 +1618,11 @@ void AuraEffect::HandlePhase(AuraApplication const* aurApp, uint8 mode, bool app } if (Player* player = target->ToPlayer()) + { + if (player->IsInWorld()) + player->GetMap()->SendUpdateTransportVisibility(player, oldPhases); player->UpdatePhasing(); + } // need triggering visibility update base at phase update of not GM invisible (other GMs anyway see in any phases) if (target->IsVisible()) @@ -1640,9 +1641,6 @@ void AuraEffect::HandlePhaseGroup(AuraApplication const* aurApp, uint8 mode, boo for (auto phase : phases) target->SetInPhase(phase, false, apply); - if (target->IsInWorld()) - target->GetMap()->SendUpdateTransportVisibility(target, oldPhases); - // call functions which may have additional effects after chainging state of unit // phase auras normally not expected at BG but anyway better check if (apply) @@ -1652,7 +1650,11 @@ void AuraEffect::HandlePhaseGroup(AuraApplication const* aurApp, uint8 mode, boo } if (Player* player = target->ToPlayer()) + { + if (player->IsInWorld()) + player->GetMap()->SendUpdateTransportVisibility(player, oldPhases); player->UpdatePhasing(); + } // need triggering visibility update base at phase update of not GM invisible (other GMs anyway see in any phases) if (target->IsVisible()) |