aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlinencloth <none@none>2010-11-16 01:13:04 +0100
committerlinencloth <none@none>2010-11-16 01:13:04 +0100
commit8fae0c176d73a1606f26a5b0d7fc44f7a23ba49c (patch)
tree5504659fc056351c6ed350368afc7ea0a9d1a5db
parent57c76407b05a919bad20008ffbfc1590a044d2ad (diff)
Core/Units: Rename and change Get/SetVisibility to use a bool value instead of an unnecessary enum
Also replace some SetVisibility hacks to directly call UpdateObjectVisibility --HG-- branch : trunk
-rwxr-xr-xsrc/server/game/AI/CoreAI/CombatAI.cpp6
-rwxr-xr-xsrc/server/game/AI/EventAI/CreatureEventAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp4
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp2
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp2
-rwxr-xr-xsrc/server/game/Entities/GameObject/GameObject.cpp2
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp4
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp8
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.h10
-rwxr-xr-xsrc/server/game/Grids/Notifiers/GridNotifiers.h2
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp4
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/duskwood.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp10
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp18
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp16
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp6
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp4
-rw-r--r--src/server/scripts/Kalimdor/silithus.cpp12
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp2
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp4
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp10
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h4
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp6
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp8
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp4
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp8
-rw-r--r--src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp12
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp2
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp2
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp2
-rw-r--r--src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp8
-rw-r--r--src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp4
-rw-r--r--src/server/scripts/Northrend/VioletHold/violet_hold.cpp6
-rw-r--r--src/server/scripts/Northrend/borean_tundra.cpp6
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_illidan.cpp34
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_supremus.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/illidari_council.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp4
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp8
-rw-r--r--src/server/scripts/Outland/netherstorm.cpp2
-rw-r--r--src/server/scripts/Outland/shadowmoon_valley.cpp12
-rw-r--r--src/server/scripts/World/item_scripts.cpp2
70 files changed, 181 insertions, 187 deletions
diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp
index 9ae9f14d118..f54daa9367f 100755
--- a/src/server/game/AI/CoreAI/CombatAI.cpp
+++ b/src/server/game/AI/CoreAI/CombatAI.cpp
@@ -265,7 +265,7 @@ AOEAI::AOEAI(Creature *c) : CreatureAI(c)
if (!me->m_spells[0])
sLog.outError("AOEAI set for creature (entry = %u) with spell1=0. AI will do nothing", me->GetEntry());
- me->SetVisibility(VISIBILITY_ON);//visible to see all spell anims
+ me->SetVisible(true);//visible to see all spell anims
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);//can't be targeted
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_1);//can't be damaged
me->SetDisplayId(11686);//invisible model,around a size of a player
@@ -308,7 +308,7 @@ void VehicleAI::UpdateAI(const uint32 diff)
if (m_DismissTimer < diff)
{
m_DoDismiss = false;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->ForcedDespawn();
}else m_DismissTimer -= diff;
}
@@ -316,7 +316,7 @@ void VehicleAI::UpdateAI(const uint32 diff)
void VehicleAI::Reset()
{
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
m_vehicle->Reset();
}
diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp
index 43cee18ae01..e69deffff52 100755
--- a/src/server/game/AI/EventAI/CreatureEventAI.cpp
+++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp
@@ -781,7 +781,7 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
me->SetPhaseMask(action.raw.param1, true);
break;
case ACTION_T_SET_VISIBILITY:
- me->SetVisibility(UnitVisibility(action.raw.param1));
+ me->SetVisible(bool(action.raw.param1));
break;
case ACTION_T_SET_ACTIVE:
me->setActive(action.raw.param1 ? true : false);
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index fbc0e563cd5..4fb4cbdcc53 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -79,7 +79,7 @@ void SmartAI::UpdateDespawn(const uint32 diff)
{
if (mDespawnState == 2)
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
mDespawnTime = 5000;
mDespawnState++;
}
@@ -544,7 +544,7 @@ void SmartAI::JustRespawned()
mDespawnTime = 0;
mDespawnState = 0;
mEscortState = SMART_ESCORT_NONE;
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
if (me->getFaction() != me->GetCreatureInfo()->faction_A)
me->RestoreFaction();
GetScript()->ProcessEventsFor(SMART_EVENT_RESPAWN);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 6e330105e07..700eb6c311a 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -681,7 +681,7 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u
case SMART_ACTION_SET_VISIBILITY:
{
if (me)
- me->SetVisibility(e.action.visibility.state ? VISIBILITY_ON : VISIBILITY_OFF);
+ me->SetVisible(e.action.visibility.state ? true : false);
break;
}
case SMART_ACTION_SET_ACTIVE:
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 1a37d5a71a8..01ad4fd12da 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -814,7 +814,7 @@ bool Creature::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry,
}
if (Entry == VISUAL_WAYPOINT)
- SetVisibility(VISIBILITY_OFF);
+ SetVisible(false);
return bResult;
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index bb79c2e0ea4..4a1521264e5 100755
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -1598,7 +1598,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId)
Creature *trigger = SummonTrigger(GetPositionX(), GetPositionY(), GetPositionZ(), 0, 1);
if (!trigger) return;
- trigger->SetVisibility(VISIBILITY_OFF); //should this be true?
+ trigger->SetVisible(false); //should this be true?
if (Unit *owner = GetOwner())
{
trigger->setFaction(owner->getFaction());
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 17a98548ddc..454001f3bd5 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -20520,7 +20520,7 @@ bool Player::IsVisibleGloballyFor(Player* u) const
return true;
// Visible units, always are visible for all players
- if (GetVisibility() == VISIBILITY_ON)
+ if (IsVisible())
return true;
// GMs are visible for higher gms (or players are visible for gms)
@@ -20528,7 +20528,7 @@ bool Player::IsVisibleGloballyFor(Player* u) const
return GetSession()->GetSecurity() <= u->GetSession()->GetSecurity();
// non faction visibility non-breakable for non-GMs
- if (GetVisibility() == VISIBILITY_OFF)
+ if (!IsVisible())
return false;
// non-gm stealth/invisibility not hide from global player lists
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 7c833b31a96..b3754da5142 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12140,9 +12140,9 @@ bool Unit::isAlwaysDetectableFor(WorldObject const* seer) const
return false;
}
-void Unit::SetVisibility(UnitVisibility x)
+void Unit::SetVisible(bool x)
{
- if (x == VISIBILITY_OFF)
+ if (!x)
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_GAMEMASTER);
else
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GM, SEC_PLAYER);
@@ -14700,13 +14700,13 @@ void Unit::SetContestedPvP(Player *attackedPlayer)
player->addUnitState(UNIT_STAT_ATTACK_PLAYER);
player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP);
// call MoveInLineOfSight for nearby contested guards
- player->SetVisibility(player->GetVisibility());
+ UpdateObjectVisibility();
}
if (!hasUnitState(UNIT_STAT_ATTACK_PLAYER))
{
addUnitState(UNIT_STAT_ATTACK_PLAYER);
// call MoveInLineOfSight for nearby contested guards
- SetVisibility(GetVisibility());
+ UpdateObjectVisibility();
}
}
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index e777370d81b..5c8406da59e 100755
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -540,12 +540,6 @@ enum DamageEffectType
SELF_DAMAGE = 5
};
-enum UnitVisibility
-{
- VISIBILITY_OFF = 0,
- VISIBILITY_ON = 1
-};
-
// Value masks for UNIT_FIELD_FLAGS
enum UnitFlags
{
@@ -1763,8 +1757,8 @@ class Unit : public WorldObject
void SetFacingToObject(WorldObject* pObject);
// Visibility system
- UnitVisibility GetVisibility() const { return (m_serverSideVisibility.GetValue(SERVERSIDE_VISIBILITY_GM) > SEC_PLAYER) ? VISIBILITY_OFF : VISIBILITY_ON; }
- void SetVisibility(UnitVisibility x);
+ bool IsVisible() const { return (m_serverSideVisibility.GetValue(SERVERSIDE_VISIBILITY_GM) > SEC_PLAYER) ? false : true; }
+ void SetVisible(bool x);
// common function for visibility checks for player/creatures with detection code
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h
index f0a6337ec52..6bb392a51b8 100755
--- a/src/server/game/Grids/Notifiers/GridNotifiers.h
+++ b/src/server/game/Grids/Notifiers/GridNotifiers.h
@@ -1144,7 +1144,7 @@ namespace Trinity
AllFriendlyCreaturesInGrid(Unit const* obj) : pUnit(obj) {}
bool operator() (Unit* u)
{
- if (u->isAlive() && u->GetVisibility() == VISIBILITY_ON && u->IsFriendlyTo(pUnit))
+ if (u->isAlive() && u->IsVisible() && u->IsFriendlyTo(pUnit))
return true;
return false;
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 10b2283b415..4c6609fc0f6 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -2924,8 +2924,8 @@ void AuraEffect::HandlePhase(AuraApplication const * aurApp, uint8 mode, bool ap
target->SetPhaseMask(PHASEMASK_NORMAL, false);
// need triggering visibility update base at phase update of not GM invisible (other GMs anyway see in any phases)
- if (target->GetVisibility() != VISIBILITY_OFF)
- target->SetVisibility(target->GetVisibility());
+ if (!target->IsVisible())
+ target->UpdateObjectVisibility();
}
/**********************/
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 4573f0357f2..a8d1a44528a 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -6574,7 +6574,7 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
//Check player targets and remove if in GM mode or GM invisibility (for not self casting case)
if (target != m_caster && target->GetTypeId() == TYPEID_PLAYER)
{
- if (target->ToPlayer()->GetVisibility() == VISIBILITY_OFF)
+ if (!target->ToPlayer()->IsVisible())
return false;
if (target->ToPlayer()->isGameMaster() && !IsPositiveSpell(m_spellInfo->Id))
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
index 0ae2279fdd9..4976e2a5af6 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/blackrock_depths.cpp
@@ -318,7 +318,7 @@ public:
break;
case 4:
CanWalk = true;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
SummonRingMob();
Event_Timer = 8000;
break;
@@ -332,7 +332,7 @@ public:
Event_Timer = 0;
break;
case 7:
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
HandleGameObject(DATA_ARENA1, false);
DoScriptText(SCRIPT_TEXT6, me);//4
CanWalk = true;
@@ -343,7 +343,7 @@ public:
Event_Timer = 5000;
break;
case 9:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
SummonRingBoss();
Event_Timer = 0;
break;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
index af4f061fe3d..96cd80bb0d6 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp
@@ -132,7 +132,7 @@ public:
Mount_Timer = 0;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
void EnterCombat(Unit* /*who*/) {}
@@ -174,7 +174,7 @@ public:
if (Mount_Timer <= diff)
{
Mount_Timer = 0;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->GetMotionMaster()->MoveIdle();
if (Unit *pAttumen = Unit::GetUnit(*me, Attumen))
{
@@ -239,10 +239,10 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
if (pMidnight)
{
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- pMidnight->SetVisibility(VISIBILITY_ON);
+ pMidnight->SetVisible(true);
}
Midnight = 0;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->Kill(me);
}
} else ResetTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index d985335699c..84f8748d90a 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -274,7 +274,7 @@ public:
if (Unit *pInfernal = Unit::GetUnit(*me, *itr))
if (pInfernal->isAlive())
{
- pInfernal->SetVisibility(VISIBILITY_OFF);
+ pInfernal->SetVisible(false);
pInfernal->setDeathState(JUST_DIED);
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index af5fbcf005e..4835bafba3d 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -593,7 +593,7 @@ public:
me->MonsterYell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL);
return 10000;
case 14:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->ClearInCombat();
if (pMap->IsDungeon())
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 7f3b23142e2..74462736992 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -515,7 +515,7 @@ public:
Eviscerate_Timer = 6000;
Wait_Timer = 5000;
InVanish = false;
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
boss_priestess_lackey_commonAI::Reset();
}
@@ -549,7 +549,7 @@ public:
{
DoCast(me->getVictim(), SPELL_BACKSTAB, true);
DoCast(me->getVictim(), SPELL_KIDNEY_SHOT, true);
- me->SetVisibility(VISIBILITY_ON); // ...? Hacklike
+ me->SetVisible(true); // ...? Hacklike
InVanish = false;
} else Wait_Timer -= diff;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 81e29bf0092..abd9df4ef10 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -574,7 +574,7 @@ public:
Phase = 2;
break;
case 2:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
PhaseTimer = 2000;
Phase = 3;
break;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index da3b4d0763c..69ea27b46cc 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -390,7 +390,7 @@ public:
me->SetStandState(UNIT_STAND_STATE_STAND);
me->Mount(25279);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
UpdateWorldState(me->GetMap(), WORLD_STATE_REMAINS, 0);
//UpdateWorldState(me->GetMap(), WORLD_STATE_COUNTDOWN, 0);
@@ -913,7 +913,7 @@ public:
if (Creature* pTemp = Unit::GetCreature(*me, uiAlexandrosGUID)) // just hide him
{
DoScriptText(EMOTE_LIGHT_OF_DAWN09, pTemp);
- pTemp->SetVisibility(VISIBILITY_OFF);
+ pTemp->SetVisible(false);
}
if (Creature* pTemp = Unit::GetCreature(*me, uiLichKingGUID))
{
@@ -1321,7 +1321,7 @@ public:
i->getSource()->CastSpell(i->getSource(), SPELL_THE_LIGHT_OF_DAWN_Q, false);
}
}
- me->SetVisibility(VISIBILITY_OFF); // respawns another Darion for quest turn in
+ me->SetVisible(false); // respawns another Darion for quest turn in
me->SummonCreature(NPC_HIGHLORD_DARION_MOGRAINE, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
JumpToNextStep(1000);
break;
@@ -1648,7 +1648,7 @@ public:
if (Creature* pTemp = Unit::GetCreature(*me, pGUID))
if (pTemp->isAlive())
{
- pTemp->SetVisibility(VISIBILITY_OFF);
+ pTemp->SetVisible(false);
pTemp->Kill(pTemp);
}
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
index 77afd6ceba4..0dac2ac2fdd 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp
@@ -44,7 +44,7 @@ public:
void Reset()
{
me->setActive(true);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlying(true);
FlyBackTimer = 500;
@@ -81,7 +81,7 @@ public:
z += 2.5; x -= 2; y -= 1.5;
me->GetMotionMaster()->MovePoint(0, x, y, z);
me->SetUInt64Value(UNIT_FIELD_TARGET, plr->GetGUID());
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
FlyBackTimer = 4500;
break;
case 2:
@@ -94,7 +94,7 @@ public:
FlyBackTimer = 5000;
break;
case 3:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
FlyBackTimer = 3000;
break;
case 4:
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 893e381c821..3114b4c7f14 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -426,7 +426,7 @@ public:
void FlyMode()
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT | MOVEMENTFLAG_LEVITATING);
me->SetSpeed(MOVE_WALK,5.0f,true);
@@ -447,7 +447,7 @@ public:
switch (id)
{
case 0:
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
break;
case 1:
{
@@ -802,7 +802,7 @@ public:
if (!debuffGUID) return;
Unit *debuff = Unit::GetUnit((*me),debuffGUID);
if (debuff)
- debuff->SetVisibility(VISIBILITY_OFF);
+ debuff->SetVisible(false);
debuffGUID = 0;
}
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
index f39364af81a..52d30755e63 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp
@@ -512,7 +512,7 @@ public:
(*i)->GetPosition(x, y, z);
me->SummonCreature(MOB_DEAD, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
}
- (*i)->SetVisibility(VISIBILITY_OFF);
+ (*i)->SetVisible(false);
(*i)->setDeathState(JUST_DIED);
if ((*i)->getDeathState() == CORPSE)
(*i)->RemoveCorpse();
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index fcdec2b2b65..c0153a88582 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -163,7 +163,7 @@ public:
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
me->SetFullHealth();//dunno why it does not resets health at evade..
@@ -185,7 +185,7 @@ public:
void EnterEvadeMode()
{
bJustReset = true;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
ScriptedAI::EnterEvadeMode();
}
@@ -235,7 +235,7 @@ public:
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
ResetTimer = 10000;
bJustReset = false;
@@ -367,7 +367,7 @@ public:
{
if (type != POINT_MOTION_TYPE)
return;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
if (isFriendly)
{
me->setDeathState(JUST_DIED);
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
index 7fde694879f..8bde996060b 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp
@@ -239,7 +239,7 @@ public:
Timer[TIMER_SENTINEL] = 31500;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
Summons.DespawnAll();
@@ -274,7 +274,7 @@ public:
switch(summoned->GetEntry())
{
case BOSS_ENTROPIUS:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
break;
case CREATURE_DARK_FIENDS:
summoned->CastSpell(summoned,SPELL_DARKFIEND_VISUAL,false);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index dfd3fb87868..e6da069f192 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -166,7 +166,7 @@ class boss_akilzon : public CreatureScript
Unit* bird = Unit::GetUnit(*me,BirdGUIDs[i]);
if (bird && bird->isAlive())
{
- bird->SetVisibility(VISIBILITY_OFF);
+ bird->SetVisible(false);
bird->setDeathState(JUST_DIED);
}
}
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
index d70c4d6600c..34f0c100cb0 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp
@@ -320,7 +320,7 @@ class boss_zuljin : public CreatureScript
Temp = Unit::GetUnit(*me, SpiritGUID[i]);
if (Temp)
{
- Temp->SetVisibility(VISIBILITY_OFF);
+ Temp->SetVisible(false);
Temp->setDeathState(DEAD);
}
}
diff --git a/src/server/scripts/EasternKingdoms/duskwood.cpp b/src/server/scripts/EasternKingdoms/duskwood.cpp
index cbc4c45b70c..49591f7b18f 100644
--- a/src/server/scripts/EasternKingdoms/duskwood.cpp
+++ b/src/server/scripts/EasternKingdoms/duskwood.cpp
@@ -46,7 +46,7 @@ public:
if (Unit* CorrupterSpeaker = pPlayer->SummonCreature(1,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()-1,0,TEMPSUMMON_TIMED_DESPAWN,15000))
{
CorrupterSpeaker->SetName("Twilight Corrupter");
- CorrupterSpeaker->SetVisibility(VISIBILITY_ON);
+ CorrupterSpeaker->SetVisible(true);
CorrupterSpeaker->MonsterYell("Come, $N. See what the Nightmare brings...",0,pPlayer->GetGUID());
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
index ff4475f2678..9514a6d5ea3 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp
@@ -463,15 +463,15 @@ public:
if (pInstance)
{
// Do not let the raid skip straight to Archimonde. Visible and hostile ONLY if Azagalor is finished.
- if ((pInstance->GetData(DATA_AZGALOREVENT) < DONE) && ((me->GetVisibility() != VISIBILITY_OFF) || (me->getFaction() != 35)))
+ if ((pInstance->GetData(DATA_AZGALOREVENT) < DONE) && (me->IsVisible() || (me->getFaction() != 35)))
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->setFaction(35);
}
- else if ((pInstance->GetData(DATA_AZGALOREVENT) >= DONE) && ((me->GetVisibility() != VISIBILITY_ON) || (me->getFaction() == 35)))
+ else if ((pInstance->GetData(DATA_AZGALOREVENT) >= DONE) && (!me->IsVisible() || (me->getFaction() == 35)))
{
me->setFaction(1720);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
}
@@ -526,7 +526,7 @@ public:
Creature* Check = me->SummonCreature(CREATURE_CHANNEL_TARGET, NORDRASSIL_X, NORDRASSIL_Y, NORDRASSIL_Z, 0, TEMPSUMMON_TIMED_DESPAWN, 2000);
if (Check)
{
- Check->SetVisibility(VISIBILITY_OFF);
+ Check->SetVisible(false);
if (me->IsWithinDistInMap(Check, 75))
{
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 7715e39b64b..4c41e2d11e7 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -756,19 +756,19 @@ void hyjalAI::UpdateAI(const uint32 diff)
case JAINA:
if (pInstance && pInstance->GetData(DATA_ALLIANCE_RETREAT))
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
HideNearPos(me->GetPositionX(), me->GetPositionY());
HideNearPos(5037.76f, -1889.71f);
for (uint8 i = 0; i < 92; ++i)//summon fires
me->SummonGameObject(FLAMEOBJECT,AllianceFirePos[i][0],AllianceFirePos[i][1],AllianceFirePos[i][2],AllianceFirePos[i][3],AllianceFirePos[i][4],AllianceFirePos[i][5],AllianceFirePos[i][6],AllianceFirePos[i][7],0);
}
- else me->SetVisibility(VISIBILITY_ON);
+ else me->SetVisible(true);
break;
case THRALL: //thrall
if (pInstance && pInstance->GetData(DATA_HORDE_RETREAT))
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
HideNearPos(me->GetPositionX(), me->GetPositionY());
HideNearPos(5563, -2763.19f);
HideNearPos(5542.2f, -2629.36f);
@@ -776,7 +776,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
me->SummonGameObject(FLAMEOBJECT,HordeFirePos[i][0],HordeFirePos[i][1],HordeFirePos[i][2],HordeFirePos[i][3],HordeFirePos[i][4],HordeFirePos[i][5],HordeFirePos[i][6],HordeFirePos[i][7],0);
}
- else me->SetVisibility(VISIBILITY_ON);
+ else me->SetVisible(true);
break;
}
}
@@ -794,10 +794,10 @@ void hyjalAI::UpdateAI(const uint32 diff)
RespawnNearPos(5563, -2763.19f);
RespawnNearPos(5542.2f, -2629.36f);
}
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}else{
RespawnTimer -= diff;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
return;
}
@@ -821,7 +821,7 @@ void hyjalAI::UpdateAI(const uint32 diff)
HideNearPos(5603.75f, -2853.12f);
break;
}
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
} else RetreatTimer -= diff;
}
@@ -914,7 +914,7 @@ void hyjalAI::JustDied(Unit* /*killer*/)
{
if (IsDummy)return;
me->Respawn();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
DoRespawn = true;
RespawnTimer = 120000;
Talk(DEATH);
@@ -954,7 +954,7 @@ void hyjalAI::HideNearPos(float x, float y)
{
for (std::list<Creature*>::const_iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
- (*itr)->SetVisibility(VISIBILITY_OFF);
+ (*itr)->SetVisible(false);
(*itr)->setFaction(35);//make them friendly so mobs won't attack them
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index dfc86bee83c..b2b055e6b93 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -457,7 +457,7 @@ public:
Creature* trigger = me->SummonCreature(NPC_TRIGGER,x+8,y+8,z+25+rand()%10,me->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,1000);
if (trigger)
{
- trigger->SetVisibility(VISIBILITY_OFF);
+ trigger->SetVisible(false);
trigger->setFaction(me->getFaction());
trigger->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
trigger->CastSpell(me,SPELL_METEOR,true);
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
index 6ce05fd0b9a..0cc3056b648 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
@@ -196,7 +196,7 @@ public:
Map* pMap = pCreature->GetMap();
if (pMap->IsDungeon() && pUnit)
{
- pUnit->SetVisibility(VISIBILITY_OFF);
+ pUnit->SetVisible(false);
Map::PlayerList const &PlayerList = pMap->GetPlayers();
if (PlayerList.isEmpty())
return;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
index be3b0e1dde7..d42d20b62f0 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp
@@ -221,7 +221,7 @@ public:
uiOutroTimer = 500;
break;
case 5:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->Kill(me);
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
index 025493b3980..3465cfc082f 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/culling_of_stratholme.cpp
@@ -843,7 +843,7 @@ public:
break;
case 39:
if (Creature* pMalganis = Unit::GetCreature(*me, uiMalganisGUID))
- pMalganis->SetVisibility(VISIBILITY_OFF);
+ pMalganis->SetVisible(false);
DoScriptText(SAY_PHASE208, me);
JumpToNextStep(7000);
break;
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
index d45f9cf5725..0a8e8245d5e 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.cpp
@@ -462,7 +462,7 @@ public:
break;
case 108:
//last waypoint, just set Thrall invisible, respawn is turned off
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
index 06a74f6c912..12368e11c7e 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp
@@ -219,7 +219,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_RED_COLORATION);
me->RemoveAurasDueToSpell(SPELL_FREEZE_ANIM);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
//Reset Phase
if (pInst)
@@ -404,7 +404,7 @@ public:
//Remove any target
me->SetUInt64Value(UNIT_FIELD_TARGET, 0);
me->SetHealth(0);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
break;
//Dead phase
@@ -542,7 +542,7 @@ public:
//Reset flags
me->RemoveAurasDueToSpell(SPELL_TRANSFORM);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
if (pInst)
pInst->SetData(DATA_CTHUN_PHASE, PHASE_NOT_STARTED);
@@ -670,7 +670,7 @@ public:
DoCast(me, SPELL_TRANSFORM, false);
me->SetFullHealth();
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
//Emerging phase
@@ -1062,7 +1062,7 @@ public:
p->Kill(p);
//Dissapear and reappear at new position
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
if (!pTarget)
@@ -1086,7 +1086,7 @@ public:
AttackStart(pTarget);
}
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
} else EvadeTimer -= diff;
}
@@ -1174,7 +1174,7 @@ public:
p->Kill(p);
//Dissapear and reappear at new position
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
if (!pTarget)
@@ -1198,7 +1198,7 @@ public:
EvadeTimer = 5000;
AttackStart(pTarget);
}
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
} else EvadeTimer -= diff;
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
index 80803f0ff9f..d0dd6f26173 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_skeram.cpp
@@ -94,7 +94,7 @@ public:
Invisible = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
if (IsImage)
me->setDeathState(JUST_DIED);
@@ -194,7 +194,7 @@ public:
if (Invisible_Timer <= diff)
{
//Making Skeram visible after telporting
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Invisible_Timer = 2500;
@@ -251,7 +251,7 @@ public:
me->RemoveAllAuras();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->GetMap()->CreatureRelocation(me, bossc->x, bossc->y, bossc->z, bossc->r);
Invisible = true;
delete place1;
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index 7b0543afa7e..536a6c4b4c1 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -380,8 +380,8 @@ public:
if (eventProgress == 11)
{
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
- naralex->SetVisibility(VISIBILITY_OFF);
- me->SetVisibility(VISIBILITY_OFF);
+ naralex->SetVisible(false);
+ me->SetVisible(false);
pInstance->SetData(TYPE_NARALEX_PART3, DONE);
}
break;
diff --git a/src/server/scripts/Kalimdor/silithus.cpp b/src/server/scripts/Kalimdor/silithus.cpp
index 19f5ba38618..4b7a207a838 100644
--- a/src/server/scripts/Kalimdor/silithus.cpp
+++ b/src/server/scripts/Kalimdor/silithus.cpp
@@ -595,7 +595,7 @@ public:
break;
case 14:
DoScriptText(ARYGOS_SAY_1,Arygos);
- Merithra->SetVisibility(VISIBILITY_OFF);
+ Merithra->SetVisible(false);
break;
case 15:
Arygos->GetMotionMaster()->MoveCharge(-8065,1530,2.61f,10);
@@ -625,7 +625,7 @@ public:
break;
case 23:
Caelestrasz->GetMotionMaster()->MoveCharge(-8065,1530,2.61f,10);
- Arygos->SetVisibility(VISIBILITY_OFF);
+ Arygos->SetVisible(false);
Arygos->GetMotionMaster()->MoveCharge(-8034.535f,1535.14f,2.61f,10);
break;
case 24:
@@ -655,7 +655,7 @@ public:
DoScriptText(ANACHRONOS_SAY_3, me, Fandral);
break;
case 32:
- Caelestrasz->SetVisibility(VISIBILITY_OFF);
+ Caelestrasz->SetVisible(false);
Caelestrasz->GetMotionMaster()->MoveCharge(-8034.535f,1535.14f,2.61f,42);
Fandral->GetMotionMaster()->MoveCharge(-8108,1529,2.77f,8);
me->GetMotionMaster()->MoveCharge(-8113,1525,2.77f,8);
@@ -745,7 +745,7 @@ public:
DoScriptText(ANACHRONOS_EMOTE_2,me);
break;
case 55:
- Fandral->SetVisibility(VISIBILITY_OFF);
+ Fandral->SetVisible(false);
break;
case 56:
DoScriptText(ANACHRONOS_EMOTE_3, me);
@@ -781,7 +781,7 @@ public:
me->GetMotionMaster()->MoveCharge(-8000,1400,150,9);
break;
case 65:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
if (Creature* AnachronosQuestTrigger = (Unit::GetCreature(*me, AnachronosQuestTriggerGUID)))
{
DoScriptText(ARYGOS_YELL_1,me);
@@ -968,7 +968,7 @@ public:
Announced = false;
Failed = false;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
void SummonNextWave()
diff --git a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
index 051352c5051..1a72efe6e79 100644
--- a/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/ahnkahet/instance_ahnkahet.cpp
@@ -195,7 +195,7 @@ public:
Creature* cr = instance->GetCreature(*itr);
if (cr && cr->isAlive())
{
- cr->SetVisibility(VISIBILITY_OFF);
+ cr->SetVisible(false);
cr->setDeathState(JUST_DIED);
cr->RemoveCorpse();
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
index bbe9cf54a3f..3edb3f0014c 100755
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/trial_of_the_crusader.cpp
@@ -215,8 +215,8 @@ class npc_announcer_toc10 : public CreatureScript
m_pInstance->SetData(TYPE_ANUBARAK,NOT_STARTED);
- if (pCreature->GetVisibility() == VISIBILITY_ON)
- pCreature->SetVisibility(VISIBILITY_OFF);
+ if (pCreature->IsVisible())
+ pCreature->SetVisible(false);
break;
}
}
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 9b247be6733..72fc965c170 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -223,7 +223,7 @@ public:
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->SetStandState(UNIT_STAND_STATE_STAND);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
void DoAction(const int32 actionId)
@@ -476,9 +476,9 @@ public:
case EVENT_INTRO_LK_5:
// summon Falric and Marwyn. then go back to the door
if (Creature* pFalric = me->GetCreature(*me, pInstance->GetData64(DATA_FALRIC)))
- pFalric->SetVisibility(VISIBILITY_ON);
+ pFalric->SetVisible(true);
if (Creature* pMarwyn = me->GetCreature(*me, pInstance->GetData64(DATA_MARWYN)))
- pMarwyn->SetVisibility(VISIBILITY_ON);
+ pMarwyn->SetVisible(true);
if (Creature* pLichKing = me->GetCreature(*me, uiLichKing))
{
@@ -533,9 +533,9 @@ public:
// TODO: implement
if (Creature* pFalric = me->GetCreature(*me, pInstance->GetData64(DATA_FALRIC)))
- pFalric->SetVisibility(VISIBILITY_ON);
+ pFalric->SetVisible(true);
if (Creature* pMarwyn = me->GetCreature(*me, pInstance->GetData64(DATA_MARWYN)))
- pMarwyn->SetVisibility(VISIBILITY_ON);
+ pMarwyn->SetVisible(true);
me->GetMotionMaster()->MovePoint(0, LichKingSpawnPos);
// TODO: Loralen/Koreln shall run also
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
index bccccffd655..d2c6ca7f973 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h
@@ -91,7 +91,7 @@ struct boss_horAI : ScriptedAI
void Reset()
{
events.Reset();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
}
@@ -108,7 +108,7 @@ struct boss_horAI : ScriptedAI
{
case ACTION_ENTER_COMBAT: // called by InstanceScript when boss shall enter in combat.
// Just in case. Should have been done by InstanceScript
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
// Reset flags
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
index 455dfea60e0..f86878bbc3f 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/instance_halls_of_reflection.cpp
@@ -377,9 +377,9 @@ public:
pSylvanas->Respawn();
if (Creature* pFalric = instance->GetCreature(uiFalric))
- pFalric->SetVisibility(VISIBILITY_OFF);
+ pFalric->SetVisible(false);
if (Creature* pMarwyn = instance->GetCreature(uiMarwyn))
- pMarwyn->SetVisibility(VISIBILITY_OFF);
+ pMarwyn->SetVisible(false);
}
// spawn a wave on behalf of the summoner.
@@ -387,7 +387,7 @@ public:
{
uint32 index;
- pSummoner->SetVisibility(VISIBILITY_ON);
+ pSummoner->SetVisible(true);
// TODO: do composition at random. # of spawn also depends on uiWaveCount
// As of now, it is just one of each.
diff --git a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
index d1b73e364ac..810c61be823 100644
--- a/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/PitOfSaron/boss_krickandick.cpp
@@ -306,7 +306,7 @@ public:
me->SetReactState(REACT_PASSIVE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
Creature* GetIck()
@@ -341,7 +341,7 @@ public:
pIck->GetNearPosition(pos, 5.0f, 3.14f);
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), 0.0f);
}
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
Creature* pJainaOrSylvanas = me->GetCreature(*me, pInstance->GetData64(DATA_JAINA_SYLVANAS_1));
if (pJainaOrSylvanas) {
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 2be0277b541..82498cd85a9 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -944,11 +944,11 @@ class npc_blood_queen_lana_thel : public CreatureScript
me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
if (instance->GetBossState(DATA_BLOOD_PRINCE_COUNCIL) == DONE)
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
bIntroDone = true;
}
else
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
void MoveInLineOfSight(Unit* who)
@@ -975,7 +975,7 @@ class npc_blood_queen_lana_thel : public CreatureScript
void MovementInform(uint32 type, uint32 id)
{
if (type == POINT_MOTION_TYPE && id == POINT_INTRO_DESPAWN)
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
void UpdateAI(const uint32 diff)
@@ -1135,7 +1135,7 @@ class npc_kinetic_bomb : public CreatureScript
switch (eventId)
{
case EVENT_BOMB_DESPAWN:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
break;
case EVENT_CONTINUE_FALLING:
me->GetMotionMaster()->Clear();
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
index c01a2a1741a..5d3a86cd992 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp
@@ -343,7 +343,7 @@ class npc_big_ooze : public CreatureScript
{
bExploded = true;
me->RemoveAllAuras();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
events.Reset();
events.ScheduleEvent(EVENT_UNSTABLE_DESPAWN, 60000);
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
index 5d8d858a38c..3ed263ffae5 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_sapphiron.cpp
@@ -100,7 +100,7 @@ public:
float x, y, z;
me->GetPosition(x, y, z);
me->SummonGameObject(GO_BIRTH, x, y, z, 0, 0, 0, 0, 0, 0);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
@@ -344,7 +344,7 @@ public:
EnterPhaseGround();
return;
case EVENT_BIRTH:
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_AGGRESSIVE);
return;
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
index 6a2da3e6b5d..500791619cb 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_magus_telestra.cpp
@@ -114,7 +114,7 @@ public:
bIsWaitingToAppear = false;
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
if (pInstance)
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, NOT_STARTED);
@@ -225,7 +225,7 @@ public:
me->GetMotionMaster()->Clear();
me->GetMap()->CreatureRelocation(me, CenterOfRoom.GetPositionX(), CenterOfRoom.GetPositionY(), CenterOfRoom.GetPositionZ(), CenterOfRoom.GetOrientation());
DoCast(me, SPELL_TELESTRA_BACK);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
if (Phase == 1)
Phase = 2;
if (Phase == 3)
@@ -248,7 +248,7 @@ public:
Phase = 1;
me->CastStop();
me->RemoveAllAuras();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
uiFireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
uiFrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
@@ -265,7 +265,7 @@ public:
Phase = 3;
me->CastStop();
me->RemoveAllAuras();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
uiFireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
uiFrostMagusGUID = SplitPersonality(MOB_FROST_MAGUS);
diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
index 37898942545..f3e8d892f04 100644
--- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
+++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp
@@ -1400,7 +1400,7 @@ public:
{
if(uiDespawnTimer < uiDiff)
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->Kill(me);
uiDespawnTimer = 28000;
return;
@@ -1496,7 +1496,7 @@ public:
{
if(uiDespawnTimer < uiDiff)
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->Kill(me);
uiDespawnTimer = 28000;
return;
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
index 25c62237830..c5068c3080f 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfLightning/boss_ionar.cpp
@@ -83,7 +83,7 @@ public:
pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true);
pCreatureTarget->AttackStop();
- pCreatureTarget->SetVisibility(VISIBILITY_OFF);
+ pCreatureTarget->SetVisible(false);
pCreatureTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
pCreatureTarget->GetMotionMaster()->Clear();
@@ -137,8 +137,8 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
- if (me->GetVisibility() == VISIBILITY_OFF)
- me->SetVisibility(VISIBILITY_ON);
+ if (!me->IsVisible())
+ me->SetVisible(true);
if (pInstance)
pInstance->SetData(TYPE_IONAR, NOT_STARTED);
@@ -195,7 +195,7 @@ public:
void DamageTaken(Unit * /*pDoneBy*/, uint32 &uiDamage)
{
- if (me->GetVisibility() == VISIBILITY_OFF)
+ if (!me->IsVisible())
uiDamage = 0;
}
@@ -230,7 +230,7 @@ public:
return;
// Splitted
- if (me->GetVisibility() == VISIBILITY_OFF)
+ if (!me->IsVisible())
{
if (uiSplitTimer <= uiDiff)
{
@@ -245,7 +245,7 @@ public:
// Lightning effect and restore Ionar
else if (lSparkList.empty())
{
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_DISABLE_MOVE);
DoCast(me, SPELL_SPARK_DESPAWN, false);
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
index 8e075f2ae7c..1e0e98fa550 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp
@@ -1204,7 +1204,7 @@ public:
if (Creature* pLeviathan = instance->instance->GetCreature(instance->GetData64(TYPE_LEVIATHAN)))
{
CAST_AI(boss_flame_leviathan::boss_flame_leviathanAI, (pLeviathan->AI()))->DoAction(0); //enable hard mode activating the 4 additional events spawning additional vehicles
- pCreature->SetVisibility(VISIBILITY_OFF);
+ pCreature->SetVisible(false);
pCreature->AI()->DoAction(0); // spawn the vehicles
if (Creature* Delorah = pCreature->FindNearestCreature(NPC_DELORAH, 1000, true))
{
diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
index 0977c32296d..29aefd24212 100644
--- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
+++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_razorscale.cpp
@@ -579,7 +579,7 @@ public:
npc_mole_machine_triggerAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
GameObject* MoleMachine;
diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
index 4702bf2192f..4d137dcf37e 100644
--- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
+++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp
@@ -344,7 +344,7 @@ public:
uiResurectPhase = 1;
break;
case 2:
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->DealDamage(me,me->GetHealth());
me->RemoveCorpse();
break;
diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
index 73b75f5b622..37327256e64 100644
--- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
+++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp
@@ -258,7 +258,7 @@ public:
{
mob_frozen_orb_stalkerAI(Creature* c) : Scripted_NoMovementAI(c)
{
- c->SetVisibility(VISIBILITY_OFF);
+ c->SetVisible(false);
c->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_DISABLE_MOVE);
c->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
index 14539491bc3..f954825ab17 100644
--- a/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
+++ b/src/server/scripts/Northrend/VioletHold/boss_ichoron.cpp
@@ -108,7 +108,7 @@ public:
uiBubbleCheckerTimer = 1000;
uiWaterBoltVolleyTimer = urand(10000, 15000);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
DespawnWaterElements();
if (pInstance)
@@ -195,7 +195,7 @@ public:
DoCast(me, SPELL_PROTECTIVE_BUBBLE, true);
}
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->GetMotionMaster()->MoveChase(me->getVictim());
}
@@ -227,7 +227,7 @@ public:
DoCast(me, SPELL_DRAINED);
bIsExploded = true;
me->AttackStop();
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
for (uint8 i = 0; i < 10; i++)
{
int tmp = urand(0, MAX_SPAWN_LOC-1);
@@ -277,7 +277,7 @@ public:
if (bIsExploded)
{
bIsExploded = false;
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
DespawnWaterElements();
diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
index f41bf090412..c32bbfaa0d1 100644
--- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp
@@ -705,7 +705,7 @@ public:
if (Creature* pSinclari = instance->GetCreature(uiSinclari))
{
- pSinclari->SetVisibility(VISIBILITY_ON);
+ pSinclari->SetVisible(true);
std::list<Creature*> GuardList;
pSinclari->GetCreatureListWithEntryInGrid(GuardList, NPC_VIOLET_HOLD_GUARD, 40.0f);
@@ -715,7 +715,7 @@ public:
{
if (Creature* pGuard = *itr)
{
- pGuard->SetVisibility(VISIBILITY_ON);
+ pGuard->SetVisible(true);
pGuard->SetReactState(REACT_AGGRESSIVE);
pGuard->GetMotionMaster()->MovePoint(1,pGuard->GetHomePosition());
}
diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
index 9a3d9c934d2..db6d72f1a83 100644
--- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
+++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp
@@ -332,7 +332,7 @@ public:
{
pGuard->DisappearAndDie();
pGuard->Respawn();
- pGuard->SetVisibility(VISIBILITY_ON);
+ pGuard->SetVisible(true);
pGuard->SetReactState(REACT_AGGRESSIVE);
}
}
@@ -380,7 +380,7 @@ public:
{
if (Creature* pGuard = *itr)
{
- pGuard->SetVisibility(VISIBILITY_OFF);
+ pGuard->SetVisible(false);
pGuard->SetReactState(REACT_PASSIVE);
}
}
@@ -609,7 +609,7 @@ public:
uint32 entry = RAND(CREATURE_AZURE_CAPTAIN,CREATURE_AZURE_RAIDER,CREATURE_AZURE_STALKER,CREATURE_AZURE_SORCEROR);
DoSummon(entry, me, 2.0f, 20000, TEMPSUMMON_DEAD_DESPAWN);
}
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
} else uiSpawnTimer -= diff;
}
else
diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp
index b62fcfcdae0..dfeee0bc505 100644
--- a/src/server/scripts/Northrend/borean_tundra.cpp
+++ b/src/server/scripts/Northrend/borean_tundra.cpp
@@ -575,7 +575,7 @@ public:
struct npc_nesingwary_trapperAI : public ScriptedAI
{
- npc_nesingwary_trapperAI(Creature *c) : ScriptedAI(c) { c->SetVisibility(VISIBILITY_OFF); }
+ npc_nesingwary_trapperAI(Creature *c) : ScriptedAI(c) { c->SetVisible(false); }
uint64 go_caribouGUID;
uint8 Phase;
@@ -583,7 +583,7 @@ public:
void Reset()
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
uiPhaseTimer = 2500;
Phase = 1;
go_caribouGUID = 0;
@@ -613,7 +613,7 @@ public:
switch (Phase)
{
case 1:
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
uiPhaseTimer = 2000;
Phase = 2;
break;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
index 07a789bcfea..9621d7387de 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp
@@ -876,7 +876,7 @@ public:
{
if (GETUNIT(Glaive, GlaiveGUID[i]))
{
- Glaive->SetVisibility(VISIBILITY_OFF);
+ Glaive->SetVisible(false);
Glaive->setDeathState(JUST_DIED); // Despawn the Glaive
}
GlaiveGUID[i] = 0;
@@ -1229,7 +1229,7 @@ public:
if (Timer[EVENT_MAIEV_STEALTH])
{
me->SetFullHealth();
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
Timer[EVENT_MAIEV_STEALTH] = 0;
}
me->InterruptNonMeleeSpells(false);
@@ -1307,7 +1307,7 @@ public:
case EVENT_MAIEV_STEALTH:
{
me->SetFullHealth();
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
Timer[EVENT_MAIEV_STEALTH] = 0;
BlinkToPlayer();
@@ -1349,7 +1349,7 @@ public:
if (HealthBelowPct(50))
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
if (GETCRE(Illidan, IllidanGUID))
CAST_AI(boss_illidan_stormrage::boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(me->GetGUID());
@@ -1446,7 +1446,7 @@ public:
me->SetUInt32Value(UNIT_NPC_FLAGS, 0); // Database sometimes has strange values..
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
me->setActive(false);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
// Do not call reset in Akama's evade mode, as this will stop him from summoning minions after he kills the first bit
@@ -1529,7 +1529,7 @@ public:
for (uint8 i = 0; i < 2; ++i)
if (Creature* Spirit = me->SummonCreature(i ? SPIRIT_OF_OLUM : SPIRIT_OF_UDALO, SpiritSpawns[i].x, SpiritSpawns[i].y, SpiritSpawns[i].z, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
{
- Spirit->SetVisibility(VISIBILITY_OFF);
+ Spirit->SetVisible(false);
SpiritGUID[i] = Spirit->GetGUID();
}
}
@@ -1649,8 +1649,8 @@ public:
Timer = 2000;
break;
case 1: // spirit appear
- Spirit[0]->SetVisibility(VISIBILITY_ON);
- Spirit[1]->SetVisibility(VISIBILITY_ON);
+ Spirit[0]->SetVisible(true);
+ Spirit[1]->SetVisible(true);
Timer = 2000;
break;
case 2: // spirit help
@@ -1675,8 +1675,8 @@ public:
me->MonsterYell(SAY_AKAMA_BEWARE, LANG_UNIVERSAL, 0);
DoPlaySoundToSet(me, SOUND_AKAMA_BEWARE);
Channel->setDeathState(JUST_DIED);
- Spirit[0]->SetVisibility(VISIBILITY_OFF);
- Spirit[1]->SetVisibility(VISIBILITY_OFF);
+ Spirit[0]->SetVisible(false);
+ Spirit[1]->SetVisible(false);
Timer = 3000;
break;
case 6:
@@ -1718,12 +1718,12 @@ public:
void UpdateAI(const uint32 diff)
{
- if (me->GetVisibility() == VISIBILITY_OFF)
+ if (!me->IsVisible())
{
if (Check_Timer <= diff)
{
if (pInstance && pInstance->GetData(DATA_ILLIDARICOUNCILEVENT) == DONE)
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
Check_Timer = 5000;
} else Check_Timer -= diff;
@@ -1882,7 +1882,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::JustSummoned(Creature* su
{
if (Phase == PHASE_TALK_SEQUENCE)
{
- summon->SetVisibility(VISIBILITY_OFF);
+ summon->SetVisible(false);
summon->setDeathState(JUST_DIED);
return;
}
@@ -1903,7 +1903,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::JustSummoned(Creature* su
break;
case MAIEV_SHADOWSONG:
{
- summon->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk
+ summon->SetVisible(false); // Leave her invisible until she has to talk
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
MaievGUID = summon->GetGUID();
CAST_AI(boss_maiev_shadowsong::boss_maievAI, summon->AI())->GetIllidanGUID(me->GetGUID());
@@ -1948,7 +1948,7 @@ void boss_illidan_stormrage::boss_illidan_stormrageAI::HandleTalkSequence()
case 11:
if (GETUNIT(Maiev, MaievGUID))
{
- Maiev->SetVisibility(VISIBILITY_ON); // Maiev is now visible
+ Maiev->SetVisible(true); // Maiev is now visible
Maiev->CastSpell(Maiev, SPELL_TELEPORT_VISUAL, true); // onoz she looks like she teleported!
Maiev->SetInFront(me); // Have her face us
me->SetInFront(Maiev); // Face her, so it's not rude =P
@@ -2235,7 +2235,7 @@ public:
AttackStart(pTarget);
else
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->setDeathState(JUST_DIED);
return;
}
@@ -2246,7 +2246,7 @@ public:
GETUNIT(Illidan, IllidanGUID);
if (!Illidan || CAST_CRE(Illidan)->IsInEvadeMode())
{
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->setDeathState(JUST_DIED);
return;
} else CheckTimer = 5000;
diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
index 4d24b08c88b..5a8fa42dff5 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -262,7 +262,7 @@ public:
IsBanished = true;
HasKilledAkama = false;
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//me->GetMotionMaster()->Clear();
diff --git a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
index fdc37b32bd5..62839f0df2a 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_supremus.cpp
@@ -72,7 +72,7 @@ public:
float x, y, z;
me->GetNearPoint(me, x, y, z, 1, 100, float(M_PI*2*rand_norm()));
me->GetMotionMaster()->MovePoint(0, x, y, z);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->CastSpell(me,SPELL_MOLTEN_FLAME,true);
}
};
diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
index 51a2b03234e..83b247857f8 100644
--- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
+++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp
@@ -802,7 +802,7 @@ public:
AppearEnvenomTimer = 150000;
HasVanished = false;
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -842,7 +842,7 @@ public:
VanishTimer = 30000;
AppearEnvenomTimer= 28000;
HasVanished = true;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoResetThreat();
// Chase a unit. Check before DoMeleeAttackIfReady prevents from attacking
@@ -872,7 +872,7 @@ public:
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveChase(me->getVictim());
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
AppearEnvenomTimer = 6000;
} else AppearEnvenomTimer -= diff;
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
index 08a39b3cfb5..670230c1eda 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
@@ -141,7 +141,7 @@ public:
pInstance->SetData(DATA_STRANGE_POOL, NOT_STARTED);
}
DoCast(me, SPELL_SUBMERGE);//submerge anim
- me->SetVisibility(VISIBILITY_OFF);//we start invis under water, submerged
+ me->SetVisible(false);//we start invis under water, submerged
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}
@@ -189,7 +189,7 @@ public:
{
if (Submerged)
{
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
Submerged = false;
WaitTimer2 = 500;
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
index 3214f8962bc..bb5e2482239 100644
--- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp
@@ -338,7 +338,7 @@ class boss_vazruden_the_herald : public CreatureScript
}
summoned = false;
me->clearUnitState(UNIT_STAT_ROOT);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
}
@@ -351,7 +351,7 @@ class boss_vazruden_the_herald : public CreatureScript
if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000))
NazanGUID = Nazan->GetGUID();
summoned = true;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->addUnitState(UNIT_STAT_ROOT);
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
index 2d168a1f064..c68cf80a530 100644
--- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp
@@ -129,7 +129,7 @@ class mob_abyssal : public CreatureScript
if (trigger == 2 && spell->Id == SPELL_BLAZE_TARGET)
{
DoCast(me, SPELL_BLAZE_TRAP, true);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
Despawn_Timer = 130000;
}
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
index 1573180e827..dc0a0013362 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp
@@ -266,7 +266,7 @@ class boss_warbringer_omrogg : public CreatureScript
//summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
//summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- summoned->SetVisibility(VISIBILITY_OFF);
+ summoned->SetVisible(false);
}
void KilledUnit(Unit* /*victim*/)
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
index 71e0f82fff7..287466b78e6 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp
@@ -136,7 +136,7 @@ class boss_high_astromancer_solarian : public CreatureScript
me->SetArmor(defaultarmor);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
me->SetFloatValue(OBJECT_FIELD_SCALE_X, defaultsize);
me->SetDisplayId(MODEL_HUMAN);
@@ -207,7 +207,7 @@ class boss_high_astromancer_solarian : public CreatureScript
if (Phase == 2)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
AppearDelay_Timer = 2000;
}
@@ -354,7 +354,7 @@ class boss_high_astromancer_solarian : public CreatureScript
SummonMinion(NPC_SOLARIUM_PRIEST, Portals[j][0], Portals[j][1], Portals[j][2]);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
DoScriptText(SAY_SUMMON2, me);
AppearDelay = true;
@@ -389,7 +389,7 @@ class boss_high_astromancer_solarian : public CreatureScript
Phase = 4;
//To make sure she wont be invisible or not selecatble
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
DoScriptText(SAY_VOIDA, me);
DoScriptText(SAY_VOIDB, me);
me->SetArmor(WV_ARMOR);
diff --git a/src/server/scripts/Outland/netherstorm.cpp b/src/server/scripts/Outland/netherstorm.cpp
index 2c96d595211..ff5d8026cee 100644
--- a/src/server/scripts/Outland/netherstorm.cpp
+++ b/src/server/scripts/Outland/netherstorm.cpp
@@ -618,7 +618,7 @@ public:
case 9:
Turn_to_eachother();
//hide pathaleon, unit will despawn shortly
- pathaleon->SetVisibility(VISIBILITY_OFF);
+ pathaleon->SetVisible(false);
PhaseSubphase = 0;
++Phase;
Phase_Timer = 3000;
diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp
index 05836408c81..a4883f84f74 100644
--- a/src/server/scripts/Outland/shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/shadowmoon_valley.cpp
@@ -226,7 +226,7 @@ public:
FlyTimer = 10000;
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- me->SetVisibility(VISIBILITY_ON);
+ me->SetVisible(true);
}
void SpellHit(Unit* caster, const SpellEntry* spell)
@@ -271,7 +271,7 @@ public:
PlayerGUID = 0;
}
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
me->RemoveCorpse();
@@ -808,7 +808,7 @@ public:
if (Illidan)
{
IllidanGUID = Illidan->GetGUID();
- Illidan->SetVisibility(VISIBILITY_OFF);
+ Illidan->SetVisible(false);
}
if (PlayerGUID)
{
@@ -840,7 +840,7 @@ public:
case 2: DoScriptText(OVERLORD_YELL_1, me, plr); return 4500; break;
case 3: me->SetInFront(plr); return 3200; break;
case 4: DoScriptText(OVERLORD_SAY_2, me, plr); return 2000; break;
- case 5: Illi->SetVisibility(VISIBILITY_ON);
+ case 5: Illi->SetVisible(true);
Illi->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); return 350; break;
case 6:
Illi->CastSpell(Illi, SPELL_ONE, true);
@@ -876,7 +876,7 @@ public:
return 500; break;
case 21: DoScriptText(OVERLORD_SAY_5, me); return 500; break;
case 22:
- Illi->SetVisibility(VISIBILITY_OFF);
+ Illi->SetVisible(false);
Illi->setDeathState(JUST_DIED);
return 1000; break;
case 23: me->SetUInt32Value(UNIT_FIELD_BYTES_1,0); return 2000; break;
@@ -1429,7 +1429,7 @@ public:
Announced = false;
Failed = false;
- me->SetVisibility(VISIBILITY_OFF);
+ me->SetVisible(false);
}
void EnterCombat(Unit* /*who*/) {}
diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp
index 668b0087f9c..1bca886d5f3 100644
--- a/src/server/scripts/World/item_scripts.cpp
+++ b/src/server/scripts/World/item_scripts.cpp
@@ -341,7 +341,7 @@ public:
pGo->SummonGameObject(GO_HIGH_QUALITY_FUR, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), 0, 0, 0, 0, 0, 1000);
if (TempSummon* summon = pPlayer->SummonCreature(NPC_NESINGWARY_TRAPPER, x, y, z, pGo->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 1000))
{
- summon->SetVisibility(VISIBILITY_OFF);
+ summon->SetVisible(false);
summon->SetReactState(REACT_PASSIVE);
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
}