 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
72 if (creator->
inv != NULL) {
77 ob_to_copy = creator->
inv;
80 if (
rndm(0, i) == 0) {
90 LOG(
llevError,
"move_creator: Creator doesn't have other arch set: %s (%s, %d, %d)\n", creator->
name ? creator->
name :
"(null)", creator->
map->
path, creator->
x, creator->
y);
104 if (creator->
level != 0)
static method_ret creator_type_trigger(object *op, object *cause, int state)
A creator is triggered.
static method_ret creator_type_process(object *op)
Processes a creator.
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
archetype * more
Next part of a linked object.
object * inv
Pointer to the first object in the inventory.
#define QUERY_FLAG(xyz, p)
struct archetype * arch
Pointer to archetype.
#define FOR_BELOW_PREPARE(op_, it_)
Constructs a loop iterating over all objects below an object.
struct mapstruct * map
Pointer to the map in which this object is present.
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
fix_generated_item(): This is called after an item is generated, in order to set it up right.
static const flag_definition flags[]
Flag mapping.
int rndm(int min, int max)
Returns a number between min and max.
void register_process(int ob_type, process_func method)
Registers the process method for the given type.
sstring title
Of foo, etc.
char path[HUGE_BUF]
Filename of the map.
int16_t level
Level of creature or object.
#define FLAG_IS_FLOOR
Can't see what's underneath this object.
#define FOR_BELOW_FINISH()
Finishes FOR_BELOW_PREPARE().
void init_type_creator(void)
Initializer for the creator object type.
#define FLAG_IS_A_TEMPLATE
Object has no ingame life until instantiated.
int16_t y
Position in the map for this object.
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects,...
#define FLAG_FREED
Object is in the list of free objects.
#define FREE_AND_COPY(sv, nv)
Release the shared string if not NULL, and make it a reference to nv.
object * object_create_arch(archetype *at)
Create a full object using the given archetype.
#define INS_BELOW_ORIGINATOR
Insert new object immediately below originator.
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Returns true if the given object can't fit in the given spot.
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
static void move_creator(object *creator)
Move function for creator objects.
struct archetype * other_arch
Pointer used for various things - mostly used for what this objects turns into or what this object cr...
object * object_create_clone(object *asrc)
Create clone from object to another.
#define FREE_AND_CLEAR_STR(xyz)
Release the shared string, and set it to NULL.
void register_trigger(int ob_type, trigger_func method)
Registers the trigger method for the given type.
char method_ret
Define some standard return values for callbacks which don't need to return any other results.
sstring slaying
Which race to do double damage to.
sstring name
The name of the object, obviously...
void object_unset_flag_inv(object *op, int flag)
Desactivate recursively a flag on an object inventory.
#define CLEAR_FLAG(xyz, p)
living stats
Str, Con, Dex, etc.
@ GT_MINIMAL
Do minimal adjustments, don't make artifacts, and so on.
#define FLAG_LIFESAVE
Saves a players' life once, then destr.