summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
commitf6bcd12cd633717e9e503bb453c85955e29cd519 (patch)
tree49225d619843accadf26532263f615392da5b8a2 /src/map/mob.c
parent9b9305b6b1a1a004c2ef909404daa705e956a5de (diff)
downloadhercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.gz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.bz2
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.xz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.zip
- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 76a89f2e1..79ae84435 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -204,7 +204,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
md->bl.y = data->y;
md->class_ = data->class_;
md->db = mob_db(md->class_);
- memcpy(md->name, data->name, NAME_LENGTH-1);
+ memcpy(md->name, data->name, NAME_LENGTH);
if (data->state.ai)
md->special_state.ai = data->state.ai;
if (data->state.size)
@@ -2338,9 +2338,9 @@ int mob_class_change (struct mob_data *md, int class_)
md->class_ = class_;
md->db = mob_db(class_);
if (battle_config.override_mob_names==1)
- memcpy(md->name,md->db->name,NAME_LENGTH-1);
+ memcpy(md->name,md->db->name,NAME_LENGTH);
else
- memcpy(md->name,md->db->jname,NAME_LENGTH-1);
+ memcpy(md->name,md->db->jname,NAME_LENGTH);
mob_stop_attack(md);
mob_stop_walking(md, 0);
@@ -3210,9 +3210,9 @@ int mob_parse_dbrow(char** str)
status = &db->status;
db->vd.class_ = class_;
- memcpy(db->sprite, str[1], NAME_LENGTH-1);
- memcpy(db->jname, str[2], NAME_LENGTH-1);
- memcpy(db->name, str[3], NAME_LENGTH-1);
+ strncpy(db->sprite, str[1], NAME_LENGTH);
+ strncpy(db->jname, str[2], NAME_LENGTH);
+ strncpy(db->name, str[3], NAME_LENGTH);
db->lv = atoi(str[4]);
db->lv = cap_value(db->lv, 1, USHRT_MAX);
status->max_hp = atoi(str[5]);