summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-06-30 21:03:47 +0200
committerGitHub <noreply@github.com>2019-06-30 21:03:47 +0200
commit60cbf12662c9cb481c6b93cec8778e93fa8f8d3d (patch)
tree9b75e97b6cb788959a9d4bc2c237ac8409d9e705 /src/map/pc.c
parent238cfaa6b6496da1a8569ad0a6f50d2c722c7d54 (diff)
parentd20cbae7763546555c4c9c8aa53266c40b31a2b1 (diff)
downloadhercules-60cbf12662c9cb481c6b93cec8778e93fa8f8d3d.tar.gz
hercules-60cbf12662c9cb481c6b93cec8778e93fa8f8d3d.tar.bz2
hercules-60cbf12662c9cb481c6b93cec8778e93fa8f8d3d.tar.xz
hercules-60cbf12662c9cb481c6b93cec8778e93fa8f8d3d.zip
Merge pull request #2427 from Emistry/scriptcommand_setfavoriteitem
Add *setfavoriteitemidx & *autofavoriteitem script commands - alter item favorite state
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5416fbec2..fb023b2a4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4778,6 +4778,13 @@ static int pc_additem(struct map_session_data *sd, const struct item *item_data,
sd->weight += w;
clif->updatestatus(sd,SP_WEIGHT);
+
+ // auto-favorite
+ if (data->flag.auto_favorite > 0) {
+ sd->status.inventory[i].favorite = 1;
+ clif->favorite_item(sd, i);
+ }
+
//Auto-equip
if(data->flag.autoequip)
pc->equipitem(sd, i, data->equip);