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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 10-15-2008, 12:01 AM
MNWatchdog
Hill Giant
 
Join Date: Feb 2006
Posts: 179
Default

Why not make the focus item effect relevant?

Mages have lots of various pet focus items that effect levels and some only certain types of pets.
Reply With Quote
  #3  
Old 10-15-2008, 06:21 AM
seveianrex
Sarnak
 
Join Date: Sep 2008
Location: asdf
Posts: 60
Default

Quote:
Originally Posted by MNWatchdog View Post
Why not make the focus item effect relevant?

Mages have lots of various pet focus items that effect levels and some only certain types of pets.
Let me be clear, the LIMIT effects are all in full effect. e.g. The "Minion of Fire" focus will only apply to Magician Fire Pets within the specified level range.

The reason that the Pet Power(int x) is not being used as a scale is because I did research on what x represents and found many large posts about how it has no relevance at all: there are items with lower x than others which provide a stronger effect.

Therefore, this will work for now until someone with greater motivation than I maps out which focus effects should be stronger/weaker than others.
Reply With Quote
  #4  
Old 02-16-2016, 03:36 AM
cray5678
Fire Beetle
 
Join Date: Feb 2016
Location: asda
Posts: 2
Default

What a thoughtful present, it is a material good, I like it.
เกมบาคาร่า
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 11:39 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