summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-23 19:49:00 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-23 19:49:00 +0300
commit01fd24443da378059a8e88c0755c5526e7b66cbc (patch)
treefd5aea77bf8917ac82d93a83356e631f062f86a3
parentd730fff10b64381cb6676b13c7b8ace459b2184d (diff)
downloadevol-hercules-01fd24443da378059a8e88c0755c5526e7b66cbc.tar.gz
evol-hercules-01fd24443da378059a8e88c0755c5526e7b66cbc.tar.bz2
evol-hercules-01fd24443da378059a8e88c0755c5526e7b66cbc.tar.xz
evol-hercules-01fd24443da378059a8e88c0755c5526e7b66cbc.zip
Fix random issues with visible cards in some items.
-rw-r--r--src/emap/send.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/emap/send.c b/src/emap/send.c
index 2d22363..ee1385a 100644
--- a/src/emap/send.c
+++ b/src/emap/send.c
@@ -112,9 +112,8 @@ void send_changelook(struct map_session_data* sd, struct map_session_data* sd2,
for (i = 0; i < data->slot; i++ )
{
struct item_data *data;
- if (!sd->status.inventory[n].card[i])
- continue;
- if ((data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL)
+ if (sd->status.inventory[n].card[i] &&
+ (data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL)
{
//ShowWarning("card %d\n", data->nameid);
WFIFOW (fd, 11 + i * 2) = data->nameid;
@@ -387,9 +386,8 @@ void send_changelook2(struct map_session_data* sd, struct block_list *bl, int id
for (i = 0; i < data->slot; i++ )
{
struct item_data *data;
- if (!sd->status.inventory[n].card[i])
- continue;
- if ((data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL)
+ if (sd->status.inventory[n].card[i] &&
+ (data = itemdb->exists(sd->status.inventory[n].card[i])) != NULL)
{
//ShowWarning("card %d\n", data->nameid);
WBUFW(buf, 11 + i * 2) = data->nameid;