Core/Misc: camelize GetFaction/SetFaction properly
(cherry picked from commit 4c4dca6d694bd1064b403a31a5b1c776a326f3ce)
This commit is contained in:
@@ -176,7 +176,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();
|
||||
|
||||
@@ -166,8 +166,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();
|
||||
}
|
||||
@@ -303,7 +303,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;
|
||||
|
||||
|
||||
@@ -580,7 +580,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();
|
||||
|
||||
@@ -365,7 +365,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, %s set faction to %u",
|
||||
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), e.action.faction.factionID);
|
||||
}
|
||||
@@ -373,9 +373,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, %s set faction to %u",
|
||||
(*itr)->GetEntry(), (*itr)->GetGUID().ToString().c_str(), ci->faction);
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ void BattlefieldTB::OnCreatureCreate(Creature* creature)
|
||||
HideNpc(creature);
|
||||
break;
|
||||
case NPC_ABANDONED_SIEGE_ENGINE:
|
||||
creature->setFaction(TBFactions[GetDefenderTeam()]);
|
||||
creature->SetFaction(TBFactions[GetDefenderTeam()]);
|
||||
creature->CastSpell(creature, SPELL_THICK_LAYER_OF_RUST, true);
|
||||
break;
|
||||
case NPC_SIEGE_ENGINE_TURRET:
|
||||
|
||||
@@ -580,7 +580,7 @@ void BattlefieldWG::OnBattleStart()
|
||||
if (Creature* creature = GetCreature(*itr))
|
||||
{
|
||||
ShowNpc(creature, true);
|
||||
creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
|
||||
creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -664,7 +664,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer)
|
||||
if (Creature* creature = GetCreature(*itr))
|
||||
{
|
||||
if (!endByTimer)
|
||||
creature->setFaction(WintergraspFaction[GetDefenderTeam()]);
|
||||
creature->SetFaction(WintergraspFaction[GetDefenderTeam()]);
|
||||
HideNpc(creature);
|
||||
}
|
||||
}
|
||||
@@ -891,9 +891,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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +384,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +342,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);
|
||||
}
|
||||
}
|
||||
@@ -756,7 +756,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,7 +782,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,9 +363,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)
|
||||
@@ -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->AddUnitFlag(UnitFlags(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)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -501,7 +501,7 @@ bool Creature::UpdateEntry(uint32 entry, CreatureData const* data /*= nullptr*/,
|
||||
if (!GetCreatureAddon())
|
||||
SetSheath(SHEATH_STATE_MELEE);
|
||||
|
||||
setFaction(cInfo->faction);
|
||||
SetFaction(cInfo->faction);
|
||||
|
||||
uint64 npcFlags;
|
||||
uint32 unitFlags, unitFlags2, unitFlags3, dynamicFlags;
|
||||
@@ -555,7 +555,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();
|
||||
}
|
||||
}
|
||||
@@ -2342,7 +2342,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
|
||||
|
||||
@@ -187,7 +187,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;
|
||||
@@ -212,9 +212,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()
|
||||
@@ -307,7 +307,7 @@ void Minion::InitStats(uint32 duration)
|
||||
SetReactState(REACT_PASSIVE);
|
||||
|
||||
SetCreatorGUID(GetOwner()->GetGUID());
|
||||
setFaction(GetOwner()->getFaction());
|
||||
SetFaction(GetOwner()->GetFaction());
|
||||
|
||||
GetOwner()->SetMinion(this, true);
|
||||
}
|
||||
|
||||
@@ -2112,7 +2112,7 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags trigge
|
||||
|
||||
if (Unit* owner = GetOwner())
|
||||
{
|
||||
trigger->setFaction(owner->getFaction());
|
||||
trigger->SetFaction(owner->GetFaction());
|
||||
if (owner->HasUnitFlag(UNIT_FLAG_PVP_ATTACKABLE))
|
||||
trigger->AddUnitFlag(UNIT_FLAG_PVP_ATTACKABLE);
|
||||
// copy pvp state flags from owner
|
||||
@@ -2123,7 +2123,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);
|
||||
|
||||
@@ -1889,7 +1889,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());
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
FactionTemplateEntry const* ft2 = receiver->GetFactionTemplateEntry();
|
||||
if (ft1 && ft2 && !ft1->IsFriendlyTo(ft2))
|
||||
// pretend that all other HOSTILE players have own faction, to allow follow, heal, rezz (trade wont work)
|
||||
factionTemplate = receiver->getFaction();
|
||||
factionTemplate = receiver->GetFaction();
|
||||
}
|
||||
|
||||
return factionTemplate;
|
||||
|
||||
@@ -186,7 +186,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petEntry, uint32 petnumber, bool c
|
||||
PhasingHandler::InheritPhaseShift(this, owner);
|
||||
|
||||
setPetType(petType);
|
||||
setFaction(owner->getFaction());
|
||||
SetFaction(owner->GetFaction());
|
||||
SetCreatedBySpell(summonSpellId);
|
||||
|
||||
if (IsCritter())
|
||||
|
||||
@@ -2200,13 +2200,13 @@ void Player::SetGameMaster(bool on)
|
||||
if (on)
|
||||
{
|
||||
m_ExtraFlags |= PLAYER_EXTRA_GM_ON;
|
||||
setFaction(35);
|
||||
SetFaction(35);
|
||||
AddPlayerFlag(PLAYER_FLAGS_GM);
|
||||
AddUnitFlag2(UNIT_FLAG2_ALLOW_CHEAT_SPELLS);
|
||||
|
||||
if (Pet* pet = GetPet())
|
||||
{
|
||||
pet->setFaction(35);
|
||||
pet->SetFaction(35);
|
||||
pet->getHostileRefManager().setOnlineOfflineState(false);
|
||||
}
|
||||
|
||||
@@ -2230,7 +2230,7 @@ void Player::SetGameMaster(bool on)
|
||||
|
||||
if (Pet* pet = GetPet())
|
||||
{
|
||||
pet->setFaction(getFaction());
|
||||
pet->SetFaction(GetFaction());
|
||||
pet->getHostileRefManager().setOnlineOfflineState(true);
|
||||
}
|
||||
|
||||
@@ -6298,7 +6298,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
|
||||
@@ -22618,7 +22618,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
|
||||
float discount = GetReputationPriceDiscount(npc);
|
||||
totalcost = uint32(ceil(totalcost * discount));
|
||||
firstcost = uint32(ceil(firstcost * discount));
|
||||
m_taxi.SetFlightMasterFactionTemplateId(npc->getFaction());
|
||||
m_taxi.SetFlightMasterFactionTemplateId(npc->GetFaction());
|
||||
}
|
||||
else
|
||||
m_taxi.SetFlightMasterFactionTemplateId(0);
|
||||
@@ -28213,7 +28213,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
PhasingHandler::InheritPhaseShift(pet, this);
|
||||
|
||||
pet->SetCreatorGUID(GetGUID());
|
||||
pet->setFaction(getFaction());
|
||||
pet->SetFaction(GetFaction());
|
||||
|
||||
pet->SetNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
pet->SetNpcFlags2(UNIT_NPC_FLAG_2_NONE);
|
||||
|
||||
@@ -5429,15 +5429,15 @@ void Unit::UpdateDisplayPower()
|
||||
|
||||
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();
|
||||
}
|
||||
@@ -11225,7 +11225,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->SetCreatedBySpell(spell_id);
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -11881,8 +11881,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);
|
||||
@@ -11998,7 +11998,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
|
||||
|
||||
if (_oldFactionId)
|
||||
{
|
||||
setFaction(_oldFactionId);
|
||||
SetFaction(_oldFactionId);
|
||||
_oldFactionId = 0;
|
||||
}
|
||||
else
|
||||
@@ -12090,13 +12090,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12191,7 +12191,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
|
||||
@@ -12210,7 +12210,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)
|
||||
|
||||
@@ -1119,8 +1119,8 @@ class TC_GAME_API Unit : public WorldObject
|
||||
void SetSheath(SheathState sheathed) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::SheatheState), sheathed); }
|
||||
|
||||
// faction template id
|
||||
uint32 getFaction() const { return m_unitData->FactionTemplate; }
|
||||
void setFaction(uint32 faction) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::FactionTemplate), faction); }
|
||||
uint32 GetFaction() const { return m_unitData->FactionTemplate; }
|
||||
void SetFaction(uint32 faction) { SetUpdateFieldValue(m_values.ModifyValue(&Unit::m_unitData).ModifyValue(&UF::UnitData::FactionTemplate), faction); }
|
||||
FactionTemplateEntry const* GetFactionTemplateEntry() const;
|
||||
|
||||
ReputationRank GetReactionTo(Unit const* target) const;
|
||||
|
||||
@@ -52,7 +52,7 @@ void WorldSession::HandleAuctionBrowseQuery(WorldPackets::AuctionHouse::AuctionB
|
||||
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), searchedname: %s, levelmin: %u, levelmax: %u, filters: %u",
|
||||
browseQuery.Auctioneer.ToString().c_str(), browseQuery.Name.c_str(), browseQuery.MinLevel, browseQuery.MaxLevel, AsUnderlyingType(browseQuery.Filters));
|
||||
@@ -115,7 +115,7 @@ void WorldSession::HandleAuctionCancelCommoditiesPurchase(WorldPackets::AuctionH
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
auctionHouse->CancelCommodityQuote(_player->GetGUID());
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ void WorldSession::HandleAuctionConfirmCommoditiesPurchase(WorldPackets::Auction
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
CharacterDatabaseTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
if (auctionHouse->BuyCommodity(trans, _player, confirmCommoditiesPurchase.ItemID, confirmCommoditiesPurchase.Quantity, throttle.DelayUntilNext))
|
||||
@@ -190,7 +190,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPackets::AuctionHouse::Auct
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionListBidderItemsResult result;
|
||||
|
||||
@@ -218,7 +218,7 @@ void WorldSession::HandleAuctionListBucketsByBucketKeys(WorldPackets::AuctionHou
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionListBucketsResult listBucketsResult;
|
||||
|
||||
@@ -248,7 +248,7 @@ void WorldSession::HandleAuctionListItemsByBucketKey(WorldPackets::AuctionHouse:
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionListItemsResult listItemsResult;
|
||||
listItemsResult.DesiredDelay = uint32(throttle.DelayUntilNext.count());
|
||||
@@ -279,7 +279,7 @@ void WorldSession::HandleAuctionListItemsByItemID(WorldPackets::AuctionHouse::Au
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionListItemsResult listItemsResult;
|
||||
listItemsResult.DesiredDelay = uint32(throttle.DelayUntilNext.count());
|
||||
@@ -311,7 +311,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPackets::AuctionHouse::Aucti
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionListOwnerItemsResult result;
|
||||
|
||||
@@ -345,7 +345,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPackets::AuctionHouse::AuctionPlac
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
AuctionPosting* auction = auctionHouse->GetAuction(placeBid.AuctionID);
|
||||
if (!auction || auction->IsCommodity())
|
||||
@@ -467,7 +467,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPackets::AuctionHouse::AuctionRe
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
AuctionPosting* auction = auctionHouse->GetAuction(removeItem.AuctionID);
|
||||
Player* player = GetPlayer();
|
||||
@@ -529,7 +529,7 @@ void WorldSession::HandleAuctionReplicateItems(WorldPackets::AuctionHouse::Aucti
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionReplicateResponse response;
|
||||
|
||||
@@ -569,7 +569,7 @@ void WorldSession::HandleAuctionSellCommodity(WorldPackets::AuctionHouse::Auctio
|
||||
}
|
||||
|
||||
uint32 houseId = 0;
|
||||
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction(), &houseId);
|
||||
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->GetFaction(), &houseId);
|
||||
if (!auctionHouseEntry)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) has wrong faction.", sellCommodity.Auctioneer.ToString().c_str());
|
||||
@@ -645,7 +645,7 @@ void WorldSession::HandleAuctionSellCommodity(WorldPackets::AuctionHouse::Auctio
|
||||
}
|
||||
|
||||
Seconds auctionTime = Seconds(int64(std::chrono::duration_cast<Seconds>(Minutes(sellCommodity.RunTime)).count() * double(sWorld->getRate(RATE_AUCTION_TIME))));
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
uint64 deposit = AuctionHouseMgr::GetCommodityAuctionDeposit(items2.begin()->second.first->GetTemplate(), Minutes(sellCommodity.RunTime), totalCount);
|
||||
if (!_player->HasEnoughMoney(deposit))
|
||||
@@ -793,7 +793,7 @@ void WorldSession::HandleAuctionSellItem(WorldPackets::AuctionHouse::AuctionSell
|
||||
}
|
||||
|
||||
uint32 houseId = 0;
|
||||
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction(), &houseId);
|
||||
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->GetFaction(), &houseId);
|
||||
if (!auctionHouseEntry)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) has wrong faction.", sellItem.Auctioneer.ToString().c_str());
|
||||
@@ -837,7 +837,7 @@ void WorldSession::HandleAuctionSellItem(WorldPackets::AuctionHouse::AuctionSell
|
||||
}
|
||||
|
||||
Seconds auctionTime = Seconds(int64(std::chrono::duration_cast<Seconds>(Minutes(sellItem.RunTime)).count() * double(sWorld->getRate(RATE_AUCTION_TIME))));
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
uint64 deposit = AuctionHouseMgr::GetItemAuctionDeposit(_player, item, Minutes(sellItem.RunTime));
|
||||
if (!_player->HasEnoughMoney(deposit))
|
||||
@@ -947,7 +947,7 @@ void WorldSession::HandleAuctionStartCommoditiesPurchase(WorldPackets::AuctionHo
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
|
||||
|
||||
WorldPackets::AuctionHouse::AuctionCommodityQuote auctionCommodityQuote;
|
||||
|
||||
@@ -972,7 +972,7 @@ void WorldSession::SendAuctionHello(ObjectGuid guid, Creature* unit)
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->getFaction(), nullptr);
|
||||
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction(), nullptr);
|
||||
if (!ahEntry)
|
||||
return;
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPackets::NPC::Hello& packet)
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
@@ -4928,7 +4928,7 @@ void AuraEffect::HandleAuraModFaction(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->setFaction(GetMiscValue());
|
||||
target->SetFaction(GetMiscValue());
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
target->RemoveUnitFlag(UNIT_FLAG_PVP_ATTACKABLE);
|
||||
}
|
||||
|
||||
@@ -2031,7 +2031,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
if (properties->Control == SUMMON_CATEGORY_ALLY)
|
||||
{
|
||||
summon->SetOwnerGUID(m_originalCaster->GetGUID());
|
||||
summon->setFaction(m_originalCaster->getFaction());
|
||||
summon->SetFaction(m_originalCaster->GetFaction());
|
||||
summon->SetCreatedBySpell(m_spellInfo->Id);
|
||||
}
|
||||
|
||||
@@ -2072,9 +2072,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;
|
||||
}
|
||||
|
||||
@@ -3604,7 +3604,7 @@ void Spell::EffectDuel(SpellEffIndex effIndex)
|
||||
|
||||
PhasingHandler::InheritPhaseShift(go, m_caster);
|
||||
|
||||
go->SetFaction(m_caster->getFaction());
|
||||
go->SetFaction(m_caster->GetFaction());
|
||||
go->SetLevel(m_caster->getLevel()+1);
|
||||
int32 duration = m_spellInfo->CalcDuration(m_caster);
|
||||
go->SetRespawnTime(duration > 0 ? duration/IN_MILLISECONDS : 0);
|
||||
@@ -4688,7 +4688,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
{
|
||||
case GAMEOBJECT_TYPE_FISHINGNODE:
|
||||
{
|
||||
go->SetFaction(m_caster->getFaction());
|
||||
go->SetFaction(m_caster->GetFaction());
|
||||
ObjectGuid bobberGuid = go->GetGUID();
|
||||
// client requires fishing bobber guid in channel object slot 0 to be usable
|
||||
m_caster->SetChannelObject(0, bobberGuid);
|
||||
@@ -5206,7 +5206,7 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
||||
((Guardian*)summon)->InitStatsForLevel(level);
|
||||
|
||||
if (properties && properties->Control == 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));
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
|
||||
if (!pfactionid)
|
||||
{
|
||||
uint32 factionid = target->getFaction();
|
||||
uint32 factionid = target->GetFaction();
|
||||
uint32 flag = target->m_unitData->Flags;
|
||||
uint64 npcflag;
|
||||
memcpy(&npcflag, target->m_unitData->NpcFlags.begin(), sizeof(uint64));
|
||||
@@ -261,7 +261,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_YOU_CHANGE_FACTION, target->GetGUID().ToString().c_str(), factionid, flag, std::to_string(npcflag).c_str(), dyflag);
|
||||
|
||||
target->setFaction(factionid);
|
||||
target->SetFaction(factionid);
|
||||
target->SetUnitFlags(UnitFlags(flag));
|
||||
target->SetNpcFlags(NPCFlags(npcflag & 0xFFFFFFFF));
|
||||
target->SetNpcFlags2(NPCFlags2(npcflag >> 32));
|
||||
|
||||
@@ -606,7 +606,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
creature->setFaction(factionId);
|
||||
creature->SetFaction(factionId);
|
||||
|
||||
// Faction is set in creature_template - not inside creature
|
||||
|
||||
@@ -725,7 +725,7 @@ public:
|
||||
|
||||
CreatureTemplate const* cInfo = target->GetCreatureTemplate();
|
||||
|
||||
uint32 faction = target->getFaction();
|
||||
uint32 faction = target->GetFaction();
|
||||
uint64 npcflags;
|
||||
memcpy(&npcflags, target->m_unitData->NpcFlags.begin(), sizeof(npcflags));
|
||||
uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask;
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
creatureTarget->SetHealth(0); // just for nice GM-mode view
|
||||
|
||||
pet->SetCreatorGUID(player->GetGUID());
|
||||
pet->setFaction(player->getFaction());
|
||||
pet->SetFaction(player->GetFaction());
|
||||
|
||||
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
|
||||
{
|
||||
|
||||
@@ -91,7 +91,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);
|
||||
}
|
||||
|
||||
+1
-1
@@ -600,7 +600,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.
|
||||
|
||||
+4
-4
@@ -143,7 +143,7 @@ public:
|
||||
{
|
||||
_Reset();
|
||||
me->AddUnitFlag(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)
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
{
|
||||
events.SetPhase(PHASE_ONE);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->setFaction(COREN_DIREBREW_FACTION_HOSTILE);
|
||||
me->SetFaction(COREN_DIREBREW_FACTION_HOSTILE);
|
||||
me->SetInCombatWithZone();
|
||||
|
||||
EntryCheckPredicate pred(NPC_ANTAGONIST);
|
||||
@@ -357,7 +357,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();
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
break;
|
||||
case ACTION_ANTAGONIST_HOSTILE:
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->setFaction(COREN_DIREBREW_FACTION_HOSTILE);
|
||||
me->SetFaction(COREN_DIREBREW_FACTION_HOSTILE);
|
||||
me->SetInCombatWithZone();
|
||||
break;
|
||||
default:
|
||||
|
||||
+1
-1
@@ -75,7 +75,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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->RemoveUnitFlag(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->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
+2
-2
@@ -354,7 +354,7 @@ public:
|
||||
{
|
||||
if (Creature* boss = instance->GetCreature(TombBossGUIDs[TombEventCounter]))
|
||||
{
|
||||
boss->setFaction(FACTION_HOSTILE);
|
||||
boss->SetFaction(FACTION_HOSTILE);
|
||||
boss->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
if (Unit* target = boss->SelectNearestTarget(500))
|
||||
boss->AI()->AttackStart(target);
|
||||
@@ -380,7 +380,7 @@ public:
|
||||
boss->GetMotionMaster()->MoveTargetedHome();
|
||||
boss->SetLootRecipient(NULL);
|
||||
}
|
||||
boss->setFaction(FACTION_FRIEND);
|
||||
boss->SetFaction(FACTION_FRIEND);
|
||||
}
|
||||
}
|
||||
GhostKillCount = 0;
|
||||
|
||||
+3
-3
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
me->SetVisible(true);
|
||||
me->SetNpcFlags(UNIT_NPC_FLAG_GOSSIP);
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR);
|
||||
me->RemoveAura(SPELL_NEFARIANS_BARRIER);
|
||||
}
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
|
||||
Talk(SAY_GAMESBEGIN_2);
|
||||
|
||||
me->setFaction(103);
|
||||
me->SetFaction(103);
|
||||
me->SetNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
DoCast(me, SPELL_NEFARIANS_BARRIER);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
@@ -342,7 +342,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());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -75,7 +75,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
creature->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->setFaction(35);
|
||||
creature->SetFaction(35);
|
||||
creature->RemoveUnitFlag(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 (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
|
||||
AttackStart(player);
|
||||
break;
|
||||
|
||||
+2
-2
@@ -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->UpdateEncounterStateForKilledCreature(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->AddNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ class boss_ragnaros : public CreatureScript
|
||||
{
|
||||
//Become unbanished again
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetEmoteState(EMOTE_ONESHOT_NONE);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EMERGE);
|
||||
@@ -253,7 +253,7 @@ class boss_ragnaros : public CreatureScript
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
//Root self
|
||||
//DoCast(me, 23973);
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetEmoteState(EMOTE_STATE_SUBMERGED);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
{
|
||||
Start(true, false, player->GetGUID());
|
||||
|
||||
me->setFaction(player->getFaction());
|
||||
me->SetFaction(player->GetFaction());
|
||||
SetData(1, 0);
|
||||
|
||||
player->PlayerTalkClass->SendCloseGossip();
|
||||
@@ -225,8 +225,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)
|
||||
{
|
||||
|
||||
@@ -374,7 +374,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();
|
||||
@@ -449,7 +449,7 @@ public:
|
||||
if (axe)
|
||||
{
|
||||
axe->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
axe->setFaction(me->getFaction());
|
||||
axe->SetFaction(me->GetFaction());
|
||||
axes[i] = axe->GetGUID();
|
||||
if (target)
|
||||
{
|
||||
|
||||
@@ -428,7 +428,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;
|
||||
@@ -446,7 +446,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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1382,7 +1382,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(uint32 diff)
|
||||
{
|
||||
Talk(SAY_JULIANNE_AGGRO);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->setFaction(16);
|
||||
me->SetFaction(16);
|
||||
AggroYellTimer = 0;
|
||||
} else AggroYellTimer -= diff;
|
||||
}
|
||||
@@ -1410,7 +1410,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;
|
||||
|
||||
@@ -454,7 +454,7 @@ public:
|
||||
Initialize();
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
|
||||
DoCast(me, SPELL_FLAMESTRIKE2, true);
|
||||
}
|
||||
@@ -659,7 +659,7 @@ public:
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisableGravity(true);
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
DoCast(me, SPELL_ARCANE_SPHERE_PASSIVE, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
events.Reset();
|
||||
me->setFaction(7);
|
||||
me->SetFaction(7);
|
||||
me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
me->LoadEquipment(0, true);
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
wait_timer -= diff;
|
||||
else
|
||||
{
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
phase = PHASE_ATTACKING;
|
||||
|
||||
@@ -594,7 +594,7 @@ public:
|
||||
{
|
||||
if (m_uiDuelTimer <= uiDiff)
|
||||
{
|
||||
me->setFaction(FACTION_HOSTILE);
|
||||
me->SetFaction(FACTION_HOSTILE);
|
||||
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, m_uiDuelerGUID))
|
||||
AttackStart(unit);
|
||||
@@ -780,7 +780,7 @@ public:
|
||||
{
|
||||
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_STOLEN_HORSE);
|
||||
caster->RemoveNpcFlag(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);
|
||||
@@ -872,7 +872,7 @@ public:
|
||||
{
|
||||
deathcharger->AddNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
deathcharger->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
deathcharger->setFaction(2096);
|
||||
deathcharger->SetFaction(2096);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -87,7 +87,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);
|
||||
|
||||
@@ -653,7 +653,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;
|
||||
}
|
||||
@@ -671,7 +671,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;
|
||||
}
|
||||
@@ -689,7 +689,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;
|
||||
}
|
||||
@@ -707,7 +707,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;
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ public:
|
||||
temp->SetEmoteState(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();
|
||||
|
||||
@@ -1010,7 +1010,7 @@ public:
|
||||
temp->SetEmoteState(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();
|
||||
}
|
||||
@@ -1402,7 +1402,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->SetVirtualItem(0, uint32(EQUIP_UNEQUIP));
|
||||
temp->AI()->Talk(SAY_LIGHT_OF_DAWN25);
|
||||
uiTirionGUID = temp->GetGUID();
|
||||
@@ -1440,7 +1440,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]);
|
||||
}
|
||||
@@ -1451,7 +1451,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]);
|
||||
}
|
||||
@@ -1462,7 +1462,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]);
|
||||
}
|
||||
@@ -1474,7 +1474,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);
|
||||
@@ -1489,7 +1489,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);
|
||||
@@ -1539,7 +1539,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();
|
||||
}
|
||||
}
|
||||
@@ -1549,7 +1549,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();
|
||||
}
|
||||
}
|
||||
@@ -1559,7 +1559,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();
|
||||
}
|
||||
}
|
||||
@@ -1569,7 +1569,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();
|
||||
}
|
||||
}
|
||||
@@ -1581,7 +1581,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();
|
||||
}
|
||||
@@ -1592,7 +1592,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();
|
||||
}
|
||||
@@ -1601,7 +1601,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();
|
||||
}
|
||||
@@ -1609,7 +1609,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();
|
||||
}
|
||||
@@ -1617,7 +1617,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();
|
||||
}
|
||||
@@ -1625,7 +1625,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();
|
||||
}
|
||||
|
||||
@@ -118,7 +118,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);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ class boss_apothecary_hummel : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_HUMMEL_SAY_0, Milliseconds(1));
|
||||
|
||||
me->AddUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->setFaction(FACTION_APOTHECARY_HOSTILE);
|
||||
me->SetFaction(FACTION_APOTHECARY_HOSTILE);
|
||||
DummyEntryCheckPredicate pred;
|
||||
summons.DoAction(ACTION_START_EVENT, pred);
|
||||
}
|
||||
@@ -290,7 +290,7 @@ struct npc_apothecary_genericAI : public ScriptedAI
|
||||
if (action == ACTION_START_EVENT)
|
||||
{
|
||||
me->AddUnitFlag(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)
|
||||
|
||||
@@ -159,7 +159,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->RemoveUnitFlag(UnitFlags(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE));
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
switch (TalkSequence)
|
||||
{
|
||||
case 1:
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
TalkTimer = 1000;
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -610,7 +610,7 @@ public:
|
||||
else
|
||||
summoned->SetLevel(me->getLevel());
|
||||
|
||||
summoned->setFaction(me->getFaction());
|
||||
summoned->SetFaction(me->GetFaction());
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
@@ -936,7 +936,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->setFaction(me->getFaction());
|
||||
summoned->SetFaction(me->GetFaction());
|
||||
summoned->SetLevel(me->getLevel());
|
||||
}
|
||||
|
||||
@@ -1036,7 +1036,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->setFaction(me->getFaction());
|
||||
summoned->SetFaction(me->GetFaction());
|
||||
summoned->SetLevel(me->getLevel());
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class boss_archaedas : public CreatureScript
|
||||
Initialize();
|
||||
|
||||
instance->SetData(0, 5); // respawn any dead minions
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->AddAura(SPELL_FREEZE_ANIM, me);
|
||||
@@ -114,14 +114,14 @@ class boss_archaedas : public CreatureScript
|
||||
minion->CastSpell(minion, SPELL_ARCHAEDAS_AWAKEN, true);
|
||||
minion->RemoveUnitFlag(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->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
}
|
||||
@@ -261,7 +261,7 @@ class npc_archaedas_minions : public CreatureScript
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->RemoveAllAuras();
|
||||
@@ -270,7 +270,7 @@ class npc_archaedas_minions : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
me->setFaction (14);
|
||||
me->SetFaction(14);
|
||||
me->RemoveAllAuras();
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
@@ -350,7 +350,7 @@ class npc_stonekeepers : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->RemoveAllAuras();
|
||||
@@ -359,7 +359,7 @@ class npc_stonekeepers : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
void SetFrozenState(Creature* creature)
|
||||
{
|
||||
creature->setFaction(35);
|
||||
creature->SetFaction(35);
|
||||
creature->RemoveAllAuras();
|
||||
creature->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->SetControlled(true, UNIT_STATE_ROOT);
|
||||
@@ -184,7 +184,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!target || !target->IsAlive())
|
||||
continue;
|
||||
target->SetControlled(false, UNIT_STATE_ROOT);
|
||||
target->setFaction(14);
|
||||
target->SetFaction(14);
|
||||
target->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
target->RemoveAura(SPELL_MINION_FREEZE_ANIM);
|
||||
|
||||
@@ -205,11 +205,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->RemoveUnitFlag(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);
|
||||
@@ -225,7 +225,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();
|
||||
}
|
||||
@@ -234,7 +234,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();
|
||||
}
|
||||
@@ -243,7 +243,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();
|
||||
}
|
||||
@@ -269,7 +269,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!ironaya)
|
||||
return;
|
||||
|
||||
ironaya->setFaction(415);
|
||||
ironaya->SetFaction(415);
|
||||
ironaya->SetControlled(false, UNIT_STATE_ROOT);
|
||||
ironaya->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
if (Creature* chainedSpirit = ObjectAccessor::GetCreature(*me, *itr))
|
||||
if (chainedSpirit->GetEntry() == NPC_CHAINED_SPIRIT && chainedSpirit->AI())
|
||||
chainedSpirit->setFaction(FACTION_NONE);
|
||||
chainedSpirit->SetFaction(FACTION_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,7 +113,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,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());
|
||||
|
||||
@@ -79,7 +79,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);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
me->SetEmoteState(EMOTE_STATE_STUN);
|
||||
me->CombatStop(); // stop combat
|
||||
me->DeleteThreatList(); // unsure of this
|
||||
me->setFaction(FACTION_HORDE_GENERIC); // horde generic
|
||||
me->SetFaction(FACTION_HORDE_GENERIC); // horde generic
|
||||
|
||||
bReset = true;
|
||||
Reset_Timer = 60000;
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
{
|
||||
EnterEvadeMode();
|
||||
bReset = false;
|
||||
me->setFaction(FACTION_TROLL_BLOODSCALP); // troll, bloodscalp
|
||||
me->SetFaction(FACTION_TROLL_BLOODSCALP); // troll, bloodscalp
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
if (me->HasStealthAura())
|
||||
me->RemoveAurasByType(SPELL_AURA_MOD_STEALTH);
|
||||
SetRun();
|
||||
me->setFaction(FACTION_ENEMY);
|
||||
me->SetFaction(FACTION_ENEMY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -917,7 +917,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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -995,7 +995,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)->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +470,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);
|
||||
}
|
||||
|
||||
@@ -297,7 +297,7 @@ class npc_blazing_monstrosity : public CreatureScript
|
||||
|
||||
// Our passenger is another vehicle (boardable by players)
|
||||
DoCast(passenger, SPELL_SHARE_HEALTH, true);
|
||||
passenger->setFaction(35);
|
||||
passenger->SetFaction(35);
|
||||
passenger->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
// Hack to relocate vehicle on vehicle so exiting players are not moved under map
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
if (Invisible && InvisibleTimer <= diff)
|
||||
{
|
||||
//Become visible again
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
me->RemoveUnitFlag(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->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
// Invisible Model
|
||||
me->SetDisplayId(11686);
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
eventInProgress = true;
|
||||
Talk(SAY_QUEST_ACCEPTED);
|
||||
me->RemoveNpcFlag(UNIT_NPC_FLAG_QUESTGIVER);
|
||||
me->setFaction(FACTION_ESCORT);
|
||||
me->SetFaction(FACTION_ESCORT);
|
||||
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
{
|
||||
Start(true, false, player->GetGUID());
|
||||
Talk(SAY_READY, player);
|
||||
me->setFaction(113);
|
||||
me->SetFaction(113);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
//Cast
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SUBMERGE);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
DoCast(me, SPELL_DIRTMOUND_PASSIVE);
|
||||
|
||||
Submerged = true;
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
if (Submerged && Back_Timer <= diff)
|
||||
{
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
|
||||
DoCastVictim(SPELL_GROUND_RUPTURE);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
creature->AI()->Talk(SAY_MAKE_PREPARATIONS);
|
||||
|
||||
creature->setFaction(250);
|
||||
creature->SetFaction(250);
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
ENSURE_AI(npc_escortAI, (creature->AI()))->Start(false, false, player->GetGUID());
|
||||
|
||||
@@ -74,7 +74,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->setFaction(FACTION_FRIENDLY);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -154,7 +154,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);
|
||||
|
||||
@@ -199,7 +199,7 @@ public:
|
||||
{
|
||||
if (Creature* crew = ObjectAccessor::GetCreature(*me, instance->GetGuidData(entry)))
|
||||
if (crew->IsAlive())
|
||||
crew->setFaction(FACTION_HOSTILE);
|
||||
crew->SetFaction(FACTION_HOSTILE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -238,7 +238,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);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -387,7 +387,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);
|
||||
@@ -454,7 +454,7 @@ public:
|
||||
if (!pZumrah)
|
||||
return false;
|
||||
|
||||
pZumrah->setFaction(ZUMRAH_HOSTILE_FACTION);
|
||||
pZumrah->SetFaction(ZUMRAH_HOSTILE_FACTION);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
npc_engineer_spark_overgrindAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
NormFaction = creature->getFaction();
|
||||
NormFaction = creature->GetFaction();
|
||||
NpcFlags = NPCFlags(creature->m_unitData->NpcFlags[0]);
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
me->setFaction(NormFaction);
|
||||
me->SetFaction(NormFaction);
|
||||
me->SetNpcFlags(NpcFlags);
|
||||
}
|
||||
|
||||
@@ -232,7 +232,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);
|
||||
}
|
||||
|
||||
@@ -403,7 +403,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:
|
||||
|
||||
@@ -105,7 +105,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;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
{
|
||||
me->CastSpell(me, SPELL_INFECTED_WOULD);
|
||||
me->SetEntry(NPC_CORRUPTED_LASHER);
|
||||
me->setFaction(FACTION_HOSTILE);
|
||||
me->SetFaction(FACTION_HOSTILE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -980,7 +980,7 @@ public:
|
||||
Merithra->SetNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
Merithra->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
Merithra->SetDisplayId(MERITHRA_NIGHT_ELF_FORM);
|
||||
Merithra->setFaction(35);
|
||||
Merithra->SetFaction(35);
|
||||
}
|
||||
|
||||
if (Caelestrasz)
|
||||
@@ -988,7 +988,7 @@ public:
|
||||
Caelestrasz->SetNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
Caelestrasz->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
Caelestrasz->SetDisplayId(CAELESTRASZ_NIGHT_ELF_FORM);
|
||||
Caelestrasz->setFaction(35);
|
||||
Caelestrasz->SetFaction(35);
|
||||
}
|
||||
|
||||
if (Arygos)
|
||||
@@ -996,7 +996,7 @@ public:
|
||||
Arygos->SetNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||
Arygos->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
Arygos->SetDisplayId(ARYGOS_GNOME_FORM);
|
||||
Arygos->setFaction(35);
|
||||
Arygos->SetFaction(35);
|
||||
}
|
||||
|
||||
if (Anachronos)
|
||||
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
}
|
||||
|
||||
void SendItem(Unit* receiver)
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
{
|
||||
if (SwitchFactionTimer <= diff)
|
||||
{
|
||||
me->setFaction(91);
|
||||
me->SetFaction(91);
|
||||
isFriendly = false;
|
||||
} else SwitchFactionTimer -= diff;
|
||||
}
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
{
|
||||
if (quest->GetQuestId() == Q_OOX17)
|
||||
{
|
||||
creature->setFaction(113);
|
||||
creature->SetFaction(113);
|
||||
creature->SetFullHealth();
|
||||
creature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_IMMUNE_TO_PC);
|
||||
|
||||
@@ -101,7 +101,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);
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
npc_taskmaster_fizzuleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
factionNorm = creature->getFaction();
|
||||
factionNorm = creature->GetFaction();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->setFaction(factionNorm);
|
||||
me->SetFaction(factionNorm);
|
||||
}
|
||||
|
||||
void DoFriend()
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
me->setFaction(FACTION_FRIENDLY_F);
|
||||
me->SetFaction(FACTION_FRIENDLY_F);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
if (FlareCount >= 2)
|
||||
{
|
||||
if (me->getFaction() == FACTION_FRIENDLY_F)
|
||||
if (me->GetFaction() == FACTION_FRIENDLY_F)
|
||||
return;
|
||||
|
||||
DoFriend();
|
||||
@@ -419,7 +419,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->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
creature->setFaction(14);
|
||||
creature->SetFaction(14);
|
||||
creature->AI()->AttackStart(warrior);
|
||||
++Wave;
|
||||
WaveTimer = 20000;
|
||||
@@ -492,7 +492,7 @@ public:
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
creature->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
creature->setFaction(14);
|
||||
creature->SetFaction(14);
|
||||
creature->AI()->AttackStart(warrior);
|
||||
}
|
||||
}
|
||||
@@ -653,7 +653,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());
|
||||
|
||||
@@ -299,7 +299,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);
|
||||
|
||||
+2
-2
@@ -195,7 +195,7 @@ public:
|
||||
{
|
||||
damage = 0;
|
||||
EnterEvadeMode();
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
bDone = true;
|
||||
}
|
||||
}
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
{
|
||||
damage = 0;
|
||||
EnterEvadeMode();
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
bDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -226,7 +226,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);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -922,7 +922,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);
|
||||
@@ -2030,7 +2030,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);
|
||||
|
||||
@@ -463,7 +463,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
{
|
||||
case EVENT_INTRO_ALLIANCE_2:
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(FACTION_SCOURGE);
|
||||
me->SetFaction(FACTION_SCOURGE);
|
||||
Talk(SAY_INTRO_ALLIANCE_2);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_3:
|
||||
@@ -476,7 +476,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_2:
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(FACTION_SCOURGE);
|
||||
me->SetFaction(FACTION_SCOURGE);
|
||||
Talk(SAY_INTRO_HORDE_2);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_4:
|
||||
|
||||
@@ -359,7 +359,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);
|
||||
|
||||
@@ -1214,7 +1214,7 @@ public:
|
||||
me->SetCanFly(false);
|
||||
}
|
||||
|
||||
me->setFaction(FACTION_FRIENDLY);
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
me->RemoveAllAuras();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,31 +61,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;
|
||||
|
||||
@@ -538,7 +538,7 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
damage = 0;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
me->AddUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCast(me, SPELL_SELF_STUN);
|
||||
events.Reset();
|
||||
|
||||
@@ -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->SetUnitFlags(UnitFlags(0)); // unselectable
|
||||
turret->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,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);
|
||||
}
|
||||
|
||||
@@ -610,7 +610,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);
|
||||
|
||||
@@ -408,7 +408,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();
|
||||
|
||||
@@ -180,7 +180,7 @@ class boss_ignis : public CreatureScript
|
||||
{
|
||||
if (summon->GetEntry() == NPC_IRON_CONSTRUCT)
|
||||
{
|
||||
summon->setFaction(16);
|
||||
summon->SetFaction(16);
|
||||
summon->SetReactState(REACT_AGGRESSIVE);
|
||||
summon->RemoveUnitFlag(UnitFlags(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);
|
||||
|
||||
@@ -637,7 +637,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:
|
||||
|
||||
@@ -774,7 +774,7 @@ class boss_sara : public CreatureScript
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
_events.Reset();
|
||||
_events.SetPhase(PHASE_ONE);
|
||||
}
|
||||
@@ -817,7 +817,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)))
|
||||
|
||||
@@ -668,11 +668,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;
|
||||
}
|
||||
|
||||
@@ -710,7 +710,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->AddUnitFlag(UnitFlags(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC));
|
||||
owner->DespawnOrUnsummon(3 * MINUTE*IN_MILLISECONDS);
|
||||
}
|
||||
@@ -891,7 +891,7 @@ public:
|
||||
if (talbot)
|
||||
{
|
||||
talbot->UpdateEntry(NPC_PRINCE_VALANAR);
|
||||
talbot->setFaction(14);
|
||||
talbot->SetFaction(14);
|
||||
talbot->AddUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
talbot->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
@@ -1629,10 +1629,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);
|
||||
@@ -2217,7 +2217,7 @@ public:
|
||||
|
||||
void AttackPlayer()
|
||||
{
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID))
|
||||
AttackStart(player);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,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;
|
||||
@@ -136,7 +136,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);
|
||||
}
|
||||
|
||||
@@ -164,7 +164,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;
|
||||
|
||||
@@ -47,7 +47,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()
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
me->setFaction(14);
|
||||
me->SetFaction(14);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* pDoneBy, uint32& uiDamage) override
|
||||
@@ -78,7 +78,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();
|
||||
|
||||
@@ -326,7 +326,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);
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
if (menuId == GOSSIP_ID && gossipListId == GOSSIP_OPTION_ID)
|
||||
{
|
||||
CloseGossipMenuFor(player);
|
||||
me->setFaction(113);
|
||||
me->SetFaction(113);
|
||||
Start(true, true, player->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,8 +345,8 @@ class go_wg_vehicle_teleporter : public GameObjectScript
|
||||
|
||||
bool IsFriendly(Unit* passenger)
|
||||
{
|
||||
return ((go->GetFaction() == WintergraspFaction[TEAM_HORDE] && passenger->getFaction() == HORDE) ||
|
||||
(go->GetFaction() == 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)
|
||||
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->setFaction(35);
|
||||
me->SetFaction(35);
|
||||
DoCast(me, SPELL_KNEEL, true); // Little Hack for kneel - Thanks Illy :P
|
||||
}
|
||||
|
||||
@@ -151,7 +151,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);
|
||||
|
||||
@@ -228,7 +228,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))
|
||||
{
|
||||
|
||||
+1
-1
@@ -96,7 +96,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);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user