Atrinik Server  4.0
Functions
monster_guard.c File Reference
#include <global.h>
#include <monster_guard.h>
#include <faction.h>
#include <plugin.h>
#include <monster_data.h>
#include <toolkit/packet.h>
#include <player.h>
#include <object.h>
#include <object_methods.h>

Go to the source code of this file.

Functions

void monster_guard_activate_gate (object *op, int state)
 
static bool monster_guard_get_bounty (object *op, player *pl, double *bounty)
 
bool monster_guard_check (object *op, object *target, const char *msg, uint32_t distance)
 
void monster_guard_check_close (object *op, object *target)
 

Detailed Description

Handles code for monsters related to guards.

Author
Alex Tokar

Definition in file monster_guard.c.

Function Documentation

void monster_guard_activate_gate ( object op,
int  state 
)

Make the monster activate a gate by applying a lever/switch/etc under the monster's feet.

Parameters
opThe monster.
state1 to activate the gate, 0 to deactivate.

Definition at line 52 of file monster_guard.c.

bool monster_guard_check ( object op,
object target,
const char *  msg,
uint32_t  distance 
)

Check a potential target's bounty.

Parameters
opGuard.
targetTarget to check.
msgWhat the target is saying to the guard.
distanceHow far away the target is.
Returns
Whether the target was stopped.

Definition at line 146 of file monster_guard.c.

void monster_guard_check_close ( object op,
object target 
)

Handle closing an interface for a guard.

Parameters
opGuard.
targetWho is closing the interface.

Definition at line 219 of file monster_guard.c.

static bool monster_guard_get_bounty ( object op,
player pl,
double *  bounty 
)
static

Acquire player's bounty.

Parameters
opGuard.
plPlayer.
[out]bountyWhere to store the bounty.
Returns
Whether the bounty was successfully acquired.

Definition at line 102 of file monster_guard.c.