Inspect code
Just some lines for inspect. Hope you can need it.
client_process.cpp: case OP_InspectRequest: { // 03/09 - Merkur Inspect_Struct* ins = (Inspect_Struct*) app->pBuffer; Mob* tmp = entity_list.GetMob(ins->TargetID); tmp->CastToClient()->QueuePacket(app); // Send request to target break; } // OP_InspectAnswer is 0xb620 (add to eq_opcodes.h) case OP_InspectAnswer: { Inspect_Struct* ins = (Inspect_Struct*) app->pBuffer; Mob* tmp = entity_list.GetMob(ins->TargetID); tmp->CastToClient()->QueuePacket(app); // Send answer to requester break; } eq_packets_struct.h: //Inspect struct Inspect_Struct { int16 TargetID; int16 PlayerID; }; Works fine ;) |
Some more lines :) Consider works pretty good this way - not 100% perfect but pretty close to EQ Live.
Code:
case OP_Consider: //03/09 -Merkur |
Currently our CVS is down, but I will merge this soon (tm). What source version did you use to create it?:)
|
I used the current Version 0.2.4.5
btw: in my version, i put these conlevel thing in a newfunction because i needed it for other things (i.e. determinate npc aggroradius) too. |
function in Mob?
I'm still trying to learn how the EMU code works (mostly be looking at it when I can and lurking on the dev board :)), so this may have implications I don't understand. But the OO side of me thinks that it would be easier to put the consider code into a function on the Mob class. Something like
int Mob::consider(Mob* target) { // Merkur's code here } Then in the processing function, replace most of the code with con->level = this->consider(entity_list.GetMob(conin->targetid)); This wouldn't add any functionality, but it might make the code a little easier to manage (especially since the Client::Process function is over 2000 lines long already) |
Yup, it would be better (and like i wrote i did it), but its easier to post this way :)
|
/auction wtb good coders to work on emu, /tell one of the devs
|
Heh, I'd love to, but I barely have the time to keep up to date on the boards. I still haven't even extracted the 0.2.4-preX stuff yet...
but I can try to offer insight every once and a while :) |
All times are GMT -4. The time now is 02:32 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.