EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Pet Power Item Focus (https://www.eqemulator.org/forums/showthread.php?t=26517)

seveianrex 10-14-2008 04:04 PM

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;
        }


MNWatchdog 10-15-2008 12:01 AM

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.

seveianrex 10-15-2008 06:21 AM

Quote:

Originally Posted by MNWatchdog (Post 158371)
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.

cray5678 02-16-2016 03:36 AM

What a thoughtful present, it is a material good, I like it.
เกมบาคาร่า


All times are GMT -4. The time now is 11:43 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.