Page 1 of 1
Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 6:20 am
by paulgh
LE,
While enhancing my 'who query patch', I've run into a problem on the next to last step.
In ZoneList::ProcessWhoQuery(vector<string>* queries, ZoneServer* zone, vector<Entity*>* players), player seems to me to be a pointer to an Entity, but when I try to use a value from info_struct, it always appears to be 0, even when it shouldn't.
In ZoneList::ProcessWhoQuery(const char* query, Client* client), player seems to be a Spawn pointer, which naturally make the compile fail. I tried to change it to an Entity pointer, and that allows it to compile, but everything returns 0.
I'm wondering if I missed a step somewhere. Help?
JA asked me some time ago why I wasn't on one of the devteams. After having this much fun (and frustration) working on this, I can't think of a reason....
Re: Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 11:15 am
by paulgh
I've worked around the previous problems I've had, and now just need to add commands to toggle the various flags.
Also implemented (just for you JA) is the ability to hide your GM status, AND for GMs to completely hide from the who command.
So my question now is, is adding a new command as simple as adding it to the function and putting a define in Commands.h?
It seems like it would require more.
Re: Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 1:02 pm
by John Adams
paulgh wrote:JA asked me some time ago why I wasn't on one of the devteams. After having this much fun (and frustration) working on this, I can't think of a reason....
Welcome aboard, your work will be much appreciated.

Re: Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 2:48 pm
by LethalEncounter
paulgh wrote:I've worked around the previous problems I've had, and now just need to add commands to toggle the various flags.
Also implemented (just for you JA) is the ability to hide your GM status, AND for GMs to completely hide from the who command.
So my question now is, is adding a new command as simple as adding it to the function and putting a define in Commands.h?
It seems like it would require more.
It also requires an entry in the database. The number you defined in the Commands.h file is used for the handler field in the commands table.
Re: Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 8:11 pm
by Zcoretri
I think LE posted an example of adding a command a while back...just have to dig and find it
I know it's here somewhere.
Re: Adding support for LFG and other flags
Posted: Thu Jun 11, 2009 9:55 pm
by paulgh
Database? What database? Um, Ohhhh... THAT database.
/emote slaps his forehead repeatedly!
Note to self: an empty database isn't really empty.
Seriously, does the number I assign to the command matter? I assume it doesn't form some old posts I read, but you all know what they say about assumptions.
Re: Adding support for LFG and other flags
Posted: Fri Jun 12, 2009 10:56 am
by LethalEncounter
paulgh wrote:
Seriously, does the number I assign to the command matter? I assume it doesn't form some old posts I read, but you all know what they say about assumptions.
Not really, but try to use the next number that hasn't been used yet so we keep them in order and don't overlap. Just post a message on one of the database forums and John Adams or I will add it to the update server for it to be pushed to everyone.