Jump to content

Item GUID


Cydh

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

GUID, "Globally Unique Identifier" at least that a term that I know back then when using PHP by using com_create_guid(), uniqid(), uuid_create() PECL uuid extension.

 

Back to a year ago, I added Official Item Packages and there's a param called isNamed in doc/item_group.txt that mostly used in db/re/item_package.txt. And guess what? Let me apologize, it's a wrong interpretation that causing a wrong implementation!!

In official Item Packages itself, there's field called guid. I didn't notice how actually it should be done, and just convert the usage to give-the-obtain-name just like forged & created item do. Until knew the "unstacked" stackable item thingy.

 

In this implementation, "reverted" that isNamed to GUID and moved the isNamed to the last optional param after isBound. When item in package is flagged with GUID, for stackable items just like Bubble_Gum in Pet_Egg_Scroll10 will be stacked each 2 in your inventory (storage, cart, guild storage when it's moved).

This GUID is using player's Unique ID to generate, just like Unique ID for unstackable items (weapons, armors)

// AEGIS--
// Pet_Egg_Scroll10
{name = "random1", item = "Bubble_Gum", cnt = 2, hour = 0, onair = false, guid = true, probability= 100};
// ours --
IG_Pet_Egg_Scroll10,Bubble_Gum,100,2,1,0,0,1

 

Weird? @Aleos say so...

After updating your server and want to disable this, there's config in src/config/core.h and comment it.

#define ENABLE_ITEM_GUID

Or, just keep this feature is active, you can meet new NPC to merge the separated items in Prontera (146,95), Mergician!

My view:

post-5421-0-50731000-1418735760_thumb.jpgpost-5421-0-33094500-1418735783_thumb.jpgpost-5421-0-55473000-1418735804_thumb.jpgpost-5421-0-12466000-1418735711_thumb.jpg

 

Commit:

Summary:

  • Corrected wrong interpretation of guid in item group/package implementation. Using player's unique ID generator to generates GUID.
  • Added new script command 'mergeitem' to merge separated items.
  • Enabled NPC: npc/re/other/item_merge.txt.
  • Added src/config/core.h config ENABLE_ITEM_GUID, enabled by default.
  • Added item flag 4 (db/re/item_flag.txt/db/pre-re/item_flag.txt). Item with this flag will generates GUID when obtained if doesn't have UID yet. If obtained by /item, only will get 1x.
  • Upvote 9
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

I tested the latest revision. but there's a debug message.

SHo4w31.jpg

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

I tested the latest revision. but there's a debug message.

SHo4w31.jpg

well, thank you. will fix it soon.

 

fixed in 1e6e3f4

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

@Cydh Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...