Quick explanation of what I am trying to achieve (in case I've gone off on a tangent) :
I want to be able to specify an additional 'char_data' and an 'int' in an event, using mud events.
As an example, to create a damage-over-time event I would like to have the damager, damagee and the type of damage included with the event.
So I've added the information to the event structure like this:
Code:
struct mud_event_data {
struct event * pEvent; /***< Pointer reference to the event */
event_id iId; /***< General ID reference */
void * pStruct; /***< Pointer to NULL, Descriptor, Character .... */
char * sVariables; /***< String variable */
+ void *vStruct; // Pointer to Victim
+ int vInt; // variable integer for attacktype, damage, etc..
};
When free_mud_event is called, should I be freeing vStruct and/or vInt as well?
Should vInt be *vInt, like *sVariables is? Bit confused on this haha