Jump to content

soroz

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by soroz

  1. In additional, this snippet

     

    if((sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN)

     

    will cause a fatal error an.d bring the map server down because when critical event cause by a monster a sd pointer will given a null and server will be crashed with pagefault

     

    to prevent this we have to check that if sd is null or not first

     

    if(sd && (sd->class_&MAPID_UPPERMASK) == MAPID_ASSASSIN)

     

    and this line should works well

  2. 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 :)
×
×
  • Create New...