mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Travis fixes (#9)
* updating code for travis-based compile * Adding files for travis * quick fix to config file * updating README * Update AuctionHouseBot.cpp Co-authored-by: Stoabrogga <38475780+Stoabrogga@users.noreply.github.com>
This commit is contained in:
@@ -375,15 +375,10 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config)
|
||||
uint64 bidPrice = 0;
|
||||
uint32 stackCount = 1;
|
||||
|
||||
switch (SellMethod)
|
||||
{
|
||||
case 0:
|
||||
buyoutPrice = prototype->SellPrice;
|
||||
break;
|
||||
case 1:
|
||||
buyoutPrice = prototype->BuyPrice;
|
||||
break;
|
||||
}
|
||||
if (SellMethod)
|
||||
buyoutPrice = prototype->BuyPrice;
|
||||
else
|
||||
buyoutPrice = prototype->SellPrice;
|
||||
|
||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||
{
|
||||
@@ -571,39 +566,34 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
|
||||
long double bidMax = 0;
|
||||
|
||||
// check that bid has acceptable value and take bid based on vendorprice, stacksize and quality
|
||||
switch (BuyMethod)
|
||||
if (BuyMethod)
|
||||
{
|
||||
case 0:
|
||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||
{
|
||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||
{
|
||||
if (currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality))
|
||||
bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
// quality is something it shouldn't be, let's get out of here
|
||||
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
if (currentprice < prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality))
|
||||
bidMax = prototype->SellPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality);
|
||||
}
|
||||
case 1:
|
||||
else
|
||||
{
|
||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||
{
|
||||
if (currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality))
|
||||
bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
// quality is something it shouldn't be, let's get out of here
|
||||
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
|
||||
// quality is something it shouldn't be, let's get out of here
|
||||
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||
{
|
||||
if (currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality))
|
||||
bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality);
|
||||
}
|
||||
else
|
||||
{
|
||||
// quality is something it shouldn't be, let's get out of here
|
||||
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// check some special items, and do recalculating to their prices
|
||||
switch (prototype->Class)
|
||||
@@ -866,16 +856,15 @@ void AuctionHouseBot::Initialize()
|
||||
break;
|
||||
}
|
||||
|
||||
switch (SellMethod)
|
||||
if (SellMethod)
|
||||
{
|
||||
case 0:
|
||||
if (itr->second.SellPrice == 0)
|
||||
continue;
|
||||
break;
|
||||
case 1:
|
||||
if (itr->second.BuyPrice == 0)
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (itr->second.SellPrice == 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itr->second.Quality > 6)
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot->Commands(0, ahMapID, NULL, NULL);
|
||||
auctionbot->Commands(0, ahMapID, 0, NULL);
|
||||
}
|
||||
else if (strncmp(opt, "minitems", l) == 0)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot->Commands(1, ahMapID, NULL, param1);
|
||||
auctionbot->Commands(1, ahMapID, 0, param1);
|
||||
}
|
||||
else if (strncmp(opt, "maxitems", l) == 0)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot->Commands(2, ahMapID, NULL, param1);
|
||||
auctionbot->Commands(2, ahMapID, 0, param1);
|
||||
}
|
||||
else if (strncmp(opt, "mintime", l) == 0)
|
||||
{
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot.Commands(3, ahMapID, NULL, param1);
|
||||
auctionbot.Commands(3, ahMapID, 0, param1);
|
||||
*/
|
||||
}
|
||||
else if (strncmp(opt, "maxtime", l) == 0)
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot.Commands(4, ahMapID, NULL, param1);
|
||||
auctionbot.Commands(4, ahMapID, 0, param1);
|
||||
*/
|
||||
}
|
||||
else if (strncmp(opt, "percentages", l) == 0)
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
strcat(param, param13);
|
||||
strcat(param, " ");
|
||||
strcat(param, param14);
|
||||
auctionbot->Commands(5, ahMapID, NULL, param);
|
||||
auctionbot->Commands(5, ahMapID, 0, param);
|
||||
}
|
||||
else if (strncmp(opt, "minprice", l) == 0)
|
||||
{
|
||||
@@ -451,7 +451,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot->Commands(12, ahMapID, NULL, param1);
|
||||
auctionbot->Commands(12, ahMapID, 0, param1);
|
||||
}
|
||||
else if (strncmp(opt, "bidsperinterval", l) == 0)
|
||||
{
|
||||
@@ -463,7 +463,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
auctionbot->Commands(13, ahMapID, NULL, param1);
|
||||
auctionbot->Commands(13, ahMapID, 0, param1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user