• Warhammer Online Addons
  • Warhammer Online
  • Average Rating:

  • Your Rating

  • Share
  • Report Abuse

LibItemCompress

 

Project Updated:
Files Updated: Tue, Aug 18 2009
Supports Game Version: 1.30b
Category: Development Tools
Tags:

[Edit Tags]

Project Manager: Nemes
Additional Authors: Silverel
Current Version: 1.1.2-release
License: GNU General Public License version 2 (GPLv2)
Development Site: CurseForge.com
Avg Daily DL (last 30 days): 1
Downloads Total: 911
Favorites: 0
Comments: 0
  • Curse Giveaways
  • Alganon

    Alganon

    Alganon Open Beta Key Giveaway Alganon is an upcoming fantasy-based MMORPG that allows thousands of people to play together in a virtual world that features a rich history dominated by commanding deities...

    Get Key

  • Contests
  • About LibItemCompress
  •  

Takes an itemData table and compresses into a single wstring. The compressed string will have a length of around 160 characters.

Usage

First, retrieve the library using LibStub:

local LibItemCompress = LibStub:GetLibrary("LibItemCompress-1.0")

To compress an itemData table, use the compressItemData method, which takes a single itemData table and returns a wstring e.g.:

local itemDataComp = LibItemCompress.compressItemData(itemData)

To uncompress a wstring, use the uncompressItemData method, which takes a single wstring and returns an itemData table e.g.:

local itemDataUnComp = LibItemCompress.uncompressItemData(itemDataComp)

Fields

The following fields are compressed and uncompressed . Any other itemData fields, such as slots, enhslot, cooldownTimeLeft will not be present in the uncompressed itemData and will be ignored when compressing.

  • name
  • description
  • races
  • skills
  • careers
  • slots
  • enhSlot
  • bonus
  • craftingBonus
  • flagsComp
  • miscFlagsComp
  • uniqueID
  • id
  • iconNum
  • sellPrice
  • itemSet
  • rarity
  • type
  • level
  • renown
  • iLevel
  • equipSlot
  • maxEquip
  • tintA
  • tintB
  • dyeTintA
  • dyeTintB
  • dps
  • speed
  • armor
  • blockRating
  • trophyLocIndex
  • stackCount
  • craftingSkillRequirement
  • cultivationType
  • marketingIndex
  • marketingVariation
  • numEnhancementSlots
  • noChargeLeftDontDelete
  • trophyLocation
  • currChargesRemaining

Testing

There is an optional file provided LibItemCompressTest.lua, which contains various tests. Any failure in any test will cause the test to halt with the appropriate error message. All test output is to the debug console. The test file is commented out of the LibItemCompress.mod file, so you'll need to uncomment it yourself to use it.

LibItemCompressTest.all()

This runs each of the unit tests and provides the average compressed wstring length.

LibItemCompressTest.sampleData()

This tests 10 sample itemData objects, created at the end of LibItemCompressTest.lua.

LibItemCompressTest.failData()

This tests all of the error / bad / incomplete input conditions.

LibItemCompressTest.getDatabaseItemData()

Tests all items found in the local itemData cache, retrieved via getDatabaseItemData().

If nLootLink is present, each of the items in the database will be tested.

Example

Annihilator Barbute,,#1|6|#1|16|#1|2|0|16||5||2|2|0|13||6||3|2|0|29||9||4|2|0|2||88||5|5||0||12958||&& 772*4*434187*5939*3501*3023*4091*5*6*36*33*48*9********216**1*1*****1****

is the result of compressing

itemData = { description = L"", renown = 33, maxEquip = 0, isNew = false, equipSlot = 9, races = { }, tintB = 0, speed = 0, cultivationType = 0, craftingSkillRequirement = 0, iconNum = 3501, rarity = 5, marketingVariation = 0, flags = { false, true, false, false, false, false, false, true, true, false, false, false, false, false, false, false, [0] = false, }, name = L"Annihilator Barbute", broken = false, skills = { [1] = 6, }, marketingIndex = 0, uniqueID = 434187, blockRating = 0, sellPrice = 3023, slots = { }, level = 36, armor = 216, dyeTintB = 0, currChargesRemaining = 0, trophyLocation = 0, dyeTintA = 0, iLevel = 48, bonus = { { value = 16, type = 2, reference = 5, duration = 0, }, { value = 13, type = 2, reference = 6, duration = 0, }, { value = 29, type = 2, reference = 9, duration = 0, }, { value = 2, type = 2, reference = 88, duration = 0, }, { value = 0, type = 5, reference = 12958, }, }, enhSlot = { }, type = 6, boundToPlayer = false, numEnhancementSlots = 1, id = 5939, dps = 0, craftingBonus = { }, trophyLocIndex = 1, careers = { [1] = 16, }, bop = true, itemSet = 4091, noChargeLeftDontDelete = 0, stackCount = 1, isRefinable = false, tintA = 0, }

  • Downloads (5)
  •  
File Name Release Type Game Version Downloads Date
Addon Curse.com Beta 2.3.3 0 9/29/2008
  File Name Release Type Game Version Downloads Date  
  LibItemCompress 1.1.2-release Release 1.30b 169 8/18/2009
  LibItemCompress 1.1.1-release Release 1.3 292 6/21/2009
  LibItemCompress 1.0.1-release Release 1.2.1 243 6/17/2009
  LibItemCompress 1.0.1-beta-WAR1.3.0 Beta 1.2.1 18 6/14/2009
  LibItemCompress 1.0.0-release Release 1.2.1 186 4/19/2009
  • 1 page(s)
  • Comments

Add Comment  

Add

You need to login or register to post.

Benefits of Registration

  • Interact with hundreds of thousands of other gamers on an open social network.
  • Post your stories, news, images, videos, and other content to share.
  • Create a network with your fellow gamers or join an existing one.
  • Gain reputation for everything you do.
  • Similar Addons
  •  

Average downloads per day

  1. 310 LibSlash Development Tools
  2. 118 Phantom Buffs & Debuffs, Development...
  3. 58 LibSurveyor Development Tools
  4. 55 NerfedButtons Action Bars, and Development...
  5. 20 TortallDPSCore Combat, and Development Tools