Broken item does not identified as [Broken]
Server name: GGamerzRO Type: Private Server serverType kRO_RagexeRE_2013_08_07a Openkore version: Latest Git 30/7/2017
Issue: Openkore does not properly identified my broken item as [Broken]
Game Client:
Console:
Are you able to figure out how the packets are different?
@moneyisgod How can i create the useful info to fix this?
Are you interested to test and debug at my server? I can provide you with GM account.
@kaliwanagan Cant figured out yet.
First solution :
Changes inside Misc.pm :
from
$display .= T("BROKEN ") if $item->{broken};to
$display .= T("BROKEN ") if ($item->{broken} || (($item->{identified} == 3 || $item->{idenfitied} == 3) && !$item->{broken})) ;
Second solution :
Because of "sub parse_items_nonstackable" in 2013_03_20 is not being parsed : We can see some calls inside src/Receive.pm :
inventory_items_stackable -> parse_items
But we can't see
inventory_items_nonstackable -> parse_items
We can see it inside 2013 03 20, but it's not being called. ^^ Only stackable.
1) Since some 2013 servers above doesn't use the "broken" param At first, $item->{broken} will be defined checking $item->{flag}
In some places of source, we can see the parse_items checking for $item->{flag}, and as i can note, inside Sakexe0, there isn't "flag" parameter in any of stackable/nonstackable items.
Then we can getting the result of $item->{broken}, since it's dependent of $item->{flag} !
2) Kore sometimes uses "idenfitied" instead of "identified".
3) $item->{flag} will return 0 Then when $item->{flag} is checked it perform some logic to mark the item as broken based in "flag".
And it's done when items are parsed;
4) But the flag doesn't exists. Than we have a problem even in stackable, as in nonstackable.
5) To do a better fix. We can do something such as :
$item->{flag} = $item->{identified} if (!$item->{broken})
This code is inside of parse items non stackable.
but it's not being called properly to perform some tests.
It must be called in somewhere of src/InventoryList/Inventory, but instead, it's being called from another place. (since it doesn't exists, i've tried added but doesn't worked)
Packet _ data
0200B704050200000000000000000000000000000000000000000000000001 = identified 03008E050502000000000000000ACB0F000000000000000000000000000003 = identified but broken 050031750400040000000000000000000000000000006693D5590000BE0201 = identified
I believe i can see too a logical error in Sakexe0.pm :
$item->{broken} = $item->{identified} & (1 << 1) unless exists $item->{broken};
$item->{broken} is always "undefined" when we don't receive "broken" as param. We receive this condition in the place of identified.
1 << 1 = 10bin = 2dec
x = $item->{identified}. f(x) = $item->{broken}
f(x) = x & 2 f(0) = 0 & 2= 0 f(1) = 1 & 2 = 0 f(2) = 2 & 2 = 2 f(3) = 2 & 3= 2
The item will never be broken.
Need fix Only for INVENTORY_ITEMS_NONSTACKABLE parsing/solving ! I guess it must be parsed in src/InventoryList/Inventory. I've tried provide my own fix trying to parse items non stackable, but no success
Does official server produce the bug like this or just specific servertype?
It will produce error in official/private, i believe !
Your 1st solution seems to be more simple and easy fix. Does official server produce the bug like this or just specific servertype?
After applied the 1st solution, my broken item now identified properly. Thanks
So, how do you proposed the actual fix?
Rly this parse items looks like complex. I dont understand it so good.
But i gave my points. But the misc is the exodia head.
Something related:
- Pet Egg (Named) appear as BROKEN too.
?????????????????????????????????????????????
Looks like using two objects to assign values between themselves with the same function (hold item identify, last byte of packet ) is not a good idea.
Just remembering that it were already tested with a Broken item and a unbroken item, and the patch used to work successfull - with unstackable, since broken are only for equips - ?!
I really didn't see parse_unstackable_items inside Receivve.pm ! I see the parse_unstackable_items inside private serverTypes (2013?) but it's not being called.
Fadreus, is this related to private or official ? Thanks for u beauty feedback. I really wanna test it now since i'm learning about OOP.
I test in iRO.
Before
After

I don't recall seeing it as BROKEN before (unless I put name on them). Not sure if any pet egg hatched it will appear as such. Don't have any other egg to test atm, all my pets are named.
yes, afaik, since first time i have egg on iro, it is always shown BROKEN egg may be all official server will show BROKEN egg ?
If you swap the Incubus and the Succubus in your inventory, you'll see that the first item will be broken. at least the first is Incubus ?
$item->{flag} will return 0
Then when $item->{flag} is checked it perform some logic to mark the item as broken based in "flag".
And it's done when items are parsed;
But the flag doesn't exists.
Than we have a problem even in stackable, as in nonstackable.
Well, how to classiy 'Eden Group Hat' as hat instead of armor ? Hm i know it's classified when equipped, but how to predefine it ?
Can be performed something in Receive.pm to fix this, a global checker for inventory, with non-overrided methods, to check if flag param exists. :@
'identified' is not needed on stackable ,isn't it? it is not equipped item
Kore sometimes uses "idenfitied" instead of "identified".
still not repaired nice observation
@moneyisgod Item is defined by type in item struct, maybe we need update to ignore identified and broken when item is egg ID nameID "type" type_equip equipped upgrade cards expire bindOnEquipType sprite_id num_options options identified
BROKEN egg is fine for me that show the difference between hatched or not unless you want to change "BROKEN" to "Hatched" , or something....
20130320 = sub sync_received_characters {
Well have an extra space and we can remove this. It's already in sT0, such as parse_items_nonstackable parse_items_nonstackable ! ^^ but the sT0 need to be refactored.
For official servers : st0 =
$item->{broken} = $item->{identified} & (1 << 1) unless exists $item->{broken};
but since 20130320 it's changed to another logical but i don't get this flag, i doesn't worked with flags, only without flags, then i can just assume as sT0.