src/ai/api/ai_accounting.cpp
author rubidium
Sun, 06 Apr 2008 12:26:40 +0000
branchnoai
changeset 9867 b7d9ffe24f81
parent 9833 89a64246458f
child 10196 aecabd927420
permissions -rw-r--r--
(svn r12589) [NoAI] -Add: GetLastError support for AIBridge.
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     1
/* $Id$ */
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     2
9833
89a64246458f (svn r12496) [NoAI] -Documentation: give the .cpp files a nice uniform format too
truebrain
parents: 9452
diff changeset
     3
/** @file ai_accounting.cpp Implementation of AIAccounting. */
9452
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     4
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     5
#include "ai_accounting.hpp"
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     6
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     7
int32 AIAccounting::GetCosts()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     8
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
     9
	return this->GetDoCommandCosts();
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    10
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    11
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    12
void AIAccounting::ResetCosts()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    13
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    14
	this->SetDoCommandCosts(0);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    15
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    16
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    17
AIAccounting::AIAccounting()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    18
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    19
	this->last_costs = this->GetDoCommandCosts();
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    20
	this->SetDoCommandCosts(0);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    21
}
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    22
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    23
AIAccounting::~AIAccounting()
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    24
{
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    25
	this->SetDoCommandCosts(this->last_costs);
4c5eedbc3ba9 (svn r9282) [NoAI] -Add: added AIAccounting, which tracks the cost of your buying/selling.
truelight
parents:
diff changeset
    26
}