I found something in battle_calc_base_damage funciton in file battle.c
static int battle_calc_base_damage(struct status_data *status, struct weapon_atk *wa, struct status_change *sc, unsigned short t_size, struct map_session_data *sd, int flag)
and this snippet
//Weapon Damage calculation
if (!(flag&1))
damage = (atkmax>atkmin? rand()%(atkmax-atkmin):0)+atkmin;
else
damage = atkmax;
This snippet is seperate a critical hit and non-critical hit damage and i want to modify it, when assasin class (assasin, assasin cross, baby assasin) make critical damage. It will be multiple with 1.5 or 2.
But i didn't know how to get the character class to check if condition is met. Im not sure that map_session_data contains any properties that refer to the class of damage dealer (Maybe sd->class_ ??) and if what i think is correct how do i compare to the 3 class that i mention above.
Please help, and sorry for my english mistake i am not a native speaker.
Thaks