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:
76
.travis.yml
Normal file
76
.travis.yml
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
sudo: required
|
||||||
|
dist: bionic # (18.04)
|
||||||
|
|
||||||
|
language: cpp
|
||||||
|
|
||||||
|
cache: ccache
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
update: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
- mysql
|
||||||
|
|
||||||
|
git:
|
||||||
|
depth: 10
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- prepare_cache
|
||||||
|
- run
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- stage: prepare_cache
|
||||||
|
env: TRAVIS_BUILD_ID="1"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
|
- stage: run
|
||||||
|
env: TRAVIS_BUILD_ID="1"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh ON
|
||||||
|
- source ./apps/ci/ci-import-db.sh
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
- source ./apps/ci/ci-worldserver-dry-run.sh
|
||||||
|
|
||||||
|
- stage: prepare_cache
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh OFF
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
|
|
||||||
|
- stage: run
|
||||||
|
env: TRAVIS_BUILD_ID="2"
|
||||||
|
before_install:
|
||||||
|
- cd ..
|
||||||
|
- git clone --depth=1 --branch=master https://github.com/azerothcore/azerothcore-wotlk.git azerothcore-wotlk
|
||||||
|
- mv "$TRAVIS_BUILD_DIR" azerothcore-wotlk/modules
|
||||||
|
- cd azerothcore-wotlk
|
||||||
|
- source ./apps/ci/ci-before_install.sh
|
||||||
|
install:
|
||||||
|
- source ./apps/ci/ci-install.sh ON
|
||||||
|
script:
|
||||||
|
- source ./apps/ci/ci-compile.sh
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#  AzerothCore
|
||||||
|
- Latest build status with azerothcore: [](https://travis-ci.org/azerothcore/mod-ah-bot)
|
||||||
# Mod-AHBOT
|
# Mod-AHBOT
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
conf/conf.sh.dist
Normal file
9
conf/conf.sh.dist
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# CUSTOM
|
||||||
|
#
|
||||||
|
|
||||||
|
DB_WORLD_CUSTOM_PATHS+=(
|
||||||
|
$MOD_AH_BOT_ROOT"/sql/world/"
|
||||||
|
)
|
||||||
@@ -183,6 +183,10 @@ AuctionHouseBot.DisableDruidItems = 0
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# AUCTION HOUSE BOT FILTERS PART 3
|
# AUCTION HOUSE BOT FILTERS PART 3
|
||||||
#
|
#
|
||||||
|
# AuctionHouseBot.DisabledItems
|
||||||
|
# Prevent Seller from listing specific item(s)
|
||||||
|
# Default "" (none)
|
||||||
|
#
|
||||||
# AuctionHouseBot.DisableItemsBelowLevel
|
# AuctionHouseBot.DisableItemsBelowLevel
|
||||||
# Prevent Seller from listing Items below this Level
|
# Prevent Seller from listing Items below this Level
|
||||||
# Default 0 (Off)
|
# Default 0 (Off)
|
||||||
@@ -249,6 +253,7 @@ AuctionHouseBot.DisableDruidItems = 0
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
AuctionHouseBot.DisabledItems = ""
|
||||||
AuctionHouseBot.DisableItemsBelowLevel = 0
|
AuctionHouseBot.DisableItemsBelowLevel = 0
|
||||||
AuctionHouseBot.DisableItemsAboveLevel = 0
|
AuctionHouseBot.DisableItemsAboveLevel = 0
|
||||||
AuctionHouseBot.DisableTGsBelowLevel = 0
|
AuctionHouseBot.DisableTGsBelowLevel = 0
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
MOD_AH_BOT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/" && pwd )"
|
||||||
|
|
||||||
|
source $MOD_AH_BOT_ROOT"/conf/conf.sh.dist"
|
||||||
|
|
||||||
|
if [ -f $MOD_AH_BOT_ROOT"/conf/conf.sh" ]; then
|
||||||
|
source $MOD_AH_BOT_ROOT"/conf/conf.sh"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -375,15 +375,10 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config)
|
|||||||
uint64 bidPrice = 0;
|
uint64 bidPrice = 0;
|
||||||
uint32 stackCount = 1;
|
uint32 stackCount = 1;
|
||||||
|
|
||||||
switch (SellMethod)
|
if (SellMethod)
|
||||||
{
|
buyoutPrice = prototype->BuyPrice;
|
||||||
case 0:
|
else
|
||||||
buyoutPrice = prototype->SellPrice;
|
buyoutPrice = prototype->SellPrice;
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
buyoutPrice = prototype->BuyPrice;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prototype->Quality <= AHB_MAX_QUALITY)
|
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||||
{
|
{
|
||||||
@@ -571,37 +566,32 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
|
|||||||
long double bidMax = 0;
|
long double bidMax = 0;
|
||||||
|
|
||||||
// check that bid has acceptable value and take bid based on vendorprice, stacksize and quality
|
// 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);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
case 1:
|
else
|
||||||
{
|
{
|
||||||
if (prototype->Quality <= AHB_MAX_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);
|
||||||
if (currentprice < prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality))
|
continue;
|
||||||
bidMax = prototype->BuyPrice * pItem->GetCount() * config->GetBuyerPrice(prototype->Quality);
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// quality is something it shouldn't be, let's get out of here
|
if (prototype->Quality <= AHB_MAX_QUALITY)
|
||||||
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->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;
|
continue;
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -866,16 +856,15 @@ void AuctionHouseBot::Initialize()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (SellMethod)
|
if (SellMethod)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
if (itr->second.SellPrice == 0)
|
|
||||||
continue;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
if (itr->second.BuyPrice == 0)
|
if (itr->second.BuyPrice == 0)
|
||||||
continue;
|
continue;
|
||||||
break;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (itr->second.SellPrice == 0)
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itr->second.Quality > 6)
|
if (itr->second.Quality > 6)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot->Commands(0, ahMapID, NULL, NULL);
|
auctionbot->Commands(0, ahMapID, 0, NULL);
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "minitems", l) == 0)
|
else if (strncmp(opt, "minitems", l) == 0)
|
||||||
{
|
{
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot->Commands(1, ahMapID, NULL, param1);
|
auctionbot->Commands(1, ahMapID, 0, param1);
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "maxitems", l) == 0)
|
else if (strncmp(opt, "maxitems", l) == 0)
|
||||||
{
|
{
|
||||||
@@ -120,7 +120,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot->Commands(2, ahMapID, NULL, param1);
|
auctionbot->Commands(2, ahMapID, 0, param1);
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "mintime", l) == 0)
|
else if (strncmp(opt, "mintime", l) == 0)
|
||||||
{
|
{
|
||||||
@@ -134,7 +134,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot.Commands(3, ahMapID, NULL, param1);
|
auctionbot.Commands(3, ahMapID, 0, param1);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "maxtime", l) == 0)
|
else if (strncmp(opt, "maxtime", l) == 0)
|
||||||
@@ -149,7 +149,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot.Commands(4, ahMapID, NULL, param1);
|
auctionbot.Commands(4, ahMapID, 0, param1);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "percentages", l) == 0)
|
else if (strncmp(opt, "percentages", l) == 0)
|
||||||
@@ -234,7 +234,7 @@ public:
|
|||||||
strcat(param, param13);
|
strcat(param, param13);
|
||||||
strcat(param, " ");
|
strcat(param, " ");
|
||||||
strcat(param, param14);
|
strcat(param, param14);
|
||||||
auctionbot->Commands(5, ahMapID, NULL, param);
|
auctionbot->Commands(5, ahMapID, 0, param);
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "minprice", l) == 0)
|
else if (strncmp(opt, "minprice", l) == 0)
|
||||||
{
|
{
|
||||||
@@ -451,7 +451,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot->Commands(12, ahMapID, NULL, param1);
|
auctionbot->Commands(12, ahMapID, 0, param1);
|
||||||
}
|
}
|
||||||
else if (strncmp(opt, "bidsperinterval", l) == 0)
|
else if (strncmp(opt, "bidsperinterval", l) == 0)
|
||||||
{
|
{
|
||||||
@@ -463,7 +463,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionbot->Commands(13, ahMapID, NULL, param1);
|
auctionbot->Commands(13, ahMapID, 0, param1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user