#include <inflictdamage.h>
Inheritance diagram for InflictDamage:

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> | |
| GameAction * | GameActionCreator (GameMap *map) |
Definition at line 29 of file inflictdamage.h.
| InflictDamage::InflictDamage | ( | ContainerBase * | container, | |
| int | damage | |||
| ) |
Definition at line 30 of file inflictdamage.cpp.
| 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().
| GameAction* GameActionCreator | ( | GameMap * | map | ) | [friend] |
1.5.1