mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
fixes
This commit is contained in:
parent
9c6a85ff16
commit
d4e752987e
@ -134,7 +134,7 @@ typedef enum { //focus types
|
|||||||
focusSwarmPetDuration, //@Fc, SPA: 398, SE_SwarmPetDuration, On Caster, swarm pet duration mod, base: milliseconds
|
focusSwarmPetDuration, //@Fc, SPA: 398, SE_SwarmPetDuration, On Caster, swarm pet duration mod, base: milliseconds
|
||||||
focusReduceRecastTime, //@Fc, SPA: 310, SE_ReduceReuseTimer, On Caster, disc reuse time mod, base: milliseconds
|
focusReduceRecastTime, //@Fc, SPA: 310, SE_ReduceReuseTimer, On Caster, disc reuse time mod, base: milliseconds
|
||||||
focusBlockNextSpell, //@Fc, SPA: 335, SE_BlockNextSpellFocus, On Caster, chance to block next spell, base: chance
|
focusBlockNextSpell, //@Fc, SPA: 335, SE_BlockNextSpellFocus, On Caster, chance to block next spell, base: chance
|
||||||
focusFcHealPctIncoming, //@Fc, SPA: 395, SE_FcHealPctCritIncoming, On Target, heal received mod pct, base: pct
|
focusFcHealPctIncoming, //@Fc, SPA: 393, SE_FcHealPctIncoming, On Target, heal received mod pct, base: pct
|
||||||
focusFcDamageAmtIncoming, //@Fc, SPA: 297, SE_FcDamageAmtIncoming, On Target, damage taken flat amt, base: amt
|
focusFcDamageAmtIncoming, //@Fc, SPA: 297, SE_FcDamageAmtIncoming, On Target, damage taken flat amt, base: amt
|
||||||
focusFcSpellDamageAmtIncomingPC, //@Fc, SPA: 484, SE_Fc_Spell_Damage_Amt_IncomingPC, On Target, damage taken flat amt, base: amt
|
focusFcSpellDamageAmtIncomingPC, //@Fc, SPA: 484, SE_Fc_Spell_Damage_Amt_IncomingPC, On Target, damage taken flat amt, base: amt
|
||||||
focusFcCastSpellOnLand, //@Fc, SPA: 481, SE_Fc_Cast_Spell_On_Land, On Target, cast spell if hit by spell, base: chance pct, limit: spellid
|
focusFcCastSpellOnLand, //@Fc, SPA: 481, SE_Fc_Cast_Spell_On_Land, On Target, cast spell if hit by spell, base: chance pct, limit: spellid
|
||||||
@ -151,7 +151,7 @@ typedef enum { //focus types
|
|||||||
focusFcAmplifyAmt, //@Fc, SPA: 508, SE_Fc_Amplify_Amt, On Caster, damage-heal-dot mod flat amt, base: amt
|
focusFcAmplifyAmt, //@Fc, SPA: 508, SE_Fc_Amplify_Amt, On Caster, damage-heal-dot mod flat amt, base: amt
|
||||||
focusFcCastTimeMod2, //@Fc, SPA: 500, SE_Fc_CastTimeMod2, On Caster, cast time mod pct, base: pct
|
focusFcCastTimeMod2, //@Fc, SPA: 500, SE_Fc_CastTimeMod2, On Caster, cast time mod pct, base: pct
|
||||||
focusFcCastTimeAmt, //@Fc, SPA: 501, SE_Fc_CastTimeAmt, On Caster, cast time mod flat amt, base: milliseconds
|
focusFcCastTimeAmt, //@Fc, SPA: 501, SE_Fc_CastTimeAmt, On Caster, cast time mod flat amt, base: milliseconds
|
||||||
focusFcHealPctCritIncoming, //@Fc, SPA: 393, SE_FcHealPctCritIncoming, On Target, heal received critical chance mod, base: chance pct
|
focusFcHealPctCritIncoming, //@Fc, SPA: 395, SE_FcHealPctCritIncoming, On Target, spell healing mod pct, base: pct
|
||||||
focusFcHealAmt, //@Fc, SPA: 392, SE_FcHealAmt, On Caster, spell healing mod flat amt, base: amt
|
focusFcHealAmt, //@Fc, SPA: 392, SE_FcHealAmt, On Caster, spell healing mod flat amt, base: amt
|
||||||
focusFcHealAmtCrit, //@Fc, SPA: 396, SE_FcHealAmtCrit, On Caster, spell healing mod flat amt, base: amt
|
focusFcHealAmtCrit, //@Fc, SPA: 396, SE_FcHealAmtCrit, On Caster, spell healing mod flat amt, base: amt
|
||||||
} focusType; //Any new FocusType needs to be added to the Mob::IsFocus function
|
} focusType; //Any new FocusType needs to be added to the Mob::IsFocus function
|
||||||
|
|||||||
@ -316,8 +316,8 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
if (spells[spell_id].buffduration < 1) {
|
if (spells[spell_id].buffduration < 1) {
|
||||||
|
|
||||||
if (target) {
|
if (target) {
|
||||||
value += int(value_BaseEffect + target->GetFocusIncoming(focusFcHealPctCritIncoming, SE_FcHealPctCritIncoming, this, spell_id) / 100); //SPA 395 ? Add before critical
|
value += int(value_BaseEffect + target->GetFocusIncoming(focusFcHealPctIncoming, SE_FcHealPctIncoming, this, spell_id) / 100); //SPA 393 Add before critical
|
||||||
value += int(value_BaseEffect + target->GetFocusIncoming(focusFcHealPctCritIncoming, SE_FcHealPctIncoming, this, spell_id) / 100); //SPA 393 Add before critical
|
value += int(value_BaseEffect + target->GetFocusIncoming(focusFcHealPctCritIncoming, SE_FcHealPctCritIncoming, this, spell_id) / 100); //SPA 395 Add before critical (?)
|
||||||
}
|
}
|
||||||
|
|
||||||
value += GetFocusEffect(focusFcHealAmtCrit, spell_id); //SPA 396 Add before critical
|
value += GetFocusEffect(focusFcHealAmtCrit, spell_id); //SPA 396 Add before critical
|
||||||
@ -331,8 +331,6 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
|||||||
incoming_heal_mod_percent = std::min(incoming_heal_mod_percent, -100);
|
incoming_heal_mod_percent = std::min(incoming_heal_mod_percent, -100);
|
||||||
value += value * incoming_heal_mod_percent / 100;
|
value += value * incoming_heal_mod_percent / 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
//value += value * target->GetHealRate(spell_id, this) / 100; //SPA 120 modifies value after Focus Applied but before critical
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Apply critical hit modifier
|
Apply critical hit modifier
|
||||||
|
|||||||
@ -5741,7 +5741,7 @@ int32 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
|||||||
|
|
||||||
case SE_FcHealPctCritIncoming:
|
case SE_FcHealPctCritIncoming:
|
||||||
if (type == focusFcHealPctCritIncoming) {
|
if (type == focusFcHealPctCritIncoming) {
|
||||||
value = focus_spell.base[i];
|
value = GetFocusRandomEffectivenessValue(focus_spell.base[i], focus_spell.base2[i], best_focus);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5759,7 +5759,7 @@ int32 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
|||||||
|
|
||||||
case SE_FcHealPctIncoming:
|
case SE_FcHealPctIncoming:
|
||||||
if (type == focusFcHealPctIncoming) {
|
if (type == focusFcHealPctIncoming) {
|
||||||
value = focus_spell.base[i];
|
value = GetFocusRandomEffectivenessValue(focus_spell.base[i], focus_spell.base2[i], best_focus);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5923,7 +5923,7 @@ void Mob::TryTriggerOnCastFocusEffect(focusType type, uint16 spell_id)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only use of this focus per AA effect.
|
// Only use one of this focus per AA effect.
|
||||||
if (IsClient() && aabonuses.FocusEffects[type]) {
|
if (IsClient() && aabonuses.FocusEffects[type]) {
|
||||||
for (const auto &aa : aa_ranks) {
|
for (const auto &aa : aa_ranks) {
|
||||||
auto ability_rank = zone->GetAlternateAdvancementAbilityAndRank(aa.first, aa.second.first);
|
auto ability_rank = zone->GetAlternateAdvancementAbilityAndRank(aa.first, aa.second.first);
|
||||||
@ -6937,44 +6937,46 @@ int32 Mob::GetFocusIncoming(focusType type, int effect, Mob *caster, uint32 spel
|
|||||||
Example: When your target has a focus limited buff that increases amount of healing on them.
|
Example: When your target has a focus limited buff that increases amount of healing on them.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!caster)
|
if (!caster) {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
if (spellbonuses.FocusEffects[type]){
|
if (spellbonuses.FocusEffects[type]){
|
||||||
|
|
||||||
int32 tmp_focus = 0;
|
int32 tmp_focus = 0;
|
||||||
int tmp_buffslot = -1;
|
int tmp_buffslot = -1;
|
||||||
|
|
||||||
int buff_count = GetMaxTotalSlots();
|
int buff_count = GetMaxTotalSlots();
|
||||||
for(int i = 0; i < buff_count; i++) {
|
for(int i = 0; i < buff_count; i++) {
|
||||||
|
|
||||||
if((IsValidSpell(buffs[i].spellid) && IsEffectInSpell(buffs[i].spellid, effect))){
|
if((IsValidSpell(buffs[i].spellid) && IsEffectInSpell(buffs[i].spellid, effect))){
|
||||||
|
|
||||||
int32 focus = caster->CalcFocusEffect(type, buffs[i].spellid, spell_id);
|
int32 focus = caster->CalcFocusEffect(type, buffs[i].spellid, spell_id);
|
||||||
|
|
||||||
if (!focus)
|
if (!focus) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (tmp_focus && focus > tmp_focus){
|
if (tmp_focus && focus > tmp_focus){
|
||||||
tmp_focus = focus;
|
tmp_focus = focus;
|
||||||
tmp_buffslot = i;
|
tmp_buffslot = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (!tmp_focus){
|
else if (!tmp_focus){
|
||||||
tmp_focus = focus;
|
tmp_focus = focus;
|
||||||
tmp_buffslot = i;
|
tmp_buffslot = i;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
value = tmp_focus;
|
|
||||||
|
|
||||||
if (tmp_buffslot >= 0)
|
|
||||||
CheckNumHitsRemaining(NumHit::MatchingSpells, tmp_buffslot);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = tmp_focus;
|
||||||
|
|
||||||
|
if (tmp_buffslot >= 0)
|
||||||
|
CheckNumHitsRemaining(NumHit::MatchingSpells, tmp_buffslot);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@ -8496,6 +8498,8 @@ bool Mob::CanFocusUseRandomEffectivenessByType(focusType type)
|
|||||||
case focusSpellHateMod:
|
case focusSpellHateMod:
|
||||||
case focusSpellVulnerability:
|
case focusSpellVulnerability:
|
||||||
case focusFcSpellDamagePctIncomingPC:
|
case focusFcSpellDamagePctIncomingPC:
|
||||||
|
case focusFcHealPctIncoming:
|
||||||
|
case focusFcHealPctCritIncoming:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user