mirror of
https://github.com/mangosfour/server.git
synced 2025-12-24 19:37:07 +00:00
Project tidy up and sync
This commit is contained in:
parent
49fe617b55
commit
5531a0087d
44 changed files with 484 additions and 427 deletions
|
|
@ -789,7 +789,6 @@ void AuctionBotBuyer::PrepareListOfEntry(AHB_Buyer_Config& config)
|
|||
|
||||
bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice, double MaxBuyablePrice, uint64 MinBuyPrice, uint32 MaxChance, uint32 ChanceRatio)
|
||||
{
|
||||
double ratio = 0;
|
||||
uint32 Chance = 0;
|
||||
|
||||
if (buyoutPrice <= MinBuyPrice)
|
||||
|
|
@ -800,7 +799,7 @@ bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice,
|
|||
{
|
||||
if ((buyoutPrice > 0) && (MaxBuyablePrice > 0))
|
||||
{
|
||||
ratio = buyoutPrice / MaxBuyablePrice;
|
||||
double ratio = buyoutPrice / MaxBuyablePrice;
|
||||
if (ratio < 10)
|
||||
{ Chance = MaxChance - (ratio * (MaxChance / 10)); }
|
||||
else { Chance = 1; }
|
||||
|
|
@ -815,7 +814,7 @@ bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice,
|
|||
{
|
||||
if ((buyoutPrice > 0) && (MaxBuyablePrice > 0))
|
||||
{
|
||||
ratio = buyoutPrice / MaxBuyablePrice;
|
||||
double ratio = buyoutPrice / MaxBuyablePrice;
|
||||
if (ratio < 10)
|
||||
{ Chance = (MaxChance / 5) - (ratio * (MaxChance / 50)); }
|
||||
else { Chance = 1; }
|
||||
|
|
@ -828,7 +827,7 @@ bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice,
|
|||
{
|
||||
if ((buyoutPrice > 0) && (MaxBuyablePrice > 0))
|
||||
{
|
||||
ratio = buyoutPrice / MaxBuyablePrice;
|
||||
double ratio = buyoutPrice / MaxBuyablePrice;
|
||||
if (ratio < 10)
|
||||
{ Chance = (MaxChance / 5) - (ratio * (MaxChance / 50)); }
|
||||
else { Chance = 0; }
|
||||
|
|
@ -841,11 +840,9 @@ bool AuctionBotBuyer::IsBuyableEntry(uint64 buyoutPrice, double InGame_BuyPrice,
|
|||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot: WIN BUY! Chance = %u, num = %u.", Chance, RandNum);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot:LOOSE BUY! Chance = %u, num = %u.", Chance, RandNum);
|
||||
return false;
|
||||
}
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AHBOT_BUYER, "AHBot:LOOSE BUY! Chance = %u, num = %u.", Chance, RandNum);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AuctionBotBuyer::IsBidableEntry(uint64 bidPrice, double InGame_BuyPrice, double MaxBidablePrice, uint64 MinBidPrice, uint32 MaxChance, uint32 ChanceRatio)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue