summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-09-16 23:33:35 +0200
committerMichieru <Michieru@users.noreply.github.com>2014-09-16 23:33:35 +0200
commitddc52570a9bf694cdba6445bc02350a94856a583 (patch)
tree495dd01a9e42e0585cafa7fd718b660914e46180 /src
parent8ab61745b81d1cf0602c7998f590aac8749187da (diff)
downloadhercules-ddc52570a9bf694cdba6445bc02350a94856a583.tar.gz
hercules-ddc52570a9bf694cdba6445bc02350a94856a583.tar.bz2
hercules-ddc52570a9bf694cdba6445bc02350a94856a583.tar.xz
hercules-ddc52570a9bf694cdba6445bc02350a94856a583.zip
Follow: https://github.com/HerculesWS/Hercules/commit/8ab61745b81d1cf0602c7998f590aac8749187da
This fixed all mob size problem :) Fix estin estun not working properly (bug:7891)
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c18
-rw-r--r--src/map/clif.c14
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/mob.h4
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/skill.c14
-rw-r--r--src/map/status.c2
7 files changed, 32 insertions, 32 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index b5e8fa797..8e50de781 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6252,7 +6252,7 @@ ACMD(summon)
return false;
}
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, "--ja--", mob_id, "", SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, -1, -1, "--ja--", mob_id, "", SZ_SMALL, AI_NONE);
if(!md)
return false;
@@ -7312,15 +7312,15 @@ ACMD(size)
{
int size = 0;
- size = cap_value(atoi(message),SZ_MEDIUM,SZ_BIG);
+ size = cap_value(atoi(message),SZ_SMALL,SZ_BIG);
if(sd->state.size) {
- sd->state.size = SZ_MEDIUM;
+ sd->state.size = SZ_SMALL;
pc->setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_TELEPORT);
}
sd->state.size = size;
- if( size == SZ_SMALL )
+ if( size == SZ_MEDIUM )
clif->specialeffect(&sd->bl,420,AREA);
else if( size == SZ_BIG )
clif->specialeffect(&sd->bl,422,AREA);
@@ -7342,12 +7342,12 @@ ACMD(sizeall)
for( pl_sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); pl_sd = (TBL_PC*)mapit->next(iter) ) {
if( pl_sd->state.size != size ) {
if( pl_sd->state.size ) {
- pl_sd->state.size = SZ_MEDIUM;
+ pl_sd->state.size = SZ_SMALL;
pc->setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
}
pl_sd->state.size = size;
- if( size == SZ_SMALL )
+ if( size == SZ_MEDIUM )
clif->specialeffect(&pl_sd->bl,420,AREA);
else if( size == SZ_BIG )
clif->specialeffect(&pl_sd->bl,422,AREA);
@@ -7378,17 +7378,17 @@ ACMD(sizeguild)
return false;
}
- size = cap_value(size,SZ_MEDIUM,SZ_BIG);
+ size = cap_value(size,SZ_SMALL,SZ_BIG);
for( i = 0; i < g->max_member; i++ ) {
if( (pl_sd = g->member[i].sd) && pl_sd->state.size != size ) {
if( pl_sd->state.size ) {
- pl_sd->state.size = SZ_MEDIUM;
+ pl_sd->state.size = SZ_SMALL;
pc->setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
}
pl_sd->state.size = size;
- if( size == SZ_SMALL )
+ if( size == SZ_MEDIUM )
clif->specialeffect(&pl_sd->bl,420,AREA);
else if( size == SZ_BIG )
clif->specialeffect(&pl_sd->bl,422,AREA);
diff --git a/src/map/clif.c b/src/map/clif.c
index 26462afba..18cc987d4 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1348,7 +1348,7 @@ bool clif_spawn(struct block_list *bl)
clif->spiritball(&sd->bl);
if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif->specialeffect(bl,423,AREA);
- else if(sd->state.size==SZ_SMALL)
+ else if(sd->state.size==SZ_MEDIUM)
clif->specialeffect(bl,421,AREA);
if( sd->bg_id && map->list[sd->bl.m].flag.battleground )
clif->sendbgemblem_area(sd);
@@ -1377,7 +1377,7 @@ bool clif_spawn(struct block_list *bl)
TBL_NPC *nd = ((TBL_NPC*)bl);
if( nd->size == SZ_BIG )
clif->specialeffect(&nd->bl,423,AREA);
- else if( nd->size == SZ_SMALL )
+ else if( nd->size == SZ_MEDIUM )
clif->specialeffect(&nd->bl,421,AREA);
}
break;
@@ -1585,7 +1585,7 @@ void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *u
// clif_movepc(sd);
if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif->specialeffect(&sd->bl,423,AREA);
- else if(sd->state.size==SZ_SMALL)
+ else if(sd->state.size==SZ_MEDIUM)
clif->specialeffect(&sd->bl,421,AREA);
}
break;
@@ -1594,7 +1594,7 @@ void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_data *u
TBL_MOB *md = ((TBL_MOB*)bl);
if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif->specialeffect(&md->bl,423,AREA);
- else if(md->special_state.size==SZ_SMALL)
+ else if(md->special_state.size==SZ_MEDIUM)
clif->specialeffect(&md->bl,421,AREA);
}
break;
@@ -4326,7 +4326,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
clif->getareachar_pc(sd, tsd);
if(tsd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif->specialeffect_single(bl,423,sd->fd);
- else if(tsd->state.size==SZ_SMALL)
+ else if(tsd->state.size==SZ_MEDIUM)
clif->specialeffect_single(bl,421,sd->fd);
if( tsd->bg_id && map->list[tsd->bl.m].flag.battleground )
clif->sendbgemblem_single(sd->fd,tsd);
@@ -4345,7 +4345,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
clif->dispchat((struct chat_data*)map->id2bl(nd->chat_id),sd->fd);
if( nd->size == SZ_BIG )
clif->specialeffect_single(bl,423,sd->fd);
- else if( nd->size == SZ_SMALL )
+ else if( nd->size == SZ_MEDIUM )
clif->specialeffect_single(bl,421,sd->fd);
}
break;
@@ -4354,7 +4354,7 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
TBL_MOB* md = (TBL_MOB*)bl;
if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif->specialeffect_single(bl,423,sd->fd);
- else if(md->special_state.size==SZ_SMALL)
+ else if(md->special_state.size==SZ_MEDIUM)
clif->specialeffect_single(bl,421,sd->fd);
#if PACKETVER >= 20120404
if( !(md->status.mode&MD_BOSS) ){
diff --git a/src/map/mob.c b/src/map/mob.c
index 3f1769d37..fd2c4213f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2203,7 +2203,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
// change experience for different sized monsters [Valaris]
if (battle_config.mob_size_influence) {
switch( md->special_state.size ) {
- case SZ_SMALL:
+ case SZ_MEDIUM:
per /= 2.;
break;
case SZ_BIG:
@@ -2324,7 +2324,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
// change drops depending on monsters size [Valaris]
if (battle_config.mob_size_influence)
{
- if (md->special_state.size == SZ_SMALL && drop_rate >= 2)
+ if (md->special_state.size == SZ_MEDIUM && drop_rate >= 2)
drop_rate /= 2;
else if( md->special_state.size == SZ_BIG)
drop_rate *= 2;
@@ -3508,7 +3508,7 @@ int mob_clone_spawn(struct map_session_data *sd, int16 m, int16 x, int16 y, cons
sd->fd = fd;
//Finally, spawn it.
- md = mob->once_spawn_sub(&sd->bl, m, x, y, "--en--", class_, event, SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, m, x, y, "--en--", class_, event, SZ_SMALL, AI_NONE);
if (!md) return 0; //Failed?
md->special_state.clone = 1;
diff --git a/src/map/mob.h b/src/map/mob.h
index c8d43dbb2..728f3d81c 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -62,8 +62,8 @@ enum MobDamageLogFlag
};
enum size {
- SZ_MEDIUM = 0,
- SZ_SMALL,
+ SZ_SMALL = 0,
+ SZ_MEDIUM,
SZ_BIG,
};
diff --git a/src/map/script.c b/src/map/script.c
index cbea20e55..dee678b4c 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9072,7 +9072,7 @@ BUILDIN(monster)
int class_ = script_getnum(st,6);
int amount = script_getnum(st,7);
const char *event = "";
- unsigned int size = SZ_MEDIUM;
+ unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
int mob_id;
@@ -9181,7 +9181,7 @@ BUILDIN(areamonster) {
int class_ = script_getnum(st,8);
int amount = script_getnum(st,9);
const char *event = "";
- unsigned int size = SZ_MEDIUM;
+ unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
int mob_id;
@@ -13501,7 +13501,7 @@ BUILDIN(summon)
clif->skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, sd->bl.x, sd->bl.y, str, class_, event, SZ_SMALL, AI_NONE);
if (md) {
md->master_id=sd->bl.id;
md->special_state.ai = AI_ATTACK;
diff --git a/src/map/skill.c b/src/map/skill.c
index 94f865d21..6d4d9ef1b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5459,7 +5459,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case SA_SUMMONMONSTER:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
- if (sd) mob->once_spawn(sd, src->m, src->x, src->y," --ja--", -1, 1, "", SZ_MEDIUM, AI_NONE);
+ if (sd) mob->once_spawn(sd, src->m, src->x, src->y," --ja--", -1, 1, "", SZ_SMALL, AI_NONE);
break;
case SA_LEVELUP:
clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
@@ -9430,7 +9430,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
if(sd) {
struct mob_data *summon_md;
- summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), 2308, "", SZ_MEDIUM, AI_NONE);
+ summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), 2308, "", SZ_SMALL, AI_NONE);
if( summon_md ) {
summon_md->master_id = src->id;
summon_md->special_state.ai = AI_ZANZOU;
@@ -9604,7 +9604,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
for(i=0; i<qty[skill_lv - 1]; i++){ //easy way
- summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), summons[skill_lv - 1], "", SZ_MEDIUM, AI_ATTACK);
+ summon_md = mob->once_spawn_sub(src, src->m, src->x, src->y, status->get_name(src), summons[skill_lv - 1], "", SZ_SMALL, AI_ATTACK);
if (summon_md) {
summon_md->master_id = src->id;
if (summon_md->deletetimer != INVALID_TIMER)
@@ -10288,7 +10288,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
struct mob_data *md;
// Correct info, don't change any of this! [Celest]
- md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_SMALL, AI_NONE);
if (md) {
md->master_id = src->id;
md->special_state.ai = (skill_id == AM_SPHEREMINE) ? AI_SPHERE : AI_FLORA;
@@ -10386,7 +10386,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
if (rnd()%100 < 50) {
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
} else {
- TBL_MOB* md = mob->once_spawn_sub(src, src->m, x, y, "--ja--",(skill_lv < 2 ? 1084+rnd()%2 : 1078+rnd()%6),"", SZ_MEDIUM, AI_NONE);
+ TBL_MOB* md = mob->once_spawn_sub(src, src->m, x, y, "--ja--",(skill_lv < 2 ? 1084+rnd()%2 : 1078+rnd()%6),"", SZ_SMALL, AI_NONE);
int i;
if (!md) break;
if ((i = skill->get_time(skill_id, skill_lv)) > 0)
@@ -10533,7 +10533,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
int class_ = 2042;
struct mob_data *md;
- md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(src, src->m, x, y, status->get_name(src), class_, "", SZ_SMALL, AI_NONE);
if( md ) {
md->master_id = src->id;
md->special_state.ai = AI_FLORA;
@@ -17193,7 +17193,7 @@ int skill_magicdecoy(struct map_session_data *sd, int nameid) {
class_ = (nameid == ITEMID_BOODY_RED || nameid == ITEMID_CRYSTAL_BLUE) ? 2043 + nameid - ITEMID_BOODY_RED : (nameid == ITEMID_WIND_OF_VERDURE) ? 2046 : 2045;
- md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_MEDIUM, AI_NONE);
+ md = mob->once_spawn_sub(&sd->bl, sd->bl.m, x, y, sd->status.name, class_, "", SZ_SMALL, AI_NONE);
if( md ) {
md->master_id = sd->bl.id;
md->special_state.ai = AI_FLORA;
diff --git a/src/map/status.c b/src/map/status.c
index 70a7fb2ce..ceaf01f1f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2164,7 +2164,7 @@ int status_calc_mob_(struct mob_data* md, enum e_status_calc_opt opt) {
if (flag&2 && battle_config.mob_size_influence) {
// change for sized monsters [Valaris]
- if (md->special_state.size==SZ_SMALL) {
+ if (md->special_state.size==SZ_MEDIUM) {
mstatus->max_hp>>=1;
mstatus->max_sp>>=1;
if (!mstatus->max_hp) mstatus->max_hp = 1;