vBrenth
New member
- Messages
- 391
- Points
- 0
- Age
- 35
- Location
- Philippines
- Discord
- Brenth
- Github
- vBrenth
- Emulator
- Client Version
- RE
I would like to ask for a help regarding this one, i cannot make it work on my own and with the help of my friends so here i am posting this
//Reject Sword bugreport:4493 by Daegaladh if(wd.damage && tsc && tsc->data[SC_SWORDREJECT] && (src->type!=BL_PC || ( ((TBL_PC *)src)->weapontype1 == W_DAGGER || ((TBL_PC *)src)->weapontype1 == W_1HSWORD || ((TBL_PC *)src)->status.weapon == W_2HSWORD )) && rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { ATK_RATER(50); status_fix_damage(target,src,wd.damage,clif->damage(target,src,0,0,wd.damage,0,0,0)); clif->skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_SWORDREJECT]->val1,1); if( --(tsc->data[SC_SWORDREJECT]->val3) <= 0 ) status_change_end(target, SC_SWORDREJECT, INVALID_TIMER); }
What i wanted to aim?, I want to make the reject swords reflect damage cannot go higher than casters HP.
We tried to add this things but doesnt work (under) ATK_RATER(50);
Thanks to Dastgir for multiple tries to help me
wd.damage = (int)cap_value(wd.damage, 0, ((TBL_PC*)src)->status.max_hp);
Little hand please?
Another problem i have encounter on newer clients [ Whisper bug [2013-12-23c ]
//Reject Sword bugreport:4493 by Daegaladh if(wd.damage && tsc && tsc->data[SC_SWORDREJECT] && (src->type!=BL_PC || ( ((TBL_PC *)src)->weapontype1 == W_DAGGER || ((TBL_PC *)src)->weapontype1 == W_1HSWORD || ((TBL_PC *)src)->status.weapon == W_2HSWORD )) && rnd()%100 < tsc->data[SC_SWORDREJECT]->val2 ) { ATK_RATER(50); status_fix_damage(target,src,wd.damage,clif->damage(target,src,0,0,wd.damage,0,0,0)); clif->skill_nodamage(target,target,ST_REJECTSWORD,tsc->data[SC_SWORDREJECT]->val1,1); if( --(tsc->data[SC_SWORDREJECT]->val3) <= 0 ) status_change_end(target, SC_SWORDREJECT, INVALID_TIMER); }
What i wanted to aim?, I want to make the reject swords reflect damage cannot go higher than casters HP.
We tried to add this things but doesnt work (under) ATK_RATER(50);
Thanks to Dastgir for multiple tries to help me
wd.damage = (int)cap_value(wd.damage, 0, ((TBL_PC*)src)->status.max_hp);
Code:
wd.damage = cap_value(wd.damage, 0, (int64)((TBL_PC*)src)->status.max_hp);
Code:
if (sd)wd.damage = cap_value(wd.damage, 0, (int64)(sd->status.max_hp));
Code:
if (sd)wd.damage = min(status_get_max_hp(src),wd.damage);
Another problem i have encounter on newer clients [ Whisper bug [2013-12-23c ]