Merge pull request #460 from KayenEQ/Development

Implemented SE_PC_Pet_Flurry_Chance
This commit is contained in:
KayenEQ 2015-10-08 19:58:32 -04:00
commit 3bdd954ac0
4 changed files with 29 additions and 5 deletions

View File

@ -619,7 +619,7 @@ typedef enum {
//#define SE_Shield_Target 463 //
#define SE_PC_Pet_Rampage 464 // implemented - Base1 % chance to do rampage for base2 % of damage each melee round
//#define SE_PC_Pet_AE_Rampage 465 // Would assume as above but need to confirm.
//#define SE_PC_Pet_Flurry_Chance 466 //
#define SE_PC_Pet_Flurry_Chance 466 // implemented - Base1 % chance to do flurry from double attack hit.
//#define SE_DS_Mitigation_Amount 467 //
//#define SE_DS_Mitigation_Percentage 468 //
//#define SE_Chance_Best_in_Spell_Grp 469 //

View File

@ -4763,8 +4763,15 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts, int spec
// A "quad" on live really is just a successful dual wield where both double attack
// The mobs that could triple lost the ability to when the triple attack skill was added in
Attack(target, MainPrimary, false, false, false, opts, special);
if (CanThisClassDoubleAttack() && CheckDoubleAttack())
if (CanThisClassDoubleAttack() && CheckDoubleAttack()){
Attack(target, MainPrimary, false, false, false, opts, special);
if ((IsPet() || IsTempPet()) && IsPetOwnerClient()){
int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry;
if (chance && zone->random.Roll(chance))
Flurry(nullptr);
}
}
return;
}
@ -4814,8 +4821,15 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts, int speci
GetEquipment(MaterialSecondary) != 0) {
if (CheckDualWield()) {
Attack(target, MainSecondary, false, false, false, opts, special);
if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack())
if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack()){
Attack(target, MainSecondary, false, false, false, opts, special);
if ((IsPet() || IsTempPet()) && IsPetOwnerClient()){
int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry;
if (chance && zone->random.Roll(chance))
Flurry(nullptr);
}
}
}
}
}

View File

@ -1423,7 +1423,12 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
if (newbon->PC_Pet_Rampage[1] < base2)
newbon->PC_Pet_Rampage[1] = base2; //Damage modifer - take highest
break;
}
}
case SE_PC_Pet_Flurry_Chance:
newbon->PC_Pet_Flurry += base1; //Chance to Flurry
break;
// to do
case SE_PetDiscipline:
break;
@ -3132,7 +3137,11 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
if (new_bonus->PC_Pet_Rampage[1] < base2)
new_bonus->PC_Pet_Rampage[1] = base2; //Damage modifer - take highest
break;
}
}
case SE_PC_Pet_Flurry_Chance:
new_bonus->PC_Pet_Flurry += effect_value; //Chance to Flurry
break;
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
if (IsAISpellEffect) {

View File

@ -408,6 +408,7 @@ struct StatBonuses {
uint32 SkillProc[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs.
uint32 SkillProcSuccess[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs_success.
uint32 PC_Pet_Rampage[2]; // 0= % chance to rampage, 1=damage modifier
uint32 PC_Pet_Flurry; // Percent chance flurry from double attack
// AAs
int8 Packrat; //weight reduction for items, 1 point = 10%