EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
MarketBotMgr Class Reference

#include "MarketBotMgr.h"

Inheritance diagram for MarketBotMgr:
Collaboration diagram for MarketBotMgr:

Public Member Functions

 ~MarketBotMgr ()
 
MarketBotMgr.h

system for automating/emulating buy and sell orders on the market. idea and some code taken from AuctionHouseBot - Copyright (C) 2008-2014 TrinityCore http://www.trinitycore.org/ : Allan

Date
: 10 August 2016
Version
: 0.15 (config version)
 MarketBotMgr ()
 
int Initialize ()
 
void Process ()
 
void AddSystem ()
 
void RemoveSystem ()
 
- Public Member Functions inherited from Singleton< MarketBotMgr >
 Singleton ()
 Primary constructor. More...
 

Private Attributes

Timer m_updateTimer
 
bool m_initalized
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< MarketBotMgr >
static MarketBotMgrget ()
 
- Static Protected Attributes inherited from Singleton< MarketBotMgr >
static std::shared_ptr
< MarketBotMgr
mInstance
 

Detailed Description

Definition at line 38 of file MarketBotMgr.h.

Constructor & Destructor Documentation

MarketBotMgr::MarketBotMgr ( )

Definition at line 39 of file MarketBotMgr.cpp.

References m_initalized.

40 : m_updateTimer(20 *60 *1000) // arbitrary 20m default
41 {
42  m_initalized = false;
43 }
Timer m_updateTimer
Definition: MarketBotMgr.h:52
bool m_initalized
Definition: MarketBotMgr.h:54
MarketBotMgr::~MarketBotMgr ( )
inline

Definition at line 43 of file MarketBotMgr.h.

43 { /* do nothing here */ }

Member Function Documentation

void MarketBotMgr::AddSystem ( )

Definition at line 74 of file MarketBotMgr.cpp.

75 {
76 
77 }
int MarketBotMgr::Initialize ( )

Definition at line 45 of file MarketBotMgr.cpp.

References BOT_CONFIG_FILE, m_initalized, sLog, sMBotConf, and sMktBotDataMgr.

46 {
47  if (!sMBotConf.ParseFile(BOT_CONFIG_FILE)) {
48  sLog.Error(" ServerInit", "Loading Market Bot Config file '%s' failed.", BOT_CONFIG_FILE);
49  return 0;
50  }
51 
52  m_initalized = true;
53  sMktBotDataMgr.Initialize();
54 
55  /* start timers, process current data, and create new orders, if needed */
56 
57  sLog.Blue(" MarketBotMgr", "Market Bot Manager Initialized.");
58  return 1;
59 }
#define sMBotConf
Definition: MarketBotConf.h:73
#define sLog
Evaluates to a NewLog instance.
Definition: LogNew.h:250
#define sMktBotDataMgr
Definition: MarketBotMgr.h:34
static const char *const BOT_CONFIG_FILE
bool m_initalized
Definition: MarketBotMgr.h:54
void MarketBotMgr::Process ( )

Definition at line 62 of file MarketBotMgr.cpp.

References Timer::Check(), m_initalized, and m_updateTimer.

63 {
64  if (!m_initalized)
65  return;
66 
67  if (m_updateTimer.Check()) {
68  /* process current data, process orders, xfer funds, reset timers, create new orders */
69 
70  }
71 }
bool Check(bool reset=true)
Definition: timer.cpp:62
Timer m_updateTimer
Definition: MarketBotMgr.h:52
bool m_initalized
Definition: MarketBotMgr.h:54

Here is the call graph for this function:

void MarketBotMgr::RemoveSystem ( )

Definition at line 79 of file MarketBotMgr.cpp.

80 {
81 
82 }

Member Data Documentation

bool MarketBotMgr::m_initalized
private

Definition at line 54 of file MarketBotMgr.h.

Referenced by Initialize(), MarketBotMgr(), and Process().

Timer MarketBotMgr::m_updateTimer
private

Definition at line 52 of file MarketBotMgr.h.

Referenced by Process().


The documentation for this class was generated from the following files: