summaryrefslogtreecommitdiff
path: root/src/map/mob.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-02-12 20:18:58 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-12 21:09:59 -0800
commitb17b9021ecf9b16c265d0a6b60faa761b34eae35 (patch)
treee8192de5b2458864f0f5ce5edd0e1ccf5605c644 /src/map/mob.hpp
parent80e36aa669274637bcd5956fbf4020dba1d4739c (diff)
downloadtmwa-b17b9021ecf9b16c265d0a6b60faa761b34eae35.tar.gz
tmwa-b17b9021ecf9b16c265d0a6b60faa761b34eae35.tar.bz2
tmwa-b17b9021ecf9b16c265d0a6b60faa761b34eae35.tar.xz
tmwa-b17b9021ecf9b16c265d0a6b60faa761b34eae35.zip
Replace mt_rand with <random>
Also add some utility methods and classes.
Diffstat (limited to 'src/map/mob.hpp')
-rw-r--r--src/map/mob.hpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/map/mob.hpp b/src/map/mob.hpp
index 3a7ce3d..16715c4 100644
--- a/src/map/mob.hpp
+++ b/src/map/mob.hpp
@@ -5,13 +5,12 @@
#include "../common/mmo.hpp"
#include "../common/timer.t.hpp"
+#include "../common/random.t.hpp"
#include "clif.t.hpp"
#include "map.hpp"
#include "skill.t.hpp"
-constexpr int MAX_RANDOMMONSTER = 3;
-
struct mob_skill
{
MobSkillState state;
@@ -22,7 +21,6 @@ struct mob_skill
short cancel;
MobSkillCondition cond1;
int cond2i;
- SkillID cond2sk() { return SkillID(cond2i); }
MobSkillTarget target;
int val[5];
short emotion;
@@ -44,20 +42,15 @@ struct mob_db
LevelElement element;
MobMode mode;
int speed, adelay, amotion, dmotion;
- int mexp, mexpper;
int mutations_nr, mutation_power;
struct
{
- int nameid, p;
+ int nameid;
+ random_::Fixed<int, 10000> p;
} dropitem[8];
- struct
- {
- int nameid, p;
- } mvpitem[3];
int sex;
short hair, hair_color, weapon, shield, head_top, head_mid, head_buttom, option, clothes_color; // [Valaris]
int equip; // [Valaris]
- int summonper[MAX_RANDOMMONSTER];
int maxskill;
struct mob_skill skill[MAX_MOBSKILL];
};
@@ -72,11 +65,6 @@ int mob_once_spawn_area(struct map_session_data *sd,
const char *mapname, int x0, int y0, int x1, int y1,
const char *mobname, int class_, int amount, const char *event);
-int mob_spawn_guardian(struct map_session_data *sd,
- const char *mapname, int x, int y,
- const char *mobname, int class_, int amount,
- const char *event, int guardian); // Spawning Guardians [Valaris]
-
int mob_target(struct mob_data *md, struct block_list *bl, int dist);
int mob_stop_walking(struct mob_data *md, int type);
int mob_stopattack(struct mob_data *);
@@ -104,7 +92,6 @@ int mob_deleteslave(struct mob_data *md);
int mob_counttargeted(struct mob_data *md, struct block_list *src,
ATK target_lv);
-int mob_class_change(struct mob_data *md, int *value);
int mob_warp(struct mob_data *md, int m, int x, int y, BeingRemoveWhy type);
int mobskill_use(struct mob_data *md, tick_t tick, MobSkillCondition event);