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

Development::Feature Requests Post suggestions/feature requests here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-12-2006, 06:21 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

I've been bouncing back to this concept between server explosions, and wanted to pose a quick concept to get feedback from devs or others on a possible way to make this work. In attack.cpp, there is a section of code regarding client death that checks the value of variables "leavecorpses". If it's set to any positive value, a corpse is generated and items are moved to the corpse, etc.

I was thinking of changing this to a switch (leavecorpses) which will check for a default case, then 1 or 2 for values which cause the corpse generation to behave differently. 1 = normal, drop corpse, move items to corpse. 2 = drop corpse, leave items on player, allow corpse rez to recover xp like normal.

Current code:
Code:
// check db variable 'leavecorpses'
char tmp[20] = {0};
database.GetVariable("leavecorpses", tmp, 20);
int leavecorpses = atoi(tmp);
if(leavecorpses)
{
  // creating the corpse takes the cash/items off the player too
			Corpse *new_corpse = new Corpse(this, exploss);
Concept code:
Code:
// check db variable 'leavecorpses'
char tmp[20] = {0};
database.GetVariable("leavecorpses", tmp, 20);
int leavecorpses = atoi(tmp);
switch (leavecorpses)
{
  case 1:
    // creating the corpse takes the cash/items off the player too
    Corpse *new_corpse = new Corpse(this, exploss);
    break;
  case 2:
    // creating the corpse leaving the cash/items on the player
    Corpse *new_naked_corpse = new Corpse(this, exploss);  // or whatever
    break;
  default:
    // just to normal, no corpse death routine
}
(I haven't verified the syntax of the switch/case yet, so forgive if it's wrong)

Does this make sense? And, are there any long-term issues you might see with adding this functionality? I've grep'd the code for where the database lookup occurs, and it only seems to be in attack.cpp. I realize a new routine would probably also need to be added like Corpse *new_naked_corpse = new Corpse(this, exploss); or something that will generate the new corpse, naked, and leave you with your gear like leavecorpses = 0 does.

Any advice would be welcome. I am working out the code now and will test it before posting here.

TIA,
J
Reply With Quote
 


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