PutTribute Class Reference

#include <resourcenet.h>

Inheritance diagram for PutTribute:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PutTribute (GameMap *gamemap)
int puttribute (Building *start, int resource, int _queryonly, int _forplayer, int _fromplayer, int _scope)

Protected Member Functions

virtual void checkbuilding (Building *b)
virtual void checkvehicle (Vehicle *v)
virtual void start (int x, int y)

Protected Attributes

int targplayer
Buildingstartbuilding

Detailed Description

Definition at line 114 of file resourcenet.h.


Constructor & Destructor Documentation

PutTribute::PutTribute ( GameMap gamemap  )  [inline]

Definition at line 122 of file resourcenet.h.


Member Function Documentation

void PutTribute::checkbuilding ( Building b  )  [protected, virtual]

Implements MapNetwork.

Definition at line 440 of file resourcenet.cpp.

References MapNetwork::actmap, Building::actstorage, GameMap::ResourceTribute::avail, cnet_stopenergyinput, ContainerBase::color, ContainerBase::getStorageCapacity(), StaticResourceNet::got, StaticResourceNet::need, Building::netcontrol, GameMap::ResourceTribute::paid, StaticResourceNet::player, StaticResourceNet::queryonly, Resources::resource(), ResourceNet::resourcetype, targplayer, and GameMap::tribute.

virtual void PutTribute::checkvehicle ( Vehicle v  )  [inline, protected, virtual]

Implements MapNetwork.

Definition at line 119 of file resourcenet.h.

void PutTribute::start ( int  x,
int  y 
) [protected, virtual]

Reimplemented from MapNetwork.

Definition at line 459 of file resourcenet.cpp.

References MapNetwork::actmap, GameMap::ResourceTribute::avail, GameMap::bi_resource, Player::exist(), ContainerBase::getOwner(), Building::getResource(), StaticResourceNet::got, maxint, StaticResourceNet::need, GameMap::ResourceTribute::paid, GameMap::player, StaticResourceNet::player, StaticResourceNet::queryonly, Resources::resource(), ResourceNet::resourcetype, ResourceNet::scope, MapNetwork::start(), startbuilding, targplayer, and GameMap::tribute.

Referenced by puttribute().

int PutTribute::puttribute ( Building start,
int  resource,
int  _queryonly,
int  _forplayer,
int  _fromplayer,
int  _scope 
)

Definition at line 504 of file resourcenet.cpp.

References Building::getEntry(), StaticResourceNet::getresource(), start(), startbuilding, targplayer, MapCoordinate::x, and MapCoordinate::y.


Member Data Documentation

int PutTribute::targplayer [protected]

Definition at line 116 of file resourcenet.h.

Referenced by checkbuilding(), puttribute(), and start().

Building* PutTribute::startbuilding [protected]

Definition at line 117 of file resourcenet.h.

Referenced by puttribute(), and start().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:18 2012 for Advanced Strategic Command by  doxygen 1.5.1