refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708)

This commit is contained in:
Malcrom
2021-11-01 13:04:32 -03:00
committed by GitHub
parent 3396a9da87
commit f106de8788
129 changed files with 418 additions and 444 deletions

View File

@@ -62,7 +62,7 @@ void WorldSession::SendAuctionHello(ObjectGuid guid, Creature* unit)
if (!sScriptMgr->CanSendAuctionHello(this, guid, unit))
return;
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->getFaction());
AuctionHouseEntry const* ahEntry = AuctionHouseMgr::GetAuctionHouseEntry(unit->GetFaction());
if (!ahEntry)
return;
@@ -166,7 +166,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->getFaction());
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(creature->GetFaction());
if (!auctionHouseEntry)
{
LOG_DEBUG("network", "WORLD: HandleAuctionSellItem - Unit (%s) has wrong faction.", auctioneer.ToString().c_str());
@@ -253,7 +253,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket& recvData)
Item* item = items[i];
uint32 auctionTime = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, item, finalCount);
if (!_player->HasEnoughMoney(deposit))
@@ -417,7 +417,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Player* player = GetPlayer();
@@ -539,7 +539,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
AuctionEntry* auction = auctionHouse->GetAuction(auctionId);
Player* player = GetPlayer();
@@ -623,7 +623,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket& recvData)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4 + 4 + 4) + 30000); // pussywizard: ensure there is enough memory
Player* player = GetPlayer();
@@ -690,7 +690,7 @@ void WorldSession::HandleAuctionListOwnerItemsEvent(ObjectGuid creatureGuid)
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->getFaction());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(creature->GetFaction());
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4 + 4 + 4) + 60000); // pussywizard: ensure there is enough memory
data << (uint32) 0; // amount place holder

View File

@@ -997,7 +997,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder const& holder)
SendFullReputation({ 942, 935, 936, 1011, 970, 967, 989, 932, 934, 1038, 1077 });
switch (pCurrChar->getFaction())
switch (pCurrChar->GetFaction())
{
case ALLIANCE:
SendFullReputation({ 72, 47, 69, 930, 730, 978, 54, 946 });

View File

@@ -314,7 +314,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
return;
// 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);

View File

@@ -181,7 +181,7 @@ uint8 WorldSession::HandleLoadPetFromDBFirstCallback(PreparedQueryResult result,
pet->SetLoading(true);
pet->Relocate(px, py, pz, owner->GetOrientation());
pet->setPetType(pet_type);
pet->setFaction(owner->getFaction());
pet->SetFaction(owner->GetFaction());
pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, summon_spell_id);
if (pet->IsCritter())