Crossfire Server, Trunk
CFBank.CFBank Class Reference
Collaboration diagram for CFBank.CFBank:
Collaboration graph

Public Member Functions

def __enter__ (self)
 
def __exit__ (self, exc_type, exc_value, traceback)
 
def __init__ (self, bankfile)
 
def close (self)
 
def deposit (self, user, amount)
 
def getbalance (self, user)
 
def remove_account (self, user)
 
def withdraw (self, user, amount)
 

Public Attributes

 bankdb
 
 bankdb_file
 

Private Member Functions

def _convert (self, name)
 

Detailed Description

Definition at line 12 of file CFBank.py.

Constructor & Destructor Documentation

◆ __init__()

def CFBank.CFBank.__init__ (   self,
  bankfile 
)

Definition at line 13 of file CFBank.py.

Member Function Documentation

◆ __enter__()

def CFBank.CFBank.__enter__ (   self)

Definition at line 17 of file CFBank.py.

◆ __exit__()

def CFBank.CFBank.__exit__ (   self,
  exc_type,
  exc_value,
  traceback 
)

Definition at line 20 of file CFBank.py.

References module_information.close, CFBank.CFBank.close(), and mtar_t.close.

Here is the call graph for this function:

◆ _convert()

def CFBank.CFBank._convert (   self,
  name 
)
private
Move a player's balance from the player file to the bank.

Definition at line 57 of file CFBank.py.

References CFBank._balance_legacy(), and CFBank.CFBank.deposit().

Referenced by CFBank.CFBank.getbalance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ close()

def CFBank.CFBank.close (   self)

Definition at line 54 of file CFBank.py.

References CFBank.CFBank.bankdb.

Referenced by CFBank.CFBank.__exit__().

Here is the caller graph for this function:

◆ deposit()

def CFBank.CFBank.deposit (   self,
  user,
  amount 
)

Definition at line 23 of file CFBank.py.

References CFBank.CFBank.bankdb.

Referenced by CFBank.CFBank._convert().

Here is the caller graph for this function:

◆ getbalance()

def CFBank.CFBank.getbalance (   self,
  user 
)

Definition at line 38 of file CFBank.py.

References CFBank.CFBank._convert(), and CFBank.CFBank.bankdb.

Referenced by CFBank.CFBank.withdraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_account()

def CFBank.CFBank.remove_account (   self,
  user 
)

Definition at line 45 of file CFBank.py.

References CFBank.CFBank.bankdb.

◆ withdraw()

def CFBank.CFBank.withdraw (   self,
  user,
  amount 
)

Definition at line 30 of file CFBank.py.

References CFBank.CFBank.bankdb, and CFBank.CFBank.getbalance().

Here is the call graph for this function:

Member Data Documentation

◆ bankdb

◆ bankdb_file

CFBank.CFBank.bankdb_file

Definition at line 14 of file CFBank.py.


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