diff --git a/changelog.txt b/changelog.txt index a177460ee..e02571f44 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,8 @@ Kayen: Update SE_Taunt - Limit value if present will now add instant hate. Kayen: Implemented SE_MassGroupBuff - Allows next group buff cast to be a MGB (AA now uses this) Kayen: Implemented SE_IllusionOther - Allows next Illusion buff (self only) cast to be cast on target. (AA now uses this) Kayen: Update SE_AETaunt - Base value will now determine AE taunt range (This will not result in any change to currently used spells). +Kayen: Udpated SE_ReclaimPet - Correct forumla for mana returned to properly return 75% of actual pet spell mana cost. +Kayen: Implemented SE_ImprovedReclaimEnergy - Modifies % mana returned from SE_ReclaimPet. Required SQL: utils/sql/git/required/2014_06_25_AA_Update.sql diff --git a/common/spdat.h b/common/spdat.h index 7773a95c4..bb3951019 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -358,7 +358,7 @@ typedef enum { //#define SE_PurgePoison 208 // not used #define SE_DispelBeneficial 209 // implemented //#define SE_PetShield 210 // *not implemented -#define SE_AEMelee 211 // implemented +#define SE_AEMelee 211 // implemented TO DO: Implement to allow NPC use (client only atm). #define SE_FrenziedDevastation 212 // implemented - increase spell criticals + all DD spells cast 2x mana. #define SE_PetMaxHP 213 // implemented[AA] - increases the maximum hit points of your pet #define SE_MaxHPChange 214 // implemented @@ -375,7 +375,7 @@ typedef enum { #define SE_GiveDoubleAttack 225 // implemented[AA] - Allow any class to double attack with set chance. #define SE_TwoHandBash 226 // *not implemented as bonus #define SE_ReduceSkillTimer 227 // implemented -#define SE_ReduceFallDamage 228 // not implented as bonus - reduce the damage that you take from falling +//#define SE_ReduceFallDamage 228 // not implented as bonus - reduce the damage that you take from falling #define SE_PersistantCasting 229 // implemented //#define SE_ExtendedShielding 230 // not used as bonus - increase range of /shield ability #define SE_StunBashChance 231 // implemented - increase chance to stun from bash. @@ -388,7 +388,7 @@ typedef enum { //#define SE_IllusionPersistence 238 // *not implemented - lends persistence to your illusionary disguises, causing them to last until you die or the illusion is forcibly removed. //#define SE_FeignedCastOnChance 239 // *not implemented as bonus - ability gives you an increasing chance for your feigned deaths to not be revealed by spells cast upon you. //#define SE_StringUnbreakable 240 // not used [Likely related to above - you become immune to feign breaking on a resisted spell and have a good chance of feigning through a spell that successfully lands upon you.] -#define SE_ImprovedReclaimEnergy 241 // not implemented as bonus - increase the amount of mana returned to you when reclaiming your pet. +#define SE_ImprovedReclaimEnergy 241 // implemented - increase the amount of mana returned to you when reclaiming your pet. #define SE_IncreaseChanceMemwipe 242 // implemented - increases the chance to wipe hate with memory blurr #define SE_CharmBreakChance 243 // implemented - Total Domination #define SE_RootBreakChance 244 // implemented[AA] reduce the chance that your root will break. diff --git a/utils/sql/git/required/2014_06_25_AA_Updates..sql b/utils/sql/git/required/2014_06_25_AA_Updates..sql index 2e2b7579f..13522e93c 100644 --- a/utils/sql/git/required/2014_06_25_AA_Updates..sql +++ b/utils/sql/git/required/2014_06_25_AA_Updates..sql @@ -6,5 +6,8 @@ UPDATE aa_actions SET spell_id = 5228, nonspell_action = 0 WHERE aaid = 128; UPDATE altadv_vars SET spellid = 5227 WHERE skill_id = 643; UPDATE aa_actions SET spell_id = 5227, nonspell_action = 0 WHERE aaid = 643; +-- AA Improved Reclaim Energy +INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('180', '1', '241', '95', '0'); + -- spells_new update ALTER TABLE `spells_new` CHANGE `field175` `numhits_type` INT(11) NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index f46328ea6..be847b280 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1270,6 +1270,15 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon) newbon->Metabolism += base1; break; + case SE_ImprovedReclaimEnergy: + { + if((base1 < 0) && (newbon->ImprovedReclaimEnergy > base1)) + newbon->ImprovedReclaimEnergy = base1; + + else if(newbon->ImprovedReclaimEnergy < base1) + newbon->ImprovedReclaimEnergy = base1; + break; + } } } } @@ -2741,6 +2750,16 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne newbon->Metabolism += effect_value; break; + case SE_ImprovedReclaimEnergy: + { + if((effect_value < 0) && (newbon->ImprovedReclaimEnergy > effect_value)) + newbon->ImprovedReclaimEnergy = effect_value; + + else if(newbon->ImprovedReclaimEnergy < effect_value) + newbon->ImprovedReclaimEnergy = effect_value; + break; + } + //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 955a29d38..7ffc1e797 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -1177,7 +1177,7 @@ uint32 Client::CalcCurrentWeight() { Total += (m_pp.platinum + m_pp.gold + m_pp.silver + m_pp.copper) / 4; } - float Packrat = (float)spellbonuses.Packrat + (float)aabonuses.Packrat; + float Packrat = (float)spellbonuses.Packrat + (float)aabonuses.Packrat + (float)itembonuses.Packrat; if (Packrat > 0) Total = (uint32)((float)Total * (1.0f - ((Packrat * 1.0f) / 100.0f))); //AndMetal: 1% per level, up to 5% (calculated from Titanium client). verified thru client that it reduces coin weight by the same % //without casting to float & back to uint32, this didn't work right diff --git a/zone/common.h b/zone/common.h index a8e8a17c9..421474eec 100644 --- a/zone/common.h +++ b/zone/common.h @@ -422,6 +422,7 @@ struct StatBonuses { int8 StunBashChance; // chance to stun with bash. int8 IncreaseChanceMemwipe; // increases chance to memory wipe int8 CriticalMend; // chance critical monk mend + int16 ImprovedReclaimEnergy; // Modifies amount of mana returned from reclaim energy }; typedef struct diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index e3fb89d6f..8eab0b329 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1551,15 +1551,22 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) GetPetType() != petCharmed ) { - int lvlmod = 4; - if(caster->IsClient() && caster->CastToClient()->GetAA(aaImprovedReclaimEnergy)) - lvlmod = 8; //this is an unconfirmed number, I made it up - if(caster->IsClient() && caster->CastToClient()->GetAA(aaImprovedReclaimEnergy2)) - lvlmod = 8; //this is an unconfirmed number, I made it up - caster->SetMana(caster->GetMana()+(GetLevel()*lvlmod)); + uint16 pet_spellid = CastToNPC()->GetPetSpellID(); + uint16 pet_ActSpellCost = caster->GetActSpellCost(pet_spellid, spells[pet_spellid].mana); + int16 ImprovedReclaimMod = caster->spellbonuses.ImprovedReclaimEnergy + + caster->itembonuses.ImprovedReclaimEnergy + + caster->aabonuses.ImprovedReclaimEnergy; + + if (!ImprovedReclaimMod) + ImprovedReclaimMod = 75; //Reclaim Energy default is 75% of actual mana cost + + pet_ActSpellCost = pet_ActSpellCost*ImprovedReclaimMod/100; + + caster->SetMana(caster->GetMana() + pet_ActSpellCost); if(caster->IsClient()) caster->CastToClient()->SetPet(0); + SetOwnerID(0); // this will kill the pet } break; @@ -5804,7 +5811,7 @@ bool Mob::TryDispel(uint8 caster_level, uint8 buff_level, int level_modifier){ /*This should provide a somewhat accurate conversion between pre 5/14 base values and post. until more information is avialble - Kayen*/ - if (level_modifier > 100) + if (level_modifier >= 100) level_modifier = level_modifier/100; //Dispels - Check level of caster agianst buffs level (level of the caster who cast the buff)