EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Break Invis/Hide when Looting Corpse (https://www.eqemulator.org/forums/showthread.php?t=23815)

TheLieka 10-25-2007 11:04 AM

Break Invis/Hide when Looting Corpse
 
Currently, it's possible to invis up and loot your corpse, on Live, looting breaks invis:

Fix:
.\zone\client_packet.cpp
Code:

void Client::Handle_OP_LootRequest(const EQApplicationPacket *app)
{
        if (app->size != sizeof(int32)) {
                cout << "Wrong size: OP_LootRequest, size=" << app->size << ", expected " << sizeof(int32) << endl;
                return;
        }
       
        Entity* ent = entity_list.GetID(*((int32*)app->pBuffer));
        if (ent == 0) {
                Message(13, "Error: OP_LootRequest: Corpse not found (ent = 0)");
                Corpse::SendLootReqErrorPacket(this);
                return;
        }
        if (ent->IsCorpse()) {
        if(invisible) {        //Lieka Edit:  Break Invis if looting
                BuffFadeByEffect(SE_Invisibility);
                BuffFadeByEffect(SE_Invisibility2);
                invisible = false;
        }
        if(invisible_undead) {
                BuffFadeByEffect(SE_InvisVsUndead);
                BuffFadeByEffect(SE_InvisVsUndead2);
                invisible_undead = false;
        }
        if(invisible_animals){
                BuffFadeByEffect(SE_InvisVsAnimals);
                invisible_animals = false;
        }

        if(hidden || improved_hidden){
                hidden = false;
                improved_hidden = false;
                EQApplicationPacket* outapp = new EQApplicationPacket(OP_SpawnAppearance, sizeof(SpawnAppearance_Struct));
                SpawnAppearance_Struct* sa_out = (SpawnAppearance_Struct*)outapp->pBuffer;
                sa_out->spawn_id = GetID();
                sa_out->type = 0x03;
                sa_out->parameter = 0;
                entity_list.QueueClients(this, outapp, true);
                safe_delete(outapp);
        }//End Lieka Edit

                ent->CastToCorpse()->MakeLootRequestPackets(this, app);
                return;
        }
        else {
                cout << "npc == 0 LOOTING FOOKED3" << endl;
                Message(13, "Error: OP_LootRequest: Corpse not a corpse?");
                Corpse::SendLootReqErrorPacket(this);
        }
        return;
}


TheLieka 10-26-2007 09:12 AM

To clarify with this:

Just add the text in red to:
void Client::Handle_OP_LootRequest(const EQApplicationPacket *app) in client_packet.cpp

Nothing has been removed from that function.

Dax

Angelox 10-26-2007 09:25 AM

There's also something else that's aggravating and I think still is a problem -
When your are invisible and camp out; when you come back in the game, there is a few seconds where you are "visible" until the server figures out you really were supposed to be invisible. If you are in a bad spot, you'll find NPCs wailing on you inv or not.
I was thinking just make some code that would make all PCs logging in invisible for "x" amount of time, tell the server caught up.

WildcardX 10-26-2007 10:10 AM

I'll validate this code for possible submission into the server code repository in the next couple of days.

WildcardX 10-26-2007 11:26 AM

I have validated this code and will add it to the server code repository the next chance I have to commit.

Thank you for your contribution.

TheLieka 10-29-2007 03:04 AM

by the way, thanks for the speedy responses WildCard, it's extremely encouraging. I'll continue to post my fixes. =)

Dax

gernblan 11-03-2007 07:21 AM

Quote:

Originally Posted by Angelox (Post 139935)
There's also something else that's aggravating and I think still is a problem -
When your are invisible and camp out; when you come back in the game, there is a few seconds where you are "visible" until the server figures out you really were supposed to be invisible. If you are in a bad spot, you'll find NPCs wailing on you inv or not.
I was thinking just make some code that would make all PCs logging in invisible for "x" amount of time, tell the server caught up.

Even WORSE, when a GM is invis (anon and GMHIDEME on) and warps to a player, they can be spotted for a brief second.

John Adams 11-03-2007 07:44 AM

Yeah, there's lots of things about the GMHide feature I do not like. Either it's very precise in it's configuration, or not working quite right. I can be in #gm on mode, and players can do a /who all and see GM-Impossible. I can #gmhide, and I am still there. However, if I turn #gm off (and thus vulnerable to attack) I am no longer on /who all, but now Mobs that are KOS attack the invisible GM.

So many inconsistencies. IMO, the /gmhide (slash version?) vs #gmhideme or whatever it's called, need to be more clearly defined. I do believe it works to an extent, just not fully, or clearly. I'd like any guide/gm to be 100% invisible to any player or /who list (or /tar [name]) simply because that flag is active - not based on any other criteria. Simple. :)

WildcardX 11-03-2007 07:46 AM

This is a code submission forum, not a feature discussion. I hate to be a tight ass about it, but we need to be strict in this forum so all code submissions make it into the server code and we don't miss something lost in discussions.

What you are discussing is related to this code submission, but it is a separate issue.

John Adams 11-03-2007 07:51 AM

Very true, sorry for my tangent. Split the posts off if necessary, cuz this is a valid issue as well - related to invis, just not on the same level.


All times are GMT -4. The time now is 03:43 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.