Planeshift
Classes | Defines | Enumerations

workmanager.h File Reference

#include <csutil/sysfunc.h>
#include "msgmanager.h"
#include "gem.h"

Go to the source code of this file.

Classes

struct  constraint
struct  NaturalResource
 This class keeps natural resource concentrations across the world. More...
class  NearNaturalResource
 This class keeps the hit of natural resources found for the player and allows ordering of them in an array. More...
class  psWorkGameEvent
 work event class More...
class  WorkManager
 This class handles all calculations around work, using statistics and information from the pspccharacterinfo Prop Classes for both the worker and the target. More...

Defines

#define CLEANUP   3
 Cleaning up of public containers.
#define CLEANUP_DELAY   600
 Seconds to wait before performing cleanup event.
#define GARBAGE_PATTERNID   1
 Define for hard coded pattern IDs.
#define LOCKPICKING   2
 Picking of locks.
#define MANUFACTURE   0
 Digging, collecting, farming.
#define PRODUCTION   1
 Crafting.
#define REPAIR   4
 Repairing items takes time too.

Enumerations

enum  TradePatternMatch {
  TRANSFORM_MATCH = 0x0000, TRANSFORM_UNKNOWN_PATTERN = 0x0001, TRANSFORM_UNKNOWN_ITEM = 0x0002, TRANSFORM_MISSING_ITEM = 0x0004,
  TRANSFORM_UNKNOWN_WORKITEM = 0x0008, TRANSFORM_MISSING_EQUIPMENT = 0x0010, TRANSFORM_BAD_TRAINING = 0x0020, TRANSFORM_BAD_SKILLS = 0x0040,
  TRANSFORM_OVER_SKILLED = 0x0080, TRANSFORM_FAILED_CONSTRAINTS = 0x0100, TRANSFORM_BAD_QUANTITY = 0x0200, TRANSFORM_BAD_COMBINATION = 0x0400,
  TRANSFORM_TOO_MANY_ITEMS = 0x0800, TRANSFORM_BAD_USE = 0x1000, TRANSFORM_NO_STAMINA = 0x2000, TRANSFORM_GONE_WRONG = 0x4000,
  TRANSFORM_GARBAGE = 0x8000
}
 

Holds the possible return values for a test to see if an item is transformable.

More...
enum  TradeTransfomType {
  TRANSFORMTYPE_UNKNOWN = 0, TRANSFORMTYPE_AUTO_CONTAINER, TRANSFORMTYPE_SLOT, TRANSFORMTYPE_CONTAINER,
  TRANSFORMTYPE_SLOT_CONTAINER, TRANSFORMTYPE_TARGETSLOT, TRANSFORMTYPE_TARGET, TRANSFORMTYPE_TARGET_TO_NPC,
  TRANSFORMTYPE_SELF_CONTAINER
}
 

Holds the possible transformation types.

More...

Define Documentation

#define CLEANUP   3

Cleaning up of public containers.

Definition at line 48 of file workmanager.h.

#define CLEANUP_DELAY   600

Seconds to wait before performing cleanup event.

Definition at line 52 of file workmanager.h.

#define GARBAGE_PATTERNID   1

Define for hard coded pattern IDs.

Definition at line 51 of file workmanager.h.

#define LOCKPICKING   2

Picking of locks.

Definition at line 47 of file workmanager.h.

#define MANUFACTURE   0

Digging, collecting, farming.

Definition at line 45 of file workmanager.h.

#define PRODUCTION   1

Crafting.

Definition at line 46 of file workmanager.h.

#define REPAIR   4

Repairing items takes time too.

Definition at line 49 of file workmanager.h.


Enumeration Type Documentation

Holds the possible return values for a test to see if an item is transformable.

This is binary since each transform atempt could have multiple reasons for failure

Enumerator:
TRANSFORM_MATCH 

There was a transform that matched correctly.

TRANSFORM_UNKNOWN_PATTERN 

There was no pattern found.

TRANSFORM_UNKNOWN_ITEM 

Item is not used with any available transform.

TRANSFORM_MISSING_ITEM 

No item found to use with work item.

TRANSFORM_UNKNOWN_WORKITEM 

No work item container choosen.

TRANSFORM_MISSING_EQUIPMENT 

Transform found but not correct equipment.

TRANSFORM_BAD_TRAINING 

Did not meet required skills.

TRANSFORM_BAD_SKILLS 

Did not meet required skills.

TRANSFORM_OVER_SKILLED 

Over skilled for this task.

TRANSFORM_FAILED_CONSTRAINTS 

Failed one or more contstraints on the transform.

TRANSFORM_BAD_QUANTITY 

Item was ok for transform but quantity was not.

TRANSFORM_BAD_COMBINATION 

Combination items or ammounts not correct.

TRANSFORM_TOO_MANY_ITEMS 

Tried to transform too many items.

TRANSFORM_BAD_USE 

Use of item or ammounts not correct.

TRANSFORM_NO_STAMINA 

Too tired to do trade skill work.

TRANSFORM_GONE_WRONG 

Correct ingredients but wrong number or wrong process.

TRANSFORM_GARBAGE 

There was a any item garbage transform that matched correctly.

Definition at line 60 of file workmanager.h.

Holds the possible transformation types.

Enumerator:
TRANSFORMTYPE_UNKNOWN 

A unknown tranformation.

TRANSFORMTYPE_AUTO_CONTAINER 

Transforming an item by putting it into auto-transform container.

TRANSFORMTYPE_SLOT 

Transforming an item in an equipped slot.

TRANSFORMTYPE_CONTAINER 

Transforming an item that is in a container.

TRANSFORMTYPE_SLOT_CONTAINER 

Transforming an item that is in a container in an equipped slot.

TRANSFORMTYPE_TARGETSLOT 

Transforming an item that is in a targetted actors equipped slot.

TRANSFORMTYPE_TARGET 

Transforming an item that is targeted.

TRANSFORMTYPE_TARGET_TO_NPC 

Transforming an item that is targeted to an npc type.

TRANSFORMTYPE_SELF_CONTAINER 

Transforming a container to another item.

Definition at line 84 of file workmanager.h.