Haven't looked in any detail at what you've done, but a quick answer to your query about where to declare your variables is this: If you want them to be persistent, the most likely place you'll want to declare them is as member variables of the parent object--in this case in "class Client {" in client.h. But don't forget to initialize them to some known valid value in the constructor!
But without looking into it in more detail, I'm not convinced that Client is where you want this to be (there might be a Spell or SpellEffect class that persists as long as the spell is in effect, or a Player class that contains a list of currently active effects--if either exists, those would be more appropriate place to have this data retained).
|