HeikoS Posted September 12, 2012 Posted September 12, 2012 Hi, i want to have a mob, that will get no damage by skills. I tried this: http://www.eathena.w...ndpost&p=927155 And I tried using parts of the function battle_calc_gvg_damage (in src/map/battle.c): int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,int skill_num,int skill_lv) { struct map_session_data *sd = NULL; struct status_change *sc; struct status_change_entry *sce; int div_ = d->div_, flag = d->flag; //## Mob-Skillimmune START int class_ = status_get_class(bl); //## Mob-Skillimmune END nullpo_ret(bl); if( !damage ) return 0; //## Mob-Skillimmune START if (class_ == 2993 && flag&BF_SKILL) return 0; //## Mob-Skillimmune END if( mob_ksprotected(src, bl) ) return 0; But the special mob (ID 2993) gets still damage from skills like Jupitel Thunder. Does anyone have a idea to make this mob immune to all skills? Quote
goddameit Posted September 12, 2012 Posted September 12, 2012 I used your code , test on poring (1002) and it works well http://i.imgur.com/TDP24.jpg http://i.imgur.com/ISkSr.jpg you can try to use some shown to see what date you got. Quote
HeikoS Posted September 12, 2012 Author Posted September 12, 2012 Thanks for this tip. With a poring (ID 1002) it works well, too. I think it will not work with mobs that are made as a sprite-copy via db/mob_avail.txt. So I will change my special mob to a real mob with real sprite. Quote
goddameit Posted September 13, 2012 Posted September 13, 2012 (edited) here is why case BL_MOB: return ((TBL_MOB*)bl)->vd->class_; it gives you vd (view date). below is my way if(bl->type==BL_MOB) if ( ((TBL_MOB*)bl)->class_ == 1002 && flag&BF_SKILL) return 0; and it success http://i.imgur.com/K2ChL.jpg http://i.imgur.com/9Wwgz.jpg http://i.imgur.com/pgFUz.jpg http://i.imgur.com/cyPXN.jpg Edited September 13, 2012 by goddameit Quote
Lighta Posted September 13, 2012 Posted September 13, 2012 yeah goddameit right. Your code fine but you get the wrong class_ here; put a breakpoint on it and you'll see that it wasn't the id you expect. You should have take ((TBL_MOB*)bl)->class_ instead. Also don't have the code here but if I recall there already a place who parse skills to see wheater or not inflict dammage (check on MOBID_EMPERIUM) Quote
HeikoS Posted September 15, 2012 Author Posted September 15, 2012 Thanks a lot, its working fine. Quote
HeikoS Posted September 23, 2012 Author Posted September 23, 2012 Oh, it prevents hits/damage from jupitel thunder. But unfortunatly skills like arrow vulcan still does damage. Any ideas? Quote
HeikoS Posted October 3, 2012 Author Posted October 3, 2012 Bump. Why is there damage from archer class skills like arrow vulcan/shower? Quote
Bin4ry Posted October 3, 2012 Posted October 3, 2012 because Arrow Vulcan/Shower is considered as BS_WEAPON not BS_MAGIC? Quote
Question
HeikoS
Hi,
i want to have a mob, that will get no damage by skills.
I tried this: http://www.eathena.w...ndpost&p=927155
And I tried using parts of the function battle_calc_gvg_damage (in src/map/battle.c):
But the special mob (ID 2993) gets still damage from skills like Jupitel Thunder.
Does anyone have a idea to make this mob immune to all skills?
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.