Complete revision of SE_SkillProc, SE_LimitToSkill,

SE_SkillProcSuccess (now implemented correctly)
to function more accurately and efficiently, AA supported.
This may need to be updated in the future, if more live
spells readily become avialable to test with.
This commit is contained in:
KayenEQ
2014-07-06 18:58:16 -04:00
parent 3a4e72e3e7
commit 0e438942e4
13 changed files with 415 additions and 186 deletions
+50
View File
@@ -3050,6 +3050,34 @@ void Mob::TriggerDefensiveProcs(const ItemInst* weapon, Mob *on, uint16 hand, in
return;
on->TryDefensiveProc(weapon, this, hand, damage);
//Defensive Skill Procs
if (damage < 0 && damage >= -4) {
uint16 skillinuse = 0;
switch (damage) {
case (-1):
skillinuse = SkillBlock;
break;
case (-2):
skillinuse = SkillParry;
break;
case (-3):
skillinuse = SkillRiposte;
break;
case (-4):
skillinuse = SkillDodge;
break;
}
if (on->HasSkillProcs())
on->TrySkillProc(this, skillinuse, 0, false, hand, true);
if (on->HasSkillProcSuccess())
on->TrySkillProc(this, skillinuse, 0, true, hand, true);
}
}
void Mob::SetDeltas(float dx, float dy, float dz, float dh) {
@@ -4714,6 +4742,28 @@ bool Mob::PassLimitToSkill(uint16 spell_id, uint16 skill) {
return false;
}
uint16 Mob::GetWeaponSpeedbyHand(uint16 hand) {
uint16 weapon_speed = 0;
switch (hand) {
case 13:
weapon_speed = attack_timer.GetDuration();
break;
case 14:
weapon_speed = attack_dw_timer.GetDuration();
break;
case 11:
weapon_speed = ranged_timer.GetDuration();
break;
}
if (weapon_speed < RuleI(Combat, MinHastedDelay))
weapon_speed = RuleI(Combat, MinHastedDelay);
return weapon_speed;
}
int8 Mob::GetDecayEffectValue(uint16 spell_id, uint16 spelleffect) {
if (!IsValidSpell(spell_id))