Open GoMateoGo opened 1 year ago
By modifying roll: GetItemGuid
Can changing the capitalization of method names or other methods solve the problem?
I'm not sure how to solve this problem more reasonably
It correctly executes the global one for me. Do you have a minimal reproducible example? Also what OS is your AzerothCore running?
OS: Win11 22621.1778
You can view characters.instance_ Is the item.guid consistent with the lGuid printing
Record the printed value of hGuid
Please modify or comment out roll: GetItemGuid for compilation
Run the example here to view the hGuid printed value and compare it with the previous value
I accidentally discovered this
example:
RegisterItemEvent(6948, 2, function (event, player, item, target)
local lGuid = item:GetGUIDLow()
print("lGuid=",lGuid)
local hGuid = GetItemGUID(lGuid)
print("hGuid=",hGuid)
local mlguid = item:GetGUID()
print("mlguid=",mlguid)
-----------The correct approach
--local guid = item:GetGUID()
--print("guid=",guid)
--local items = player:GetItemByGUID( guid )
--print("items",items:GetEntry())
end)
I don't know why, every time I use 'code' preview, it always doesn't match my expectations
There are currently 2 types of 'GetItemGuid'
Roll
Global
When using global GetItemGuid (lowGuid), it defaults to executing roll first
These two types should be treated differently