summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-15 23:45:46 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-15 23:45:46 +0800
commit6fd440ea35cf2a084ffa434ee3c8f651b3259c60 (patch)
tree66cce4bc4bc76ad20dbac39531103c02ca165e96 /src
parent8fb06fb0d7d89b31204519bacd72ab078bb8480d (diff)
downloadhercules-6fd440ea35cf2a084ffa434ee3c8f651b3259c60.tar.gz
hercules-6fd440ea35cf2a084ffa434ee3c8f651b3259c60.tar.bz2
hercules-6fd440ea35cf2a084ffa434ee3c8f651b3259c60.tar.xz
hercules-6fd440ea35cf2a084ffa434ee3c8f651b3259c60.zip
Initial release for Monster Transformation Scrolls.(Thanks to Beret)
(http://hercules.ws/board/topic/1087-scroll-transform/) Fixed Bug#7372 -where bows should not benefit matk bonus from upgrade. Thanks to Ryuuzaki Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c13
-rw-r--r--src/map/status.h2
2 files changed, 13 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 8363b8021..597128b82 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -915,6 +915,7 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
StatusIconChangeTable[SC_REBOUND] = SI_REBOUND;
StatusIconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
+ StatusIconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
//Other SC which are not necessarily associated to skills.
StatusChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
@@ -2500,7 +2501,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
- if( r ) // renewal magic attack refine bonus
+ if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
wa->matk += refine_info[wlv].bonus[r-1] / 100;
#endif
@@ -8712,6 +8713,11 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick_time = 10000;
val4 = tick / tick_time;
break;
+ case SC_MONSTER_TRANSFORM:
+ if( !mobdb_checkid(val1) )
+ val1 = 1002; // default poring
+ val_flag |= 1;
+ break;
default:
if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 )
{ //Status change with no calc, no icon, and no skill associated...?
@@ -8739,8 +8745,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_SUMMON3:
case SC_SUMMON4:
case SC_SUMMON5:
+ case SC_MONSTER_TRANSFORM:
val_flag |= 1;
break;
+ case SC_KYOUGAKU:
+ clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
+ break;
}
}
@@ -9646,7 +9656,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
break;
case SC_KYOUGAKU:
- clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_KYOUGAKU);
clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_ACTIVE_MONSTER_TRANSFORM);
break;
case SC_CLAIRVOYANCE:
diff --git a/src/map/status.h b/src/map/status.h
index 617cd9572..fbce95f17 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -671,6 +671,8 @@ typedef enum sc_type {
SC_ALL_RIDING,
SC_HANBOK,
+ SC_MONSTER_TRANSFORM,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;