Skip to content

Commit

Permalink
Fixes #790
Browse files Browse the repository at this point in the history
* Fixes the close button not displaying after canceling a shop transaction.
  • Loading branch information
aleos89 committed Dec 4, 2015
1 parent 92d617b commit 42b7ba9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/map/clif.c
Expand Up @@ -1913,6 +1913,8 @@ void clif_buylist(struct map_session_data *sd, struct npc_data *nd)

WFIFOW(fd,2) = 4 + c*11;
WFIFOSET(fd,WFIFOW(fd,2));

sd->npc_shopid = 0; // Clear shop data here in case Cancel is clicked.
}


Expand Down Expand Up @@ -1951,6 +1953,8 @@ void clif_selllist(struct map_session_data *sd)
}
WFIFOW(fd,2)=c*10+4;
WFIFOSET(fd,WFIFOW(fd,2));

sd->npc_shopid = 0; // Clear shop data here in case Cancel is clicked.
}


Expand Down Expand Up @@ -11296,7 +11300,6 @@ void clif_parse_NpcBuyListSend(int fd, struct map_session_data* sd)
else
result = npc_buylist(sd, n, (struct s_npc_buy_list*)RFIFOP(fd,info->pos[1]));

sd->npc_shopid = 0; //Clear shop data.
clif_npc_buy_result(sd, result);
}

Expand Down Expand Up @@ -11333,8 +11336,6 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
else
fail = npc_selllist(sd,n,item_list);

sd->npc_shopid = 0; //Clear shop data.

clif_npc_sell_result(sd, fail);
}

Expand Down

3 comments on commit 42b7ba9

@admkakaroto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The situation became worse, now I can not sell anything at any NPC, when having to sell, the message of failure.

@cydh
Copy link
Contributor

@cydh cydh commented on 42b7ba9 Dec 5, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better just revert the first ever commit when u try to fix the cancelbutton-callshop. (where's again)
also there, I mentioned, the 'cancel' button on shop (normal shop, not market shop except) doesn't send any packet.
I fyou unset sd->npc_shopid on clif_buylist and clif_selllist, player will lost track of the NPC that clicked, and @admkakaroto's case appear. :P

@admkakaroto
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello good day, then the suggestion is to reverse this commit and remove sd-> npc_shopid in clif_npc_sell_result and clif_npc_buy_result?

Please sign in to comment.