Openkore.com

OpenKore Forums
It is currently 24 Sep 2019, 05:37

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 15 Aug 2010, 18:01 
Offline
Noob
Noob

Joined: 11 Sep 2009, 03:58
Posts: 18
[iRO::Valkyrie]

i got forged "<name>'s Damascus" - yes, NO element and NO starcrumbs.

"i" command lists it as following:
Code:
-- Equipment (Not Equipped) --
15   Main Gauche [Santa Poring*4] [4] (Weapon)           
16   VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVS Holy Damascus (Weapon) 
22   Earth Damascus (Weapon)   
...


packet:
Code:
D0 02
EE 00
16 00 B8 04 05 01 22 00 00 00 00 00 A5 0F A5 0F A5 0F A5 0F 00 00 00 00 00 00
18 00 C6 04 05 01 22 00 00 00 00 00 FF 00 00 00 16 C2 0A 00 00 00 00 00 00 00   <-- this one
25 00 C6 04 05 01 22 00 00 00 00 00 FF 00 03 00 3D 47 08 00 00 00 00 00 00 00
26 00 B8 04 05 01 22 00 00 00 00 00 DC 0F DC 0F DC 0F DC 0F 00 00 00 00 00 00
27 00 51 15 04 01 00 01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
28 00 23 09 04 01 10 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
29 00 DA 09 04 01 04 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2A 00 C6 04 05 01 22 00 02 00 00 00 FF 00 02 00 16 C2 0A 00 00 00 00 00 00 00
2B 00 B8 04 05 01 22 00 20 00 00 00 DF 0F DF 0F DF 0F DF 0F 00 00 00 00 00 00


sems like problem lies in src/Misc.pm's itemName function. here's possibly faulty code branch (with inserted debug logging code):
Code:
...
        } elsif ($cards[0] == 255) {
                # Forged weapon
                #
                # Display e.g. "VVS Earth" or "Fire"
                my $elementID = $cards[1] % 10;
                my $elementName = $elements_lut{$elementID};
                my $starCrumbs = ($cards[1] >> 8) / 5;
# [-sinny-]
message TF("[dbg] ~~~ cards[1](%d) elem(%d->%s) starCrumbs(%d) ~~~ \n", $cards[1], $elementID, $elementName, $starCrumbs), "info";
                $prefix .= ('V'x$starCrumbs)."S " if $starCrumbs;
                $prefix .= "$elementName " if ($elementName ne "");
        } elsif (@cards) {
...


for my weird damascus inserted logging would print:
Code:
[info] [dbg] ~~~ cards[1](49686) elem(6->Holy) starCrumbs(38) ~~~ 


my common coding sense gets screwed up trying to get how "$cards[1]" could expand to "49686" (insufficient perl knowledge?) so i can make no further progress on this on my own...


Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 15 Aug 2010, 18:15 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Could be caused that 0x02D0, 0x02D1, 0x02D2 packets internals changed a bit.
We know 2 types of internal: len 26 and 28.
the bug could be caused by trying to parse Internals with wrong struct len.


P.S. Just finished the HEX pattern to check that:
Quote:
Check EQUIPMENTITEM_EXTRAINFO3 len (packets: 0x02d0, 0x02d1, 0x02d2):
Quote:
EQUIPMENTITEM_EXTRAINFO3 Struct [0x02d0, 0x02d1, 0x02d2] (Extended, len 28):
8B 45 08 83 C6 1C 48 89 5D C4 89 5D C8 89 5D ?? 89 45 08 0F ?? ?? ?? ?? ?? 5F

EQUIPMENTITEM_EXTRAINFO3 Struct [0x02d0, 0x02d1, 0x02d2] (Normal, len 26):
8B 45 08 83 C6 1A 48 89 5D C8 89 5D CC 89 5D ?? 89 45 08 0F ?? ?? ?? ?? ?? 5F


_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 15 Aug 2010, 18:27 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Hmm.. nope.
I think, OpenKore supports Item Type somehow Wrong:
Code:
typedef enum <unnamed-tag> {
  TYPE_HEAL =  0x0,
  TYPE_SCHANGE =  0x1,
  TYPE_SPECIAL =  0x2,
  TYPE_EVENT =  0x3,
  TYPE_ARMOR =  0x4,
  TYPE_WEAPON =  0x5,
  TYPE_CARD =  0x6,
  TYPE_QUEST =  0x7,
  TYPE_BOW =  0x8,
  TYPE_BOTHHAND =  0x9,
  TYPE_ARROW =  0xa,
  TYPE_ARMORTM =  0xb,
  TYPE_ARMORTB =  0xc,
  TYPE_ARMORMB =  0xd,
  TYPE_ARMORTMB =  0xe,
  TYPE_GUN =  0xf,
  TYPE_AMMO =  0x10,
  TYPE_THROWWEAPON =  0x11,
  TYPE_CASH_POINT_ITEM =  0x12,
  TYPE_CANNONBALL =  0x13,
  TYPE_COSTUME =  0x14,
  TYPE_LAST =  0x15,
} <unnamed-tag>;


typedef enum enumInventoryItemType {
  INVENTORYITEMTYPE_ITEM =  0x0,
  INVENTORYITEMTYPE_NORMALITEM =  0x1,
  INVENTORYITEMTYPE_NORMALARROWITEM =  0x2,
  INVENTORYITEMTYPE_EQUIPITEM =  0x3,
  INVENTORYITEMTYPE_MONEYITEM =  0x4,
  INVENTORYITEMTYPE_SKILL =  0x5,
  INVENTORYITEMTYPE_UNNONE =  0x6,
  INVENTORYITEMTYPE_QUESTITEM =  0x7,
  INVENTORYITEMTYPE_CASHPOINTITEM =  0x8,
} enumInventoryItemType;

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 15 Aug 2010, 18:41 
Offline
Noob
Noob

Joined: 11 Sep 2009, 03:58
Posts: 18
seems to me like the problem is purely in the code branch i quoted at the very beginning.

i can confirm the following being displayed as it should:
- forged elemental with NO starcrumbs.

it should be laid out absolutely the same way in packet as non-elemental non-starcrumb forged weapon in question.

UPD:
to be more precise, i get the following debug output in openkore:
Code:
[info] [dbg] ~~~ cards[1](49686) elem(6->Holy) starCrumbs(38) ~~~
[info] [dbg] ~~~ cards[1](3) elem(3->Fire) starCrumbs(0) ~~~
[info] [dbg] ~~~ cards[1](2) elem(2->Earth) starCrumbs(0) ~~~


"<name>'s Earth Damascus" and "<name>'s Fire Damascus" are actually present in inventory. the problem is only with forged "<name>'s Damascus" (non-starcrumb and non-elemental) - it get named weirdly.


Last edited by obsc on 15 Aug 2010, 18:52, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 15 Aug 2010, 18:50 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Found it.
near the
Code:
next unless $card;
push(@cards, $card);
($cards{$card} ||= 0) += 1;

Break all Special Items data.

Upd:
the thing is, that ZERO data is ignored, and does not get into the array.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 18 Jul 2012, 18:22 
Offline
Developers
Developers

Joined: 05 Dec 2008, 05:42
Posts: 1811
What's the status on this?


Top
 Profile  
 
 Post subject: Re: [iRO::Valkyrie] incorrect forged item name generation
PostPosted: 18 Jul 2012, 19:10 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1301
Donno.
Someone Tried to Support it with StarCrumb patch.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group