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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-14-2008, 04:04 PM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default Pet Power Item Focus

The following snippet provides the implementation for pet power item focus. The focus has been setup to provide a prescribed percentage increase, which should scale with level nicely.

Code has been pre-tested locally for bugs.

{Zone\spdat.h}
find (line ~241)
Code:
#define SE_PetPowerIncrease			167	//not implemented, base % increase of pet stuff
and replace comment
Code:
#define SE_PetPowerIncrease			167	//percentage boost to pet HP, min/max damage, min/max HP
{Zone\client.h}
find (line ~88)
Code:
typedef enum {	//focus types
	focusSpellHaste = 1,
	focusSpellDuration,
	focusRange,
	focusReagentCost,
	focusManaCost,
	focusImprovedHeal,
	focusImprovedDamage,
	focusImprovedDOT,		//i dont know about this...
	focusImprovedCritical,
	focusImprovedUndeadDamage
and add a new item to the enum
Code:
focusPetPower
{Zone\spell_effects.cpp}

find (line ~3269)
Code:
case SE_ReduceManaCost:
			if (type == focusManaCost && focus_spell.base[i] > value)
			{
				value = focus_spell.base[i];
			}
			break;
and add:
Code:
case SE_PetPowerIncrease:
			if (type == focusPetPower && focus_spell.base[i] > value)
			{
				value = focus_spell.base[i];
			}
			break;
{Zone\pets.cpp}

in void MakePet, around line 190, find the following:

Code:
memcpy(npc_type, base, sizeof(NPCType));
and add below:

Code:
	// focus effects only apply for client casters
	// the pet is either focused or not, the value on the item is irrelevant
	if (this->IsClient() && CastToClient()->GetFocusEffect(focusPetPower, spell_id) > 0)
	{
		npc_type->max_hp *= 1.20;
		npc_type->cur_hp = npc_type->max_hp;
		npc_type->AC *= 1.20;
		npc_type->level += 1;
		npc_type->min_dmg *= 1.10;
		npc_type->max_dmg *= 1.10;
	}
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 06:41 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3