|
Planeshift
|
A reaction embodies the change in desire which occurs in an NPC when he perceives something. More...
#include <reaction.h>
Public Member Functions | |
| void | DeepCopy (Reaction &other, BehaviorSet &behaviors) |
| bool | DoNotInterrupt (Behavior *behavior) |
| Check if this is a behavior that shouldn't be interrupted. | |
| csString | GetAffectedBehaviors () |
| const csString & | GetEventType () const |
| int | GetFactionDiff () |
| const csString & | GetLastTriggerd () |
| char | GetOp () |
| int | GetRandom (int i) |
| bool | GetRandomValid (int i) |
| float | GetRange () |
| const csString | GetType (NPC *npc) const |
| csString | GetValue () |
| int | GetValue (int i) |
| bool | GetValueValid (int i) |
| bool | Load (iDocumentNode *node, BehaviorSet &behaviors) |
| bool | OnlyInterrupt (Behavior *behavior) |
| Check if this is a behavior is on the only interrupt list if set. | |
| void | React (NPC *who, Perception *pcpt) |
| Reaction (Reaction &other, BehaviorSet &behaviors) | |
| Reaction () | |
| bool | SetValue (int i, int value) |
| Setting the value. | |
| bool | ShouldReact (gemNPCObject *entity) |
| Check if the player should react to this reaction. | |
Protected Types | |
| enum | DesireType { DESIRE_NONE, DESIRE_DELTA, DESIRE_ABSOLUTE, DESIRE_GUARANTEED } |
Protected Attributes | |
| bool | activeOnly |
| csArray< Behavior * > | affected |
| MathScript * | calcCondition |
| This is the particular calculation for condition. | |
| csString | condition |
| DesireType | desireType |
| Indicate the type of desire change this reaction has. | |
| float | desireValue |
| The value to use for the desire type. | |
| csArray< csString > | doNotInterrupt |
| csString | eventType |
| int | factionDiff |
| bool | inactiveOnly |
| csString | lastTriggered |
| Used for debug, show when this was last triggered. | |
| csArray< csString > | onlyInterrupt |
| csString | oper |
| csArray< int > | randoms |
| csArray< bool > | randomsValid |
| float | range |
| bool | reactWhenDead |
| bool | reactWhenInvincible |
| bool | reactWhenInvisible |
| csString | type |
| csArray< int > | values |
| csArray< bool > | valuesValid |
| float | weight |
| The weight to apply to deltas. | |
A reaction embodies the change in desire which occurs in an NPC when he perceives something.
Definition at line 51 of file reaction.h.
enum Reaction::DesireType [protected] |
Definition at line 79 of file reaction.h.
| Reaction::Reaction | ( | ) |
| Reaction::Reaction | ( | Reaction & | other, |
| BehaviorSet & | behaviors | ||
| ) | [inline] |
Definition at line 95 of file reaction.h.
| void Reaction::DeepCopy | ( | Reaction & | other, |
| BehaviorSet & | behaviors | ||
| ) |
| bool Reaction::DoNotInterrupt | ( | Behavior * | behavior | ) |
Check if this is a behavior that shouldn't be interrupted.
| behavior | The behavior to check. |
| csString Reaction::GetAffectedBehaviors | ( | ) |
| const csString& Reaction::GetEventType | ( | ) | const |
| int Reaction::GetFactionDiff | ( | ) | [inline] |
Definition at line 139 of file reaction.h.
| const csString& Reaction::GetLastTriggerd | ( | ) | [inline] |
Definition at line 157 of file reaction.h.
| char Reaction::GetOp | ( | ) |
| bool Reaction::GetRandomValid | ( | int | i | ) |
| float Reaction::GetRange | ( | ) | [inline] |
Definition at line 135 of file reaction.h.
| const csString Reaction::GetType | ( | NPC * | npc | ) | const |
| csString Reaction::GetValue | ( | ) |
| bool Reaction::GetValueValid | ( | int | i | ) |
| bool Reaction::Load | ( | iDocumentNode * | node, |
| BehaviorSet & | behaviors | ||
| ) |
| bool Reaction::OnlyInterrupt | ( | Behavior * | behavior | ) |
Check if this is a behavior is on the only interrupt list if set.
If there is a limitation on behaviors to interrupt for this reaction this function will return true if the behavior isn't on that list.
| behavior | The behavior to check. |
| void Reaction::React | ( | NPC * | who, |
| Perception * | pcpt | ||
| ) |
Setting the value.
This function ignore the data valid flag. And will not update it for the value set.
| bool Reaction::ShouldReact | ( | gemNPCObject * | entity | ) |
Check if the player should react to this reaction.
Caled by perception related to entitis to check for reaction against visibility and invincibility
| entity | The entity tho check for visibility and invincibility |
bool Reaction::activeOnly [protected] |
Definition at line 63 of file reaction.h.
csArray<Behavior*> Reaction::affected [protected] |
Definition at line 77 of file reaction.h.
MathScript* Reaction::calcCondition [protected] |
This is the particular calculation for condition.
Definition at line 62 of file reaction.h.
csString Reaction::condition [protected] |
Definition at line 61 of file reaction.h.
DesireType Reaction::desireType [protected] |
Indicate the type of desire change this reaction has.
Definition at line 87 of file reaction.h.
float Reaction::desireValue [protected] |
The value to use for the desire type.
Definition at line 88 of file reaction.h.
csArray<csString> Reaction::doNotInterrupt [protected] |
Definition at line 74 of file reaction.h.
csString Reaction::eventType [protected] |
Definition at line 57 of file reaction.h.
int Reaction::factionDiff [protected] |
Definition at line 59 of file reaction.h.
bool Reaction::inactiveOnly [protected] |
Definition at line 64 of file reaction.h.
csString Reaction::lastTriggered [protected] |
Used for debug, show when this was last triggered.
Definition at line 91 of file reaction.h.
csArray<csString> Reaction::onlyInterrupt [protected] |
Definition at line 73 of file reaction.h.
csString Reaction::oper [protected] |
Definition at line 60 of file reaction.h.
csArray<int> Reaction::randoms [protected] |
Definition at line 71 of file reaction.h.
csArray<bool> Reaction::randomsValid [protected] |
Definition at line 70 of file reaction.h.
float Reaction::range [protected] |
Definition at line 58 of file reaction.h.
bool Reaction::reactWhenDead [protected] |
Definition at line 65 of file reaction.h.
bool Reaction::reactWhenInvincible [protected] |
Definition at line 67 of file reaction.h.
bool Reaction::reactWhenInvisible [protected] |
Definition at line 66 of file reaction.h.
csString Reaction::type [protected] |
Definition at line 72 of file reaction.h.
csArray<int> Reaction::values [protected] |
Definition at line 69 of file reaction.h.
csArray<bool> Reaction::valuesValid [protected] |
Definition at line 68 of file reaction.h.
float Reaction::weight [protected] |
The weight to apply to deltas.
Definition at line 89 of file reaction.h.
1.7.3