HeikoS Posted September 12, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/08/12 Last Seen: October 22, 2013 Share 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 Link to comment Share on other sites More sharing options...
goddameit Posted September 12, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share 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 Link to comment Share on other sites More sharing options...
HeikoS Posted September 12, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/08/12 Last Seen: October 22, 2013 Author Share 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 Link to comment Share on other sites More sharing options...
goddameit Posted September 13, 2012 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Share 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 Link to comment Share on other sites More sharing options...
Lighta Posted September 13, 2012 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 737 Reputation: 216 Joined: 11/29/11 Last Seen: December 20, 2020 Share 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 Link to comment Share on other sites More sharing options...
HeikoS Posted September 15, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/08/12 Last Seen: October 22, 2013 Author Share Posted September 15, 2012 Thanks a lot, its working fine. Quote Link to comment Share on other sites More sharing options...
HeikoS Posted September 23, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/08/12 Last Seen: October 22, 2013 Author Share Posted September 23, 2012 Oh, it prevents hits/damage from jupitel thunder. But unfortunatly skills like arrow vulcan still does damage. Any ideas? Quote Link to comment Share on other sites More sharing options...
HeikoS Posted October 3, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 22 Reputation: 2 Joined: 01/08/12 Last Seen: October 22, 2013 Author Share Posted October 3, 2012 Bump. Why is there damage from archer class skills like arrow vulcan/shower? Quote Link to comment Share on other sites More sharing options...
Bin4ry Posted October 3, 2012 Group: Members Topic Count: 30 Topics Per Day: 0.01 Content Count: 782 Reputation: 82 Joined: 01/01/12 Last Seen: September 21, 2015 Share Posted October 3, 2012 because Arrow Vulcan/Shower is considered as BS_WEAPON not BS_MAGIC? Quote Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
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.