Fix getnameditem command (#5807)

* Fixes #5713.
* Resolves script command getnameditem not properly naming items.
* Also resolves atcommand getring.
Thanks to @Erukanu and @Balferian!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
Balfear
2021-03-31 02:46:31 +03:00
committed by GitHub
parent 1037a75bef
commit b41043d393
3 changed files with 8 additions and 4 deletions

View File

@@ -7834,8 +7834,8 @@ BUILDIN_FUNC(getnameditem)
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.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 SCRIPT_CMD_SUCCESS; //Failed to add item, we will not drop if they don't fit