mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implemented SPA 498 and 499 (extra attack chance effects) (#1475)
* Implemented SPA 498 and 499 Implemented SE_AddExtraAttackPct_1h_Primary 498 , gives your double attacks a percent chance to perform an extra attack with 1-handed primary weapon, base: chance, limit: amt attacks max: none SE_AddExtraAttackPct_1h_Secondary 499 gives your double attacks a percent chance to perform an extra attack with 1-handed secondary weapon, base: chance, limit: amt attacks max: none Added limit functionality to similar effect SPA 266 SPA 266 will now be calculated to take highest percent value when applying bonus. (was additive, which does not seem correct based on AA data) * Update attack.cpp code update * Update bonuses.cpp code update * Update spdat.h added commas * Update spell_effects.cpp fix to remove unknown spa message Co-authored-by: Michael Cook (mackal) <mcook@mackal.net>
This commit is contained in:
+81
-8
@@ -860,9 +860,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
case SE_MaxBindWound:
|
||||
newbon->MaxBindWound += base1;
|
||||
break;
|
||||
case SE_ExtraAttackChance:
|
||||
newbon->ExtraAttackChance += base1;
|
||||
break;
|
||||
case SE_SeeInvis:
|
||||
newbon->SeeInvis = base1;
|
||||
break;
|
||||
@@ -984,7 +981,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
case SE_BlockBehind:
|
||||
newbon->BlockBehind += base1;
|
||||
break;
|
||||
|
||||
case SE_StrikeThrough:
|
||||
case SE_StrikeThrough2:
|
||||
newbon->StrikeThrough += base1;
|
||||
@@ -1572,6 +1568,34 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
newbon->Pet_Add_Atk += base1;
|
||||
break;
|
||||
|
||||
case SE_ExtraAttackChance:
|
||||
{
|
||||
if (newbon->ExtraAttackChance[0] < base1) {
|
||||
newbon->ExtraAttackChance[0] = base1;
|
||||
newbon->ExtraAttackChance[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Primary:
|
||||
{
|
||||
if (newbon->ExtraAttackChancePrimary[0] < base1) {
|
||||
newbon->ExtraAttackChancePrimary[0] = base1;
|
||||
newbon->ExtraAttackChancePrimary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Secondary:
|
||||
{
|
||||
|
||||
if (newbon->ExtraAttackChanceSecondary[0] < base1) {
|
||||
newbon->ExtraAttackChanceSecondary[0] = base1;
|
||||
newbon->ExtraAttackChanceSecondary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// to do
|
||||
case SE_PetDiscipline:
|
||||
break;
|
||||
@@ -2382,8 +2406,45 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
||||
}
|
||||
|
||||
case SE_ExtraAttackChance:
|
||||
new_bonus->ExtraAttackChance += effect_value;
|
||||
{
|
||||
if (AdditiveWornBonus) {
|
||||
new_bonus->ExtraAttackChance[0] += effect_value;
|
||||
new_bonus->ExtraAttackChance[1] = base2 ? base2 : 1;
|
||||
}
|
||||
if (new_bonus->ExtraAttackChance[0] < effect_value) {
|
||||
new_bonus->ExtraAttackChance[0] = effect_value;
|
||||
new_bonus->ExtraAttackChance[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Primary:
|
||||
{
|
||||
if (AdditiveWornBonus) {
|
||||
new_bonus->ExtraAttackChancePrimary[0] += effect_value;
|
||||
new_bonus->ExtraAttackChancePrimary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
|
||||
if (new_bonus->ExtraAttackChancePrimary[0] < effect_value) {
|
||||
new_bonus->ExtraAttackChancePrimary[0] = effect_value;
|
||||
new_bonus->ExtraAttackChancePrimary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Secondary:
|
||||
{
|
||||
if (AdditiveWornBonus) {
|
||||
new_bonus->ExtraAttackChanceSecondary[0] += effect_value;
|
||||
new_bonus->ExtraAttackChanceSecondary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
|
||||
if (new_bonus->ExtraAttackChanceSecondary[0] < effect_value) {
|
||||
new_bonus->ExtraAttackChanceSecondary[0] = effect_value;
|
||||
new_bonus->ExtraAttackChanceSecondary[1] = base2 ? base2 : 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_PercentXPIncrease:
|
||||
{
|
||||
@@ -4302,9 +4363,21 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
break;
|
||||
|
||||
case SE_ExtraAttackChance:
|
||||
spellbonuses.ExtraAttackChance = effect_value;
|
||||
aabonuses.ExtraAttackChance = effect_value;
|
||||
itembonuses.ExtraAttackChance = effect_value;
|
||||
spellbonuses.ExtraAttackChance[0] = effect_value;
|
||||
aabonuses.ExtraAttackChance[0] = effect_value;
|
||||
itembonuses.ExtraAttackChance[0] = effect_value;
|
||||
break;
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Primary:
|
||||
spellbonuses.ExtraAttackChancePrimary[0] = effect_value;
|
||||
aabonuses.ExtraAttackChancePrimary[0] = effect_value;
|
||||
itembonuses.ExtraAttackChancePrimary[0] = effect_value;
|
||||
break;
|
||||
|
||||
case SE_AddExtraAttackPct_1h_Secondary:
|
||||
spellbonuses.ExtraAttackChanceSecondary[0] = effect_value;
|
||||
aabonuses.ExtraAttackChanceSecondary[0] = effect_value;
|
||||
itembonuses.ExtraAttackChanceSecondary[0] = effect_value;
|
||||
break;
|
||||
|
||||
case SE_PercentXPIncrease:
|
||||
|
||||
Reference in New Issue
Block a user