View Single Post
  #33  
Old 06-26-2009, 07:07 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I started looking into recast timers on clicky items that have recast delays on them along with a recast type. I think I actually got it figured out now, but really don't know how to code it to do what it needs to do.

Basically, the field we have labeled as PotionType in the item Serialization for SoF is actually supposed to be for all items that have a recast delay/type set on them. It appears that this field of the serialization is supposed to pull the recast timers from the player profile for the recast type of that item. I think I have the structure set properly for where to save the recast timers, but I don't know how to set it to save a unix timestamp to those fields of the profile, so it isn't coded yet.

Once the PP is coded to save the timestamps, we would pull those timestamps and send them in the potiontype field (which probably needs to be renamed to something more like LastCastTime) for any item that has a recast delay > 0. This should tell the item whether it should be greyed out/counting down or if it should be shown as ready to use. Setting a time/date definitely stop items with recast delays from being greyed out. Here is the serialization packet of an item I have on Live broken down into the structure that shows an example:

Book of Knowledge
Code:
01 00 00 00 stacksize
00 00 00 00 unknown004
2a 01 00 00 slot
00 00 00 00 price
01 00 00 00 merchant_slot
00 00 00 00 unknown020
ec e6 5d 00 instance_id
00 00 00 00 unknown028
94 3a 48 48 potion_type - Unix Time - Thu Jun 05 14:12:20 2008
04 00 00 00 charges
00 00 00 00 inst_nodrop
00 00 00 00 unknown044
00 00 00 00 unknown048
00 00 00 00 unknown052
00 00 00 00 unknown056
00 unknown060
00 unknown061
00 ItemClass
00 Doesn't Exist in SoF
So far, it seems like items with recasttype of 10 will count down properly after being clicked, but the others do not. I believe this is probably something to do with us not sending the manachange or some other spell casting packet with the proper information. I would guess that we need to send the recast type somewhere after casting a spell.

It would probably help to figure the recast stuff out if anyone with a Live account that has an epic 1.5 could collect a packet log of their player profile as well as the item packet for their epic so I can see how those are serialized. It could be that one of the other unknowns sends the recasttype to go along with the last cast time from the player profile.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote