mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 04:37:02 +00:00
Apply style fix pt3
This commit is contained in:
parent
1392c131e7
commit
d93dbd95fe
191 changed files with 9851 additions and 676 deletions
|
|
@ -148,9 +148,13 @@ class AHB_Seller_Config
|
|||
return 1;
|
||||
}
|
||||
else if ((m_maxTime) && (m_minTime > m_maxTime))
|
||||
{ return m_maxTime; }
|
||||
{
|
||||
return m_maxTime;
|
||||
}
|
||||
else
|
||||
{ return m_minTime; }
|
||||
{
|
||||
return m_minTime;
|
||||
}
|
||||
}
|
||||
|
||||
void SetMaxTime(uint32 value) { m_maxTime = value; }
|
||||
|
|
@ -167,7 +171,9 @@ class AHB_Seller_Config
|
|||
m_ItemInfo[quality].ItemClassInfos[itemclass].MissItems = m_ItemInfo[quality].ItemClassInfos[itemclass].AmountOfItems - found;
|
||||
}
|
||||
else
|
||||
{ m_ItemInfo[quality].ItemClassInfos[itemclass].MissItems = 0; }
|
||||
{
|
||||
m_ItemInfo[quality].ItemClassInfos[itemclass].MissItems = 0;
|
||||
}
|
||||
}
|
||||
uint32 GetMissedItemsPerClass(AuctionQuality quality, ItemClass itemclass) const { return m_ItemInfo[quality].ItemClassInfos[itemclass].MissItems; }
|
||||
|
||||
|
|
@ -408,7 +414,9 @@ bool AuctionBotConfig::Initialize()
|
|||
return false;
|
||||
}
|
||||
else
|
||||
{ sLog.outString("AHBot using configuration file %s", m_configFileName.c_str()); }
|
||||
{
|
||||
sLog.outString("AHBot using configuration file %s", m_configFileName.c_str());
|
||||
}
|
||||
|
||||
GetConfigFromFile();
|
||||
|
||||
|
|
@ -747,14 +755,18 @@ uint32 AuctionBotBuyer::GetBuyableEntry(AHB_Buyer_Config& config)
|
|||
buyerItem.MinBuyPrice = Aentry->buyout / item->GetCount();
|
||||
}
|
||||
else if (buyerItem.MinBuyPrice == 0)
|
||||
{ buyerItem.MinBuyPrice = Aentry->buyout / item->GetCount(); }
|
||||
{
|
||||
buyerItem.MinBuyPrice = Aentry->buyout / item->GetCount();
|
||||
}
|
||||
}
|
||||
if (Aentry->startbid / item->GetCount() < buyerItem.MinBidPrice)
|
||||
{
|
||||
buyerItem.MinBidPrice = Aentry->startbid / item->GetCount();
|
||||
}
|
||||
else if (buyerItem.MinBidPrice == 0)
|
||||
{ buyerItem.MinBidPrice = Aentry->startbid / item->GetCount(); }
|
||||
{
|
||||
buyerItem.MinBidPrice = Aentry->startbid / item->GetCount();
|
||||
}
|
||||
|
||||
if (Aentry->owner == sAuctionBotConfig.GetAHBotId())
|
||||
{
|
||||
|
|
@ -803,7 +815,9 @@ void AuctionBotBuyer::PrepareListOfEntry(AHB_Buyer_Config& config)
|
|||
config.CheckedEntry.erase(itr++);
|
||||
}
|
||||
else
|
||||
{ ++itr; }
|
||||
{
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: CheckedEntry size = " SIZEFMTD, config.CheckedEntry.size());
|
||||
|
|
@ -858,7 +872,9 @@ bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice,
|
|||
}
|
||||
}
|
||||
else if (buyoutPrice <= MaxBuyablePrice)
|
||||
{ Chance = MaxChance / 10; }
|
||||
{
|
||||
Chance = MaxChance / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((buyoutPrice > 0) && (MaxBuyablePrice > 0))
|
||||
|
|
@ -909,12 +925,16 @@ bool AuctionBotBuyer::IsBidableEntry(uint64 bidPrice, double InGame_BuyPrice, do
|
|||
Chance = ((MaxChance / 500) * ratio);
|
||||
}
|
||||
else
|
||||
{ Chance = (MaxChance / 500); }
|
||||
{
|
||||
Chance = (MaxChance / 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (bidPrice < (InGame_BuyPrice - (InGame_BuyPrice / 30)))
|
||||
{ Chance = (MaxChance / 10); }
|
||||
{
|
||||
Chance = (MaxChance / 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (bidPrice < MaxBidablePrice)
|
||||
|
|
@ -925,7 +945,9 @@ bool AuctionBotBuyer::IsBidableEntry(uint64 bidPrice, double InGame_BuyPrice, do
|
|||
Chance = ((MaxChance / 1000) * ratio);
|
||||
}
|
||||
else
|
||||
{ Chance = (MaxChance / 1000); }
|
||||
{
|
||||
Chance = (MaxChance / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
uint32 RandNum = urand(1, ChanceRatio);
|
||||
|
|
@ -967,7 +989,9 @@ void AuctionBotBuyer::addNewAuctionBuyerBotBid(AHB_Buyer_Config& config)
|
|||
BASIC_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: Boost value used for Buyer! (if this happens often adjust both ItemsPerCycle in ahbot.conf)");
|
||||
}
|
||||
else
|
||||
{ BuyCycles = sAuctionBotConfig.GetItemPerCycleNormal(); }
|
||||
{
|
||||
BuyCycles = sAuctionBotConfig.GetItemPerCycleNormal();
|
||||
}
|
||||
|
||||
for (CheckEntryMap::iterator itr = config.CheckedEntry.begin(); itr != config.CheckedEntry.end();)
|
||||
{
|
||||
|
|
@ -1077,7 +1101,9 @@ void AuctionBotBuyer::addNewAuctionBuyerBotBid(AHB_Buyer_Config& config)
|
|||
BuyEntry(auction);
|
||||
}
|
||||
else
|
||||
{ BuyEntry(auction); }
|
||||
{
|
||||
BuyEntry(auction);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1981,7 +2007,9 @@ void AuctionBotSeller::addNewAuctions(AHB_Seller_Config& config)
|
|||
buyoutPrice = prototype->BuyPrice * item->GetCount();
|
||||
}
|
||||
else
|
||||
{ buyoutPrice = prototype->SellPrice * item->GetCount(); }
|
||||
{
|
||||
buyoutPrice = prototype->SellPrice * item->GetCount();
|
||||
}
|
||||
// Price of items are set here
|
||||
SetPricesOfItem(prototype, config, buyoutPrice, bidPrice, stackCount, ItemQualities(prototype->Quality));
|
||||
|
||||
|
|
@ -2001,7 +2029,9 @@ bool AuctionBotSeller::Update(AuctionHouseType houseType)
|
|||
return true;
|
||||
}
|
||||
else
|
||||
{ return false; }
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//== AuctionHouseBot functions =============================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue