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:
Rob
2019-12-20 20:22:43 -07:00
committed by WiZZy
parent 73fb4f6d2c
commit f7ff6fea29
7 changed files with 140 additions and 50 deletions

76
.travis.yml Normal file
View 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

View File

@@ -1,3 +1,5 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
- Latest build status with azerothcore: [![Build Status](https://travis-ci.org/azerothcore/mod-ah-bot.svg?branch=master)](https://travis-ci.org/azerothcore/mod-ah-bot)
# Mod-AHBOT

9
conf/conf.sh.dist Normal file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
#
# CUSTOM
#
DB_WORLD_CUSTOM_PATHS+=(
$MOD_AH_BOT_ROOT"/sql/world/"
)

View File

@@ -183,6 +183,10 @@ AuctionHouseBot.DisableDruidItems = 0
###############################################################################
# AUCTION HOUSE BOT FILTERS PART 3
#
# AuctionHouseBot.DisabledItems
# Prevent Seller from listing specific item(s)
# Default "" (none)
#
# AuctionHouseBot.DisableItemsBelowLevel
# Prevent Seller from listing Items below this Level
# Default 0 (Off)
@@ -249,6 +253,7 @@ AuctionHouseBot.DisableDruidItems = 0
#
###############################################################################
AuctionHouseBot.DisabledItems = ""
AuctionHouseBot.DisableItemsBelowLevel = 0
AuctionHouseBot.DisableItemsAboveLevel = 0
AuctionHouseBot.DisableTGsBelowLevel = 0

View File

@@ -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

View File

@@ -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:
if (SellMethod)
buyoutPrice = prototype->BuyPrice;
break;
}
else
buyoutPrice = prototype->SellPrice;
if (prototype->Quality <= AHB_MAX_QUALITY)
{
@@ -571,9 +566,7 @@ 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)
{
case 0:
if (BuyMethod)
{
if (prototype->Quality <= AHB_MAX_QUALITY)
{
@@ -586,9 +579,8 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
continue;
}
break;
}
case 1:
else
{
if (prototype->Quality <= AHB_MAX_QUALITY)
{
@@ -601,8 +593,6 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(Player *AHBplayer, AHBConfig *con
if (debug_Out) sLog->outError( "AHBuyer: Quality %u not Supported", prototype->Quality);
continue;
}
break;
}
}
// check some special items, and do recalculating to their prices
@@ -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)

View File

@@ -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
{