Add Spells:SHDProcIDOffByeOne to support newer spell files

In June 2009 SoE stopped doing a +1 to the base for SHD procs
So UF+ spell files were not working, set this to false to support these spell files
This commit is contained in:
Michael Cook (mackal) 2014-09-20 16:58:35 -04:00
parent 33b79a3588
commit 1049e48aca
4 changed files with 19 additions and 15 deletions

View File

@ -3,6 +3,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
== 09/20/2014 ==
demonstar55: Fix crash in SendEnterWorld on illegally long names
demonstar55: The client only lets you enter 15 characters for your name (UF at least)
demonstar55: Add rule Spells:SHDProcIDOffByOne for pre-UF spell file, set to true, UF+ set to false
== 09/19/2014 ==
demonstar55: Added Client::Tell_StringID (used in tell queue messages)

View File

@ -321,6 +321,7 @@ RULE_INT ( Spells, AI_PursueDetrimentalChance, 90) // Chance while chasing targe
RULE_INT ( Spells, AI_IdleNoSpellMinRecast, 500) // AI spell recast time(MS) check when no spell is cast while idle. (min time in random)
RULE_INT ( Spells, AI_IdleNoSpellMaxRecast, 2000) // AI spell recast time(MS) check when no spell is cast while chasing target. (max time in random)
RULE_INT ( Spells, AI_IdleBeneficialChance, 100) // Chance while idle to do a beneficial spell on self or others.
RULE_BOOL ( Spells, SHDProcIDOffByOne, true) // pre June 2009 SHD spell procs were off by 1, they stopped doing this in June 2009 (so UF+ spell files need this false)
RULE_CATEGORY_END()

View File

@ -0,0 +1 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES (1, 'Spells:SHDProcIDOffByOne', 'true', 'SHD procs are off by 1. Set true for pre-UF spell files, false for UF+.');

View File

@ -5598,28 +5598,29 @@ void Mob::CheckNumHitsRemaining(uint8 type, uint32 buff_slot, uint16 spell_id)
}
//for some stupid reason SK procs return theirs one base off...
uint16 Mob::GetProcID(uint16 spell_id, uint8 effect_index) {
uint16 Mob::GetProcID(uint16 spell_id, uint8 effect_index)
{
if (!RuleB(Spells, SHDProcIDOffByOne)) // UF+ spell files
return spells[spell_id].base[effect_index];
// We should actually just be checking if the mob is SHD, but to not force
// custom servers to create new spells, we will still do this
bool sk = false;
bool other = false;
for(int x = 0; x < 16; x++)
{
if(x == 4){
if(spells[spell_id].classes[4] < 255)
for (int x = 0; x < 16; x++) {
if (x == 4) {
if (spells[spell_id].classes[4] < 255)
sk = true;
}
else{
if(spells[spell_id].classes[x] < 255)
} else {
if (spells[spell_id].classes[x] < 255)
other = true;
}
}
if(sk && !other)
{
return(spells[spell_id].base[effect_index] + 1);
}
else{
return(spells[spell_id].base[effect_index]);
}
if (sk && !other)
return spells[spell_id].base[effect_index] + 1;
else
return spells[spell_id].base[effect_index];
}
bool Mob::TryDivineSave()