Merge remote-tracking branch 'upstream/master' into shieldability

This commit is contained in:
KayenEQ
2021-08-12 22:12:42 -04:00
9 changed files with 89 additions and 6 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.2) CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH}) SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/" ${CMAKE_MODULE_PATH})
+2 -2
View File
@@ -834,7 +834,7 @@ typedef enum {
#define SE_DS_Mitigation_Percentage 468 // implemented - Modify incoming damage shield damage by percentage #define SE_DS_Mitigation_Percentage 468 // implemented - Modify incoming damage shield damage by percentage
#define SE_Chance_Best_in_Spell_Grp 469 // implemented - Chance to cast highest scribed spell within a spell group. All base2 spells share roll chance, only 1 cast. #define SE_Chance_Best_in_Spell_Grp 469 // implemented - Chance to cast highest scribed spell within a spell group. All base2 spells share roll chance, only 1 cast.
#define SE_Trigger_Best_in_Spell_Grp 470 // implemented - Chance to cast highest scribed spell within a spell group. Each spell has own chance. #define SE_Trigger_Best_in_Spell_Grp 470 // implemented - Chance to cast highest scribed spell within a spell group. Each spell has own chance.
//#define SE_Double_Melee_Round 471 // #define SE_Double_Melee_Round 471 // implemented, @OffBonus, percent chance to repeat primary weapon round with a percent damage modifier, base: pct chance repeat, limit: pct dmg mod, max: none
#define SE_Buy_AA_Rank 472 // implemented, @Special, Used in AA abilities that have Enable/Disable toggle. Spell on Disabled Rank has this effect in it, base: 1, limit: none, max: none, Note: This will not just buy an AA #define SE_Buy_AA_Rank 472 // implemented, @Special, Used in AA abilities that have Enable/Disable toggle. Spell on Disabled Rank has this effect in it, base: 1, limit: none, max: none, Note: This will not just buy an AA
#define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front #define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front
#define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner #define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner
@@ -852,7 +852,7 @@ typedef enum {
#define SE_Ff_Same_Caster 486 // implemented, @Ff, Caster of spell on target with a focus effect that is checked by incoming spells, base1: 0=Must be different caster 1=Must be same caster #define SE_Ff_Same_Caster 486 // implemented, @Ff, Caster of spell on target with a focus effect that is checked by incoming spells, base1: 0=Must be different caster 1=Must be same caster
//#define SE_Extend_Tradeskill_Cap 487 // //#define SE_Extend_Tradeskill_Cap 487 //
//#define SE_Defender_Melee_Force_Pct_PC 488 // //#define SE_Defender_Melee_Force_Pct_PC 488 //
//#define SE_Worn_Endurance_Regen_Cap 489 // #define SE_Worn_Endurance_Regen_Cap 489 // implemented, modify worn regen cap, base: amt, limit: none, max: none
#define SE_Ff_ReuseTimeMin 490 // implemented, @Ff, Minimum recast time of a spell that can be focused, base: recast time #define SE_Ff_ReuseTimeMin 490 // implemented, @Ff, Minimum recast time of a spell that can be focused, base: recast time
#define SE_Ff_ReuseTimeMax 491 // implemented, @Ff, Max recast time of a spell that can be focused, base: recast time #define SE_Ff_ReuseTimeMax 491 // implemented, @Ff, Max recast time of a spell that can be focused, base: recast time
#define SE_Ff_Endurance_Min 492 // implemented, @Ff, Minimum endurance cost of a spell that can be focused, base: endurance cost #define SE_Ff_Endurance_Min 492 // implemented, @Ff, Minimum endurance cost of a spell that can be focused, base: endurance cost
+48
View File
@@ -1628,6 +1628,16 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break; break;
} }
case SE_Double_Melee_Round:
{
if (newbon->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] < base1) {
newbon->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] = base1;
newbon->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] = base2;
}
break;
}
case SE_ExtendedShielding: case SE_ExtendedShielding:
{ {
if (newbon->ExtendedShielding < base1) { if (newbon->ExtendedShielding < base1) {
@@ -1644,6 +1654,10 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break; break;
} }
case SE_Worn_Endurance_Regen_Cap:
newbon->ItemEnduranceRegenCap += base1;
break;
// to do // to do
case SE_PetDiscipline: case SE_PetDiscipline:
break; break;
@@ -2495,6 +2509,20 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
break; break;
} }
case SE_Double_Melee_Round:
{
if (AdditiveWornBonus) {
new_bonus->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] += effect_value;
new_bonus->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] += base2;
}
if (new_bonus->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] < effect_value) {
new_bonus->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] = effect_value;
new_bonus->DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] = base2;
}
break;
}
case SE_PercentXPIncrease: case SE_PercentXPIncrease:
{ {
if(new_bonus->XPRateMod < effect_value) if(new_bonus->XPRateMod < effect_value)
@@ -3580,6 +3608,14 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
break; break;
} }
case SE_Worn_Endurance_Regen_Cap:
new_bonus->ItemEnduranceRegenCap += effect_value;
break;
case SE_ItemManaRegenCapIncrease:
new_bonus->ItemManaRegenCap += effect_value;
break;
case SE_Weapon_Stance: { case SE_Weapon_Stance: {
if (IsValidSpell(effect_value)) { //base1 is the spell_id of buff if (IsValidSpell(effect_value)) { //base1 is the spell_id of buff
if (base2 <= WEAPON_STANCE_TYPE_MAX) { //0=2H, 1=Shield, 2=DW if (base2 <= WEAPON_STANCE_TYPE_MAX) { //0=2H, 1=Shield, 2=DW
@@ -4500,6 +4536,12 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] = effect_value; itembonuses.ExtraAttackChanceSecondary[SBIndex::EXTRA_ATTACK_CHANCE] = effect_value;
break; break;
case SE_Double_Melee_Round:
spellbonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] = effect_value;
aabonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] = effect_value;
itembonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] = effect_value;
break;
case SE_PercentXPIncrease: case SE_PercentXPIncrease:
spellbonuses.XPRateMod = effect_value; spellbonuses.XPRateMod = effect_value;
aabonuses.XPRateMod = effect_value; aabonuses.XPRateMod = effect_value;
@@ -4964,6 +5006,12 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
itembonuses.ItemHPRegenCap = effect_value; itembonuses.ItemHPRegenCap = effect_value;
break; break;
case SE_Worn_Endurance_Regen_Cap:
spellbonuses.ItemEnduranceRegenCap = effect_value;
aabonuses.ItemEnduranceRegenCap = effect_value;
itembonuses.ItemEnduranceRegenCap = effect_value;
break;
case SE_OffhandRiposteFail: case SE_OffhandRiposteFail:
spellbonuses.OffhandRiposteFail = effect_value; spellbonuses.OffhandRiposteFail = effect_value;
aabonuses.OffhandRiposteFail = effect_value; aabonuses.OffhandRiposteFail = effect_value;
+2 -2
View File
@@ -781,7 +781,7 @@ int32 Client::CalcManaRegen(bool bCombat)
int32 Client::CalcManaRegenCap() int32 Client::CalcManaRegenCap()
{ {
int32 cap = RuleI(Character, ItemManaRegenCap) + aabonuses.ItemManaRegenCap; int32 cap = RuleI(Character, ItemManaRegenCap) + aabonuses.ItemManaRegenCap + itembonuses.ItemManaRegenCap + spellbonuses.ItemManaRegenCap;
return (cap * RuleI(Character, ManaRegenMultiplier) / 100); return (cap * RuleI(Character, ManaRegenMultiplier) / 100);
} }
@@ -1751,7 +1751,7 @@ int32 Client::CalcEnduranceRegen(bool bCombat)
int32 Client::CalcEnduranceRegenCap() int32 Client::CalcEnduranceRegenCap()
{ {
int cap = RuleI(Character, ItemEnduranceRegenCap); int cap = RuleI(Character, ItemEnduranceRegenCap) + aabonuses.ItemEnduranceRegenCap + itembonuses.ItemEnduranceRegenCap + spellbonuses.ItemEnduranceRegenCap;
return (cap * RuleI(Character, EnduranceRegenMultiplier) / 100); return (cap * RuleI(Character, EnduranceRegenMultiplier) / 100);
} }
+5
View File
@@ -394,6 +394,11 @@ bool Client::Process() {
TriggerDefensiveProcs(auto_attack_target, EQ::invslot::slotPrimary, false); TriggerDefensiveProcs(auto_attack_target, EQ::invslot::slotPrimary, false);
DoAttackRounds(auto_attack_target, EQ::invslot::slotPrimary); DoAttackRounds(auto_attack_target, EQ::invslot::slotPrimary);
if (TryDoubleMeleeRoundEffect()) {
DoAttackRounds(auto_attack_target, EQ::invslot::slotPrimary);
}
if (CheckAATimer(aaTimerRampage)) { if (CheckAATimer(aaTimerRampage)) {
entity_list.AEAttack(this, 30); entity_list.AEAttack(this, 30);
} }
+4
View File
@@ -454,6 +454,7 @@ struct StatBonuses {
int32 ExtraAttackChance[2]; // base chance(w/ 2H weapon)=0, amt of extra attacks=1 int32 ExtraAttackChance[2]; // base chance(w/ 2H weapon)=0, amt of extra attacks=1
int32 ExtraAttackChancePrimary[2]; // base chance=0, , amt of extra attacks=1 int32 ExtraAttackChancePrimary[2]; // base chance=0, , amt of extra attacks=1
int32 ExtraAttackChanceSecondary[2]; // base chance=0, , amt of extra attacks=1 int32 ExtraAttackChanceSecondary[2]; // base chance=0, , amt of extra attacks=1
int32 DoubleMeleeRound[2]; // base chance=0, damage mod=1
int32 DoTShielding; int32 DoTShielding;
int32 DivineSaveChance[2]; // Second Chance (base1 = chance, base2 = spell on trigger) int32 DivineSaveChance[2]; // Second Chance (base1 = chance, base2 = spell on trigger)
uint32 DeathSave[4]; // Death Pact [0](value = 1 partial 2 = full) [1]=slot [2]=LvLimit [3]=HealAmt uint32 DeathSave[4]; // Death Pact [0](value = 1 partial 2 = full) [1]=slot [2]=LvLimit [3]=HealAmt
@@ -549,6 +550,7 @@ struct StatBonuses {
int32 DS_Mitigation_Percentage; // base = percent amt of DS mitigation. Negative value to reduce int32 DS_Mitigation_Percentage; // base = percent amt of DS mitigation. Negative value to reduce
int32 Pet_Crit_Melee_Damage_Pct_Owner; // base = percent mod for pet critcal damage from owner int32 Pet_Crit_Melee_Damage_Pct_Owner; // base = percent mod for pet critcal damage from owner
int32 Pet_Add_Atk; // base = Pet ATK bonus from owner int32 Pet_Add_Atk; // base = Pet ATK bonus from owner
int32 ItemEnduranceRegenCap; // modify endurance regen cap
int32 WeaponStance[WEAPON_STANCE_TYPE_MAX +1];// base = trigger spell id, base2 = 0 is 2h, 1 is shield, 2 is dual wield, [0]spid 2h, [1]spid shield, [2]spid DW int32 WeaponStance[WEAPON_STANCE_TYPE_MAX +1];// base = trigger spell id, base2 = 0 is 2h, 1 is shield, 2 is dual wield, [0]spid 2h, [1]spid shield, [2]spid DW
@@ -673,6 +675,8 @@ namespace SBIndex {
constexpr uint16 FINISHING_EFFECT_DMG = 1; // SPA 278, 439, 217 constexpr uint16 FINISHING_EFFECT_DMG = 1; // SPA 278, 439, 217
constexpr uint16 FINISHING_EFFECT_LEVEL_MAX = 0; // SPA 440, 345, 346 constexpr uint16 FINISHING_EFFECT_LEVEL_MAX = 0; // SPA 440, 345, 346
constexpr uint16 FINISHING_EFFECT_LEVEL_CHANCE_BONUS = 1; // SPA 440, 345, 346 constexpr uint16 FINISHING_EFFECT_LEVEL_CHANCE_BONUS = 1; // SPA 440, 345, 346
constexpr uint16 DOUBLE_MELEE_ROUND_CHANCE = 0; // SPA 471
constexpr uint16 DOUBLE_MELEE_ROUND_DMG_BONUS = 1; // SPA 471
}; };
+20
View File
@@ -472,6 +472,8 @@ Mob::Mob(
AssistAggro = false; AssistAggro = false;
npc_assist_cap = 0; npc_assist_cap = 0;
use_double_melee_round_dmg_bonus = false;
#ifdef BOTS #ifdef BOTS
m_manual_follow = false; m_manual_follow = false;
#endif #endif
@@ -4842,6 +4844,10 @@ int16 Mob::GetMeleeDamageMod_SE(uint16 skill)
dmg_mod += itembonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + spellbonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + dmg_mod += itembonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + spellbonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] + aabonuses.DamageModifier3[EQ::skills::HIGHEST_SKILL + 1] +
itembonuses.DamageModifier3[skill] + spellbonuses.DamageModifier3[skill] + aabonuses.DamageModifier3[skill]; itembonuses.DamageModifier3[skill] + spellbonuses.DamageModifier3[skill] + aabonuses.DamageModifier3[skill];
if (GetUseDoubleMeleeRoundDmgBonus()) {
dmg_mod += itembonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] + spellbonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS] + aabonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_DMG_BONUS];
}
if(dmg_mod < -100) if(dmg_mod < -100)
dmg_mod = -100; dmg_mod = -100;
@@ -4965,6 +4971,20 @@ void Mob::MeleeLifeTap(int32 damage) {
} }
} }
bool Mob::TryDoubleMeleeRoundEffect() {
auto chance = aabonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] + itembonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE] +
spellbonuses.DoubleMeleeRound[SBIndex::DOUBLE_MELEE_ROUND_CHANCE];
if (chance && zone->random.Roll(chance)) {
SetUseDoubleMeleeRoundDmgBonus(true);
return true;
}
SetUseDoubleMeleeRoundDmgBonus(false);
return false;
}
bool Mob::TryReflectSpell(uint32 spell_id) bool Mob::TryReflectSpell(uint32 spell_id)
{ {
if (!spells[spell_id].reflectable) if (!spells[spell_id].reflectable)
+5
View File
@@ -844,6 +844,10 @@ public:
bool CanFocusUseRandomEffectivenessByType(focusType type); bool CanFocusUseRandomEffectivenessByType(focusType type);
int GetFocusRandomEffectivenessValue(int focus_base, int focus_base2, bool best_focus = 0); int GetFocusRandomEffectivenessValue(int focus_base, int focus_base2, bool best_focus = 0);
bool TryDoubleMeleeRoundEffect();
bool GetUseDoubleMeleeRoundDmgBonus() const { return use_double_melee_round_dmg_bonus; }
inline void SetUseDoubleMeleeRoundDmgBonus(bool val) { use_double_melee_round_dmg_bonus = val; }
void CastSpellOnLand(Mob* caster, int32 spell_id); void CastSpellOnLand(Mob* caster, int32 spell_id);
void FocusProcLimitProcess(); void FocusProcLimitProcess();
bool ApplyFocusProcLimiter(int32 spell_id, int buffslot = -1); bool ApplyFocusProcLimiter(int32 spell_id, int buffslot = -1);
@@ -1516,6 +1520,7 @@ protected:
bool has_twohandbluntequiped; bool has_twohandbluntequiped;
bool has_twohanderequipped; bool has_twohanderequipped;
bool has_duelweaponsequiped; bool has_duelweaponsequiped;
bool use_double_melee_round_dmg_bonus;
bool can_facestab; bool can_facestab;
bool has_numhits; bool has_numhits;
bool has_MGB; bool has_MGB;
+2 -1
View File
@@ -3250,9 +3250,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
case SE_Ff_Value_Max: case SE_Ff_Value_Max:
case SE_AddExtraAttackPct_1h_Primary: case SE_AddExtraAttackPct_1h_Primary:
case SE_AddExtraAttackPct_1h_Secondary: case SE_AddExtraAttackPct_1h_Secondary:
case SE_Double_Melee_Round:
case SE_Skill_Base_Damage_Mod: case SE_Skill_Base_Damage_Mod:
case SE_Worn_Endurance_Regen_Cap:
case SE_Buy_AA_Rank: case SE_Buy_AA_Rank:
{ {
break; break;
} }