aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp2
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp6
-rw-r--r--src/server/game/Battlefield/Zones/BattlefieldWG.cpp24
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp4
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp2
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp16
-rw-r--r--src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp8
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp6
-rw-r--r--src/server/game/Entities/Creature/TemporarySummon.cpp8
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp6
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rw-r--r--src/server/game/Entities/Pet/Pet.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp12
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp26
-rw-r--r--src/server/game/Entities/Unit/Unit.h4
-rw-r--r--src/server/game/Handlers/AuctionHouseHandler.cpp16
-rw-r--r--src/server/game/Handlers/NPCHandler.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp12
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp4
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp6
-rw-r--r--src/server/scripts/Commands/cs_pet.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp8
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp44
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp6
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp18
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp16
-rw-r--r--src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_ghostlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_hinterlands.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp12
-rw-r--r--src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp4
-rw-r--r--src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/zone_wetlands.cpp2
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp4
-rw-r--r--src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp2
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp4
-rw-r--r--src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp2
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp4
-rw-r--r--src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp6
-rw-r--r--src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp2
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp2
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp12
-rw-r--r--src/server/scripts/Kalimdor/zone_ashenvale.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp8
-rw-r--r--src/server/scripts/Kalimdor/zone_darkshore.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_desolace.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_feralas.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_tanaris.cpp6
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp18
-rw-r--r--src/server/scripts/Kalimdor/zone_thousand_needles.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_ungoro_crater.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_winterspring.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp4
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp10
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp4
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp16
-rw-r--r--src/server/scripts/Northrend/zone_dragonblight.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_grizzly_hills.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_howling_fjord.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_icecrown.cpp6
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_storm_peaks.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp4
-rw-r--r--src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp2
-rw-r--r--src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp2
-rw-r--r--src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp10
-rw-r--r--src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp4
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp6
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp2
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp2
-rw-r--r--src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp2
-rw-r--r--src/server/scripts/Outland/zone_hellfire_peninsula.cpp10
-rw-r--r--src/server/scripts/Outland/zone_nagrand.cpp4
-rw-r--r--src/server/scripts/Outland/zone_netherstorm.cpp4
-rw-r--r--src/server/scripts/Outland/zone_shadowmoon_valley.cpp8
-rw-r--r--src/server/scripts/Outland/zone_shattrath_city.cpp4
-rw-r--r--src/server/scripts/Outland/zone_terokkar_forest.cpp18
-rw-r--r--src/server/scripts/Outland/zone_zangarmarsh.cpp8
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp2
-rw-r--r--src/server/scripts/World/go_scripts.cpp2
-rw-r--r--src/server/scripts/World/npcs_special.cpp6
130 files changed, 356 insertions, 356 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index 93f31a0f57a..085ef9c4047 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -168,7 +168,7 @@ void npc_escortAI::JustRespawned()
//add a small delay before going to first waypoint, normal in near all cases
m_uiWPWaitTimer = 2500;
- if (me->getFaction() != me->GetCreatureTemplate()->faction)
+ if (me->GetFaction() != me->GetCreatureTemplate()->faction)
me->RestoreFaction();
Reset();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index cf6c693fb7a..79c3c17d610 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -163,8 +163,8 @@ void FollowerAI::JustRespawned()
if (!IsCombatMovementAllowed())
SetCombatMovement(true);
- if (me->getFaction() != me->GetCreatureTemplate()->faction)
- me->setFaction(me->GetCreatureTemplate()->faction);
+ if (me->GetFaction() != me->GetCreatureTemplate()->faction)
+ me->SetFaction(me->GetCreatureTemplate()->faction);
Reset();
}
@@ -300,7 +300,7 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu
m_uiLeaderGUID = player->GetGUID();
if (factionForFollower)
- me->setFaction(factionForFollower);
+ me->SetFaction(factionForFollower);
m_pQuestForFollow = quest;
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 9cefccd19df..e62f5bcc1fd 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -579,7 +579,7 @@ void SmartAI::JustRespawned()
mDespawnState = 0;
mEscortState = SMART_ESCORT_NONE;
me->SetVisible(true);
- if (me->getFaction() != me->GetCreatureTemplate()->faction)
+ if (me->GetFaction() != me->GetCreatureTemplate()->faction)
me->RestoreFaction();
mJustReset = true;
JustReachedHome();
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 359f35e4d40..5f021440376 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -229,7 +229,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (e.action.faction.factionID)
{
- (*itr)->ToCreature()->setFaction(e.action.faction.factionID);
+ (*itr)->ToCreature()->SetFaction(e.action.faction.factionID);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().GetCounter(), e.action.faction.factionID);
}
@@ -237,9 +237,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
{
if (CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate((*itr)->ToCreature()->GetEntry()))
{
- if ((*itr)->ToCreature()->getFaction() != ci->faction)
+ if ((*itr)->ToCreature()->GetFaction() != ci->faction)
{
- (*itr)->ToCreature()->setFaction(ci->faction);
+ (*itr)->ToCreature()->SetFaction(ci->faction);
TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SET_FACTION: Creature entry %u, GuidLow %u set faction to %u",
(*itr)->GetEntry(), (*itr)->GetGUID().GetCounter(), ci->faction);
}
diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
index 9959f53a0fe..6270932d7c2 100644
--- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
+++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp
@@ -575,7 +575,7 @@ void BattlefieldWG::OnBattleStart()
if (Creature* creature = GetCreature(*itr))
{
ShowNpc(creature, true);
- creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
+ creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
}
}
@@ -659,7 +659,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
if (Creature* creature = GetCreature(*itr))
{
if (!endByTimer)
- creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
+ creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
HideNpc(creature);
}
}
@@ -886,9 +886,9 @@ void BattlefieldWG::OnCreatureRemove(Creature* /*creature*/)
case NPC_WINTERGRASP_DEMOLISHER:
{
uint8 team;
- if (creature->getFaction() == WintergraspFaction[TEAM_ALLIANCE])
+ if (creature->GetFaction() == WintergraspFaction[TEAM_ALLIANCE])
team = TEAM_ALLIANCE;
- else if (creature->getFaction() == WintergraspFaction[TEAM_HORDE])
+ else if (creature->GetFaction() == WintergraspFaction[TEAM_HORDE])
team = TEAM_HORDE;
else
return;
@@ -1604,12 +1604,12 @@ void BfWGGameObjectBuilding::Init(GameObject* go)
case GO_WINTERGRASP_FORTRESS_TOWER_2:
case GO_WINTERGRASP_FORTRESS_TOWER_3:
case GO_WINTERGRASP_FORTRESS_TOWER_4:
- turret->setFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
+ turret->SetFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
break;
case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
case GO_WINTERGRASP_FLAMEWATCH_TOWER:
- turret->setFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
+ turret->SetFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
break;
}
@@ -1629,12 +1629,12 @@ void BfWGGameObjectBuilding::Init(GameObject* go)
case GO_WINTERGRASP_FORTRESS_TOWER_2:
case GO_WINTERGRASP_FORTRESS_TOWER_3:
case GO_WINTERGRASP_FORTRESS_TOWER_4:
- turret->setFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
+ turret->SetFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
break;
case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
case GO_WINTERGRASP_FLAMEWATCH_TOWER:
- turret->setFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
+ turret->SetFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
break;
}
_wg->HideNpc(turret);
@@ -1689,14 +1689,14 @@ void BfWGGameObjectBuilding::UpdateTurretAttack(bool disable)
case GO_WINTERGRASP_FORTRESS_TOWER_3:
case GO_WINTERGRASP_FORTRESS_TOWER_4:
{
- creature->setFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
+ creature->SetFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
break;
}
case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
case GO_WINTERGRASP_FLAMEWATCH_TOWER:
{
- creature->setFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
+ creature->SetFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
break;
}
}
@@ -1719,14 +1719,14 @@ void BfWGGameObjectBuilding::UpdateTurretAttack(bool disable)
case GO_WINTERGRASP_FORTRESS_TOWER_3:
case GO_WINTERGRASP_FORTRESS_TOWER_4:
{
- creature->setFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
+ creature->SetFaction(WintergraspFaction[_wg->GetDefenderTeam()]);
break;
}
case GO_WINTERGRASP_SHADOWSIGHT_TOWER:
case GO_WINTERGRASP_WINTER_S_EDGE_TOWER:
case GO_WINTERGRASP_FLAMEWATCH_TOWER:
{
- creature->setFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
+ creature->SetFaction(WintergraspFaction[_wg->GetAttackerTeam()]);
break;
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
index 0f80dade095..9cf28da0e25 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp
@@ -399,7 +399,7 @@ void BattlegroundAB::_NodeOccupied(uint8 node, Team team)
//aura should only apply to players who have accupied the node, set correct faction for trigger
if (trigger)
{
- trigger->setFaction(team == ALLIANCE ? 84 : 83);
+ trigger->SetFaction(team == ALLIANCE ? 84 : 83);
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
index e86ea340eef..c31239b7109 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp
@@ -340,7 +340,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type)
{
if (Creature* trigger = AddCreature(WORLD_TRIGGER, triggerSpawnID, BG_AV_CreaturePos[triggerSpawnID]))
{
- trigger->setFaction(newFaction);
+ trigger->SetFaction(newFaction);
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
}
}
@@ -752,7 +752,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
DelCreature(node + 302);
return;
}
- trigger->setFaction(owner == ALLIANCE ? 84 : 83);
+ trigger->SetFaction(owner == ALLIANCE ? 84 : 83);
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
index 7b0dfaaf452..19f085dd8bb 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp
@@ -783,7 +783,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player* player, uint32 Point)
//aura should only apply to players who have accupied the node, set correct faction for trigger
if (trigger)
{
- trigger->setFaction(Team == ALLIANCE ? 84 : 83);
+ trigger->SetFaction(Team == ALLIANCE ? 84 : 83);
trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false);
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
index 3e3c5d3cfda..bbd4f16328a 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp
@@ -187,7 +187,7 @@ void BattlegroundIC::PostUpdateImpl(uint32 diff)
DelObject(nodePoint[i].gameobject_type);
AddObject(nodePoint[i].gameobject_type, nodePoint[i].gameobject_entry, cords[0], cords[1], cords[2], cords[3], 0, 0, 0, 0, RESPAWN_ONE_DAY);
- GetBGObject(nodePoint[i].gameobject_type)->SetUInt32Value(GAMEOBJECT_FACTION, nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_Factions[1] : BG_IC_Factions[0]);
+ GetBGObject(nodePoint[i].gameobject_type)->SetFaction(nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_Factions[1] : BG_IC_Factions[0]);
UpdateNodeWorldState(&nodePoint[i]);
HandleCapturedNodes(&nodePoint[i], false);
@@ -364,9 +364,9 @@ bool BattlegroundIC::SetupBattleground()
// setting correct factions for Keep Cannons
for (uint8 i = BG_IC_NPC_KEEP_CANNON_1; i <= BG_IC_NPC_KEEP_CANNON_12; ++i)
- GetBGCreature(i)->setFaction(BG_IC_Factions[0]);
+ GetBGCreature(i)->SetFaction(BG_IC_Factions[0]);
for (uint8 i = BG_IC_NPC_KEEP_CANNON_13; i <= BG_IC_NPC_KEEP_CANNON_24; ++i)
- GetBGCreature(i)->setFaction(BG_IC_Factions[1]);
+ GetBGCreature(i)->SetFaction(BG_IC_Factions[1]);
// correcting spawn time for keeps bombs
for (uint8 i = BG_IC_GO_HUGE_SEAFORIUM_BOMBS_A_1; i < BG_IC_GO_HUGE_SEAFORIUM_BOMBS_H_4; ++i)
@@ -485,7 +485,7 @@ void BattlegroundIC::EventPlayerClickedOnFlag(Player* player, GameObject* target
EndBattleground(0);
}
- GetBGObject(nodePoint[i].gameobject_type)->SetUInt32Value(GAMEOBJECT_FACTION, nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_Factions[1] : BG_IC_Factions[0]);
+ GetBGObject(nodePoint[i].gameobject_type)->SetFaction(nodePoint[i].faction == TEAM_ALLIANCE ? BG_IC_Factions[1] : BG_IC_Factions[0]);
UpdateNodeWorldState(&nodePoint[i]);
// we dont need iterating if we are here
@@ -694,7 +694,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* node, bool recapture)
continue;
if (AddCreature(node->faction == TEAM_ALLIANCE ? NPC_GLAIVE_THROWER_A : NPC_GLAIVE_THROWER_H, type, BG_IC_DocksVehiclesGlaives[i], node->faction, RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ GetBGCreature(type)->SetFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
// spawning catapults
@@ -706,7 +706,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* node, bool recapture)
continue;
if (AddCreature(NPC_CATAPULT, type, BG_IC_DocksVehiclesCatapults[i], node->faction, RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ GetBGCreature(type)->SetFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
break;
case BG_IC_GO_WORKSHOP_BANNER:
@@ -738,7 +738,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* node, bool recapture)
continue;
if (AddCreature(NPC_DEMOLISHER, type, BG_IC_WorkshopVehicles[i], node->faction, RESPAWN_ONE_DAY))
- GetBGCreature(type)->setFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ GetBGCreature(type)->SetFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
// we check if the opossing siege engine is in use
@@ -763,7 +763,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* node, bool recapture)
if (Creature* siegeEngine = GetBGCreature(siegeType))
{
siegeEngine->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_CANNOT_SWIM|UNIT_FLAG_IMMUNE_TO_PC);
- siegeEngine->setFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
+ siegeEngine->SetFaction(BG_IC_Factions[(node->faction == TEAM_ALLIANCE ? 0 : 1)]);
}
}
}
diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
index 95bb66f66d7..936106052c0 100644
--- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
+++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
@@ -654,13 +654,13 @@ void BattlegroundSA::OverrideGunFaction()
for (uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10; i++)
{
if (Creature* gun = GetBGCreature(i))
- gun->setFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
+ gun->SetFaction(BG_SA_Factions[Attackers ? TEAM_ALLIANCE : TEAM_HORDE]);
}
for (uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4; i++)
{
if (Creature* dem = GetBGCreature(i))
- dem->setFaction(BG_SA_Factions[Attackers]);
+ dem->SetFaction(BG_SA_Factions[Attackers]);
}
}
@@ -831,7 +831,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
AddCreature(BG_SA_NpcEntries[j], j, BG_SA_NpcSpawnlocs[j], (Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE), 600);
if (Creature* dem = GetBGCreature(j))
- dem->setFaction(BG_SA_Factions[Attackers]);
+ dem->SetFaction(BG_SA_Factions[Attackers]);
}
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, GraveyardStatus[i] == TEAM_ALLIANCE);
@@ -856,7 +856,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
AddCreature(BG_SA_NpcEntries[j], j, BG_SA_NpcSpawnlocs[j], Attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE, 600);
if (Creature* dem = GetBGCreature(j))
- dem->setFaction(BG_SA_Factions[Attackers]);
+ dem->SetFaction(BG_SA_Factions[Attackers]);
}
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, GraveyardStatus[i] == TEAM_ALLIANCE);
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 375997fe636..360fe1151c9 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -484,7 +484,7 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/,
if (!GetCreatureAddon())
SetSheath(SHEATH_STATE_MELEE);
- setFaction(cInfo->faction);
+ SetFaction(cInfo->faction);
uint32 npcflag, unit_flags, dynamicflags;
ObjectMgr::ChooseCreatureFlags(cInfo, npcflag, unit_flags, dynamicflags, data);
@@ -533,7 +533,7 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/,
{
if (Player* owner = Creature::GetCharmerOrOwnerPlayerOrPlayerItself()) // this check comes in case we don't have a player
{
- setFaction(owner->getFaction()); // vehicles should have same as owner faction
+ SetFaction(owner->GetFaction()); // vehicles should have same as owner faction
owner->VehicleSpellInitialize();
}
}
@@ -2248,7 +2248,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
// only from same creature faction
if (checkfaction)
{
- if (getFaction() != u->getFaction())
+ if (GetFaction() != u->GetFaction())
return false;
}
else
diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp
index 9892878c982..bc433ed2d69 100644
--- a/src/server/game/Entities/Creature/TemporarySummon.cpp
+++ b/src/server/game/Entities/Creature/TemporarySummon.cpp
@@ -186,7 +186,7 @@ void TempSummon::InitStats(uint32 duration)
if (owner && IsTrigger() && m_spells[0])
{
- setFaction(owner->getFaction());
+ SetFaction(owner->GetFaction());
SetLevel(owner->getLevel());
if (owner->GetTypeId() == TYPEID_PLAYER)
m_ControlledByPlayer = true;
@@ -210,9 +210,9 @@ void TempSummon::InitStats(uint32 duration)
}
if (m_Properties->Faction)
- setFaction(m_Properties->Faction);
+ SetFaction(m_Properties->Faction);
else if (IsVehicle() && owner) // properties should be vehicle
- setFaction(owner->getFaction());
+ SetFaction(owner->GetFaction());
}
void TempSummon::InitSummon()
@@ -300,7 +300,7 @@ void Minion::InitStats(uint32 duration)
SetReactState(REACT_PASSIVE);
SetCreatorGUID(GetOwner()->GetGUID());
- setFaction(GetOwner()->getFaction());
+ SetFaction(GetOwner()->GetFaction());
GetOwner()->SetMinion(this, true);
}
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index 1eeacba22ae..b5621918295 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -290,7 +290,7 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
if (m_goTemplateAddon)
{
- SetUInt32Value(GAMEOBJECT_FACTION, m_goTemplateAddon->faction);
+ SetFaction(m_goTemplateAddon->faction);
SetUInt32Value(GAMEOBJECT_FLAGS, m_goTemplateAddon->flags);
}
@@ -1886,7 +1886,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
if (Unit* owner = GetOwner())
{
- trigger->setFaction(owner->getFaction());
+ trigger->SetFaction(owner->GetFaction());
if (owner->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE))
trigger->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
// copy pvp state flags from owner
@@ -1897,7 +1897,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
}
else
{
- trigger->setFaction(spellInfo->IsPositive() ? 35 : 14);
+ trigger->SetFaction(spellInfo->IsPositive() ? 35 : 14);
// Set owner guid for target if no owner available - needed by trigger auras
// - trigger gets despawned and there's no caster avalible (see AuraEffect::TriggerSpell())
trigger->CastSpell(target ? target : trigger, spellInfo, triggered, nullptr, nullptr, target ? target->GetGUID() : ObjectGuid::Empty);
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 39a058b80d8..b2fc5314c8b 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -2046,7 +2046,7 @@ Creature* WorldObject::SummonTrigger(float x, float y, float z, float ang, uint3
//summon->SetName(GetName());
if (GetTypeId() == TYPEID_PLAYER || GetTypeId() == TYPEID_UNIT)
{
- summon->setFaction(((Unit*)this)->getFaction());
+ summon->SetFaction(((Unit*)this)->GetFaction());
summon->SetLevel(((Unit*)this)->getLevel());
}
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 72fb329b672..e506c59ec40 100644
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -180,7 +180,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
return false;
setPetType(petType);
- setFaction(owner->getFaction());
+ SetFaction(owner->GetFaction());
SetUInt32Value(UNIT_CREATED_BY_SPELL, summonSpellId);
if (IsCritter())
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 96660969332..db3b936f001 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -2547,13 +2547,13 @@ void Player::SetGameMaster(bool on)
if (on)
{
m_ExtraFlags |= PLAYER_EXTRA_GM_ON;
- setFaction(35);
+ SetFaction(35);
SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_ALLOW_CHEAT_SPELLS);
if (Pet* pet = GetPet())
{
- pet->setFaction(35);
+ pet->SetFaction(35);
pet->getHostileRefManager().setOnlineOfflineState(false);
}
@@ -2587,7 +2587,7 @@ void Player::SetGameMaster(bool on)
if (Pet* pet = GetPet())
{
- pet->setFaction(getFaction());
+ pet->SetFaction(GetFaction());
pet->getHostileRefManager().setOnlineOfflineState(true);
}
@@ -6657,7 +6657,7 @@ void Player::setFactionForRace(uint8 race)
m_team = TeamForRace(race);
ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race);
- setFaction(rEntry ? rEntry->FactionID : 0);
+ SetFaction(rEntry ? rEntry->FactionID : 0);
}
ReputationRank Player::GetReputationRank(uint32 faction) const
@@ -24285,7 +24285,7 @@ bool Player::CanUseBattlegroundObject(GameObject* gameobject) const
if (gameobject)
{
FactionTemplateEntry const* playerFaction = GetFactionTemplateEntry();
- FactionTemplateEntry const* faction = sFactionTemplateStore.LookupEntry(gameobject->GetUInt32Value(GAMEOBJECT_FACTION));
+ FactionTemplateEntry const* faction = sFactionTemplateStore.LookupEntry(gameobject->GetFaction());
if (playerFaction && faction && !playerFaction->IsFriendlyTo(*faction))
return false;
@@ -26557,7 +26557,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
}
pet->SetCreatorGUID(GetGUID());
- pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction());
+ pet->SetFaction(GetFaction());
pet->setPowerType(POWER_MANA);
pet->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index fc1aed52609..effd158dd2a 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5555,15 +5555,15 @@ void Unit::setPowerType(Powers new_powertype)
FactionTemplateEntry const* Unit::GetFactionTemplateEntry() const
{
- FactionTemplateEntry const* entry = sFactionTemplateStore.LookupEntry(getFaction());
+ FactionTemplateEntry const* entry = sFactionTemplateStore.LookupEntry(GetFaction());
if (!entry)
{
if (Player const* player = ToPlayer())
- TC_LOG_ERROR("entities.unit", "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), getFaction());
+ TC_LOG_ERROR("entities.unit", "Player %s has invalid faction (faction template id) #%u", player->GetName().c_str(), GetFaction());
else if (Creature const* creature = ToCreature())
- TC_LOG_ERROR("entities.unit", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
+ TC_LOG_ERROR("entities.unit", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, GetFaction());
else
- TC_LOG_ERROR("entities.unit", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
+ TC_LOG_ERROR("entities.unit", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), GetFaction());
ABORT();
}
@@ -11886,7 +11886,7 @@ Pet* Unit::CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id)
bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
{
pet->SetCreatorGUID(GetGUID());
- pet->setFaction(getFaction());
+ pet->SetFaction(GetFaction());
pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id);
if (GetTypeId() == TYPEID_PLAYER)
@@ -12522,8 +12522,8 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
if (aurApp && aurApp->GetRemoveMode())
return false;
- _oldFactionId = getFaction();
- setFaction(charmer->getFaction());
+ _oldFactionId = GetFaction();
+ SetFaction(charmer->GetFaction());
// Set charmed
charmer->SetCharm(this, true);
@@ -12639,7 +12639,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
if (_oldFactionId)
{
- setFaction(_oldFactionId);
+ SetFaction(_oldFactionId);
_oldFactionId = 0;
}
else
@@ -12731,13 +12731,13 @@ void Unit::RestoreFaction()
{
if (Unit* owner = GetOwner())
{
- setFaction(owner->getFaction());
+ SetFaction(owner->GetFaction());
return;
}
}
if (CreatureTemplate const* cinfo = ToCreature()->GetCreatureTemplate()) // normal creature
- setFaction(cinfo->faction);
+ SetFaction(cinfo->faction);
}
}
@@ -12825,7 +12825,7 @@ bool Unit::IsInPartyWith(Unit const* unit) const
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
return true;
- return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->getFaction() == u2->getFaction();
+ return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->GetFaction() == u2->GetFaction();
}
bool Unit::IsInRaidWith(Unit const* unit) const
@@ -12844,7 +12844,7 @@ bool Unit::IsInRaidWith(Unit const* unit) const
(u1->GetTypeId() == TYPEID_PLAYER && u2->GetTypeId() == TYPEID_UNIT && u2->ToCreature()->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_TREAT_AS_RAID_UNIT))
return true;
- return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->getFaction() == u2->getFaction();
+ return u1->GetTypeId() == TYPEID_UNIT && u2->GetTypeId() == TYPEID_UNIT && u1->GetFaction() == u2->GetFaction();
}
void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
@@ -14460,7 +14460,7 @@ void Unit::BuildValuesUpdate(uint8 updateType, ByteBuffer* data, Player* target)
fieldBuffer << (m_uint32Values[UNIT_FIELD_BYTES_2] & ((UNIT_BYTE2_FLAG_SANCTUARY /*| UNIT_BYTE2_FLAG_AURAS | UNIT_BYTE2_FLAG_UNK5*/) << 8)); // this flag is at uint8 offset 1 !!
else
// pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work)
- fieldBuffer << uint32(target->getFaction());
+ fieldBuffer << uint32(target->GetFaction());
}
else
fieldBuffer << m_uint32Values[index];
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index 3312e88d3ba..f404302d3f1 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1425,8 +1425,8 @@ class TC_GAME_API Unit : public WorldObject
virtual void SetSheath(SheathState sheathed) { SetByteValue(UNIT_FIELD_BYTES_2, UNIT_BYTES_2_OFFSET_SHEATH_STATE, sheathed); }
// faction template id
- uint32 getFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); }
- void setFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction); }
+ uint32 GetFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); }
+ void SetFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction); }
FactionTemplateEntry const* GetFactionTemplateEntry() const;
ReputationRank GetReactionTo(Unit const* target) const;
diff --git a/src/server/game/Handlers/AuctionHouseHandler.cpp b/src/server/game/Handlers/AuctionHouseHandler.cpp
index 702da0d4b66..49373d97036 100644
--- a/src/server/game/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Handlers/AuctionHouseHandler.cpp
@@ -59,7 +59,7 @@ void WorldSession::SendAuctionHello(ObjectGuid guid, Creature* unit)
return;
}
- AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->getFaction());
+ AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction());
if (!ahEntry)
return;
@@ -162,7 +162,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
return;
}
- AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
+ AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->GetFaction());
if (!auctionHouseEntry)
{
TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) has wrong faction.", auctioneer.ToString().c_str());
@@ -247,7 +247,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Item* item = items[0];
uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
if (!_player->HasEnoughMoney(deposit))
@@ -441,7 +441,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Player* player = GetPlayer();
@@ -565,7 +565,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Player* player = GetPlayer();
@@ -649,7 +649,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4));
Player* player = GetPlayer();
@@ -698,7 +698,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4+4+4));
data << (uint32) 0; // amount place holder
@@ -753,7 +753,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
TC_LOG_DEBUG("auctionHouse", "Auctionhouse search (%s) list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
guid.ToString().c_str(), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp
index 53f855c7872..d5e8f8c1e7c 100644
--- a/src/server/game/Handlers/NPCHandler.cpp
+++ b/src/server/game/Handlers/NPCHandler.cpp
@@ -311,7 +311,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
}
// set faction visible if needed
- if (FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->getFaction()))
+ if (FactionTemplateEntry const* factionTemplateEntry = sFactionTemplateStore.LookupEntry(unit->GetFaction()))
_player->GetReputationMgr().SetVisible(factionTemplateEntry);
GetPlayer()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_TALK);
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 5ec98e85be8..9cdadf661c5 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -4839,7 +4839,7 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode,
if (apply)
{
- target->setFaction(GetMiscValue());
+ target->SetFaction(GetMiscValue());
if (target->GetTypeId() == TYPEID_PLAYER)
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index b45a9702600..2638a9138ac 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -2283,7 +2283,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
if (properties->Category == SUMMON_CATEGORY_ALLY)
{
summon->SetOwnerGUID(m_originalCaster->GetGUID());
- summon->setFaction(m_originalCaster->getFaction());
+ summon->SetFaction(m_originalCaster->GetFaction());
summon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
}
@@ -2324,9 +2324,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
uint32 faction = properties->Faction;
if (!faction)
- faction = m_originalCaster->getFaction();
+ faction = m_originalCaster->GetFaction();
- summon->setFaction(faction);
+ summon->SetFaction(faction);
break;
}
@@ -4073,7 +4073,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
return;
}
- pGameObj->SetUInt32Value(GAMEOBJECT_FACTION, m_caster->getFaction());
+ pGameObj->SetFaction(m_caster->GetFaction());
pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()+1);
int32 duration = m_spellInfo->GetDuration();
pGameObj->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
@@ -5549,7 +5549,7 @@ void Spell::EffectGameObjectDamage(SpellEffIndex /*effIndex*/)
return;
FactionTemplateEntry const* casterFaction = caster->GetFactionTemplateEntry();
- FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetUInt32Value(GAMEOBJECT_FACTION));
+ FactionTemplateEntry const* targetFaction = sFactionTemplateStore.LookupEntry(gameObjTarget->GetFaction());
// Do not allow to damage GO's of friendly factions (ie: Wintergrasp Walls/Ulduar Storm Beacons)
if (!targetFaction || (casterFaction && targetFaction && !casterFaction->IsFriendlyTo(*targetFaction)))
gameObjTarget->ModifyHealth(-damage, caster, GetSpellInfo()->Id);
@@ -5623,7 +5623,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
((Guardian*)summon)->InitStatsForLevel(level);
if (properties && properties->Category == SUMMON_CATEGORY_ALLY)
- summon->setFaction(caster->getFaction());
+ summon->SetFaction(caster->GetFaction());
if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst())
((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon));
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 57f6dda800a..5b2507482dd 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -217,7 +217,7 @@ public:
if (!pfactionid)
{
- uint32 factionid = target->getFaction();
+ uint32 factionid = target->GetFaction();
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
@@ -259,7 +259,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().GetCounter(), factionid, flag, npcflag, dyflag);
- target->setFaction(factionid);
+ target->SetFaction(factionid);
target->SetUInt32Value(UNIT_FIELD_FLAGS, flag);
target->SetUInt32Value(UNIT_NPC_FLAGS, npcflag);
target->SetUInt32Value(UNIT_DYNAMIC_FLAGS, dyflag);
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index 22bb02ae547..d201469a0ef 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -559,7 +559,7 @@ public:
return false;
}
- creature->setFaction(factionId);
+ creature->SetFaction(factionId);
// Faction is set in creature_template - not inside creature
@@ -675,7 +675,7 @@ public:
CreatureTemplate const* cInfo = target->GetCreatureTemplate();
- uint32 faction = target->getFaction();
+ uint32 faction = target->GetFaction();
uint32 npcflags = target->GetUInt32Value(UNIT_NPC_FLAGS);
uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask;
uint32 displayid = target->GetDisplayId();
@@ -699,7 +699,7 @@ public:
if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].Value)
handler->PSendSysMessage("%s (0x%X)", unitFlags[i].Name, unitFlags[i].Value);
- handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction());
+ handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->GetFaction());
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);
handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId());
diff --git a/src/server/scripts/Commands/cs_pet.cpp b/src/server/scripts/Commands/cs_pet.cpp
index 1b704e29b06..552bf15d0c4 100644
--- a/src/server/scripts/Commands/cs_pet.cpp
+++ b/src/server/scripts/Commands/cs_pet.cpp
@@ -97,7 +97,7 @@ public:
creatureTarget->SetHealth(0); // just for nice GM-mode view
pet->SetGuidValue(UNIT_FIELD_CREATEDBY, player->GetGUID());
- pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, player->getFaction());
+ pet->SetFaction(player->GetFaction());
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
{
diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
index 2f45e1f2c6c..9b18098417f 100644
--- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
+++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp
@@ -90,7 +90,7 @@ public:
void JustSummoned(Creature* summoned) override
{
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
WaterElementalGUID = summoned->GetGUID();
summons.Summon(summoned);
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
index cf528d3644d..9b29d8c29b0 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp
@@ -595,7 +595,7 @@ public:
//spell by trap has effect61, this indicate the bar go hostile
if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PHALANX)))
- tmp->setFaction(14);
+ tmp->SetFaction(14);
//for later, this event(s) has alot more to it.
//optionally, DONE can trigger bar to go hostile.
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
index 2dadbecbfbe..b9e9e6186b4 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp
@@ -139,7 +139,7 @@ public:
{
_Reset();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(COREN_DIREBREW_FACTION_FRIEND);
+ me->SetFaction(COREN_DIREBREW_FACTION_FRIEND);
events.SetPhase(PHASE_ALL);
for (uint8 i = 0; i < MAX_ANTAGONISTS; ++i)
@@ -162,7 +162,7 @@ public:
{
events.SetPhase(PHASE_ONE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(COREN_DIREBREW_FACTION_HOSTILE);
+ me->SetFaction(COREN_DIREBREW_FACTION_HOSTILE);
me->SetInCombatWithZone();
EntryCheckPredicate pred(NPC_ANTAGONIST);
@@ -353,7 +353,7 @@ public:
void Reset() override
{
- me->setFaction(COREN_DIREBREW_FACTION_HOSTILE);
+ me->SetFaction(COREN_DIREBREW_FACTION_HOSTILE);
DoCastAOE(SPELL_MOLE_MACHINE_EMERGE, true);
me->SetInCombatWithZone();
}
@@ -395,7 +395,7 @@ public:
break;
case ACTION_ANTAGONIST_HOSTILE:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(COREN_DIREBREW_FACTION_HOSTILE);
+ me->SetFaction(COREN_DIREBREW_FACTION_HOSTILE);
me->SetInCombatWithZone();
break;
default:
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
index 73511b5d0e4..56e72236545 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp
@@ -73,7 +73,7 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
if (Creature* moira = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_MOIRA)))
{
moira->AI()->EnterEvadeMode();
- moira->setFaction(35);
+ moira->SetFaction(35);
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
index 989a2b06fcb..86ae8fdccee 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp
@@ -134,7 +134,7 @@ class boss_doomrel : public CreatureScript
case GOSSIP_ACTION_INFO_DEF+2:
CloseGossipMenuFor(player);
//start event here
- creature->setFaction(FACTION_HOSTILE);
+ creature->SetFaction(FACTION_HOSTILE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
creature->AI()->AttackStart(player);
InstanceScript* instance = creature->GetInstanceScript();
@@ -170,7 +170,7 @@ class boss_doomrel : public CreatureScript
{
Initialize();
- me->setFaction(FACTION_FRIEND);
+ me->SetFaction(FACTION_FRIEND);
// was set before event start, so set again
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
index 59123bfde71..8d2d3164504 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp
@@ -351,7 +351,7 @@ public:
{
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
{
- boss->setFaction(FACTION_HOSTILE);
+ boss->SetFaction(FACTION_HOSTILE);
boss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
if (Unit* target = boss->SelectNearestTarget(500))
boss->AI()->AttackStart(target);
@@ -377,7 +377,7 @@ public:
boss->GetMotionMaster()->MoveTargetedHome();
boss->SetLootRecipient(NULL);
}
- boss->setFaction(FACTION_FRIEND);
+ boss->SetFaction(FACTION_FRIEND);
}
}
GhostKillCount = 0;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
index 3a46d63fe5d..ad9dfd240f9 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp
@@ -188,7 +188,7 @@ public:
me->SetVisible(true);
me->SetPhaseMask(1, true);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
- me->setFaction(35);
+ me->SetFaction(35);
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
me->RemoveAura(SPELL_NEFARIANS_BARRIER);
}
@@ -205,7 +205,7 @@ public:
Talk(SAY_GAMESBEGIN_2);
- me->setFaction(103);
+ me->SetFaction(103);
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
DoCast(me, SPELL_NEFARIANS_BARRIER);
me->SetStandState(UNIT_STAND_STATE_STAND);
@@ -340,7 +340,7 @@ public:
CreatureID = Entry[urand(0, 4)];
if (Creature* dragon = me->SummonCreature(CreatureID, DrakeSpawnLoc[i]))
{
- dragon->setFaction(103);
+ dragon->SetFaction(103);
dragon->AI()->AttackStart(me->GetVictim());
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
index 8e904c5acf2..ffee18f54cf 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp
@@ -75,7 +75,7 @@ public:
{
Initialize();
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
- creature->setFaction(35);
+ creature->SetFaction(35);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
@@ -153,7 +153,7 @@ public:
events.ScheduleEvent(EVENT_SPEECH_4, 16000);
break;
case EVENT_SPEECH_4:
- me->setFaction(103);
+ me->SetFaction(103);
if (PlayerGUID && ObjectAccessor::GetUnit(*me, PlayerGUID))
AttackStart(ObjectAccessor::GetUnit(*me, PlayerGUID));;
break;
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
index a1ea9f7012a..c061ae2a429 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp
@@ -110,7 +110,7 @@ class boss_majordomo : public CreatureScript
if (!me->FindNearestCreature(NPC_FLAMEWAKER_HEALER, 100.0f) && !me->FindNearestCreature(NPC_FLAMEWAKER_ELITE, 100.0f))
{
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
EnterEvadeMode();
Talk(SAY_DEFEAT);
_JustDied();
@@ -191,7 +191,7 @@ class boss_majordomo : public CreatureScript
}
else if (action == ACTION_START_RAGNAROS_ALT)
{
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
}
}
diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
index c06a00907eb..57dc8f03f3f 100644
--- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
+++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp
@@ -173,7 +173,7 @@ class boss_ragnaros : public CreatureScript
{
//Become unbanished again
me->SetReactState(REACT_AGGRESSIVE);
- me->setFaction(14);
+ me->SetFaction(14);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
@@ -251,7 +251,7 @@ class boss_ragnaros : public CreatureScript
me->InterruptNonMeleeSpells(false);
//Root self
//DoCast(me, 23973);
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_SUBMERGED);
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
index 6a200a8089b..d6bbed40e9e 100644
--- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
+++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp
@@ -127,7 +127,7 @@ public:
{
Start(true, false, player->GetGUID());
- me->setFaction(player->getFaction());
+ me->SetFaction(player->GetFaction());
SetData(1, 0);
player->PlayerTalkClass->SendCloseGossip();
@@ -222,8 +222,8 @@ public:
{
//just in case
if (GetPlayerForEscort())
- if (me->getFaction() != GetPlayerForEscort()->getFaction())
- me->setFaction(GetPlayerForEscort()->getFaction());
+ if (me->GetFaction() != GetPlayerForEscort()->GetFaction())
+ me->SetFaction(GetPlayerForEscort()->GetFaction());
switch (waypointId)
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
index e5bc0386d68..3fc3dd1c8f8 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp
@@ -371,7 +371,7 @@ public:
if (infernal)
{
infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE);
- infernal->setFaction(me->getFaction());
+ infernal->SetFaction(me->GetFaction());
if (point)
ENSURE_AI(netherspite_infernal::netherspite_infernalAI, infernal->AI())->point = point;
ENSURE_AI(netherspite_infernal::netherspite_infernalAI, infernal->AI())->malchezaar = me->GetGUID();
@@ -446,7 +446,7 @@ public:
if (axe)
{
axe->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- axe->setFaction(me->getFaction());
+ axe->SetFaction(me->GetFaction());
axes[i] = axe->GetGUID();
if (target)
{
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
index 3ef03674f5e..d3a580f5159 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp
@@ -405,7 +405,7 @@ public:
if (Creature* pSpawn = me->SummonCreature(CREATURE_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000))
{
- pSpawn->setFaction(me->getFaction());
+ pSpawn->SetFaction(me->GetFaction());
pSpawn->CastSpell(pSpawn, SPELL_CIRCULAR_BLIZZARD, false);
}
break;
@@ -423,7 +423,7 @@ public:
if (Creature* unit = me->SummonCreature(CREATURE_WATER_ELEMENTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
unit->Attack(me->GetVictim(), true);
- unit->setFaction(me->getFaction());
+ unit->SetFaction(me->GetFaction());
}
}
@@ -437,7 +437,7 @@ public:
if (Creature* unit = me->SummonCreature(CREATURE_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
{
unit->Attack(me->GetVictim(), true);
- unit->setFaction(me->getFaction());
+ unit->SetFaction(me->GetFaction());
}
}
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
index 5a3e680bfaa..3a13da90857 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp
@@ -1377,7 +1377,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
{
Talk(SAY_JULIANNE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- me->setFaction(16);
+ me->SetFaction(16);
AggroYellTimer = 0;
} else AggroYellTimer -= diff;
}
@@ -1405,7 +1405,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
ENSURE_AI(boss_romulo::boss_romuloAI, pRomulo->AI())->Phase = PHASE_ROMULO;
DoZoneInCombat(pRomulo);
- pRomulo->setFaction(16);
+ pRomulo->SetFaction(16);
}
SummonedRomulo = true;
} else SummonRomuloTimer -= diff;
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
index af713682bdc..5b8fe23530c 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp
@@ -460,7 +460,7 @@ public:
Initialize();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(14);
+ me->SetFaction(14);
DoCast(me, SPELL_FLAMESTRIKE2, true);
}
@@ -666,7 +666,7 @@ public:
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetDisableGravity(true);
- me->setFaction(14);
+ me->SetFaction(14);
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 82af424c714..d4a17aca5be 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -125,7 +125,7 @@ public:
{
Initialize();
events.Reset();
- me->setFaction(7);
+ me->SetFaction(7);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->LoadEquipment(0, true);
@@ -231,7 +231,7 @@ public:
wait_timer -= diff;
else
{
- me->setFaction(14);
+ me->SetFaction(14);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
phase = PHASE_ATTACKING;
@@ -585,7 +585,7 @@ public:
{
if (m_uiDuelTimer <= uiDiff)
{
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
if (Unit* unit = ObjectAccessor::GetUnit(*me, m_uiDuelerGUID))
AttackStart(unit);
@@ -771,7 +771,7 @@ public:
{
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
caster->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
- caster->setFaction(35);
+ caster->SetFaction(35);
DoCast(caster, SPELL_CALL_DARK_RIDER, true);
if (Creature* Dark_Rider = me->FindNearestCreature(NPC_DARK_RIDER_OF_ACHERUS, 15))
ENSURE_AI(npc_dark_rider_of_acherus::npc_dark_rider_of_acherusAI, Dark_Rider->AI())->InitDespawnHorse(caster);
@@ -863,7 +863,7 @@ public:
{
deathcharger->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
deathcharger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- deathcharger->setFaction(2096);
+ deathcharger->SetFaction(2096);
}
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
index a64277a3d84..59f510ded28 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter2.cpp
@@ -85,7 +85,7 @@ public:
playerGUID = player->GetGUID();
speechTimer = 1000;
speechCounter = 1;
- me->setFaction(player->getFaction());
+ me->SetFaction(player->GetFaction());
me->CombatStop(true);
me->GetMotionMaster()->MoveIdle();
me->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index ce343623be8..396d5fb2fa1 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -649,7 +649,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_ACHERUS_GHOUL, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiGhoulGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -667,7 +667,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiAbominationGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -685,7 +685,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiWarriorGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -703,7 +703,7 @@ public:
{
Unit* temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, (me->GetPositionX() - 20) + rand32() % 40, (me->GetPositionY() - 20) + rand32() % 40, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
temp->SetWalk(false);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiBehemothGUID[uiSummon_counter] = temp->GetGUID();
++uiSummon_counter;
}
@@ -998,7 +998,7 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
uiDefenderGUID[0] = temp->GetGUID();
@@ -1006,7 +1006,7 @@ public:
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_ATTACK_UNARMED);
temp->SetWalk(false);
temp->SetSpeedRate(MOVE_RUN, 2.0f);
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
uiEarthshatterGUID[0] = temp->GetGUID();
}
@@ -1398,7 +1398,7 @@ public:
if (!uiTirionGUID)
if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].GetPositionWithOffset({ 0.0f, 0.0f, 0.0f, 1.528f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
{
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
temp->AI()->Talk(SAY_LIGHT_OF_DAWN25);
uiTirionGUID = temp->GetGUID();
@@ -1436,7 +1436,7 @@ public:
temp->DeleteThreatList();
temp->CombatStop(true);
temp->AttackStop();
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[9]);
}
@@ -1447,7 +1447,7 @@ public:
temp->DeleteThreatList();
temp->CombatStop(true);
temp->AttackStop();
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[12]);
}
@@ -1458,7 +1458,7 @@ public:
temp->DeleteThreatList();
temp->CombatStop(true);
temp->AttackStop();
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[15]);
}
@@ -1470,7 +1470,7 @@ public:
temp->DeleteThreatList();
temp->CombatStop(true);
temp->AttackStop();
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[18]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
@@ -1485,7 +1485,7 @@ public:
temp->DeleteThreatList();
temp->CombatStop(true);
temp->AttackStop();
- temp->setFaction(me->getFaction());
+ temp->SetFaction(me->GetFaction());
temp->SetWalk(false);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[20]);
temp->CastSpell(temp, SPELL_THE_LIGHT_OF_DAWN, false);
@@ -1535,7 +1535,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_ACHERUS_GHOUL, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiGhoulGUID[i] = temp->GetGUID();
}
}
@@ -1545,7 +1545,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_WARRIOR_OF_THE_FROZEN_WASTES, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiAbominationGUID[i] = temp->GetGUID();
}
}
@@ -1555,7 +1555,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RAMPAGING_ABOMINATION, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiWarriorGUID[i] = temp->GetGUID();
}
}
@@ -1565,7 +1565,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_FLESH_BEHEMOTH, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2084);
+ temp->SetFaction(2084);
uiBehemothGUID[i] = temp->GetGUID();
}
}
@@ -1577,7 +1577,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_DEFENDER_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiDefenderGUID[i] = temp->GetGUID();
}
@@ -1588,7 +1588,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RIMBLAT_EARTHSHATTER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiEarthshatterGUID[i] = temp->GetGUID();
}
@@ -1597,7 +1597,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_KORFAX_CHAMPION_OF_THE_LIGHT, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiKorfaxGUID = temp->GetGUID();
}
@@ -1605,7 +1605,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_LORD_MAXWELL_TYROSUS, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiMaxwellGUID = temp->GetGUID();
}
@@ -1613,7 +1613,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_COMMANDER_ELIGOR_DAWNBRINGER, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiEligorGUID = temp->GetGUID();
}
@@ -1621,7 +1621,7 @@ public:
if (!temp)
{
temp = me->SummonCreature(NPC_RAYNE, LightofDawnLoc[0].GetPositionWithOffset({ float(rand32() % 30), float(rand32() % 30), 0.0f, 0.0f }), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000);
- temp->setFaction(2089);
+ temp->SetFaction(2089);
me->AddThreat(temp, 0.0f);
uiRayneGUID = temp->GetGUID();
}
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
index 70771f55fb9..1ca23799f83 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
@@ -115,7 +115,7 @@ class boss_apothecary_hummel : public CreatureScript
_deadCount = 0;
_isDead = false;
events.SetPhase(PHASE_ALL);
- me->setFaction(FACTION_APOTHECARY_FRIENDLY);
+ me->SetFaction(FACTION_APOTHECARY_FRIENDLY);
me->SummonCreatureGroup(1);
}
@@ -134,7 +134,7 @@ class boss_apothecary_hummel : public CreatureScript
events.ScheduleEvent(EVENT_HUMMEL_SAY_0, Milliseconds(1));
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(FACTION_APOTHECARY_HOSTILE);
+ me->SetFaction(FACTION_APOTHECARY_HOSTILE);
DummyEntryCheckPredicate pred;
summons.DoAction(ACTION_START_EVENT, pred);
}
@@ -289,7 +289,7 @@ struct npc_apothecary_genericAI : public ScriptedAI
if (action == ACTION_START_EVENT)
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(FACTION_APOTHECARY_HOSTILE);
+ me->SetFaction(FACTION_APOTHECARY_HOSTILE);
me->GetMotionMaster()->MovePoint(1, _movePos);
}
else if (action == ACTION_START_FIGHT)
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
index fae988d9bb6..34289a5a414 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp
@@ -155,7 +155,7 @@ public:
if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
Sath->AI()->EnterEvadeMode();
- me->setFaction(14);
+ me->SetFaction(14);
if (!bJustReset) //first reset at create
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
@@ -379,7 +379,7 @@ public:
switch (TalkSequence)
{
case 1:
- me->setFaction(35);
+ me->SetFaction(35);
TalkTimer = 1000;
break;
case 2:
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
index 77b3da4eece..8ad5f24b639 100644
--- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
+++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp
@@ -287,7 +287,7 @@ public:
me->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
for (uint8 i = 0; i < 4; ++i)
if (GameObject* pOrb = GetOrb(i))
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 0);
+ pOrb->SetFaction(0);
}
void EmpowerOrb(bool all)
@@ -304,7 +304,7 @@ public:
if (GameObject* pOrb = GetOrb(i))
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 35);
+ pOrb->SetFaction(35);
pOrb->setActive(true);
pOrb->Refresh();
}
@@ -316,7 +316,7 @@ public:
if (GameObject* pOrb = GetOrb(urand(0, 3)))
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
- pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 35);
+ pOrb->SetFaction(35);
pOrb->setActive(true);
pOrb->Refresh();
@@ -345,7 +345,7 @@ public:
{
if (GameObject* pOrb = GetOrb(i))
{
- if (pOrb->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
+ if (pOrb->GetFaction() == 35)
{
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
pOrb->setActive(true);
@@ -364,12 +364,12 @@ public:
bool OnGossipHello(Player* player, GameObject* go) override
{
- if (go->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
+ if (go->GetFaction() == 35)
{
InstanceScript* instance = go->GetInstanceScript();
player->SummonCreature(NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false);
- go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
+ go->SetFaction(0);
if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_KALECGOS_KJ)))
ENSURE_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->SetRingOfBlueFlames();
@@ -604,7 +604,7 @@ public:
else
summoned->SetLevel(me->getLevel());
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
summons.Summon(summoned);
}
@@ -930,7 +930,7 @@ public:
void JustSummoned(Creature* summoned) override
{
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
summoned->SetLevel(me->getLevel());
}
@@ -1030,7 +1030,7 @@ public:
void JustSummoned(Creature* summoned) override
{
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
summoned->SetLevel(me->getLevel());
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
index cbe1bdd7732..eae2d3a0470 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp
@@ -96,7 +96,7 @@ class boss_archaedas : public CreatureScript
Initialize();
instance->SetData(0, 5); // respawn any dead minions
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->AddAura(SPELL_FREEZE_ANIM, me);
@@ -112,14 +112,14 @@ class boss_archaedas : public CreatureScript
minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true);
minion->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
minion->SetControlled(false, UNIT_STATE_ROOT);
- minion->setFaction(14);
+ minion->SetFaction(14);
minion->RemoveAura(SPELL_MINION_FREEZE_ANIM);
}
}
void EnterCombat(Unit* /*who*/) override
{
- me->setFaction(14);
+ me->SetFaction(14);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
}
@@ -259,7 +259,7 @@ class npc_archaedas_minions : public CreatureScript
{
Initialize();
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->RemoveAllAuras();
@@ -268,7 +268,7 @@ class npc_archaedas_minions : public CreatureScript
void EnterCombat(Unit* /*who*/) override
{
- me->setFaction (14);
+ me->SetFaction (14);
me->RemoveAllAuras();
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
@@ -348,7 +348,7 @@ class npc_stonekeepers : public CreatureScript
void Reset() override
{
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(true, UNIT_STATE_ROOT);
me->RemoveAllAuras();
@@ -357,7 +357,7 @@ class npc_stonekeepers : public CreatureScript
void EnterCombat(Unit* /*who*/) override
{
- me->setFaction(14);
+ me->SetFaction(14);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetControlled(false, UNIT_STATE_ROOT);
}
diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
index 854f42e16cd..dbb5941f7ac 100644
--- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
+++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp
@@ -144,7 +144,7 @@ class instance_uldaman : public InstanceMapScript
void SetFrozenState(Creature* creature)
{
- creature->setFaction(35);
+ creature->SetFaction(35);
creature->RemoveAllAuras();
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->SetControlled(true, UNIT_STATE_ROOT);
@@ -179,7 +179,7 @@ class instance_uldaman : public InstanceMapScript
if (!target || !target->IsAlive())
continue;
target->SetControlled(false, UNIT_STATE_ROOT);
- target->setFaction(14);
+ target->SetFaction(14);
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
target->RemoveAura(SPELL_MINION_FREEZE_ANIM);
@@ -200,11 +200,11 @@ class instance_uldaman : public InstanceMapScript
for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
{
Creature* target = instance->GetCreature(*i);
- if (!target || !target->IsAlive() || target->getFaction() == 14)
+ if (!target || !target->IsAlive() || target->GetFaction() == 14)
continue;
target->SetControlled(false, UNIT_STATE_ROOT);
target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- target->setFaction(14);
+ target->SetFaction(14);
target->RemoveAura(SPELL_MINION_FREEZE_ANIM);
archaedas->CastSpell(target, SPELL_AWAKEN_VAULT_WALKER, true);
target->CastSpell(target, SPELL_ARCHAEDAS_AWAKEN, true);
@@ -220,7 +220,7 @@ class instance_uldaman : public InstanceMapScript
for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
{
Creature* target = instance->GetCreature(*i);
- if (!target || target->isDead() || target->getFaction() != 14)
+ if (!target || target->isDead() || target->GetFaction() != 14)
continue;
target->DespawnOrUnsummon();
@@ -230,7 +230,7 @@ class instance_uldaman : public InstanceMapScript
for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
{
Creature* target = instance->GetCreature(*i);
- if (!target || target->isDead() || target->getFaction() != 14)
+ if (!target || target->isDead() || target->GetFaction() != 14)
continue;
target->DespawnOrUnsummon();
@@ -240,7 +240,7 @@ class instance_uldaman : public InstanceMapScript
for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
{
Creature* target = instance->GetCreature(*i);
- if (!target || target->isDead() || target->getFaction() != 14)
+ if (!target || target->isDead() || target->GetFaction() != 14)
continue;
target->DespawnOrUnsummon();
@@ -267,7 +267,7 @@ class instance_uldaman : public InstanceMapScript
if (!ironaya)
return;
- ironaya->setFaction(415);
+ ironaya->SetFaction(415);
ironaya->SetControlled(false, UNIT_STATE_ROOT);
ironaya->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
index 3a28a2569d1..7074051277b 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp
@@ -196,7 +196,7 @@ class boss_akilzon : public CreatureScript
y = 1380.0f + rand32() % 60;
if (Unit* trigger = me->SummonTrigger(x, y, z, 0, 2000))
{
- trigger->setFaction(35);
+ trigger->SetFaction(35);
trigger->SetMaxHealth(100000);
trigger->SetHealth(100000);
trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -290,7 +290,7 @@ class boss_akilzon : public CreatureScript
Cloud->SetDisableGravity(true);
Cloud->StopMoving();
Cloud->SetObjectScale(1.0f);
- Cloud->setFaction(35);
+ Cloud->SetFaction(35);
Cloud->SetMaxHealth(9999999);
Cloud->SetHealth(9999999);
Cloud->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
index afe5fed0014..54f7791e5dd 100644
--- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp
@@ -190,7 +190,7 @@ class boss_thekal : public CreatureScript
if (Unit* pLorKhan = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_LORKHAN)))
{
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- pLorKhan->setFaction(14);
+ pLorKhan->SetFaction(14);
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pLorKhan->SetFullHealth();
instance->SetData(DATA_LORKHAN, DONE);
@@ -203,7 +203,7 @@ class boss_thekal : public CreatureScript
if (Unit* pZath = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ZATH)))
{
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
- pZath->setFaction(14);
+ pZath->SetFaction(14);
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pZath->SetFullHealth();
instance->SetBossState(DATA_ZATH, DONE);
@@ -381,7 +381,7 @@ class npc_zealot_lorkhan : public CreatureScript
{
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- pThekal->setFaction(14);
+ pThekal->SetFaction(14);
pThekal->SetFullHealth();
}
}
@@ -393,7 +393,7 @@ class npc_zealot_lorkhan : public CreatureScript
{
pZath->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- pZath->setFaction(14);
+ pZath->SetFaction(14);
pZath->SetFullHealth();
}
}
@@ -408,7 +408,7 @@ class npc_zealot_lorkhan : public CreatureScript
me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
- me->setFaction(35);
+ me->SetFaction(35);
me->AttackStop();
instance->SetBossState(DATA_LORKHAN, SPECIAL);
@@ -531,7 +531,7 @@ class npc_zealot_zath : public CreatureScript
{
pLorKhan->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- pLorKhan->setFaction(14);
+ pLorKhan->SetFaction(14);
pLorKhan->SetFullHealth();
}
}
@@ -543,7 +543,7 @@ class npc_zealot_zath : public CreatureScript
{
pThekal->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- pThekal->setFaction(14);
+ pThekal->SetFaction(14);
pThekal->SetFullHealth();
}
}
@@ -558,7 +558,7 @@ class npc_zealot_zath : public CreatureScript
me->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
- me->setFaction(35);
+ me->SetFaction(35);
me->AttackStop();
instance->SetBossState(DATA_ZATH, SPECIAL);
diff --git a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
index 45143ec78a7..43c5dbdc584 100644
--- a/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_arathi_highlands.cpp
@@ -120,7 +120,7 @@ class npc_professor_phizzlethorpe : public CreatureScript
{
Talk(SAY_PROGRESS_1, player);
npc_escortAI::Start(false, false, player->GetGUID(), quest);
- me->setFaction(FACTION_SUNKEN_TREASURE);
+ me->SetFaction(FACTION_SUNKEN_TREASURE);
}
}
diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
index 270f023670f..2156b772e75 100644
--- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp
@@ -132,7 +132,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE_FROM_THE_CATACOMBS)
{
- creature->setFaction(FACTION_QUEST_ESCAPE);
+ creature->SetFaction(FACTION_QUEST_ESCAPE);
if (npc_escortAI* pEscortAI = CAST_AI(npc_ranger_lilatha::npc_ranger_lilathaAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
index 89e031c6f88..66e999ec85a 100644
--- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp
@@ -80,7 +80,7 @@ public:
if (quest->GetQuestId() == QUEST_RESQUE_OOX_09)
{
me->SetStandState(UNIT_STAND_STATE_STAND);
- me->setFaction(player->GetTeam() == ALLIANCE ? FACTION_ESCORTEE_A : FACTION_ESCORTEE_H);
+ me->SetFaction(player->GetTeam() == ALLIANCE ? FACTION_ESCORTEE_A : FACTION_ESCORTEE_H);
Talk(SAY_OOX_START, player);
npc_escortAI::Start(false, false, player->GetGUID(), quest);
}
diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
index 74c013caf07..df55de6f35f 100644
--- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp
@@ -68,7 +68,7 @@ public:
if (quest->GetQuestId() == QUEST_MISSING_IN_ACTION)
{
Talk(SAY_CORPORAL_1, player);
- me->setFaction(250);
+ me->SetFaction(250);
npc_escortAI::Start(true, false, player->GetGUID(), quest);
}
}
diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
index 22d6662e7f4..9e71280a2a8 100644
--- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp
@@ -256,7 +256,7 @@ public:
if (!target)
target = me;
- summoned->setFaction(FACTION_ENEMY);
+ summoned->SetFaction(FACTION_ENEMY);
summoned->AddThreat(target, 32.0f);
summoned->AI()->AttackStart(target);
}
diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
index 30f441a3cc6..704253f2cfc 100644
--- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp
@@ -56,7 +56,7 @@ public:
{
if (quest->GetQuestId() == QUEST_BEAT)
{
- creature->setFaction(FACTION_ENEMY);
+ creature->SetFaction(FACTION_ENEMY);
creature->AI()->AttackStart(player);
}
return true;
@@ -71,15 +71,15 @@ public:
{
npc_bartlebyAI(Creature* creature) : ScriptedAI(creature)
{
- m_uiNormalFaction = creature->getFaction();
+ m_uiNormalFaction = creature->GetFaction();
}
uint32 m_uiNormalFaction;
void Reset() override
{
- if (me->getFaction() != m_uiNormalFaction)
- me->setFaction(m_uiNormalFaction);
+ if (me->GetFaction() != m_uiNormalFaction)
+ me->SetFaction(m_uiNormalFaction);
}
void AttackedBy(Unit* pAttacker) override
@@ -267,8 +267,8 @@ public:
if (Creature* pTyrion = me->FindNearestCreature(NPC_TYRION, 20.0f, true))
pTyrion->AI()->Talk(SAY_TYRION_2);
if (Creature* pMarzon = ObjectAccessor::GetCreature(*me, MarzonGUID))
- pMarzon->setFaction(14);
- me->setFaction(14);
+ pMarzon->SetFaction(14);
+ me->SetFaction(14);
uiTimer = 0;
uiPhase = 0;
break;
diff --git a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
index 9540499cd73..2d38b5f3d67 100644
--- a/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_stranglethorn_vale.cpp
@@ -80,7 +80,7 @@ public:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN);
me->CombatStop(); //stop combat
me->DeleteThreatList(); //unsure of this
- me->setFaction(83); //horde generic
+ me->SetFaction(83); //horde generic
bReset = true;
Reset_Timer = 60000;
@@ -98,7 +98,7 @@ public:
{
EnterEvadeMode();
bReset = false;
- me->setFaction(28); //troll, bloodscalp
+ me->SetFaction(28); //troll, bloodscalp
return;
}
diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
index 5b9ffb79c88..6d54c9f0f88 100644
--- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp
@@ -54,7 +54,7 @@ public:
{
if (quest->GetQuestId() == QUEST_590)
{
- creature->setFaction(FACTION_HOSTILE);
+ creature->SetFaction(FACTION_HOSTILE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
ENSURE_AI(npc_calvin_montague::npc_calvin_montagueAI, creature->AI())->AttackStart(player);
}
diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
index 7ace94024b0..c5fd05924da 100644
--- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
+++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp
@@ -85,7 +85,7 @@ public:
if (me->HasStealthAura())
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
SetRun();
- me->setFaction(FACTION_ENEMY);
+ me->SetFaction(FACTION_ENEMY);
break;
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
index 5865f2fbc57..f76c8bf6cac 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjalAI.cpp
@@ -923,7 +923,7 @@ void hyjalAI::HideNearPos(float x, float y)
for (std::list<Creature*>::const_iterator itr = creatures.begin(); itr != creatures.end(); ++itr)
{
(*itr)->SetVisible(false);
- (*itr)->setFaction(35);//make them friendly so mobs won't attack them
+ (*itr)->SetFaction(35);//make them friendly so mobs won't attack them
}
}
}
@@ -1022,7 +1022,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
if ((*itr) && (*itr)->IsAlive())
{
(*itr)->CastSpell(*itr, SPELL_TELEPORT_VISUAL, true);
- (*itr)->setFaction(35);//make them friendly so mobs won't attack them
+ (*itr)->SetFaction(35);//make them friendly so mobs won't attack them
(*itr)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
index 7eec37758ee..4838c263c0a 100644
--- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
+++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/hyjal_trash.cpp
@@ -467,7 +467,7 @@ public:
if (Creature* trigger = me->SummonCreature(NPC_WORLD_TRIGGER_TINY, me->GetPositionWithOffset({ 8.0f, 8.0f, frand(25.0f, 35.0f), 0.0f }), TEMPSUMMON_TIMED_DESPAWN, 1000))
{
trigger->SetVisible(false);
- trigger->setFaction(me->getFaction());
+ trigger->SetFaction(me->GetFaction());
trigger->SetDisableGravity(true);
trigger->CastSpell(me, SPELL_METEOR, true);
}
diff --git a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
index 51065ed35d4..f839c252915 100644
--- a/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
+++ b/src/server/scripts/Kalimdor/Maraudon/boss_noxxion.cpp
@@ -82,7 +82,7 @@ public:
if (Invisible && InvisibleTimer <= diff)
{
//Become visible again
- me->setFaction(14);
+ me->SetFaction(14);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
//Noxxion model
me->SetDisplayId(11172);
@@ -122,7 +122,7 @@ public:
//Interrupt any spell casting
//me->m_canMove = true;
me->InterruptNonMeleeSpells(false);
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
// Invisible Model
me->SetDisplayId(11686);
diff --git a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
index 0c36843b6f2..bf1b0a45984 100644
--- a/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenDowns/razorfen_downs.cpp
@@ -136,7 +136,7 @@ public:
eventInProgress = true;
Talk(SAY_QUEST_ACCEPTED);
me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
- me->setFaction(FACTION_ESCORT);
+ me->SetFaction(FACTION_ESCORT);
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
}
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
index 2ab9b1ec66c..15843a9048b 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/instance_razorfen_kraul.cpp
@@ -68,7 +68,7 @@ public:
switch (go->GetEntry())
{
case 21099: DoorWardGUID = go->GetGUID(); break;
- case 20920: go->SetUInt32Value(GAMEOBJECT_FACTION, 0); break; // big fat fugly hack
+ case 20920: go->SetFaction(0); break; // big fat fugly hack
}
}
diff --git a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
index 21048bf9be7..07f9afcd5cd 100644
--- a/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
+++ b/src/server/scripts/Kalimdor/RazorfenKraul/razorfen_kraul.cpp
@@ -57,7 +57,7 @@ public:
{
Start(true, false, player->GetGUID());
Talk(SAY_READY, player);
- me->setFaction(113);
+ me->SetFaction(113);
}
}
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
index daf9e3eb535..26276875861 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_ouro.cpp
@@ -112,7 +112,7 @@ public:
//Cast
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(35);
+ me->SetFaction(35);
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
Submerged = true;
@@ -135,7 +135,7 @@ public:
if (Submerged && Back_Timer <= diff)
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(14);
+ me->SetFaction(14);
DoCastVictim(SPELL_GROUND_RUPTURE);
diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
index 23317131033..43ca24179b5 100644
--- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
+++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_twinemperors.cpp
@@ -332,7 +332,7 @@ struct boss_twinemperorsAI : public ScriptedAI
if (c->isDead())
{
c->Respawn();
- c->setFaction(7);
+ c->SetFaction(7);
c->RemoveAllAuras();
}
if (c->IsWithinDistInMap(me, ABUSE_BUG_RANGE))
@@ -427,7 +427,7 @@ public:
void CastSpellOnBug(Creature* target) override
{
- target->setFaction(14);
+ target->SetFaction(14);
target->AI()->AttackStart(me->getThreatManager().getHostilTarget());
target->AddAura(SPELL_MUTATE_BUG, target);
target->SetFullHealth();
@@ -518,7 +518,7 @@ public:
void CastSpellOnBug(Creature* target) override
{
- target->setFaction(14);
+ target->SetFaction(14);
target->AddAura(SPELL_EXPLODEBUG, target);
target->SetFullHealth();
}
diff --git a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
index 7f9710d504f..bd77e4c9546 100644
--- a/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
+++ b/src/server/scripts/Kalimdor/WailingCaverns/wailing_caverns.cpp
@@ -96,7 +96,7 @@ public:
creature->AI()->Talk(SAY_MAKE_PREPARATIONS);
- creature->setFaction(250);
+ creature->SetFaction(250);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
ENSURE_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp
index 424803ae2ca..8548045333b 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/boss_zum_rah.cpp
@@ -73,7 +73,7 @@ public:
void Reset() override
{
- me->setFaction(ZUMRAH_FRIENDLY_FACTION); // areatrigger sets faction to enemy
+ me->SetFaction(ZUMRAH_FRIENDLY_FACTION); // areatrigger sets faction to enemy
Initialize();
}
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index f593ef27203..51bc5b7a945 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -128,7 +128,7 @@ public:
{
Initialize();
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
}
void UpdateAI(uint32 diff) override
@@ -151,7 +151,7 @@ public:
Text_Timer = 5000;
break;
case 3:
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
AttackStart(target);
@@ -196,7 +196,7 @@ public:
{
if (Creature* crew = ObjectAccessor::GetCreature(*me, instance->GetGuidData(entry)))
if (crew->IsAlive())
- crew->setFaction(FACTION_HOSTILE);
+ crew->SetFaction(FACTION_HOSTILE);
}
};
@@ -235,7 +235,7 @@ private:
crew->SetWalk(true);
crew->SetHomePosition(x, y, z, 0);
crew->GetMotionMaster()->MovePoint(1, x, y, z);
- crew->setFaction(FACTION_FREED);
+ crew->SetFaction(FACTION_FREED);
}
}
};
@@ -384,7 +384,7 @@ public:
{
if (me->IsAlive())
{
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
me->GetMotionMaster()->MovePoint(0, 1858.57f, 1146.35f, 14.745f);
me->SetHomePosition(1858.57f, 1146.35f, 14.745f, 3.85f); // in case he gets interrupted
Talk(SAY_WEEGLI_OK_I_GO);
@@ -451,7 +451,7 @@ public:
if (!pZumrah)
return false;
- pZumrah->setFaction(ZUMRAH_HOSTILE_FACTION);
+ pZumrah->SetFaction(ZUMRAH_HOSTILE_FACTION);
return true;
}
diff --git a/src/server/scripts/Kalimdor/zone_ashenvale.cpp b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
index 3074ccc936d..ecd1f2e4d60 100644
--- a/src/server/scripts/Kalimdor/zone_ashenvale.cpp
+++ b/src/server/scripts/Kalimdor/zone_ashenvale.cpp
@@ -83,7 +83,7 @@ public:
{
if (quest->GetQuestId() == QUEST_FREEDOM_TO_RUUL)
{
- me->setFaction(FACTION_QUEST);
+ me->SetFaction(FACTION_QUEST);
npc_escortAI::Start(true, false, player->GetGUID());
}
}
@@ -226,7 +226,7 @@ public:
if (quest->GetQuestId() == QUEST_VORSHA)
{
Talk(SAY_MUG_START1);
- me->setFaction(FACTION_QUEST);
+ me->SetFaction(FACTION_QUEST);
npc_escortAI::Start(true, false, player->GetGUID());
}
}
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
index 4733119a631..32f2d04efac 100644
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ b/src/server/scripts/Kalimdor/zone_azshara.cpp
@@ -356,7 +356,7 @@ public:
{
Talk(SAY_RIZZLE_FINAL);
me->SetUInt32Value(UNIT_NPC_FLAGS, 1);
- me->setFaction(35);
+ me->SetFaction(35);
me->GetMotionMaster()->MoveIdle();
me->RemoveAurasDueToSpell(SPELL_PERIODIC_DEPTH_CHARGE);
Reached = true;
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index c141b9ed608..811db4a8ac1 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -202,7 +202,7 @@ public:
npc_engineer_spark_overgrindAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
- NormFaction = creature->getFaction();
+ NormFaction = creature->GetFaction();
NpcFlags = creature->GetUInt32Value(UNIT_NPC_FLAGS);
}
@@ -221,7 +221,7 @@ public:
{
Initialize();
- me->setFaction(NormFaction);
+ me->SetFaction(NormFaction);
me->SetUInt32Value(UNIT_NPC_FLAGS, NpcFlags);
}
@@ -233,7 +233,7 @@ public:
void sGossipSelect(Player* player, uint32 /*menuId*/, uint32 /*gossipListId*/) override
{
CloseGossipMenuFor(player);
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
me->Attack(player, true);
}
@@ -404,7 +404,7 @@ public:
case EVENT_ACCEPT_QUEST:
if (Player* player = ObjectAccessor::GetPlayer(*me, _player))
Talk(SAY_START, player);
- me->setFaction(FACTION_QUEST);
+ me->SetFaction(FACTION_QUEST);
_events.ScheduleEvent(EVENT_START_ESCORT, Seconds(1));
break;
case EVENT_START_ESCORT:
diff --git a/src/server/scripts/Kalimdor/zone_darkshore.cpp b/src/server/scripts/Kalimdor/zone_darkshore.cpp
index 241f11f61b3..c5506593799 100644
--- a/src/server/scripts/Kalimdor/zone_darkshore.cpp
+++ b/src/server/scripts/Kalimdor/zone_darkshore.cpp
@@ -297,7 +297,7 @@ public:
if (npc_escortAI* pEscortAI = CAST_AI(npc_prospector_remtravel::npc_prospector_remtravelAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID());
- creature->setFaction(FACTION_ESCORTEE);
+ creature->SetFaction(FACTION_ESCORTEE);
}
return true;
@@ -352,7 +352,7 @@ public:
void DoAtEnd()
{
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
if (Player* pHolder = GetLeaderForFollower())
AttackStart(pHolder);
diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp
index 6d6cf76bbba..c61239f5145 100644
--- a/src/server/scripts/Kalimdor/zone_desolace.cpp
+++ b/src/server/scripts/Kalimdor/zone_desolace.cpp
@@ -213,7 +213,7 @@ public:
if (npc_escortAI* escortAI = CAST_AI(npc_dalinda::npc_dalindaAI, creature->AI()))
{
escortAI->Start(true, false, player->GetGUID());
- creature->setFaction(113);
+ creature->SetFaction(113);
}
}
return true;
diff --git a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
index 313223a816e..92d8ce43156 100644
--- a/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
+++ b/src/server/scripts/Kalimdor/zone_dustwallow_marsh.cpp
@@ -107,7 +107,7 @@ public:
bool OnQuestAccept(Player* /*player*/, Creature* creature, const Quest* quest) override
{
if (quest->GetQuestId() == QUEST_MISSING_DIPLO_PT16)
- creature->setFaction(FACTION_HOSTILE);
+ creature->SetFaction(FACTION_HOSTILE);
return true;
}
diff --git a/src/server/scripts/Kalimdor/zone_feralas.cpp b/src/server/scripts/Kalimdor/zone_feralas.cpp
index 14b717362a5..676d285e37f 100644
--- a/src/server/scripts/Kalimdor/zone_feralas.cpp
+++ b/src/server/scripts/Kalimdor/zone_feralas.cpp
@@ -73,10 +73,10 @@ public:
creature->SetStandState(UNIT_STAND_STATE_STAND);
if (player->GetTeam() == ALLIANCE)
- creature->setFaction(FACTION_ESCORTEE_A);
+ creature->SetFaction(FACTION_ESCORTEE_A);
if (player->GetTeam() == HORDE)
- creature->setFaction(FACTION_ESCORTEE_H);
+ creature->SetFaction(FACTION_ESCORTEE_H);
if (npc_escortAI* pEscortAI = CAST_AI(npc_oox22fe::npc_oox22feAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index c0322c98eec..d9b5cc82b1b 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -977,7 +977,7 @@ public:
Merithra->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Merithra->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Merithra->SetUInt32Value(UNIT_FIELD_DISPLAYID, MERITHRA_NIGHT_ELF_FORM);
- Merithra->setFaction(35);
+ Merithra->SetFaction(35);
}
if (Caelestrasz)
@@ -985,7 +985,7 @@ public:
Caelestrasz->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Caelestrasz->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Caelestrasz->SetUInt32Value(UNIT_FIELD_DISPLAYID, CAELESTRASZ_NIGHT_ELF_FORM);
- Caelestrasz->setFaction(35);
+ Caelestrasz->SetFaction(35);
}
if (Arygos)
@@ -993,7 +993,7 @@ public:
Arygos->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
Arygos->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
Arygos->SetUInt32Value(UNIT_FIELD_DISPLAYID, ARYGOS_GNOME_FORM);
- Arygos->setFaction(35);
+ Arygos->SetFaction(35);
}
if (Anachronos)
diff --git a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
index ba41c523afb..4363917b9a3 100644
--- a/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
+++ b/src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp
@@ -88,7 +88,7 @@ public:
pEscortAI->Start(true, false, player->GetGUID());
creature->AI()->Talk(SAY_START);
- creature->setFaction(113);
+ creature->SetFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
return true;
diff --git a/src/server/scripts/Kalimdor/zone_tanaris.cpp b/src/server/scripts/Kalimdor/zone_tanaris.cpp
index d9a454dcd2a..92558f73269 100644
--- a/src/server/scripts/Kalimdor/zone_tanaris.cpp
+++ b/src/server/scripts/Kalimdor/zone_tanaris.cpp
@@ -93,7 +93,7 @@ public:
void Reset() override
{
Initialize();
- me->setFaction(35);
+ me->SetFaction(35);
}
void SendItem(Unit* receiver)
@@ -123,7 +123,7 @@ public:
{
if (SwitchFactionTimer <= diff)
{
- me->setFaction(91);
+ me->SetFaction(91);
isFriendly = false;
} else SwitchFactionTimer -= diff;
}
@@ -322,7 +322,7 @@ public:
{
if (quest->GetQuestId() == Q_OOX17)
{
- creature->setFaction(113);
+ creature->SetFaction(113);
creature->SetFullHealth();
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index 820e34a49c9..93927f0d074 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -105,7 +105,7 @@ public:
{
if (quest->GetQuestId() == QUEST_FREE_FROM_HOLD)
{
- creature->setFaction(FACTION_ESCORTEE);
+ creature->SetFaction(FACTION_ESCORTEE);
creature->SetStandState(UNIT_STAND_STATE_STAND);
creature->AI()->Talk(SAY_GIL_START, player);
@@ -200,7 +200,7 @@ public:
npc_taskmaster_fizzuleAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
- factionNorm = creature->getFaction();
+ factionNorm = creature->GetFaction();
}
void Initialize()
@@ -218,7 +218,7 @@ public:
void Reset() override
{
Initialize();
- me->setFaction(factionNorm);
+ me->SetFaction(factionNorm);
}
void DoFriend()
@@ -230,7 +230,7 @@ public:
me->StopMoving();
me->GetMotionMaster()->MoveIdle();
- me->setFaction(FACTION_FRIENDLY_F);
+ me->SetFaction(FACTION_FRIENDLY_F);
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
}
@@ -270,7 +270,7 @@ public:
{
if (FlareCount >= 2)
{
- if (me->getFaction() == FACTION_FRIENDLY_F)
+ if (me->GetFaction() == FACTION_FRIENDLY_F)
return;
DoFriend();
@@ -423,7 +423,7 @@ public:
Creature* creature = me->SummonCreature(NPC_AFFRAY_CHALLENGER, AffrayChallengerLoc[i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
if (!creature)
continue;
- creature->setFaction(35);
+ creature->SetFaction(35);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
@@ -464,7 +464,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
- creature->setFaction(14);
+ creature->SetFaction(14);
creature->AI()->AttackStart(warrior);
++Wave;
WaveTimer = 20000;
@@ -496,7 +496,7 @@ public:
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
- creature->setFaction(14);
+ creature->SetFaction(14);
creature->AI()->AttackStart(warrior);
}
}
@@ -657,7 +657,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ESCAPE)
{
- creature->setFaction(FACTION_RATCHET);
+ creature->SetFaction(FACTION_RATCHET);
creature->AI()->Talk(SAY_START);
if (npc_escortAI* pEscortAI = CAST_AI(npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, creature->AI()))
pEscortAI->Start(true, false, player->GetGUID());
diff --git a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
index 6d698cf88e0..6170ddb2e53 100644
--- a/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
+++ b/src/server/scripts/Kalimdor/zone_thousand_needles.cpp
@@ -145,7 +145,7 @@ public:
if (quest->GetQuestId() == QUEST_FREE_AT_LAST)
{
creature->AI()->Talk(SAY_LAKO_START, player);
- creature->setFaction(FACTION_ESCORTEE_LAKO);
+ creature->SetFaction(FACTION_ESCORTEE_LAKO);
if (npc_lakota_windsongAI* pEscortAI = CAST_AI(npc_lakota_windsong::npc_lakota_windsongAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -228,7 +228,7 @@ public:
if (quest->GetQuestId() == QUEST_HOMEWARD)
{
creature->AI()->Talk(SAY_START, player);
- creature->setFaction(FACTION_ESCORTEE);
+ creature->SetFaction(FACTION_ESCORTEE);
if (npc_paoka_swiftmountainAI* pEscortAI = CAST_AI(npc_paoka_swiftmountain::npc_paoka_swiftmountainAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
diff --git a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
index 6d6188858bc..fa6ef602da4 100644
--- a/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
+++ b/src/server/scripts/Kalimdor/zone_ungoro_crater.cpp
@@ -65,7 +65,7 @@ public:
creature->AI()->Talk(SAY_READY, player);
creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
// Change faction so mobs attack
- creature->setFaction(113);
+ creature->SetFaction(113);
}
return true;
}
diff --git a/src/server/scripts/Kalimdor/zone_winterspring.cpp b/src/server/scripts/Kalimdor/zone_winterspring.cpp
index 57fef9f5b46..e16fb9bd0a7 100644
--- a/src/server/scripts/Kalimdor/zone_winterspring.cpp
+++ b/src/server/scripts/Kalimdor/zone_winterspring.cpp
@@ -297,7 +297,7 @@ public:
if (quest->GetQuestId() == QUEST_GUARDIANS_ALTAR)
{
creature->AI()->Talk(SAY_QUEST_START);
- creature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
+ creature->SetFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
if (npc_ranshallaAI* escortAI = dynamic_cast<npc_ranshallaAI*>(creature->AI()))
escortAI->Start(false, false, player->GetGUID(), quest);
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
index 9137ee98090..ad61b20cf38 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheChampion/boss_argent_challenge.cpp
@@ -192,7 +192,7 @@ public:
{
damage = 0;
EnterEvadeMode();
- me->setFaction(35);
+ me->SetFaction(35);
bDone = true;
}
}
@@ -320,7 +320,7 @@ public:
{
damage = 0;
EnterEvadeMode();
- me->setFaction(35);
+ me->SetFaction(35);
bDone = true;
}
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
index 7d6aaa3ce88..2c89526fcd9 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp
@@ -224,7 +224,7 @@ class boss_anubarak_trial : public CreatureScript
for (int i = 0; i < 10; i++)
if (Creature* scarab = me->SummonCreature(NPC_SCARAB, AnubarakLoc[1].GetPositionX()+urand(0, 50)-25, AnubarakLoc[1].GetPositionY()+urand(0, 50)-25, AnubarakLoc[1].GetPositionZ()))
{
- scarab->setFaction(31);
+ scarab->SetFaction(31);
scarab->GetMotionMaster()->MoveRandom(10);
}
}
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 26e79428906..9ca1dee21f3 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -892,7 +892,7 @@ class npc_toc_shaman : public CreatureScript
events.ScheduleEvent(EVENT_SPIRIT_CLEANSE, urand(15*IN_MILLISECONDS, 35*IN_MILLISECONDS));
return;
case EVENT_HEAL_BLOODLUST_HEROISM:
- if (me->getFaction()) // alliance = 1
+ if (me->GetFaction()) // alliance = 1
{
if (!me->HasAura(AURA_EXHAUSTION))
DoCastAOE(SPELL_HEROISM);
@@ -2000,7 +2000,7 @@ class npc_toc_enh_shaman : public CreatureScript
events.ScheduleEvent(EVENT_STORMSTRIKE, urand(8*IN_MILLISECONDS, 10*IN_MILLISECONDS));
return;
case EVENT_DPS_BLOODLUST_HEROISM:
- if (me->getFaction()) //Am i alliance?
+ if (me->GetFaction()) //Am i alliance?
{
if (!me->HasAura(AURA_EXHAUSTION))
DoCastAOE(SPELL_HEROISM);
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
index e8110a32438..ebf246affc2 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
@@ -461,7 +461,7 @@ class boss_deathbringer_saurfang : public CreatureScript
{
case EVENT_INTRO_ALLIANCE_2:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(FACTION_SCOURGE);
+ me->SetFaction(FACTION_SCOURGE);
Talk(SAY_INTRO_ALLIANCE_2);
break;
case EVENT_INTRO_ALLIANCE_3:
@@ -474,7 +474,7 @@ class boss_deathbringer_saurfang : public CreatureScript
break;
case EVENT_INTRO_HORDE_2:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(FACTION_SCOURGE);
+ me->SetFaction(FACTION_SCOURGE);
Talk(SAY_INTRO_HORDE_2);
break;
case EVENT_INTRO_HORDE_4:
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index a751e9e172c..ac7c30db38c 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -355,7 +355,7 @@ class boss_lady_deathwhisper : public CreatureScript
{
if (darnavan->IsAlive())
{
- darnavan->setFaction(35);
+ darnavan->SetFaction(35);
darnavan->CombatStop(true);
darnavan->GetMotionMaster()->MoveIdle();
darnavan->SetReactState(REACT_PASSIVE);
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
index ec382ee8467..d46ed34561a 100644
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp
@@ -1204,7 +1204,7 @@ public:
me->SetCanFly(false);
}
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
me->RemoveAllAuras();
}
}
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
index bc28c610e87..4ae82a89270 100644
--- a/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
+++ b/src/server/scripts/Northrend/Nexus/Nexus/instance_nexus.cpp
@@ -59,31 +59,31 @@ class instance_nexus : public InstanceMapScript
// Alliance npcs are spawned by default, if you are alliance, you will fight against horde npcs.
case NPC_ALLIANCE_BERSERKER:
if (ServerAllowsTwoSideGroups())
- creature->setFaction(FACTION_HOSTILE_FOR_ALL);
+ creature->SetFaction(FACTION_HOSTILE_FOR_ALL);
if (_teamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_HORDE_BERSERKER);
break;
case NPC_ALLIANCE_RANGER:
if (ServerAllowsTwoSideGroups())
- creature->setFaction(FACTION_HOSTILE_FOR_ALL);
+ creature->SetFaction(FACTION_HOSTILE_FOR_ALL);
if (_teamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_HORDE_RANGER);
break;
case NPC_ALLIANCE_CLERIC:
if (ServerAllowsTwoSideGroups())
- creature->setFaction(FACTION_HOSTILE_FOR_ALL);
+ creature->SetFaction(FACTION_HOSTILE_FOR_ALL);
if (_teamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_HORDE_CLERIC);
break;
case NPC_ALLIANCE_COMMANDER:
if (ServerAllowsTwoSideGroups())
- creature->setFaction(FACTION_HOSTILE_FOR_ALL);
+ creature->SetFaction(FACTION_HOSTILE_FOR_ALL);
if (_teamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_HORDE_COMMANDER);
break;
case NPC_COMMANDER_STOUTBEARD:
if (ServerAllowsTwoSideGroups())
- creature->setFaction(FACTION_HOSTILE_FOR_ALL);
+ creature->SetFaction(FACTION_HOSTILE_FOR_ALL);
if (_teamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_COMMANDER_KOLURG);
break;
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index b7e099a2137..07dd5d6bc24 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -531,7 +531,7 @@ class boss_algalon_the_observer : public CreatureScript
damage = 0;
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
- me->setFaction(35);
+ me->SetFaction(35);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_SELF_STUN);
events.Reset();
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 72a775ba160..87129eefd9a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -607,7 +607,7 @@ class boss_flame_leviathan_seat : public CreatureScript
if (Unit* turretPassenger = me->GetVehicleKit()->GetPassenger(SEAT_TURRET))
if (Creature* turret = turretPassenger->ToCreature())
{
- turret->setFaction(me->GetVehicleBase()->getFaction());
+ turret->SetFaction(me->GetVehicleBase()->GetFaction());
turret->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
turret->AI()->AttackStart(who);
}
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
index e2173f51fc7..238bbc9c3ac 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_freya.cpp
@@ -222,7 +222,7 @@ class npc_iron_roots : public CreatureScript
SetCombatMovement(false);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip
- me->setFaction(14);
+ me->SetFaction(14);
me->SetReactState(REACT_PASSIVE);
}
@@ -606,7 +606,7 @@ class boss_freya : public CreatureScript
_JustDied();
me->RemoveAllAuras();
me->AttackStop();
- me->setFaction(35);
+ me->SetFaction(35);
me->DeleteThreatList();
me->CombatStop(true);
me->DespawnOrUnsummon(7500);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
index f8fae195e09..2d412162630 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_hodir.cpp
@@ -405,7 +405,7 @@ class boss_hodir : public CreatureScript
DoCastAOE(SPELL_KILL_CREDIT, true); /// need to be cast before changing boss faction
/// spell will target enemies only
- me->setFaction(35);
+ me->SetFaction(35);
me->DespawnOrUnsummon(10000);
_JustDied();
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
index 399718d49cf..5c42276e63a 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_ignis.cpp
@@ -177,7 +177,7 @@ class boss_ignis : public CreatureScript
{
if (summon->GetEntry() == NPC_IRON_CONSTRUCT)
{
- summon->setFaction(16);
+ summon->SetFaction(16);
summon->SetReactState(REACT_AGGRESSIVE);
summon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_STUNNED | UNIT_FLAG_IMMUNE_TO_PC);
summon->SetControlled(false, UNIT_STATE_ROOT);
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
index fc19ad7779b..8152183231c 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp
@@ -635,7 +635,7 @@ class boss_mimiron : public CreatureScript
case EVENT_OUTTRO_1:
me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL_1);
DoCast(me, SPELL_SLEEP_VISUAL_2);
- me->setFaction(35);
+ me->SetFaction(35);
events.ScheduleEvent(EVENT_OUTTRO_2, 3000);
break;
case EVENT_OUTTRO_2:
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
index 05c9d44d48e..69404eacbad 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_yogg_saron.cpp
@@ -765,7 +765,7 @@ class boss_sara : public CreatureScript
{
me->RemoveAllAuras();
me->SetReactState(REACT_PASSIVE);
- me->setFaction(35);
+ me->SetFaction(35);
_events.Reset();
_events.SetPhase(PHASE_ONE);
}
@@ -808,7 +808,7 @@ class boss_sara : public CreatureScript
case EVENT_TRANSFORM_3:
Talk(SAY_SARA_TRANSFORM_4);
DoCast(me, SPELL_FULL_HEAL);
- me->setFaction(16);
+ me->SetFaction(16);
if (Creature* voice = _instance->GetCreature(DATA_VOICE_OF_YOGG_SARON))
voice->AI()->DoAction(ACTION_PHASE_TWO);
if (Creature* mimiron = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_MIMIRON_YS)))
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 3af776d21a7..e00d2489de8 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -115,7 +115,7 @@ public:
DoCast(me, SPELL_EXPLODE_CART, true);
DoCast(me, SPELL_SUMMON_CART, true);
if (GameObject* cart = me->FindNearestGameObject(GO_EXPLOSIVES_CART, 3.0f))
- cart->SetUInt32Value(GAMEOBJECT_FACTION, 14);
+ cart->SetFaction(14);
phaseTimer = 3000;
phase = 2;
break;
@@ -667,11 +667,11 @@ public:
switch (player->GetTeam())
{
case ALLIANCE:
- creature->setFaction(FACTION_ESCORTEE_A);
+ creature->SetFaction(FACTION_ESCORTEE_A);
break;
default:
case HORDE:
- creature->setFaction(FACTION_ESCORTEE_H);
+ creature->SetFaction(FACTION_ESCORTEE_H);
break;
}
@@ -709,7 +709,7 @@ public:
owner->GetMotionMaster()->MoveFollow(GetCaster(), 4.0f, 0.0f);
owner->CastSpell(owner, SPELL_SUBDUED, true);
GetCaster()->CastSpell(GetCaster(), SPELL_DRAKE_HATCHLING_SUBDUED, true);
- owner->setFaction(35);
+ owner->SetFaction(35);
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
owner->DespawnOrUnsummon(3 * MINUTE*IN_MILLISECONDS);
}
@@ -890,7 +890,7 @@ public:
if (talbot)
{
talbot->UpdateEntry(NPC_PRINCE_VALANAR);
- talbot->setFaction(14);
+ talbot->SetFaction(14);
talbot->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
talbot->SetReactState(REACT_PASSIVE);
}
@@ -1628,10 +1628,10 @@ public:
switch (player->GetTeam())
{
case ALLIANCE:
- creature->setFaction(FACTION_ESCORTEE_A);
+ creature->SetFaction(FACTION_ESCORTEE_A);
break;
case HORDE:
- creature->setFaction(FACTION_ESCORTEE_H);
+ creature->SetFaction(FACTION_ESCORTEE_H);
break;
}
creature->SetStandState(UNIT_STAND_STATE_STAND);
@@ -2216,7 +2216,7 @@ public:
void AttackPlayer()
{
- me->setFaction(14);
+ me->SetFaction(14);
if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID))
AttackStart(player);
}
diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp
index 358f3a1ed33..de8633283cc 100644
--- a/src/server/scripts/Northrend/zone_dragonblight.cpp
+++ b/src/server/scripts/Northrend/zone_dragonblight.cpp
@@ -414,7 +414,7 @@ public:
else if (roll == 0) // enemy version
{
tree->AI()->Talk(SAY_WALKER_ENEMY, player);
- tree->setFaction(FACTION_WALKER_ENEMY);
+ tree->SetFaction(FACTION_WALKER_ENEMY);
tree->Attack(player, true);
}
}
diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
index 2612725cb27..e71a92b3e0c 100644
--- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp
+++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp
@@ -102,7 +102,7 @@ public:
Talk(SAY_WORGRAGGRO3);
if (Creature* RWORG = me->SummonCreature(NPC_RAVENOUS_WORG, me->GetPositionX()+10, me->GetPositionY()+8, me->GetPositionZ()+2, 3.229f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000))
{
- RWORG->setFaction(35);
+ RWORG->SetFaction(35);
_RavenousworgGUID = RWORG->GetGUID();
}
break;
@@ -135,7 +135,7 @@ public:
{
RWORG->Kill(Mrfloppy);
Mrfloppy->ExitVehicle();
- RWORG->setFaction(14);
+ RWORG->SetFaction(14);
RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10, RWORG->GetPositionY()+80, RWORG->GetPositionZ());
Talk(SAY_VICTORY2);
}
diff --git a/src/server/scripts/Northrend/zone_howling_fjord.cpp b/src/server/scripts/Northrend/zone_howling_fjord.cpp
index 785cfc7614c..4061d69d021 100644
--- a/src/server/scripts/Northrend/zone_howling_fjord.cpp
+++ b/src/server/scripts/Northrend/zone_howling_fjord.cpp
@@ -162,7 +162,7 @@ public:
break;
case EVENT_START_ESCORT:
events.Reset();
- me->setFaction(FACTION_ESCORTEE_H);
+ me->SetFaction(FACTION_ESCORTEE_H);
me->SetReactState(REACT_AGGRESSIVE);
ENSURE_AI(npc_escortAI, (me->AI()))->Start(true, true, _player);
break;
diff --git a/src/server/scripts/Northrend/zone_icecrown.cpp b/src/server/scripts/Northrend/zone_icecrown.cpp
index 18858474478..37ce1ea6d6e 100644
--- a/src/server/scripts/Northrend/zone_icecrown.cpp
+++ b/src/server/scripts/Northrend/zone_icecrown.cpp
@@ -46,7 +46,7 @@ public:
{
Initialize();
creature->GetMotionMaster()->MovePoint(0, 8599.258f, 963.951f, 547.553f);
- creature->setFaction(35); //wrong faction in db?
+ creature->SetFaction(35); //wrong faction in db?
}
void Initialize()
@@ -68,7 +68,7 @@ public:
if (uiType != POINT_MOTION_TYPE)
return;
- me->setFaction(14);
+ me->SetFaction(14);
}
void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override
@@ -77,7 +77,7 @@ public:
{
uiDamage = 0;
pDoneBy->CastSpell(pDoneBy, SPELL_KILL_CREDIT, true);
- me->setFaction(35);
+ me->SetFaction(35);
me->DespawnOrUnsummon(5000);
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
EnterEvadeMode();
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index fe984cf48b6..7b9cd56c6a9 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -322,7 +322,7 @@ public:
if (npc_engineer_heliceAI* pEscortAI = CAST_AI(npc_engineer_helice::npc_engineer_heliceAI, creature->AI()))
{
creature->GetMotionMaster()->MoveJumpTo(0, 0.4f, 0.4f);
- creature->setFaction(113);
+ creature->SetFaction(113);
pEscortAI->Start(false, false, player->GetGUID());
creature->AI()->Talk(SAY_WP_1);
diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp
index fc58b83db56..e18670a1d9c 100644
--- a/src/server/scripts/Northrend/zone_storm_peaks.cpp
+++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp
@@ -90,7 +90,7 @@ public:
if (menuId == GOSSIP_ID && gossipListId == GOSSIP_OPTION_ID)
{
CloseGossipMenuFor(player);
- me->setFaction(113);
+ me->SetFaction(113);
Start(true, true, player->GetGUID());
}
}
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index e45b1f42fa1..49e4f5d3dee 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -341,8 +341,8 @@ class go_wg_vehicle_teleporter : public GameObjectScript
bool IsFriendly(Unit* passenger)
{
- return ((go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_HORDE] && passenger->getFaction() == HORDE) ||
- (go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_ALLIANCE] && passenger->getFaction() == ALLIANCE));
+ return ((go->GetFaction() == WintergraspFaction[TEAM_HORDE] && passenger->GetFaction() == HORDE) ||
+ (go->GetFaction() == WintergraspFaction[TEAM_ALLIANCE] && passenger->GetFaction() == ALLIANCE));
}
Creature* GetValidVehicle(Creature* cVeh)
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 5fec3f058fe..26da2249623 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -135,7 +135,7 @@ public:
void Reset() override
{
- me->setFaction(35);
+ me->SetFaction(35);
DoCast(me, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P
}
@@ -148,7 +148,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_LEFT_CHAIN);
me->RemoveAurasDueToSpell(SPELL_RIGHT_CHAIN);
me->RemoveAurasDueToSpell(SPELL_KNEEL);
- me->setFaction(me->GetCreatureTemplate()->faction);
+ me->SetFaction(me->GetCreatureTemplate()->faction);
DoCast(me, SPELL_UNSHACKLED, true);
Talk(SAY_RAGECLAW);
me->GetMotionMaster()->MoveRandom(10);
diff --git a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
index 22ff5b88dd2..8bb2248f85c 100644
--- a/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
+++ b/src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
@@ -225,7 +225,7 @@ void OPvPCapturePointEP_NPT::SummonGO(uint32 team)
auto bounds = map->GetGameObjectBySpawnIdStore().equal_range(m_Objects[EP_NPT_BUFF]);
for (auto itr = bounds.first; itr != bounds.second; ++itr)
if (GameObject* go = itr->second)
- go->SetUInt32Value(GAMEOBJECT_FACTION, (team == ALLIANCE ? 84 : 83));
+ go->SetFaction(team == ALLIANCE ? 84 : 83);
}
}
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
index 93d5ce2f556..386d65c31ce 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_exarch_maladaar.cpp
@@ -227,7 +227,7 @@ public:
//SPELL_STOLEN_SOUL_VISUAL has shapeshift effect, but not implemented feature in Trinity for this spell.
summoned->CastSpell(summoned, SPELL_STOLEN_SOUL_VISUAL, false);
summoned->SetDisplayId(soulmodel);
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
if (Unit* target = ObjectAccessor::GetUnit(*me, soulholder))
{
diff --git a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
index 9e4151c808b..1037fcebcf8 100644
--- a/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
+++ b/src/server/scripts/Outland/Auchindoun/AuchenaiCrypts/boss_shirrak_the_dead_watcher.cpp
@@ -94,7 +94,7 @@ public:
if (summoned && summoned->GetEntry() == NPC_FOCUS_FIRE)
{
summoned->CastSpell(summoned, SPELL_FOCUS_FIRE_VISUAL, false);
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
summoned->SetLevel(me->getLevel());
summoned->AddUnitState(UNIT_STATE_ROOT);
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 0f38dc32b7d..8fc8c2e2f1b 100644
--- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
+++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp
@@ -379,7 +379,7 @@ public:
void Reset() override
{
Initialize();
- me->setFaction(ASHTONGUE_FACTION_FRIEND);
+ me->SetFaction(ASHTONGUE_FACTION_FRIEND);
DoCastSelf(SPELL_STEALTH);
if (_instance->GetBossState(DATA_SHADE_OF_AKAMA) != DONE)
@@ -425,7 +425,7 @@ public:
{
_isInCombat = false;
me->CombatStop(true);
- me->setFaction(ASHTONGUE_FACTION_FRIEND);
+ me->SetFaction(ASHTONGUE_FACTION_FRIEND);
me->SetWalk(true);
_events.Reset();
me->GetMotionMaster()->MovePoint(AKAMA_INTRO_WAYPOINT, AkamaWP[1]);
@@ -479,7 +479,7 @@ public:
case EVENT_SHADE_CHANNEL:
me->SetFacingTo(FACE_THE_PLATFORM);
DoCastSelf(SPELL_AKAMA_SOUL_CHANNEL);
- me->setFaction(AKAMA_FACTION_COMBAT);
+ me->SetFaction(AKAMA_FACTION_COMBAT);
_events.ScheduleEvent(EVENT_FIXATE, Seconds(5));
break;
case EVENT_FIXATE:
@@ -527,7 +527,7 @@ public:
}
}
- if (me->getFaction() == AKAMA_FACTION_COMBAT)
+ if (me->GetFaction() == AKAMA_FACTION_COMBAT)
{
if (!UpdateVictim())
return;
@@ -1165,7 +1165,7 @@ public:
Talk(SAY_BROKEN_SPECIAL);
break;
case ACTION_BROKEN_HAIL:
- me->setFaction(ASHTONGUE_FACTION_FRIEND);
+ me->SetFaction(ASHTONGUE_FACTION_FRIEND);
Talk(SAY_BROKEN_HAIL);
break;
case ACTION_BROKEN_EMOTE:
diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
index b9aad29f63d..7fc4cc76a0d 100644
--- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
+++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp
@@ -123,7 +123,7 @@ class instance_black_temple : public InstanceMapScript
case NPC_STORM_FURY:
AshtongueGUIDs.emplace_back(creature->GetGUID());
if (GetBossState(DATA_SHADE_OF_AKAMA) == DONE)
- creature->setFaction(ASHTONGUE_FACTION_FRIEND);
+ creature->SetFaction(ASHTONGUE_FACTION_FRIEND);
break;
default:
break;
@@ -170,7 +170,7 @@ class instance_black_temple : public InstanceMapScript
if (state == DONE)
for (ObjectGuid ashtongueGuid : AshtongueGUIDs)
if (Creature* ashtongue = instance->GetCreature(ashtongueGuid))
- ashtongue->setFaction(ASHTONGUE_FACTION_FRIEND);
+ ashtongue->SetFaction(ASHTONGUE_FACTION_FRIEND);
// no break
case DATA_TERON_GOREFIEND:
case DATA_GURTOGG_BLOODBOIL:
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
index 062dfaddcec..a468f9714ad 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp
@@ -661,7 +661,7 @@ public:
{
Cyclone->SetObjectScale(3.0f);
Cyclone->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- Cyclone->setFaction(me->getFaction());
+ Cyclone->SetFaction(me->GetFaction());
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_CYCLONE, true);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
Cyclone->AI()->AttackStart(target);
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
index febd57cc4fa..f390054495f 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp
@@ -754,7 +754,7 @@ public:
void Reset() override
{
me->SetDisableGravity(true);
- me->setFaction(14);
+ me->SetFaction(14);
Initialize();
}
@@ -789,7 +789,7 @@ public:
{
if (Creature* trig = me->SummonCreature(TOXIC_SPORES_TRIGGER, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 30000))
{
- trig->setFaction(14);
+ trig->SetFaction(14);
trig->CastSpell(trig, SPELL_TOXIC_SPORES, true);
}
}
@@ -805,7 +805,7 @@ public:
if (!Vashj || !Vashj->IsAlive() || ENSURE_AI(boss_lady_vashj::boss_lady_vashjAI, Vashj->ToCreature()->AI())->Phase != 3)
{
// remove
- me->setFaction(35);
+ me->SetFaction(35);
me->DespawnOrUnsummon();
return;
}
diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
index 1d932a0f94a..3e5ee17b86c 100644
--- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
+++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
@@ -319,7 +319,7 @@ public:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(14);
+ me->SetFaction(14);
}
void EnterCombat(Unit* /*who*/) override { }
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 e88833a36c6..7a4651f3f00 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
@@ -102,7 +102,7 @@ class boss_nazan : public CreatureScript
if (summoned && summoned->GetEntry() == NPC_LIQUID_FIRE)
{
summoned->SetLevel(me->getLevel());
- summoned->setFaction(me->getFaction());
+ summoned->SetFaction(me->GetFaction());
summoned->CastSpell(summoned, DUNGEON_MODE(SPELL_SUMMON_LIQUID_FIRE, SPELL_SUMMON_LIQUID_FIRE_H), true);
summoned->CastSpell(summoned, SPELL_FIRE_NOVA_VISUAL, true);
}
diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
index 0757cc44acf..45a863886de 100644
--- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
+++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp
@@ -206,7 +206,7 @@ class boss_grand_warlock_nethekurse : public CreatureScript
void JustSummoned(Creature* summoned) override
{
- summoned->setFaction(16);
+ summoned->SetFaction(16);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
index 04ee2c90fa0..85044025d26 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
@@ -407,7 +407,7 @@ class boss_alar : public CreatureScript
Summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
Summoned->SetObjectScale(Summoned->GetObjectScale() * 2.5f);
Summoned->SetDisplayId(11686);
- Summoned->setFaction(me->getFaction());
+ Summoned->SetFaction(me->GetFaction());
Summoned->SetLevel(me->getLevel());
Summoned->CastSpell(Summoned, SPELL_FLAME_PATCH, false);
}
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
index 620bbf5525b..f9285b006ef 100644
--- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
+++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp
@@ -1277,7 +1277,7 @@ class npc_kael_flamestrike : public CreatureScript
Initialize();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- me->setFaction(14);
+ me->SetFaction(14);
}
void MoveInLineOfSight(Unit* /*who*/) override { }
diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
index f96fadfc5a7..0d4c615d977 100644
--- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
+++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp
@@ -538,7 +538,7 @@ class npc_zerekethvoidzone : public CreatureScript
void Reset() override
{
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
- me->setFaction(16);
+ me->SetFaction(16);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoCast(me, SPELL_VOID_ZONE_DAMAGE);
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
index d8f14217afc..a3fc6ecb8d7 100644
--- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
+++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp
@@ -75,7 +75,7 @@ public:
Initialize();
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
Talk(SAY_SUMMON);
}
@@ -86,7 +86,7 @@ public:
{
if (faction_Timer <= diff)
{
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
faction_Timer = 0;
} else faction_Timer -= diff;
}
@@ -96,7 +96,7 @@ public:
if (HealthBelowPct(30))
{
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
me->RemoveAllAuras();
me->DeleteThreatList();
@@ -280,7 +280,7 @@ public:
{
if (quest->GetQuestId() == QUEST_ROAD_TO_FALCON_WATCH)
{
- me->setFaction(FACTION_FALCON_WATCH_QUEST);
+ me->SetFaction(FACTION_FALCON_WATCH_QUEST);
npc_escortAI::Start(true, false, player->GetGUID());
}
}
@@ -1003,7 +1003,7 @@ public:
break;
case EVENT_ATTACK:
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
me->CombatStart(ObjectAccessor::GetPlayer(*me, _playerGUID));
_events.ScheduleEvent(EVENT_FIREBALL, 1);
_events.ScheduleEvent(EVENT_FROSTNOVA, Seconds(5));
diff --git a/src/server/scripts/Outland/zone_nagrand.cpp b/src/server/scripts/Outland/zone_nagrand.cpp
index de689f03fa9..98c3433cbd5 100644
--- a/src/server/scripts/Outland/zone_nagrand.cpp
+++ b/src/server/scripts/Outland/zone_nagrand.cpp
@@ -76,7 +76,7 @@ public:
if (npc_maghar_captiveAI* EscortAI = dynamic_cast<npc_maghar_captiveAI*>(creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- creature->setFaction(232);
+ creature->SetFaction(232);
EscortAI->Start(true, false, player->GetGUID(), quest);
creature->AI()->Talk(SAY_MAG_START);
@@ -430,7 +430,7 @@ public:
if (npc_kurenai_captiveAI* EscortAI = dynamic_cast<npc_kurenai_captiveAI*>(creature->AI()))
{
creature->SetStandState(UNIT_STAND_STATE_STAND);
- creature->setFaction(231);
+ creature->SetFaction(231);
EscortAI->Start(true, false, player->GetGUID(), quest);
creature->AI()->Talk(SAY_KUR_START);
diff --git a/src/server/scripts/Outland/zone_netherstorm.cpp b/src/server/scripts/Outland/zone_netherstorm.cpp
index 08199e9b415..82334302dad 100644
--- a/src/server/scripts/Outland/zone_netherstorm.cpp
+++ b/src/server/scripts/Outland/zone_netherstorm.cpp
@@ -496,7 +496,7 @@ public:
{
if (quest->GetQuestId() == Q_ALMABTRIEB)
{
- creature->setFaction(113);
+ creature->SetFaction(113);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
ENSURE_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
}
@@ -662,7 +662,7 @@ public:
{
if (npc_maxx_a_million_escortAI* pEscortAI = CAST_AI(npc_maxx_a_million_escort::npc_maxx_a_million_escortAI, creature->AI()))
{
- creature->setFaction(113);
+ creature->SetFaction(113);
pEscortAI->Start(false, false, player->GetGUID());
}
}
diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
index 1f3a7c569ea..c4cec3f609e 100644
--- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
+++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp
@@ -375,7 +375,7 @@ public:
void Reset() override
{
if (!Tapped)
- me->setFaction(FACTION_DEFAULT);
+ me->SetFaction(FACTION_DEFAULT);
FlyTimer = 10000;
me->SetDisableGravity(false);
@@ -391,7 +391,7 @@ public:
Tapped = true;
PlayerGUID = caster->GetGUID();
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
DoCast(caster, SPELL_FORCE_OF_NELTHARAKU, true);
Unit* Dragonmaw = me->FindNearestCreature(NPC_DRAGONMAW_SUBJUGATOR, 50);
@@ -598,7 +598,7 @@ public:
if (quest->GetQuestId() == QUEST_ESCAPE_COILSCAR)
{
creature->AI()->Talk(SAY_WIL_START, player);
- creature->setFaction(FACTION_EARTHEN);
+ creature->SetFaction(FACTION_EARTHEN);
if (npc_earthmender_wildaAI* pEscortAI = CAST_AI(npc_earthmender_wilda::npc_earthmender_wildaAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -1476,7 +1476,7 @@ public:
totemOspirits = me->FindNearestCreature(ENTRY_TOTEM_OF_SPIRITS, RADIUS_TOTEM_OF_SPIRITS);
if (totemOspirits)
{
- Summoned->setFaction(FACTION_ENRAGED_SOUL_FRIENDLY);
+ Summoned->SetFaction(FACTION_ENRAGED_SOUL_FRIENDLY);
Summoned->GetMotionMaster()->MovePoint(0, totemOspirits->GetPositionX(), totemOspirits->GetPositionY(), Summoned->GetPositionZ());
if (Unit* owner = totemOspirits->GetOwner())
diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp
index 78bbb88e021..01c88a427fe 100644
--- a/src/server/scripts/Outland/zone_shattrath_city.cpp
+++ b/src/server/scripts/Outland/zone_shattrath_city.cpp
@@ -64,7 +64,7 @@ public:
if (action == GOSSIP_ACTION_INFO_DEF+1)
{
CloseGossipMenuFor(player);
- creature->setFaction(FACTION_OGRE_HOSTILE);
+ creature->SetFaction(FACTION_OGRE_HOSTILE);
creature->AI()->Talk(SAY_RALIQ_ATTACK, player);
creature->AI()->AttackStart(player);
}
@@ -154,7 +154,7 @@ public:
if (action == GOSSIP_ACTION_INFO_DEF+1)
{
CloseGossipMenuFor(player);
- creature->setFaction(FACTION_DEMON_HOSTILE);
+ creature->SetFaction(FACTION_DEMON_HOSTILE);
creature->AI()->Talk(SAY_DEMONIC_AGGRO, player);
creature->AI()->AttackStart(player);
}
diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp
index 834de219ea4..9fccb9cb4f9 100644
--- a/src/server/scripts/Outland/zone_terokkar_forest.cpp
+++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp
@@ -87,7 +87,7 @@ public:
{
Initialize();
me->SetStandState(UNIT_STAND_STATE_STAND);
- me->setFaction(FACTION_HOSTILE);
+ me->SetFaction(FACTION_HOSTILE);
}
void EnterCombat(Unit* /*who*/) override { }
@@ -95,7 +95,7 @@ public:
void DoNice()
{
Talk(SAY_SUBMIT);
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
me->SetStandState(UNIT_STAND_STATE_SIT);
me->RemoveAllAuras();
me->DeleteThreatList();
@@ -339,7 +339,7 @@ public:
if (action == GOSSIP_ACTION_INFO_DEF+1)
{
CloseGossipMenuFor(player);
- creature->setFaction(FACTION_HOSTILE_FLOON);
+ creature->SetFaction(FACTION_HOSTILE_FLOON);
creature->AI()->Talk(SAY_FLOON_ATTACK, player);
creature->AI()->AttackStart(player);
}
@@ -365,7 +365,7 @@ public:
npc_floonAI(Creature* creature) : ScriptedAI(creature)
{
Initialize();
- m_uiNormFaction = creature->getFaction();
+ m_uiNormFaction = creature->GetFaction();
}
void Initialize()
@@ -383,8 +383,8 @@ public:
void Reset() override
{
Initialize();
- if (me->getFaction() != m_uiNormFaction)
- me->setFaction(m_uiNormFaction);
+ if (me->GetFaction() != m_uiNormFaction)
+ me->SetFaction(m_uiNormFaction);
}
void EnterCombat(Unit* /*who*/) override { }
@@ -504,7 +504,7 @@ public:
if (quest->GetQuestId() == ESCAPE_FROM_FIREWING_POINT_H || quest->GetQuestId() == ESCAPE_FROM_FIREWING_POINT_A)
{
ENSURE_AI(npc_escortAI, (creature->AI()))->Start(true, false, player->GetGUID());
- creature->setFaction(FACTION_ESCORTEE);
+ creature->SetFaction(FACTION_ESCORTEE);
}
return true;
}
@@ -644,9 +644,9 @@ public:
pEscortAI->Start(false, false, player->GetGUID());
if (player->GetTeamId() == TEAM_ALLIANCE)
- creature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
+ creature->SetFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE);
else
- creature->setFaction(FACTION_ESCORT_H_NEUTRAL_PASSIVE);
+ creature->SetFaction(FACTION_ESCORT_H_NEUTRAL_PASSIVE);
}
return true;
}
diff --git a/src/server/scripts/Outland/zone_zangarmarsh.cpp b/src/server/scripts/Outland/zone_zangarmarsh.cpp
index a1810316cf1..f6cc09eba8e 100644
--- a/src/server/scripts/Outland/zone_zangarmarsh.cpp
+++ b/src/server/scripts/Outland/zone_zangarmarsh.cpp
@@ -171,7 +171,7 @@ public:
{
npc_cooshcooshAI(Creature* creature) : ScriptedAI(creature)
{
- m_uiNormFaction = creature->getFaction();
+ m_uiNormFaction = creature->GetFaction();
Initialize();
}
@@ -186,8 +186,8 @@ public:
void Reset() override
{
Initialize();
- if (me->getFaction() != m_uiNormFaction)
- me->setFaction(m_uiNormFaction);
+ if (me->GetFaction() != m_uiNormFaction)
+ me->SetFaction(m_uiNormFaction);
}
void EnterCombat(Unit* /*who*/) override { }
@@ -227,7 +227,7 @@ public:
if (action == GOSSIP_ACTION_INFO_DEF)
{
CloseGossipMenuFor(player);
- creature->setFaction(FACTION_HOSTILE_CO);
+ creature->SetFaction(FACTION_HOSTILE_CO);
creature->AI()->AttackStart(player);
}
return true;
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index e8528297ed0..cac920650d7 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -3738,7 +3738,7 @@ class spell_gen_gm_freeze : public SpellScriptLoader
if (Player* player = GetTarget()->ToPlayer())
{
// stop combat + make player unattackable + duel stop + stop some spells
- player->setFaction(35);
+ player->SetFaction(35);
player->CombatStop();
if (player->IsNonMeleeSpellCast(true))
player->InterruptNonMeleeSpells(true);
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 12e89755963..4c70439f421 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -251,7 +251,7 @@ public:
if (Spell)
creature->CastSpell(player, Spell, false);
else
- TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->getFaction());
+ TC_LOG_ERROR("scripts", "go_ethereum_prison summoned Creature (entry %u) but faction (%u) are not expected by script.", creature->GetEntry(), creature->GetFaction());
}
}
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 54a654527ba..268b4ff2c69 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -283,7 +283,7 @@ public:
void Reset() override
{
Initialize();
- me->setFaction(FACTION_CHICKEN);
+ me->SetFaction(FACTION_CHICKEN);
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
}
@@ -315,7 +315,7 @@ public:
if (player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_NONE && rand32() % 30 == 1)
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
Talk(player->GetTeam() == HORDE ? EMOTE_HELLO_H : EMOTE_HELLO_A);
}
break;
@@ -323,7 +323,7 @@ public:
if (player->GetQuestStatus(QUEST_CLUCK) == QUEST_STATUS_COMPLETE)
{
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
- me->setFaction(FACTION_FRIENDLY);
+ me->SetFaction(FACTION_FRIENDLY);
Talk(EMOTE_CLUCK_TEXT);
}
break;