PDA

View Full Version : Pet Power Item Focus


seveianrex
10-14-2008, 04:04 PM
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)

#define SE_PetPowerIncrease 167 //not implemented, base % increase of pet stuff


and replace comment

#define SE_PetPowerIncrease 167 //percentage boost to pet HP, min/max damage, min/max HP


{Zone\client.h}
find (line ~88)

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

focusPetPower


{Zone\spell_effects.cpp}

find (line ~3269)

case SE_ReduceManaCost:
if (type == focusManaCost && focus_spell.base[i] > value)
{
value = focus_spell.base[i];
}
break;


and add:

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:


memcpy(npc_type, base, sizeof(NPCType));


and add below:


// 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
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.
เกมบาคาร่า (http://gclubtg-casino.blogspot.com/2015/09/gclub-casino_13.html)