summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-22 21:26:17 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-22 21:26:17 +0000
commita751d2c64853018600bcc5491ec854cc7ddfb070 (patch)
treed5ae1eae8d6411bd4df4455304bb2bae87ddccd6
parent6afc32ebbda2dd1edd6085662baaf61c96af6455 (diff)
downloadhercules-a751d2c64853018600bcc5491ec854cc7ddfb070.tar.gz
hercules-a751d2c64853018600bcc5491ec854cc7ddfb070.tar.bz2
hercules-a751d2c64853018600bcc5491ec854cc7ddfb070.tar.xz
hercules-a751d2c64853018600bcc5491ec854cc7ddfb070.zip
- Fixed a crash on the mobspawn script command.
- Made SC_FLEET increase batk as well as watk. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8444 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/mob.c12
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/status.c4
4 files changed, 16 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 3ff91ba2e..971260e91 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/08/22
+ * Fixed a crash on the mobspawn script command. [Skotlex]
+ * Made SC_FLEET increase batk as well as watk. [Skotlex]
* Fixed gcc warning [Toms]
* Fixed AM_REST not closing the homunc status window [Toms]
* Fixed SC_NEN according to Mpeg [Toms]
diff --git a/src/map/mob.c b/src/map/mob.c
index 5e6284aa4..18c845baf 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -265,8 +265,16 @@ struct mob_data *mob_once_spawn_sub(struct block_list *bl, int m,
data.m = m;
data.num = 1;
data.class_ = class_;
- strncpy(data.name, mobname, NAME_LENGTH-1);
- strncpy(data.eventname, event, 50);
+ if (mobname)
+ strncpy(data.name, mobname, NAME_LENGTH-1);
+ else
+ if(battle_config.override_mob_names==1)
+ strcpy(data.name,"--en--");
+ else
+ strcpy(data.name,"--ja--");
+
+ if (event)
+ strncpy(data.eventname, event, 50);
if (bl && (x < 0 || y < 0))//Locate spot around player.
map_search_freecell(bl, m, &x, &y, 1, 1, 0);
diff --git a/src/map/script.c b/src/map/script.c
index 8408e8546..cf101f156 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11787,7 +11787,7 @@ int buildin_mobspawn(struct script_state *st){
x =conv_num(st,& (st->stack->stack_data[st->start+5]));
y =conv_num(st,& (st->stack->stack_data[st->start+6]));
- id = mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,1,NULL);
+ id = mob_once_spawn(map_id2sd(st->rid),map,x,y,str,class_,1,"");
push_val(st->stack,C_INT,id);
return 0;
diff --git a/src/map/status.c b/src/map/status.c
index 4547df182..eb462b19c 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3251,6 +3251,8 @@ static unsigned short status_calc_batk(struct block_list *bl, struct status_chan
//Curse shouldn't effect on this? <- Curse OR Bleeding??
// if(sc->data[SC_BLEEDING].timer != -1)
// batk -= batk * 25/100;
+ if(sc->data[SC_FLEET].timer!=-1)
+ batk += batk * sc->data[SC_FLEET].val3/100;
if(sc->data[SC_GATLINGFEVER].timer!=-1)
batk += sc->data[SC_GATLINGFEVER].val3;
if(sc->data[SC_MADNESSCANCEL].timer!=-1)
@@ -5497,7 +5499,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
break;
case SC_FLEET:
val2 = 30*val1; //Aspd change
- val3 = 5+5*val1; //Atk rate change
+ val3 = 5+5*val1; //bAtk/wAtk rate change
break;
case SC_MINDBREAKER:
val2 = 20*val1; //matk increase.