mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11723] Auction House Bot (AHBot) patch applied
Thanks to Chris K, cyberium, Dolomit6, grether, Kerbe, Naicisum, Paradox, Xeross
and other contributers for creating, long time improvments and patch up-to-date state support.
AHBot disabled by default. For enable it you need have ahbot.conf
in same dir where mangosd.conf placed and enable options:
AuctionHouseBot.Seller.Enabled and/or AuctionHouseBot.Buyer.Enabled
Original version ahbot.conf can be found by path:
src/game/AuctionHouseBot/ahbot.conf.dist.in
Note: chat commands from patch not included in commits and will added later after
additional work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
124dc96643
commit
04581f36ce
16 changed files with 2287 additions and 17 deletions
|
|
@ -61,6 +61,7 @@
|
|||
#include "WaypointManager.h"
|
||||
#include "GMTicketMgr.h"
|
||||
#include "Util.h"
|
||||
#include "AuctionHouseBot/AuctionHouseBot.h"
|
||||
#include "CharacterDatabaseCleaner.h"
|
||||
|
||||
INSTANTIATE_SINGLETON_1( World );
|
||||
|
|
@ -1320,6 +1321,9 @@ void World::SetInitialWorldSettings()
|
|||
m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILLISECONDS);
|
||||
m_timers[WUPDATE_DELETECHARS].SetInterval(DAY*IN_MILLISECONDS); // check for chars to delete every day
|
||||
|
||||
// for AhBot
|
||||
m_timers[WUPDATE_AHBOT].SetInterval(20*IN_MILLISECONDS); // every 20 sec
|
||||
|
||||
//to set mailtimer to return mails every day between 4 and 5 am
|
||||
//mailtimer is increased when updating auctions
|
||||
//one second is 1000 -(tested on win system)
|
||||
|
|
@ -1364,6 +1368,9 @@ void World::SetInitialWorldSettings()
|
|||
// Delete all characters which have been deleted X days before
|
||||
Player::DeleteOldCharacters();
|
||||
|
||||
sLog.outString("Initialize AuctionHouseBot...");
|
||||
sAuctionBot.Initialize();
|
||||
|
||||
sLog.outString( "WORLD: World initialized" );
|
||||
|
||||
uint32 uStartInterval = WorldTimer::getMSTimeDiff(uStartTime, WorldTimer::getMSTime());
|
||||
|
|
@ -1463,6 +1470,13 @@ void World::Update(uint32 diff)
|
|||
sAuctionMgr.Update();
|
||||
}
|
||||
|
||||
/// <li> Handle AHBot operations
|
||||
if (m_timers[WUPDATE_AHBOT].Passed())
|
||||
{
|
||||
sAuctionBot.Update();
|
||||
m_timers[WUPDATE_AHBOT].Reset();
|
||||
}
|
||||
|
||||
/// <li> Handle session updates
|
||||
UpdateSessions(diff);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue