server/src/kernel/equipment.c

38 lines
737 B
C
Raw Normal View History

2010-08-08 10:06:34 +02:00
#include <platform.h>
#include <kernel/config.h>
#include "equipment.h"
/* kernel includes */
#include "callbacks.h"
#include "faction.h"
#include "item.h"
2010-08-08 10:06:34 +02:00
#include "race.h"
#include "spell.h"
#include "unit.h"
2010-08-08 10:06:34 +02:00
/* util includes */
#include <selist.h>
#include <critbit.h>
#include <util/log.h>
2010-08-08 10:06:34 +02:00
#include <util/rand.h>
#include <util/rng.h>
#include <util/strings.h>
2010-08-08 10:06:34 +02:00
/* libc includes */
#include <assert.h>
#include <string.h>
#include <stdlib.h>
2010-08-08 10:06:34 +02:00
bool equip_unit(struct unit *u, const char *eqname)
2010-08-08 10:06:34 +02:00
{
return equip_unit_mask(u, eqname, EQUIP_ALL);
2010-08-08 10:06:34 +02:00
}
bool equip_unit_mask(struct unit *u, const char *eqname, int mask)
2010-08-08 10:06:34 +02:00
{
if (callbacks.equip_unit) {
return callbacks.equip_unit(u, eqname, mask);
}
return false;
}