PDA

View Full Version : Fix: Feign Death opcode and indiff /con


Mongrel
01-15-2004, 06:13 AM
Feign Death is working for the most part, however the opcode was still wrong and tabbed out.

The new opcode for Feign Death is 0x022F (obviously you would change this in eq_opcodes.h)

And here's a small fix to make NPCs regard you indifferently when you're feigned.

zone/client_process.cpp:

In Client::HandlePacket look for the OP_Consider opcode

case OP_Consider: {


and change the following lines

if(database.GetServerType() == 1) {
if (!tmob->IsNPC() )
con->pvpcon = tmob->CastToClient()->GetPVP();
}

QueuePacket(outapp);
safe_delete(outapp);
break;


to:

if(database.GetServerType() == 1) {
if (!tmob->IsNPC() )
con->pvpcon = tmob->CastToClient()->GetPVP();
}

// Mongrel: If we're feigned show NPC as indifferent
if (tmob->IsNPC())
{
if (feigned)
con->faction = FACTION_INDIFFERENT;
}

QueuePacket(outapp);
safe_delete(outapp);
break;


Note: The same could be done with Invis and InvisToUndead. However, ITU isn't implemented yet (would need a flag "invistoundead", similar to the "invisible" flag, a rather large change in code), so I'm leaving this out for now.

Trumpcard
01-15-2004, 07:08 AM
Good fix... I'll get it in tonight...

Thanks!

EDIT: Ok, merged. Thanks again