Mercurial > wow > askmrrobot
comparison AskMrRobot-Serializer/AskMrRobot-Serializer.lua @ 135:57be71eccc0a v63
Small azerite gear fix.
| author | yellowfive |
|---|---|
| date | Sun, 12 Aug 2018 23:36:17 -0700 |
| parents | a0894ffebd15 |
| children | 6dc0e8e9f960 |
comparison
equal
deleted
inserted
replaced
| 134:41cf09da376d | 135:57be71eccc0a |
|---|---|
| 1 -- AskMrRobot-Serializer will serialize and communicate character data between users. | 1 -- AskMrRobot-Serializer will serialize and communicate character data between users. |
| 2 | 2 |
| 3 local MAJOR, MINOR = "AskMrRobot-Serializer", 62 | 3 local MAJOR, MINOR = "AskMrRobot-Serializer", 63 |
| 4 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) | 4 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) |
| 5 | 5 |
| 6 if not Amr then return end -- already loaded by something else | 6 if not Amr then return end -- already loaded by something else |
| 7 | 7 |
| 8 -- event and comm used for player snapshotting on entering combat | 8 -- event and comm used for player snapshotting on entering combat |
| 138 ["Worgen"] = 12, | 138 ["Worgen"] = 12, |
| 139 ["Pandaren"] = 13, | 139 ["Pandaren"] = 13, |
| 140 ["Nightborne"] = 14, | 140 ["Nightborne"] = 14, |
| 141 ["HighmountainTauren"] = 15, | 141 ["HighmountainTauren"] = 15, |
| 142 ["VoidElf"] = 16, | 142 ["VoidElf"] = 16, |
| 143 ["LightforgedDraenei"] = 17 | 143 ["LightforgedDraenei"] = 17, |
| 144 ["DarkIronDwarf"] = 18, | |
| 145 ["MagharOrc"] = 19 | |
| 144 } | 146 } |
| 145 | 147 |
| 146 Amr.FactionIds = { | 148 Amr.FactionIds = { |
| 147 ["None"] = 0, | 149 ["None"] = 0, |
| 148 ["Alliance"] = 1, | 150 ["Alliance"] = 1, |
| 251 end | 253 end |
| 252 | 254 |
| 253 return item | 255 return item |
| 254 end | 256 end |
| 255 | 257 |
| 256 function Amr.GetItemUniqueId(item, noUpgrade) | 258 local AZERITE_EMPOWERED_BONUS_ID = 4775 |
| 259 | |
| 260 function Amr.GetItemUniqueId(item, noUpgrade, noAzeriteEmpoweredBonusId) | |
| 257 if not item then return "" end | 261 if not item then return "" end |
| 258 local ret = item.id .. "" | 262 local ret = item.id .. "" |
| 259 if item.bonusIds then | 263 if item.bonusIds then |
| 260 for i = 1, #item.bonusIds do | 264 for i = 1, #item.bonusIds do |
| 261 ret = ret .. "b" .. item.bonusIds[i] | 265 if not noAzeriteEmpoweredBonusId or item.bonusIds[i] ~= AZERITE_EMPOWERED_BONUS_ID then |
| 266 ret = ret .. "b" .. item.bonusIds[i] | |
| 267 end | |
| 262 end | 268 end |
| 263 end | 269 end |
| 264 if item.suffixId ~= 0 then | 270 if item.suffixId ~= 0 then |
| 265 ret = ret .. "s" .. item.suffixId | 271 ret = ret .. "s" .. item.suffixId |
| 266 end | 272 end |
