summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 07:14:58 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-15 07:14:58 +0000
commitc161174bedba0cb6d6200b667ef7d245dfcb46d6 (patch)
tree9f863e80645055864768588ccd29a1807099f15d /src/map/pc.c
parent286ed5a89afeeefa3f3e3e45af74d327db6fd35b (diff)
downloadhercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.gz
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.bz2
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.tar.xz
hercules-c161174bedba0cb6d6200b667ef7d245dfcb46d6.zip
* Added mobs_level_up option. [Valaris]
-Everytime a monster kills a play their level will increase and show levelup animation. -Their 6 main stats and speed will increase as they level. -They will recover 10% of the max hp of the player it kills. -Player will gain extra exp based on how much stronger a monster is than normal. -Skill estimation will show monsters current level (instead of reading from db). -Will display level 99 aura if and when a monster hits level 99. -They will not go higher than level 99. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@187 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 0c204c707..2022f1e58 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2648,6 +2648,11 @@ int pc_skill(struct map_session_data *sd,int id,int level,int flag)
pc_calcstatus(sd,0);
clif_skillinfoblock(sd);
}
+ else if(flag==2 && (sd->status.skill[id].id == id || level == 0)){ // クエスト所得ならここで条件を確認して送信する
+ sd->status.skill[id].lv+=level;
+ pc_calcstatus(sd,0);
+ clif_skillinfoblock(sd);
+ }
else if(sd->status.skill[id].lv < level){ // 覚えられるがlvが小さいなら
if(sd->status.skill[id].id==id)
sd->status.skill[id].flag=sd->status.skill[id].lv+2; // lvを記憶
@@ -5014,6 +5019,20 @@ int pc_damage(struct block_list *src,struct map_session_data *sd,int damage)
clif_updatestatus(sd,SP_JOBEXP);
}
}
+ // monster level up [Valaris]
+ if(battle_config.mobs_level_up && src && src->type==BL_MOB) {
+ struct mob_data *md=(struct mob_data *)src;
+ if(md && md->target_id != 0 && md->target_id==sd->bl.id) { // reset target id when player dies
+ md->target_id=0;
+ mob_changestate(md,MS_WALK,0);
+ }
+ if(md && md->state.state!=MS_DEAD && md->level < 99) {
+ clif_misceffect(&md->bl,0);
+ md->level++;
+ md->hp+=sd->status.max_hp*.1;
+ }
+ }
+
//ナイトメアモードアイテムドロップ
if(map[sd->bl.m].flag.pvp_nightmaredrop){ // Moved this outside so it works when PVP isnt enabled and during pk mode [Ancyker]
for(j=0;j<MAX_DROP_PER_MAP;j++){