Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 10-25-2007, 11:04 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default 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;
}
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #2  
Old 10-26-2007, 09:12 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

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
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #3  
Old 10-26-2007, 09:25 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

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.
Reply With Quote
  #4  
Old 10-26-2007, 10:10 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

I'll validate this code for possible submission into the server code repository in the next couple of days.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #5  
Old 10-26-2007, 11:26 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

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.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #6  
Old 10-29-2007, 03:04 AM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

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

Dax
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote
  #7  
Old 11-03-2007, 07:21 AM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Quote:
Originally Posted by Angelox View Post
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.
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote
  #8  
Old 11-03-2007, 07:44 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

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.
Reply With Quote
  #9  
Old 11-03-2007, 07:46 AM
WildcardX
Developer
 
Join Date: Apr 2003
Posts: 589
Default

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.
__________________
Read my developer notes at my blog.

Quote:
If it's not on IRC, it ain't l33t!
Reply With Quote
  #10  
Old 11-03-2007, 07:51 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:54 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3