InflictDamage Class Reference

#include <inflictdamage.h>

Inheritance diagram for InflictDamage:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 InflictDamage (ContainerBase *container, int damage)
ASCString getDescription () const

Protected Member Functions

virtual GameActionID getID () const
virtual ActionResult runAction (const Context &context)
virtual ActionResult undoAction (const Context &context)
virtual ActionResult postCheck ()
 postCheck is called after an action has been redone and should check that the state of the map is exactly the same as it was after the action has been executed the first time.
virtual void readData (tnstream &stream)
virtual void writeData (tnstream &stream) const

Friends

template<class Child>
GameActionGameActionCreator (GameMap *map)

Detailed Description

Definition at line 29 of file inflictdamage.h.


Constructor & Destructor Documentation

InflictDamage::InflictDamage ( ContainerBase container,
int  damage 
)

Definition at line 30 of file inflictdamage.cpp.


Member Function Documentation

ASCString InflictDamage::getDescription (  )  const [virtual]

Implements GameAction.

Definition at line 39 of file inflictdamage.cpp.

References ASCString::toString().

GameActionID InflictDamage::getID (  )  const [protected, virtual]

Implements GameAction.

Definition at line 72 of file inflictdamage.cpp.

References ActionRegistry::InflictDamage.

ActionResult InflictDamage::runAction ( const Context context  )  [protected, virtual]

Implements GameAction.

Definition at line 77 of file inflictdamage.cpp.

References ContainerBase::damage, ActionRegistry::DestructContainer, GameAction::execute(), ContainerAction::getContainer(), and ActionResult::successful().

ActionResult InflictDamage::undoAction ( const Context context  )  [protected, virtual]

Implements GameAction.

Definition at line 97 of file inflictdamage.cpp.

References ContainerBase::damage, and ContainerAction::getContainer().

ActionResult InflictDamage::postCheck (  )  [protected, virtual]

postCheck is called after an action has been redone and should check that the state of the map is exactly the same as it was after the action has been executed the first time.

The cheat detection of Replays heavily relies on this mechanism.

Reimplemented from GameAction.

Definition at line 108 of file inflictdamage.cpp.

References ContainerBase::damage, and ContainerAction::getContainer().

void InflictDamage::readData ( tnstream stream  )  [protected, virtual]

Reimplemented from ContainerAction.

Definition at line 46 of file inflictdamage.cpp.

References ContainerAction::readData(), and tnstream::readInt().

void InflictDamage::writeData ( tnstream stream  )  const [protected, virtual]

Reimplemented from ContainerAction.

Definition at line 60 of file inflictdamage.cpp.

References ContainerAction::writeData(), and tnstream::writeInt().


Friends And Related Function Documentation

template<class Child>
GameAction* GameActionCreator ( GameMap map  )  [friend]

Definition at line 114 of file action.h.


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