PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
GetItemDescriptor() struct.Name and struct.Desc

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096
Display posts from previous:   

Author Message
Mithril



Joined: 04 Feb 2006
Posts: 25

PostPosted: Sat Mar 04, 2006 4:33 pm    Post subject: GetItemDescriptor() struct.Name and struct.Desc Reply with quote

When using GetItemDescriptor() to create items, setting the Name or Desc member of the descriptor struct has no impact on the created item. No name is given to the item except what may already be in the tile data for the graphic of the item. Would be nice if this worked Smile

Author Message
Xandros



Joined: 17 Feb 2006
Posts: 76

PostPosted: Sat Mar 04, 2006 6:54 pm    Post subject: Reply with quote

Yes.. this problem alas exists since a long time...

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Mon Mar 06, 2006 5:37 am    Post subject: Reply with quote

Mind testing something for me, before I look at this? (think I found a bug involving something with names/desc anyway).

Create an item that is stackable. Rename it to whatever you want. Create the same item again. Does it stack on the renamed item? Does it take the name of the Renamed item? If so, that is a bug, and hence one reason why the .desc might have been ignored with the GetItemDescriptor().

Let me know, and I'll fix it, plus look into the GetItemDescriptor() change.

Author Message
MuadDib
POL Developer


Joined: 13 Feb 2006
Posts: 830
Location: Indiana, USA

PostPosted: Mon Mar 06, 2006 5:43 am    Post subject: Reply with quote

btw, i mean as it is created, it adds it to the stack (Using CreateItemInBackpack() to make the item, etc)

Also, be SURE to use GetItemDescription() to create the item with it (do not just use the objtype by itself).

Below is an example script:

Code:

use uo;
use polsys;

program textcmd_test(who, objtype)

   objtype := GetItemDescriptor(objtype);

   if(!objtype || objtype.errortext)
      SendSysMessage(who, "Invalid objtype");
      return;
   endif

   var newitem := createiteminbackpack(who, objtype, 1);

   SendSysMessage(who, "Info: " + newitem.name + " , " + newitem.desc);

   return;

endprogram

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 173

PostPosted: Mon Mar 10, 2008 4:08 am    Post subject: Reply with quote

Ha, tested this using the latest 097 core.

If I create an item, and rename it to, say, "an item" - and create another one, it adds up into the stack and the stack will still be named as "an item".

If I edit the desc in struct GetItemDescriptor() returns before it is passed to CreateItemInBackpack(), it will have no effect in the actual item created.

Bug still exists.

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 096 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty