Jesse Nesbitt wrote:
I'm no expert, but from what I can see, blocks is a hashtable (keys, values). It seems that you store multiple blocks of data in blocks, and you do this by having another hash with your flags and "payload" data, then using the flags hash as your key, and the block type as your value. It's kind of a hard structure to visualize, but if you use the template, you shouldn't have much trouble. Also, take a look at SLProxy's Analyzer. You can log and look at packets on the fly from the SL client. I'm going to fool around with it more once we come back up. --Jesse
The hashtables used for building packets are slightly backwards due to the nature of hashtables. One hash = one value, where each hash is unique in the table but they can point to the same or different values. This works fine at the field level because often times multiple fields in a packet have the same value, but each field in a block has a different name (a unique key). When it comes to blocks though, you have variable blocks meaning you can have more than one of the same block in a single block hashtable. It would probably make more sense to use an ArrayList for the blocks, maybe this will be changed soon.
SLAccountant is a good example of a stand-alone program and will give you a feel for how things work, but for your actual project I really recommend the new SLProxy that was recently released. It allows you to use the official client but also inject and modify packets, making it an excellent fit for extending the official client.
The GiveMoney function is a friendly wrapper around the manual process of building packets with hashtables. Eventually all packets will have friendly wrappers, but for the ones not implemented you can build them yourself with the hashtable method you've seen. AgentAnimation does not have a friendly wrapper yet, but if you file a bug report (that will serve as a reminder to me or anyone with svn commit access) for it then it will be added quickly.
John _______________________________________________ libsecondlife-dev mailing list libsecondlife-dev@gna.org https://mail.gna.org/listinfo/libsecondlife-dev