View Single Post
  #196  
Old 02-18-2009, 04:02 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

I started working on OP_Consume the other night (otherwise, client freezes when you right-click on food), but since I haven't really worked with the encoding/decoding of packets much, I'm not sure what we need to do in SoF_ops.h & SoF.cpp, but here's the new struct:

Code:
struct Consume_Struct
{
/*0000*/ int32 slot;
/*0004*/ int32 unknown4; // usually 0x0, but also saw 0x43
};
That's specifically from right-clicking though. Here are some captures from the log (after adding a hex output to client_packet.cpp):
Code:
Right-clicked food (Bread Crumbs*) from slot 24
3652 [02.09. - 02:28:02] [NET__ERROR] OP size error: OP_Consume expected:16 got:8
3652 [02.09. - 02:28:02] [NET__ERROR] 0000: 18 00 00 00 43 00 00 00 -                          | ....C...

Right-clicked drink (Skin of Milk) from slot 23
3652 [02.09. - 02:31:28] [NET__ERROR] OP size error: OP_Consume expected:16 got:8
3652 [02.09. - 02:31:28] [NET__ERROR] 0000: 17 00 00 00 00 00 00 00 -                          | ........

Right-clicked food (Misty Thicket Picnic [9662]) from slot 28
3652 [02.09. - 02:38:09] [NET__ERROR] OP size error: OP_Consume expected:16 got:8
3652 [02.09. - 02:38:09] [NET__ERROR] 0000: 1c 00 00 00 00 00 00 00 -                          | ........
If someone wants to finish it off before I have a chance to learn it, feel free.

As far as the items issue, 32768 is for Shrouds in Titanium. Here's an excerpt from my PHP editor (that I haven't worked on in forever):
items/index.php
Code:
        // Class(es)
        echo "Class: ";
        if ($db_row[classes] == 65535) echo "ALL ";
        elseif ($db_row[classes] == 0) echo "NONE ";
        else {foreach ($ClassesShort as $key => $value) if ($db_row[classes] & pow(2, $key - 1)) echo $value . " ";};
        echo "<br>\n";
includes/constants.php
Code:
// Race List
$Races = array(
        1 => "HUM",
        2 => "BAR",
        4 => "ERU",
        8 => "ELF",
        16 => "HIE",
        32 => "DEF",
        64 => "HEF",
        128 => "DWF",
        256 => "TRL",
        512 => "OGR",
        1024 => "HFL",
        2048 => "GNM",
        4096 => "IKS",
        8192 => "VAH",
        16384 => "FRG",
        32768 => "Shroud"
);
As a matter of fact, it looks like this actually got buried in the Wiki:
Quote:
races

* What race or races can use the item. Rememeber to add up the results.
o 0 = None
o 1 = Human
o 2 = Barbarian
o 4 = Erudite
o 8 = ELF
o 16 = HIE
o 32 = Dark Elf
o 64 = HEF
o 128 = Dwarf
o 256 = Troll
o 512 = Ogre
o 1024 = HFL
o 2048 = Gnome
o 4096 = Iksar
o 8192 = Vah Shir
o 16384 = Froglok
o 32768 = Shroud
* These are combined values, but with special meaning:
o 32767 = Any/All
o 65535 = Usually a container
So it sounds like we may need to convert the races in Titanium & 6.2 to delete that bit for the Drakken, then everything else should be fine.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki

Last edited by AndMetal; 02-19-2009 at 12:05 AM..
Reply With Quote