mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Remove AuctionHouseBot-functionality from core (some cleanups may be required)
--HG-- branch : trunk
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -216,7 +216,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction)
|
||||
uint32 profit = auction->bid + auction->deposit - auctionCut;
|
||||
|
||||
//FIXME: what do if owner offline
|
||||
if (owner && owner->GetGUIDLow() != auctionbot.GetAHBplayerGUID())
|
||||
if (owner)
|
||||
{
|
||||
owner->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_GOLD_EARNED_BY_AUCTIONS, profit);
|
||||
owner->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_SOLD, auction->bid);
|
||||
@@ -245,7 +245,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry * auction)
|
||||
std::ostringstream subject;
|
||||
subject << auction->item_template << ":0:" << AUCTION_EXPIRED << ":0:0";
|
||||
|
||||
if (owner && owner->GetGUIDLow() != auctionbot.GetAHBplayerGUID())
|
||||
if (owner)
|
||||
owner->GetSession()->SendAuctionOwnerNotification(auction);
|
||||
|
||||
MailDraft(subject.str(), "") // TODO: fix body
|
||||
@@ -472,17 +472,16 @@ AuctionHouseEntry const* AuctionHouseMgr::GetAuctionHouseEntry(uint32 factionTem
|
||||
|
||||
return sAuctionHouseStore.LookupEntry(houseid);
|
||||
}
|
||||
void AuctionHouseObject::AddAuction(AuctionEntry *ah)
|
||||
{
|
||||
ASSERT(ah);
|
||||
AuctionsMap[ah->Id] = ah;
|
||||
auctionbot.IncrementItemCounts(ah);
|
||||
}
|
||||
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 item_template)
|
||||
{
|
||||
auctionbot.DecrementItemCounts(auction, item_template);
|
||||
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
|
||||
void AuctionHouseObject::AddAuction(AuctionEntry *ah)
|
||||
{
|
||||
ASSERT(ah);
|
||||
AuctionsMap[ah->Id] = ah;
|
||||
}
|
||||
|
||||
bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 item_template)
|
||||
{
|
||||
bool wasInMap = AuctionsMap.erase(auction->Id) ? true : false;
|
||||
|
||||
// we need to delete the entry, it is not referenced any more
|
||||
delete auction;
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
|
||||
#include "SharedDefines.h"
|
||||
|
||||
#include "AuctionHouseBot.h"
|
||||
|
||||
class Item;
|
||||
class Player;
|
||||
class WorldPacket;
|
||||
|
||||
@@ -700,7 +700,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
|
||||
{ "pet", SEC_GAMEMASTER, false, NULL, "", petCommandTable },
|
||||
{ "loadpath", SEC_ADMINISTRATOR, false, &ChatHandler::HandleReloadAllPaths, "", NULL },
|
||||
{ "ahbotoptions", SEC_GAMEMASTER, true, &ChatHandler::HandleAHBotOptionsCommand, "", NULL },
|
||||
{ "ticket", SEC_MODERATOR, false, NULL, "", ticketCommandTable },
|
||||
|
||||
{ "aura", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAuraCommand, "", NULL },
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include "BattleGroundMgr.h"
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "InstanceData.h"
|
||||
#include "AuctionHouseBot.h"
|
||||
#include "CreatureEventAIMgr.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "DBCEnums.h"
|
||||
@@ -59,494 +58,6 @@
|
||||
#include "DisableMgr.h"
|
||||
#include "Transport.h"
|
||||
|
||||
bool ChatHandler::HandleAHBotOptionsCommand(const char *args)
|
||||
{
|
||||
uint32 ahMapID = 0;
|
||||
char * opt = strtok((char*)args, " ");
|
||||
char * ahMapIdStr = strtok(NULL, " ");
|
||||
if (ahMapIdStr)
|
||||
{
|
||||
ahMapID = (uint32) strtoul(ahMapIdStr, NULL, 0);
|
||||
switch (ahMapID)
|
||||
{
|
||||
case 2:
|
||||
case 6:
|
||||
case 7:
|
||||
break;
|
||||
default:
|
||||
opt = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!opt)
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions $option $ahMapID (2, 6 or 7) $parameter");
|
||||
PSendSysMessage("Try ahbotoptions help to see a list of options.");
|
||||
return false;
|
||||
}
|
||||
int l = strlen(opt);
|
||||
|
||||
if (strncmp(opt,"help",l) == 0)
|
||||
{
|
||||
PSendSysMessage("AHBot commands:");
|
||||
PSendSysMessage("ahexpire");
|
||||
PSendSysMessage("minitems");
|
||||
PSendSysMessage("maxitems");
|
||||
//PSendSysMessage("");
|
||||
//PSendSysMessage("");
|
||||
PSendSysMessage("percentages");
|
||||
PSendSysMessage("minprice");
|
||||
PSendSysMessage("maxprice");
|
||||
PSendSysMessage("minbidprice");
|
||||
PSendSysMessage("maxbidprice");
|
||||
PSendSysMessage("maxstack");
|
||||
PSendSysMessage("buyerprice");
|
||||
PSendSysMessage("bidinterval");
|
||||
PSendSysMessage("bidsperinterval");
|
||||
return true;
|
||||
}
|
||||
else if (strncmp(opt,"ahexpire",l) == 0)
|
||||
{
|
||||
if (!ahMapIdStr)
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions ahexpire $ahMapID (2, 6 or 7)");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(0, ahMapID, NULL, NULL);
|
||||
}
|
||||
else if (strncmp(opt,"minitems",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions minitems $ahMapID (2, 6 or 7) $minItems");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(1, ahMapID, NULL, param1);
|
||||
}
|
||||
else if (strncmp(opt,"maxitems",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxitems $ahMapID (2, 6 or 7) $maxItems");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(2, ahMapID, NULL, param1);
|
||||
}
|
||||
else if (strncmp(opt,"mintime",l) == 0)
|
||||
{
|
||||
PSendSysMessage("ahbotoptions mintime has been deprecated");
|
||||
return false;
|
||||
/*
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions mintime $ahMapID (2, 6 or 7) $mintime");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(3, ahMapID, NULL, param1);
|
||||
*/
|
||||
}
|
||||
else if (strncmp(opt,"maxtime",l) == 0)
|
||||
{
|
||||
PSendSysMessage("ahbotoptions maxtime has been deprecated");
|
||||
return false;
|
||||
/*
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxtime $ahMapID (2, 6 or 7) $maxtime");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(4, ahMapID, NULL, param1);
|
||||
*/
|
||||
}
|
||||
else if (strncmp(opt,"percentages",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
char * param3 = strtok(NULL, " ");
|
||||
char * param4 = strtok(NULL, " ");
|
||||
char * param5 = strtok(NULL, " ");
|
||||
char * param6 = strtok(NULL, " ");
|
||||
char * param7 = strtok(NULL, " ");
|
||||
char * param8 = strtok(NULL, " ");
|
||||
char * param9 = strtok(NULL, " ");
|
||||
char * param10 = strtok(NULL, " ");
|
||||
char * param11 = strtok(NULL, " ");
|
||||
char * param12 = strtok(NULL, " ");
|
||||
char * param13 = strtok(NULL, " ");
|
||||
char * param14 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param14))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions percentages $ahMapID (2, 6 or 7) $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14");
|
||||
PSendSysMessage("1 GreyTradeGoods 2 WhiteTradeGoods 3 GreenTradeGoods 4 BlueTradeGoods 5 PurpleTradeGoods");
|
||||
PSendSysMessage("6 OrangeTradeGoods 7 YellowTradeGoods 8 GreyItems 9 WhiteItems 10 GreenItems 11 BlueItems");
|
||||
PSendSysMessage("12 PurpleItems 13 OrangeItems 14 YellowItems");
|
||||
PSendSysMessage("The total must add up to 100%");
|
||||
return false;
|
||||
}
|
||||
uint32 greytg = (uint32) strtoul(param1, NULL, 0);
|
||||
uint32 whitetg = (uint32) strtoul(param2, NULL, 0);
|
||||
uint32 greentg = (uint32) strtoul(param3, NULL, 0);
|
||||
uint32 bluetg = (uint32) strtoul(param3, NULL, 0);
|
||||
uint32 purpletg = (uint32) strtoul(param5, NULL, 0);
|
||||
uint32 orangetg = (uint32) strtoul(param6, NULL, 0);
|
||||
uint32 yellowtg = (uint32) strtoul(param7, NULL, 0);
|
||||
uint32 greyi = (uint32) strtoul(param8, NULL, 0);
|
||||
uint32 whitei = (uint32) strtoul(param9, NULL, 0);
|
||||
uint32 greeni = (uint32) strtoul(param10, NULL, 0);
|
||||
uint32 bluei = (uint32) strtoul(param11, NULL, 0);
|
||||
uint32 purplei = (uint32) strtoul(param12, NULL, 0);
|
||||
uint32 orangei = (uint32) strtoul(param13, NULL, 0);
|
||||
uint32 yellowi = (uint32) strtoul(param14, NULL, 0);
|
||||
uint32 totalPercent = greytg + whitetg + greentg + bluetg + purpletg + orangetg + yellowtg + greyi + whitei + greeni + bluei + purplei + orangei + yellowi;
|
||||
if ((totalPercent == 0) || (totalPercent != 100))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions percentages $ahMapID (2, 6 or 7) $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14");
|
||||
PSendSysMessage("1 GreyTradeGoods 2 WhiteTradeGoods 3 GreenTradeGoods 4 BlueTradeGoods 5 PurpleTradeGoods");
|
||||
PSendSysMessage("6 OrangeTradeGoods 7 YellowTradeGoods 8 GreyItems 9 WhiteItems 10 GreenItems 11 BlueItems");
|
||||
PSendSysMessage("12 PurpleItems 13 OrangeItems 14 YellowItems");
|
||||
PSendSysMessage("The total must add up to 100%");
|
||||
return false;
|
||||
}
|
||||
char param[100];
|
||||
param[0] = '\0';
|
||||
strcat(param, param1);
|
||||
strcat(param, " ");
|
||||
strcat(param, param2);
|
||||
strcat(param, " ");
|
||||
strcat(param, param3);
|
||||
strcat(param, " ");
|
||||
strcat(param, param4);
|
||||
strcat(param, " ");
|
||||
strcat(param, param5);
|
||||
strcat(param, " ");
|
||||
strcat(param, param6);
|
||||
strcat(param, " ");
|
||||
strcat(param, param7);
|
||||
strcat(param, " ");
|
||||
strcat(param, param8);
|
||||
strcat(param, " ");
|
||||
strcat(param, param9);
|
||||
strcat(param, " ");
|
||||
strcat(param, param10);
|
||||
strcat(param, " ");
|
||||
strcat(param, param11);
|
||||
strcat(param, " ");
|
||||
strcat(param, param12);
|
||||
strcat(param, " ");
|
||||
strcat(param, param13);
|
||||
strcat(param, " ");
|
||||
strcat(param, param14);
|
||||
auctionbot.Commands(5, ahMapID, NULL, param);
|
||||
}
|
||||
else if (strncmp(opt,"minprice",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(6, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions minprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"maxprice",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(7, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"minbidprice",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
uint32 minBidPrice = (uint32) strtoul(param2, NULL, 0);
|
||||
if ((minBidPrice < 1) || (minBidPrice > 100))
|
||||
{
|
||||
PSendSysMessage("The min bid price multiplier must be between 1 and 100");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(8, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions minbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"maxbidprice",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxbidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
uint32 maxBidPrice = (uint32) strtoul(param2, NULL, 0);
|
||||
if ((maxBidPrice < 1) || (maxBidPrice > 100))
|
||||
{
|
||||
PSendSysMessage("The max bid price multiplier must be between 1 and 100");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(9, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions max bidprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $price");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"maxstack",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $value");
|
||||
return false;
|
||||
}
|
||||
uint32 maxStack = (uint32) strtoul(param2, NULL, 0);
|
||||
if (maxStack < 0)
|
||||
{
|
||||
PSendSysMessage("maxstack can't be a negative number.");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(10, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions maxstack $ahMapID (2, 6 or 7) $color (grey, white, green, blue, purple, orange or yellow) $value");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"buyerprice",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
char * param2 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1) || (!param2))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
|
||||
return false;
|
||||
}
|
||||
if (strncmp(param1,"grey",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_GREY, param2);
|
||||
}
|
||||
else if (strncmp(param1,"white",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_WHITE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"green",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_GREEN, param2);
|
||||
}
|
||||
else if (strncmp(param1,"blue",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_BLUE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"purple",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_PURPLE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"orange",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_ORANGE, param2);
|
||||
}
|
||||
else if (strncmp(param1,"yellow",l) == 0)
|
||||
{
|
||||
auctionbot.Commands(11, ahMapID, AHB_YELLOW, param2);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions buyerprice $ahMapID (2, 6 or 7) $color (grey, white, green, blue or purple) $price");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (strncmp(opt,"bidinterval",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions bidinterval $ahMapID (2, 6 or 7) $interval(in minutes)");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(12, ahMapID, NULL, param1);
|
||||
}
|
||||
else if (strncmp(opt,"bidsperinterval",l) == 0)
|
||||
{
|
||||
char * param1 = strtok(NULL, " ");
|
||||
if ((!ahMapIdStr) || (!param1))
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions bidsperinterval $ahMapID (2, 6 or 7) $bids");
|
||||
return false;
|
||||
}
|
||||
auctionbot.Commands(13, ahMapID, NULL, param1);
|
||||
}
|
||||
else
|
||||
{
|
||||
PSendSysMessage("Syntax is: ahbotoptions $option $ahMapID (2, 6 or 7) $parameter");
|
||||
PSendSysMessage("Try ahbotoptions help to see a list of options.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//reload commands
|
||||
bool ChatHandler::HandleReloadAllCommand(const char*)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "UpdateMask.h"
|
||||
#include "Unit.h"
|
||||
#include "Language.h"
|
||||
#include "AuctionHouseBot.h"
|
||||
#include "DBCStores.h"
|
||||
#include "BattleGroundMgr.h"
|
||||
#include "Item.h"
|
||||
@@ -395,10 +394,7 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
|
||||
pl->RemoveMItem(itr2->item_guid);
|
||||
}
|
||||
}
|
||||
if (m->sender == auctionbot.GetAHBplayerGUID())
|
||||
draft.AddMoney(m->money).SendReturnToSender(GetAccountId(), m->receiver, auctionbot.GetAHBplayerGUID());
|
||||
else
|
||||
draft.AddMoney(m->money).SendReturnToSender(GetAccountId(), m->receiver, m->sender);
|
||||
draft.AddMoney(m->money).SendReturnToSender(GetAccountId(), m->receiver, m->sender);
|
||||
}
|
||||
|
||||
delete m; //we can deallocate old mail
|
||||
@@ -921,13 +917,6 @@ void MailDraft::SendMailTo(MailReceiver const& receiver, MailSender const& sende
|
||||
|
||||
uint32 mailId = objmgr.GenerateMailID();
|
||||
|
||||
if (receiver.GetPlayerGUIDLow() == auctionbot.GetAHBplayerGUID())
|
||||
{
|
||||
if (sender.GetMailMessageType() == MAIL_AUCTION) // auction mail with items
|
||||
deleteIncludedItems(true);
|
||||
return;
|
||||
}
|
||||
|
||||
time_t deliver_time = time(NULL) + deliver_delay;
|
||||
|
||||
//expire time if COD 3 days, if no COD 30 days, if auction sale pending 1 hour
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
#include "AuctionHouseBot.h"
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "Log.h"
|
||||
#include "Opcodes.h"
|
||||
@@ -130,9 +129,6 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPri
|
||||
std::ostringstream msgAuctionOutbiddedSubject;
|
||||
msgAuctionOutbiddedSubject << auction->item_template << ":0:" << AUCTION_OUTBIDDED << ":0:0";
|
||||
|
||||
if (oldBidder && !_player)
|
||||
oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, auctionbot.GetAHBplayerGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
||||
|
||||
if (oldBidder && _player)
|
||||
oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, _player->GetGUID(), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include "BattleGroundMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "AuctionHouseBot.h"
|
||||
#include "WaypointMovementGenerator.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "GameEventMgr.h"
|
||||
@@ -1724,9 +1723,6 @@ void World::SetInitialWorldSettings()
|
||||
sLog.outString("Starting objects Pooling system...");
|
||||
poolhandler.Initialize();
|
||||
|
||||
sLog.outString("Initialize AuctionHouseBot...");
|
||||
auctionbot.Initialize();
|
||||
|
||||
// possibly enable db logging; avoid massive startup spam by doing it here.
|
||||
if (sLog.GetLogDBLater())
|
||||
{
|
||||
@@ -1892,7 +1888,6 @@ void World::Update(uint32 diff)
|
||||
/// <ul><li> Handle auctions when the timer has passed
|
||||
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
||||
{
|
||||
auctionbot.Update();
|
||||
m_timers[WUPDATE_AUCTIONS].Reset();
|
||||
|
||||
///- Update mails (return old mails with item, or delete them)
|
||||
|
||||
@@ -1796,272 +1796,6 @@ Network.OutKBuff = -1
|
||||
Network.OutUBuff = 65536
|
||||
Network.TcpNodelay = 1
|
||||
|
||||
###############################################################################
|
||||
# AUCTION HOUSE BOT SETTINGS
|
||||
#
|
||||
# AuctionHouseBot.DEBUG
|
||||
# Enable/Disable Debugging output
|
||||
# Default 0 (disabled)
|
||||
#
|
||||
# AuctionHouseBot.DEBUG_FILTERS
|
||||
# Enable/Disable Debugging output from Filters
|
||||
# Default 0 (disabled)
|
||||
#
|
||||
# AuctionHouseBot.EnableSeller
|
||||
# Enable/Disable the part of AHBot that puts items up for auction
|
||||
# Default 0 (disabled)
|
||||
#
|
||||
# AuctionHouseBot.EnableBuyer
|
||||
# Enable/Disable the part of AHBot that buys items from players
|
||||
# Default 0 (disabled)
|
||||
#
|
||||
# AuctionHouseBot.UseBuyPriceForSeller
|
||||
# Should the Seller use BuyPrice or SellPrice to determine Bid Prices
|
||||
# Default 0 (use SellPrice)
|
||||
#
|
||||
# AuctionHouseBot.UseBuyPriceForBuyer
|
||||
# Should the Buyer use BuyPrice or SellPrice to determine Bid Prices
|
||||
# Default 0 (use SellPrice)
|
||||
#
|
||||
# Auction House Bot character data
|
||||
# AuctionHouseBot.Account is the account number
|
||||
# (in realmd->account table) of the player you want to run
|
||||
# as the auction bot.
|
||||
# AuctionHouseBot.GUID is the GUID (in characters->characters table)
|
||||
# of the player you want to run as the auction bot.
|
||||
# Default: 0 (Auction House Bot disabled)
|
||||
#
|
||||
# AuctionHouseBot.ItemsPerCycle
|
||||
# Number of Items to Add/Remove from the AH during mass operations
|
||||
# Default 200
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
AuctionHouseBot.DEBUG = 0
|
||||
AuctionHouseBot.DEBUG_FILTERS = 0
|
||||
AuctionHouseBot.EnableSeller = 0
|
||||
AuctionHouseBot.EnableBuyer = 0
|
||||
AuctionHouseBot.UseBuyPriceForSeller = 0
|
||||
AuctionHouseBot.UseBuyPriceForBuyer = 0
|
||||
AuctionHouseBot.Account = 0
|
||||
AuctionHouseBot.GUID = 0
|
||||
AuctionHouseBot.ItemsPerCycle = 200
|
||||
|
||||
###############################################################################
|
||||
# AUCTION HOUSE BOT FILTERS PART 1
|
||||
#
|
||||
# AuctionHouseBot.VendorItems
|
||||
# Include items that can be bought from vendors.
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.VendorTradeGoods
|
||||
# Include Trade Goods that can be bought from vendors.
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.LootItems
|
||||
# Include items that can be looted or fished for.
|
||||
# Default 1 (True)
|
||||
#
|
||||
# AuctionHouseBot.LootTradeGoods
|
||||
# Include Trade Goods that can be looted or fished for.
|
||||
# Default 1 (True)
|
||||
#
|
||||
# AuctionHouseBot.OtherItems
|
||||
# Include misc. items.
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.OtherTradeGoods
|
||||
# Include misc. Trade Goods.
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.Bonding_types
|
||||
# Indicates which bonding types to allow seller to put up for auction
|
||||
# No_Bind
|
||||
# Default 1 (True)
|
||||
# Bind_When_Picked_Up
|
||||
# Default 0 (False)
|
||||
# Bind_When_Equipped
|
||||
# Default 1 (True)
|
||||
# Bind_When_Use
|
||||
# Default 1 (True)
|
||||
# Bind_Quest_Item
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableBeta_PTR_Unused
|
||||
# Disable certain items that are usually unavailable to Players
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisablePermEnchant
|
||||
# Disable Items with a Permanent Enchantment
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableConjured
|
||||
# Disable Conjured Items
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableGems
|
||||
# Disable Gems
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableMoney
|
||||
# Disable Items that are used as money
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableMoneyLoot
|
||||
# Disable Items that have Money as a loot
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableLootable
|
||||
# Disable Items that have other items as loot
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableKeys
|
||||
# Disable Items that are keys
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableDuration
|
||||
# Disable Items with a duration
|
||||
# Default 0 (False)
|
||||
#
|
||||
# AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel
|
||||
# Disable items that are BOP or Quest Item
|
||||
# with a Required level that is less than the Item Level
|
||||
# (This prevents a level 10 with a level 60 weapon or armor)
|
||||
# (May need further refinement)
|
||||
# Default 0 (False)
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
AuctionHouseBot.VendorItems = 0
|
||||
AuctionHouseBot.VendorTradeGoods = 0
|
||||
AuctionHouseBot.LootItems = 1
|
||||
AuctionHouseBot.LootTradeGoods = 1
|
||||
AuctionHouseBot.OtherItems = 0
|
||||
AuctionHouseBot.OtherTradeGoods = 0
|
||||
AuctionHouseBot.No_Bind = 1
|
||||
AuctionHouseBot.Bind_When_Picked_Up = 0
|
||||
AuctionHouseBot.Bind_When_Equipped = 1
|
||||
AuctionHouseBot.Bind_When_Use = 1
|
||||
AuctionHouseBot.Bind_Quest_Item = 0
|
||||
AuctionHouseBot.DisableBeta_PTR_Unused = 0
|
||||
AuctionHouseBot.DisablePermEnchant = 0
|
||||
AuctionHouseBot.DisableConjured = 0
|
||||
AuctionHouseBot.DisableGems = 0
|
||||
AuctionHouseBot.DisableMoney = 0
|
||||
AuctionHouseBot.DisableMoneyLoot = 0
|
||||
AuctionHouseBot.DisableLootable = 0
|
||||
AuctionHouseBot.DisableKeys = 0
|
||||
AuctionHouseBot.DisableDuration = 0
|
||||
AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel = 0
|
||||
|
||||
###############################################################################
|
||||
# AUCTION HOUSE BOT FILTERS PART 2
|
||||
#
|
||||
# These Filters are boolean (0 or 1) and will disable items that are
|
||||
# specifically meant for the Class named.
|
||||
# (UnusedClass is Class 10, which was skipped for some reason)
|
||||
# Default 0 (allowed)
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
AuctionHouseBot.DisableWarriorItems = 0
|
||||
AuctionHouseBot.DisablePaladinItems = 0
|
||||
AuctionHouseBot.DisableHunterItems = 0
|
||||
AuctionHouseBot.DisableRogueItems = 0
|
||||
AuctionHouseBot.DisablePriestItems = 0
|
||||
AuctionHouseBot.DisableDKItems = 0
|
||||
AuctionHouseBot.DisableShamanItems = 0
|
||||
AuctionHouseBot.DisableMageItems = 0
|
||||
AuctionHouseBot.DisableWarlockItems = 0
|
||||
AuctionHouseBot.DisableUnusedClassItems = 0
|
||||
AuctionHouseBot.DisableDruidItems = 0
|
||||
|
||||
###############################################################################
|
||||
# AUCTION HOUSE BOT FILTERS PART 3
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsBelowLevel
|
||||
# Prevent Seller from listing Items below this Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsAboveLevel
|
||||
# Prevent Seller from listing Items above this Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsBelowLevel
|
||||
# Prevent Seller from listing Trade Goods below this Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsAboveLevel
|
||||
# Prevent Seller from listing Trade Goods above this Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsBelowGUID
|
||||
# Prevent Seller from listing Items below this GUID
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsAboveGUID
|
||||
# Prevent Seller from listing Items above this GUID
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsBelowGUID
|
||||
# Prevent Seller from listing Trade Goods below this GUID
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsAboveGUID
|
||||
# Prevent Seller from listing Trade Goods above this GUID
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsBelowReqLevel
|
||||
# Prevent Seller from listing Items below this Required Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsAboveReqLevel
|
||||
# Prevent Seller from listing Items above this Required Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsBelowReqLevel
|
||||
# Prevent Seller from listing Trade Goods below this Required Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsAboveReqLevel
|
||||
# Prevent Seller from listing Trade Goods above this Required Level
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsBelowReqSkillRank
|
||||
# Prevent Seller from listing Items below this Required Skill Rank
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableItemsAboveReqSkillRank
|
||||
# Prevent Seller from listing Items above this Required Skill Rank
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsBelowReqSkillRank
|
||||
# Prevent Seller from listing Trade Goods below this Required Skill Rank
|
||||
# Default 0 (Off)
|
||||
#
|
||||
# AuctionHouseBot.DisableTGsAboveReqSkillRank
|
||||
# Prevent Seller from listing Trade Goods above this Required Skill Rank
|
||||
# Default 0 (Off)
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
AuctionHouseBot.DisableItemsBelowLevel = 0
|
||||
AuctionHouseBot.DisableItemsAboveLevel = 0
|
||||
AuctionHouseBot.DisableTGsBelowLevel = 0
|
||||
AuctionHouseBot.DisableTGsAboveLevel = 0
|
||||
AuctionHouseBot.DisableItemsBelowGUID = 0
|
||||
AuctionHouseBot.DisableItemsAboveGUID = 0
|
||||
AuctionHouseBot.DisableTGsBelowGUID = 0
|
||||
AuctionHouseBot.DisableTGsAboveGUID = 0
|
||||
AuctionHouseBot.DisableItemsBelowReqLevel = 0
|
||||
AuctionHouseBot.DisableItemsAboveReqLevel = 0
|
||||
AuctionHouseBot.DisableTGsBelowReqLevel = 0
|
||||
AuctionHouseBot.DisableTGsAboveReqLevel = 0
|
||||
AuctionHouseBot.DisableItemsBelowReqSkillRank = 0
|
||||
AuctionHouseBot.DisableItemsAboveReqSkillRank = 0
|
||||
AuctionHouseBot.DisableTGsBelowReqSkillRank = 0
|
||||
AuctionHouseBot.DisableTGsAboveReqSkillRank = 0
|
||||
|
||||
###############################################################################
|
||||
# CONSOLE AND REMOTE ACCESS
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user