------------------------
What purpose would a serializer on world objects serve?
------------------------
Quite handy for sending an object to a server for reporting. Useful for MobTracker, LootTracker, RareTracker or any statistical gathering plugin. See example from a previous thread:
------------------------
void WorldFilter_ChangeObject(object sender, Decal.Adapter.Wrappers.ChangeObjectEventArgs e)
{
// Check for ID receipt and send data
if (e.Change == WorldChangeType.IdentReceived)
{
int ItemIndex = PendingItems.BinarySearch(e.Changed.Id);
if (ItemIndex >= 0)
{
PendingItems.RemoveAt(ItemIndex);
ScannedItems.Add(e.Changed.Id);
SendToServer(e.Changed.Serialize());
}
}
}
The SendToServer line is actually a call to a procedure that enumerates every property and sends the resulting string to the server. The net effect of this identical to what the line above would be IF the WO had a Serializer(Hint Hint). Very clean, very simple. (Before you ask, items that are not ID'd are sent in the Create in a similar manner, and the server does the deduplication)
------------------------
-----signature-----
Current developer of Mob Tracker (mobtracker.yewsplugins.com)
Current developer of Rare Tracker(raretracker.yewsplugins.com)
Current developer of Craft Bot(craftbot.yewsplugins.com)
Email:yew@yewsplugins.com