mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user