[Bug Fix] Update to #1893 (#1926)

* Update to #1893

* Missed bonuses.cpp
This commit is contained in:
JJ 2022-01-12 22:04:58 -05:00 committed by GitHub
parent 1a556f4451
commit 613066976d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -190,7 +190,7 @@
#define MAX_FOCUS_PROC_LIMIT_TIMERS 20 //Number of focus recast timers that can be going at same time (This is arbitrary)
#define MAX_PROC_LIMIT_TIMERS 8 //Number of proc delay timers that can be going at same time, different proc types get their own timer array. (This is arbitrary)
#define MAX_APPEARANCE_EFFECTS 20 //Up to 20 Appearance Effects can be saved to a mobs appearance effect array, these will be sent to other clients when they enter a zone (This is arbitrary)
#define MAX_CAST_ON_SKILL_USE 36; //Actual amount is MAX/3
#define MAX_CAST_ON_SKILL_USE 36 //Actual amount is MAX/3
const int Z_AGGRO=10;

View File

@ -5296,7 +5296,7 @@ void Mob::TryCastOnSkillUse(Mob *on, EQ::skills::SkillType skill) {
}
if (spellbonuses.HasSkillAttackProc[skill]) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE i += 3) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE; i += 3) {
if (spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID] && skill == spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SKILL]) {
if (IsValidSpell(spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]) && zone->random.Int(1, 1000) <= spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_CHANCE]) {
SpellFinished(spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID], on, EQ::spells::CastingSlot::Item, 0, -1, spells[spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]].resist_difficulty);
@ -5306,7 +5306,7 @@ void Mob::TryCastOnSkillUse(Mob *on, EQ::skills::SkillType skill) {
}
if (itembonuses.HasSkillAttackProc[skill]) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE i += 3) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE; i += 3) {
if (itembonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID] && skill == itembonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SKILL]) {
if (IsValidSpell(itembonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]) && zone->random.Int(1, 1000) <= spellbonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_CHANCE]) {
SpellFinished(itembonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID], on, EQ::spells::CastingSlot::Item, 0, -1, spells[itembonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]].resist_difficulty);
@ -5316,7 +5316,7 @@ void Mob::TryCastOnSkillUse(Mob *on, EQ::skills::SkillType skill) {
}
if (aabonuses.HasSkillAttackProc[skill]) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE i += 3) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE; i += 3) {
if (IsValidSpell(aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]) && aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID] && skill == aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SKILL]) {
if (zone->random.Int(1, 1000) <= aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_CHANCE]) {
SpellFinished(aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID], on, EQ::spells::CastingSlot::Item, 0, -1, spells[aabonuses.SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]].resist_difficulty);

View File

@ -1207,7 +1207,7 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
}
case SE_SkillAttackProc: {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE i += 3) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE; i += 3) {
if (!newbon->SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]) { // spell id
newbon->SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID] = rank.spell; // spell to proc
newbon->SkillAttackProc[i + SBIndex::SKILLATK_PROC_CHANCE] = base_value; // Chance base 1000 = 100% proc rate
@ -3588,7 +3588,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
}
case SE_SkillAttackProc: {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE i += 3) {
for (int i = 0; i < MAX_CAST_ON_SKILL_USE; i += 3) {
if (!new_bonus->SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID]) { // spell id
new_bonus->SkillAttackProc[i + SBIndex::SKILLATK_PROC_SPELL_ID] = max_value; // spell to proc
new_bonus->SkillAttackProc[i + SBIndex::SKILLATK_PROC_CHANCE] = effect_value; // Chance base 1000 = 100% proc rate