summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/echar/char.c22
-rw-r--r--src/emap/clif.c28
-rw-r--r--src/emap/clif.h4
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/pc.c3
-rw-r--r--src/emap/struct/itemdext.h2
6 files changed, 24 insertions, 36 deletions
diff --git a/src/echar/char.c b/src/echar/char.c
index a926f13..efbe402 100644
--- a/src/echar/char.c
+++ b/src/echar/char.c
@@ -194,10 +194,10 @@ void send_additional_slots(int fd, struct char_session_data* sd)
int char_id;
int name_id;
int slot;
- short card0;
- short card1;
- short card2;
- short card3;
+ int card0;
+ int card1;
+ int card2;
+ int card3;
if (!sd)
return;
@@ -216,13 +216,13 @@ void send_additional_slots(int fd, struct char_session_data* sd)
"LEFT JOIN inventory ON inventory.char_id = `char`.char_id "
"WHERE account_id = '%d' AND equip <> 0 AND amount > 0 ORDER BY inventory.char_id", sd->account_id)
|| SQL_ERROR == SQL->StmtExecute(stmt)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, sizeof char_id, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &name_id, sizeof name_id, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &slot, sizeof slot, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &card0, sizeof card0, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &card1, sizeof card1, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_SHORT, &card2, sizeof card2, NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_SHORT, &card3, sizeof card3, NULL, NULL))
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, sizeof char_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &name_id, sizeof name_id, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &slot, sizeof slot, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &card0, sizeof card0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &card1, sizeof card1, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &card2, sizeof card2, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &card3, sizeof card3, NULL, NULL))
{
SqlStmt_ShowDebug(stmt);
SQL->StmtFree(stmt);
diff --git a/src/emap/clif.c b/src/emap/clif.c
index 75807e8..a5ff9cb 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -811,7 +811,7 @@ void eclif_getareachar_item_pre(struct map_session_data **sdPtr,
WFIFOB(fd, 9) = fitem->item_data.identify;
WFIFOB(fd, 10) = fitem->item_data.attribute;
WFIFOB(fd, 11) = fitem->item_data.refine;
- clif->addcards(WFIFOP(fd, 12), &fitem->item_data);
+ clif->addcards((struct EQUIPSLOTINFO*)WFIFOP(fd, 12), &fitem->item_data);
WFIFOW(fd, 20) = fitem->bl.x;
WFIFOW(fd, 22) = fitem->bl.y;
WFIFOW(fd, 24) = fitem->item_data.amount;
@@ -855,7 +855,7 @@ void eclif_dropflooritem_pre(struct flooritem_data **fitemPtr)
WBUFB(buf, 9) = fitem->item_data.identify;
WBUFB(buf, 10) = fitem->item_data.attribute;
WBUFB(buf, 11) = fitem->item_data.refine;
- clif->addcards(WBUFP(buf, 12), &fitem->item_data);
+ clif->addcards((struct EQUIPSLOTINFO*)WBUFP(buf, 12), &fitem->item_data);
WBUFW(buf, 20) = fitem->bl.x;
WBUFW(buf, 22) = fitem->bl.y;
WBUFW(buf, 24) = fitem->item_data.amount;
@@ -936,29 +936,17 @@ void eclif_disp_message_pre(struct block_list **srcPtr,
clif->send(buf, WBUFW(buf, 2), src, *targetPtr);
}
-void eclif_addcards_post(unsigned char *buf, struct item *item)
+void eclif_addcards_post(struct EQUIPSLOTINFO *buf,
+ struct item *item)
{
if (!buf || !item)
return;
if (item->card[0] == CARD0_PET)
{
- WBUFW(buf, 0) = item->card[0];
- WBUFW(buf, 2) = item->card[1];
- WBUFW(buf, 4) = item->card[2];
- WBUFW(buf, 6) = item->card[3];
- }
-}
-
-void eclif_addcards2_post(unsigned short *cards, struct item *item)
-{
- if (!cards || !item)
- return;
- if (item->card[0] == CARD0_PET)
- {
- cards[0] = item->card[0];
- cards[1] = item->card[1];
- cards[2] = item->card[2];
- cards[3] = item->card[3];
+ buf->card[0] = item->card[0];
+ buf->card[1] = item->card[1];
+ buf->card[2] = item->card[2];
+ buf->card[3] = item->card[3];
}
}
diff --git a/src/emap/clif.h b/src/emap/clif.h
index ab0bcca..ef09b07 100644
--- a/src/emap/clif.h
+++ b/src/emap/clif.h
@@ -63,10 +63,8 @@ void eclif_disp_message_pre(struct block_list **srcPtr,
const char **mesPtr,
enum send_target *targetPtr);
-void eclif_addcards_post(unsigned char *buf,
+void eclif_addcards_post(struct EQUIPSLOTINFO *buf,
struct item *item);
-void eclif_addcards2_post(unsigned short *cards,
- struct item *item);
void eclif_useskill(struct block_list* bl,
int src_id,
int dst_id,
diff --git a/src/emap/init.c b/src/emap/init.c
index ed1739c..510d40b 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -305,7 +305,6 @@ HPExport void plugin_init (void)
addHookPost(clan, join, eclan_join_post);
addHookPost(clan, leave, eclan_leave_post);
addHookPost(clif, addcards, eclif_addcards_post);
- addHookPost(clif, addcards2, eclif_addcards2_post);
addHookPost(clif, getareachar_unit, eclif_getareachar_unit_post);
addHookPost(clif, authok, eclif_authok_post);
addHookPost(clif, changemap, eclif_changemap_post);
diff --git a/src/emap/pc.c b/src/emap/pc.c
index d87b132..afea705 100644
--- a/src/emap/pc.c
+++ b/src/emap/pc.c
@@ -20,6 +20,7 @@
#include "map/itemdb.h"
#include "map/npc.h"
#include "map/pc.h"
+#include "map/quest.h"
#include "plugins/HPMHooking.h"
@@ -1009,6 +1010,8 @@ int epc_jobchange(struct map_session_data *sd,
}
}
+ quest->questinfo_refresh(sd);
+
return 0;
}
diff --git a/src/emap/struct/itemdext.h b/src/emap/struct/itemdext.h
index ccc4773..b75bafd 100644
--- a/src/emap/struct/itemdext.h
+++ b/src/emap/struct/itemdext.h
@@ -6,7 +6,7 @@
struct ItemCardExt
{
- unsigned short id;
+ int id;
unsigned short amount;
};