Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2008, 08:14 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Is it necessary to add a rule? From what I understand, this would simply be doing something that Live eventually did.
Reply With Quote
  #2  
Old 08-12-2008, 04:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Well, you probably don't NEED a rule, but I think it would be nice to have the option. Some people might not want corpses to be poofing while the mob is still doing the death animation. I wouldn't mind having corpses not get made at all if it they are empty. But, I also wouldn't mind the option to set it to 5 or 10 seconds so that they at least see a corpse for a few seconds.

Rules aren't really all that hard to add, and I think they only further customize-ability of servers. Though, I think it might be a good idea to have a "Notes" column added to the Rule_Values table. It would be only for reference when setting the rule, and would be a brief description of what the rule does and how to set it. There are already descriptions for most rules directly in the ruletypes.h file, so maybe those could be pulled and put in the notes column.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 08-13-2008, 09:11 PM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

I didn't think it needed to be a rule, so I just hardcoded a 5 sec decay on empty corpses.

In zone/PlayerCorpse.cpp, near line 150 after Hogie's variable decay loop, add this.
Code:
	// Added By Hogie 
	for(int count = 0; count < 100; count++) {
		if ((level >= npcCorpseDecayTimes[count].minlvl) && (level <= npcCorpseDecayTimes[count].maxlvl)) {
			corpse_decay_timer.SetTimer(npcCorpseDecayTimes[count].seconds*1000);
			break;
		}
	}
	// Added By Hogie -- End

	if (itemlist.size() < 1)
		corpse_decay_timer.SetTimer(5000);

	for (int i=0; i<MAX_LOOTERS; i++)
		looters[i] = 0;
	this->rezzexp = 0;
I can put it into a rule if that's how it should be.
Reply With Quote
  #4  
Old 08-13-2008, 09:27 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

LOL, I figured it would be something simple like that! I will test it out on my server tonight. My only question is if this takes coin loot into consideration, or only items?

I think you guys are right. This really doesn't have much reason to be set as a rule. I guess I just like to have as many options as possible :P

Thanks Theeper!
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 08-13-2008, 09:40 PM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

I didn't think about coin, good catch Trev. Use this instead.
Code:
	if (itemlist.size() < 1 && in_npc->GetCopper() == 0 && in_npc->GetSilver()== 0 && in_npc->GetGold()== 0 && in_npc->GetPlatinum() == 0)
		corpse_decay_timer.SetTimer(5000);
Reply With Quote
  #6  
Old 08-13-2008, 09:41 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It doesn't have to be set as a rule but it is; there will be a rule in tonight's build along with some other stuff that's probably not as exciting for some people.

btw there's already a function to tell if the corpse is empty: Corpse::IsEmpty() =p
Reply With Quote
  #7  
Old 08-13-2008, 09:43 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Every little bit helps, and all progress is exciting. Thanks as always =)
Reply With Quote
  #8  
Old 08-13-2008, 10:06 PM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Quote:
Originally Posted by KLS View Post
btw there's already a function to tell if the corpse is empty: Corpse::IsEmpty() =p
LOL, that's what I get for not looking through the function list very carefully. It seems as though IsEmpty() is only used for the PERL interface right now.

Ignore the above and use this until KLS tells us how it's actually supposed to be done in one line probably :p~

Code:

	if (IsEmpty())
		corpse_decay_timer.SetTimer(5000);
Reply With Quote
  #9  
Old 08-13-2008, 10:28 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Well that's actually basically it.
Reply With Quote
  #10  
Old 08-13-2008, 10:33 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Doesn't it need the brackets around it like this?

Code:
	if (IsEmpty()) {
		corpse_decay_timer.SetTimer(5000); }
Or am I still too much of a coding newbie? :P

The only reason I ask is because I will probably just add this in manually on my server until more of the features I have to add in manually each time get added into the Official Source(Lore Aug, Chaotic Potential and new MQ Detection are the most important ones, and they all seem to be working perfectly). Or, at least until there are some significant changes in the source that I want to have on my server.

Currently, I also add these each time I update:

Lore Aug Fix:
http://www.eqemulator.net/forums/showthread.php?t=24572

CotH limiting per zone (I think live is per zone)
http://www.eqemulator.net/forums/showthread.php?t=25643

MQ Illegal Item Equip Detection
http://www.eqemulator.net/forums/showthread.php?t=25783

Chaotic Potential Fix
http://www.eqemulator.net/forums/showthread.php?t=25717

Spell And Skill Rule for Above MaxLevel Players
http://www.eqemulator.net/forums/showthread.php?t=25937

Minor NPC Spells Recast Delay Adjustment
http://www.eqemulator.net/forums/showthread.php?t=25877

Removing Non-Titanium Version Checks - Mostly to change Titanium to be checked first
http://www.eqemulator.net/forums/showthread.php?t=25569
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:20 AM.


 

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 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3