Merge pull request #462 from KayenEQ/Development

Updated a few AA effects to use database values instead of hard coded …
This commit is contained in:
KayenEQ 2015-10-09 14:42:10 -04:00
commit 817059a2e8
6 changed files with 47 additions and 35 deletions

View File

@ -400,7 +400,7 @@ typedef enum {
#define SE_RootBreakChance 244 // implemented[AA] reduce the chance that your root will break.
#define SE_TrapCircumvention 245 // *not implemented[AA] - decreases the chance that you will set off a trap when opening a chest
#define SE_SetBreathLevel 246 // *not implemented as bonus
#define SE_RaiseSkillCap 247 // *not implemented[AA] - adds skill over the skill cap.
#define SE_RaiseSkillCap 247 // implemented[AA] - adds skill over the skill cap.
#define SE_SecondaryForte 248 // not implemented as bonus(gives you a 2nd specialize skill that can go past 50 to 100)
#define SE_SecondaryDmgInc 249 // implemented[AA] Allows off hand weapon to recieve a damage bonus (Sinister Strikes)
#define SE_SpellProcChance 250 // implemented - Increase chance to proc from melee proc spells (ie Spirit of Panther)
@ -416,7 +416,7 @@ typedef enum {
#define SE_AddSingingMod 260 // implemented[AA] - Instrument/Singing Mastery, base1 is the mod, base2 is the ItemType
#define SE_SongModCap 261 // implemented[AA] - Song Mod cap increase (no longer used on live)
#define SE_RaiseStatCap 262 // implemented
#define SE_TradeSkillMastery 263 // not implemented - lets you raise more than one tradeskill above master.
#define SE_TradeSkillMastery 263 // implemented - lets you raise more than one tradeskill above master.
#define SE_HastenedAASkill 264 // implemented
#define SE_MasteryofPast 265 // implemented[AA] - Spells less than effect values level can not be fizzled
#define SE_ExtraAttackChance 266 // implemented - increase chance to score an extra attack with a 2-Handed Weapon.
@ -478,7 +478,7 @@ typedef enum {
#define SE_GateToHomeCity 322 // implemented
#define SE_DefensiveProc 323 // implemented
#define SE_HPToMana 324 // implemented
//#define SE_ChanceInvsBreakToAoE 325 // *not implemented[AA] - [AA Nerves of Steel] increasing chance to remain hidden when they are an indirect target of an AoE spell.
//#define SE_NoBreakAESneak 325 // *not implemented[AA] - [AA Nerves of Steel] increasing chance to remain hidden when they are an indirect target of an AoE spell.
#define SE_SpellSlotIncrease 326 // *not implemented as bonus - increases your spell slot availability
#define SE_MysticalAttune 327 // implemented - increases amount of buffs that a player can have
#define SE_DelayDeath 328 // implemented - increases how far you can fall below 0 hp before you die

View File

@ -1199,13 +1199,14 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break;
}
// Kayen: Not sure best way to implement this yet.
// Physically raises skill cap ie if 55/55 it will raise to 55/60
case SE_RaiseSkillCap: {
if (newbon->RaiseSkillCap[0] < base1) {
newbon->RaiseSkillCap[0] = base1; // value
newbon->RaiseSkillCap[1] = base2; // skill
}
if (base2 > HIGHEST_SKILL)
break;
if (newbon->RaiseSkillCap[base2] < base1)
newbon->RaiseSkillCap[base2] = base1;
break;
}
@ -1437,9 +1438,19 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
newbon->ReduceFallDamage += base1;
break;
case SE_ReduceTradeskillFail:
case SE_ReduceTradeskillFail:{
if (base2 > HIGHEST_SKILL)
break;
newbon->ReduceTradeskillFail[base2] += base1;
break;
}
case SE_TradeSkillMastery:
if (newbon->TradeSkillMastery < base1)
newbon->TradeSkillMastery = base1;
break;
// to do
case SE_PetDiscipline:
@ -1452,8 +1463,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break;
case SE_ForageSkill:
break;
case SE_TradeSkillMastery:
break;
case SE_SecondaryForte:
break;
case SE_FeignedCastOnChance:
@ -3157,10 +3166,29 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
new_bonus->ReduceFallDamage += effect_value;
break;
case SE_ReduceTradeskillFail:
case SE_ReduceTradeskillFail:{
if (base2 > HIGHEST_SKILL)
break;
new_bonus->ReduceTradeskillFail[base2] += effect_value;
break;
}
case SE_TradeSkillMastery:
if (new_bonus->TradeSkillMastery < effect_value)
new_bonus->TradeSkillMastery = effect_value;
break;
case SE_RaiseSkillCap: {
if (base2 > HIGHEST_SKILL)
break;
if (new_bonus->RaiseSkillCap[base2] < effect_value)
new_bonus->RaiseSkillCap[base2] = effect_value;
break;
}
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
if (IsAISpellEffect) {

View File

@ -2439,18 +2439,8 @@ uint16 Client::GetMaxSkillAfterSpecializationRules(SkillUseTypes skillid, uint16
}
}
// This should possibly be handled by bonuses rather than here.
switch(skillid)
{
case SkillTracking:
{
Result += ((GetAA(aaAdvancedTracking) * 10) + (GetAA(aaTuneofPursuance) * 10));
break;
}
default:
break;
}
Result += spellbonuses.RaiseSkillCap[skillid] + itembonuses.RaiseSkillCap[skillid] + aabonuses.RaiseSkillCap[skillid];
return Result;
}

View File

@ -439,7 +439,7 @@ struct StatBonuses {
int32 CombatStability; // Melee damage mitigation.
int32 DoubleRiposte; // Chance to double riposte
int32 GiveDoubleRiposte[3]; // 0=Regular Chance, 1=Skill Attack Chance, 2=Skill
uint32 RaiseSkillCap[2]; // Raise a specific skill cap (1 = value, 2=skill)
uint32 RaiseSkillCap[HIGHEST_SKILL+1]; // Raise a specific skill cap (base1= value, base2=skill)
int32 Ambidexterity; // Increase chance to duel wield by adding bonus 'skill'.
int32 PetMaxHP; // Increase the max hp of your pet.
int32 PetFlurry; // Chance for pet to flurry.
@ -470,6 +470,7 @@ struct StatBonuses {
bool ShroudofStealth; // rogue improved invisiblity
uint16 ReduceFallDamage; // reduce fall damage by percent
int32 ReduceTradeskillFail[HIGHEST_SKILL+1]; // Reduces chance for trade skills to fail by percent.
uint8 TradeSkillMastery; // Allow number of tradeskills to exceed 200 skill.
};
typedef struct

View File

@ -750,14 +750,6 @@ bool Client::CheckFizzle(uint16 spell_id)
// always at least 1% chance to fail or 5% to succeed
fizzlechance = fizzlechance < 1 ? 1 : (fizzlechance > 95 ? 95 : fizzlechance);
/*
if(IsBardSong(spell_id))
{
//This was a channel chance modifier - no evidence for fizzle reduction
fizzlechance -= GetAA(aaInternalMetronome) * 1.5f;
}
*/
float fizzle_roll = zone->random.Real(0, 100);
Log.Out(Logs::Detail, Logs::Spells, "Check Fizzle %s spell %d fizzlechance: %0.2f%% diff: %0.2f roll: %0.2f", GetName(), spell_id, fizzlechance, diff, fizzle_roll);

View File

@ -1403,8 +1403,9 @@ bool Client::CanIncreaseTradeskill(SkillUseTypes tradeskill) {
uint8 Pottery = (GetRawSkill(SkillPottery) > 200) ? 1 : 0;
uint8 Tailoring = (GetRawSkill(SkillTailoring) > 200) ? 1 : 0;
uint8 SkillTotal = Baking + Smithing + Brewing + Fletching + Jewelry + Pottery + Tailoring; //Tradeskills above 200
uint32 aaLevel = GetAA(aaNewTanaanCraftingMastery); //New Tanaan AA: Each level allows an additional tradeskill above 200 (first one is free)
//New Tanaan AA: Each level allows an additional tradeskill above 200 (first one is free)
uint8 aaLevel = spellbonuses.TradeSkillMastery + itembonuses.TradeSkillMastery + aabonuses.TradeSkillMastery;
switch (tradeskill) {
case SkillBaking:
case SkillBlacksmithing: