Adding support for LFG and other flags

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Adding support for LFG and other flags

Post by paulgh » Thu Jun 11, 2009 6:20 am

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....

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Adding support for LFG and other flags

Post by paulgh » Thu Jun 11, 2009 11:15 am

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Adding support for LFG and other flags

Post by John Adams » Thu Jun 11, 2009 1:02 pm

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. :)

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Adding support for LFG and other flags

Post by LethalEncounter » Thu Jun 11, 2009 2:48 pm

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.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Adding support for LFG and other flags

Post by Zcoretri » Thu Jun 11, 2009 8:11 pm

I think LE posted an example of adding a command a while back...just have to dig and find it :mrgreen:

I know it's here somewhere.

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Adding support for LFG and other flags

Post by paulgh » Thu Jun 11, 2009 9:55 pm

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.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Adding support for LFG and other flags

Post by LethalEncounter » Fri Jun 12, 2009 10:56 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests