summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-05-05 21:10:38 +0200
committerGitHub <noreply@github.com>2019-05-05 21:10:38 +0200
commitaa79da0e801a536b22911d47fd12df351c36214e (patch)
tree1e266783f544394a6ac0834ec7abc2ab44f1c9e7 /src/map/script.c
parent416acb084a7f04a61c410cbc8b31a85ae90c013f (diff)
parent9e934f3608a4a67667573514909911130493e174 (diff)
downloadhercules-aa79da0e801a536b22911d47fd12df351c36214e.tar.gz
hercules-aa79da0e801a536b22911d47fd12df351c36214e.tar.bz2
hercules-aa79da0e801a536b22911d47fd12df351c36214e.tar.xz
hercules-aa79da0e801a536b22911d47fd12df351c36214e.zip
Merge pull request #2425 from hemagx/hercules_signed_items_fix
Fix an issue with named/brewed/forged items getting saved with the wrong character id
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/script.c b/src/map/script.c
index b4a955f09..2c5e5237b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8177,12 +8177,12 @@ static BUILDIN(getnameditem)
}
memset(&item_tmp,0,sizeof(item_tmp));
- item_tmp.nameid=nameid;
- item_tmp.amount=1;
- item_tmp.identify=1;
- item_tmp.card[0]=CARD0_CREATE; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus]
- item_tmp.card[2]=tsd->status.char_id;
- item_tmp.card[3]=tsd->status.char_id >> 16;
+ item_tmp.nameid = nameid;
+ item_tmp.amount = 1;
+ item_tmp.identify = 1;
+ item_tmp.card[0] = CARD0_CREATE; //we don't use 255! because for example SIGNED WEAPON shouldn't get TOP10 BS Fame bonus [Lupus]
+ item_tmp.card[2] = GetWord(tsd->status.char_id, 0);
+ item_tmp.card[3] = GetWord(tsd->status.char_id, 1);
if(pc->additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT)) {
script_pushint(st,0);
return true; //Failed to add item, we will not drop if they don't fit