Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant homun_data check. #3056

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/map/atcommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -5709,7 +5709,7 @@ ACMD(useskill)
pc->autocast_clear(sd);

if (skill_id >= HM_SKILLBASE && skill_id < HM_SKILLBASE+MAX_HOMUNSKILL
&& sd->hd && homun_alive(sd->hd)) // (If used with @useskill, put the homunc as dest)
&& homun_alive(sd->hd)) // (If used with @useskill, put the homunc as dest)
bl = &sd->hd->bl;
else
bl = &sd->bl;
Expand Down Expand Up @@ -7306,7 +7306,7 @@ ACMD(makehomun)

homunid = atoi(message);

if (homunid == -1 && sd->status.hom_id && !(sd->hd && homun_alive(sd->hd))) {
if (homunid == -1 && sd->status.hom_id && !(homun_alive(sd->hd))) {
if (!sd->hd)
homun->call(sd);
else if( sd->hd->homunculus.vaporize )
Expand Down
2 changes: 1 addition & 1 deletion src/map/chrif.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static bool chrif_save(struct map_session_data *sd, int flag)

if( sd->status.pet_id > 0 && sd->pd )
intif->save_petdata(sd->status.account_id,&sd->pd->pet);
if( sd->hd && homun_alive(sd->hd) )
if (homun_alive(sd->hd))
homun->save(sd->hd);
if( sd->md && mercenary->get_lifetime(sd->md) > 0 )
mercenary->save(sd->md);
Expand Down