Added @addfame (#6588)
* Added `@addfame` * Added alias `famepoint`, `famepoints` * Changed `sd` in `pc_addfame` to reference Co-authored-by: Lemongrass3110 <lemongrass@kstp.at> Co-authored-by: Aleos <aleos89@users.noreply.github.com>
This commit is contained in:
@@ -755,26 +755,28 @@ void pc_delabyssball( struct map_session_data& sd, int count ){
|
||||
* Increases a player's fame points and displays a notice to him
|
||||
* @param sd Player
|
||||
* @param count Fame point
|
||||
* @return true: on success, false: on error
|
||||
*/
|
||||
void pc_addfame(struct map_session_data *sd,int count)
|
||||
bool pc_addfame(map_session_data &sd, int count)
|
||||
{
|
||||
enum e_rank ranktype;
|
||||
nullpo_retv(sd);
|
||||
sd->status.fame += count;
|
||||
if(sd->status.fame > MAX_FAME)
|
||||
sd->status.fame = MAX_FAME;
|
||||
|
||||
switch(sd->class_&MAPID_UPPERMASK){
|
||||
sd.status.fame += count;
|
||||
if (sd.status.fame > MAX_FAME)
|
||||
sd.status.fame = MAX_FAME;
|
||||
|
||||
switch(sd.class_&MAPID_UPPERMASK){
|
||||
case MAPID_BLACKSMITH: ranktype = RANK_BLACKSMITH; break;
|
||||
case MAPID_ALCHEMIST: ranktype = RANK_ALCHEMIST; break;
|
||||
case MAPID_TAEKWON: ranktype = RANK_TAEKWON; break;
|
||||
default:
|
||||
ShowWarning( "pc_addfame: Trying to add fame to class '%s'(%d).\n", job_name(sd->status.class_), sd->status.class_ );
|
||||
return;
|
||||
ShowWarning( "pc_addfame: Trying to add fame to class '%s'(%d).\n", job_name(sd.status.class_), sd.status.class_ );
|
||||
return false;
|
||||
}
|
||||
|
||||
clif_update_rankingpoint(sd,ranktype,count);
|
||||
chrif_updatefamelist(sd);
|
||||
clif_update_rankingpoint(sd, ranktype, count);
|
||||
chrif_updatefamelist(sd, ranktype);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user