From c161174bedba0cb6d6200b667ef7d245dfcb46d6 Mon Sep 17 00:00:00 2001 From: valaris Date: Mon, 15 Nov 2004 07:14:58 +0000 Subject: * 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 --- src/map/pc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/map/pc.c') 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