mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
update
This commit is contained in:
parent
1ce5087e2a
commit
3faa0d2603
@ -316,17 +316,8 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
if (spells[spell_id].buffduration < 1) {
|
||||
|
||||
if (target) {
|
||||
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_FcHealPctCritIncoming, this, spell_id) / 100); //SPA 395 Add before critical (?)
|
||||
|
||||
int test1 = 0;
|
||||
int test2 = 0;
|
||||
|
||||
test1 += target->GetFocusIncoming(focusFcHealPctIncoming, SE_FcHealPctIncoming, this, spell_id); //SPA 393 Add before critical
|
||||
test2 = target->GetFocusEffect(focusFcHealPctIncoming, spell_id); //SPA 393 Add before critical
|
||||
|
||||
Shout("Test GetFocusIncomming %i", test1);
|
||||
Shout("Test GetFocusEffect %i", test2);
|
||||
value += int(value_BaseEffect + target->GetFocusEffect(focusFcHealPctIncoming, spell_id)/100); //SPA 393 Add before critical
|
||||
value += int(value_BaseEffect + target->GetFocusEffect(focusFcHealPctCritIncoming, spell_id)/100); //SPA 395 Add before critical (?)
|
||||
}
|
||||
|
||||
value += GetFocusEffect(focusFcHealAmtCrit, spell_id); //SPA 396 Add before critical
|
||||
@ -350,10 +341,9 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += GetFocusEffect(focusFcAmplifyAmt, spell_id); //SPA 508 ? Add after critical
|
||||
|
||||
if (target) {
|
||||
value += target->GetFocusIncoming(focusFcHealAmtIncoming, SE_FcHealAmtIncoming, this, spell_id); //SPA 394 Add after critical
|
||||
value += target->GetFocusEffect(focusFcHealAmtIncoming, spell_id); //SPA 394 Add after critical
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (IsNPC() && CastToNPC()->GetHealScale()) {
|
||||
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
|
||||
}
|
||||
|
||||
@ -803,7 +803,6 @@ public:
|
||||
uint16 GetSpellEffectResistChance(uint16 spell_id);
|
||||
int32 GetVulnerability(Mob* caster, uint32 spell_id, uint32 ticsremaining);
|
||||
int32 GetFcDamageAmtIncoming(Mob *caster, uint32 spell_id, bool use_skill = false, uint16 skill=0);
|
||||
int32 GetFocusIncoming(focusType type, int effect, Mob *caster, uint32 spell_id);
|
||||
int32 GetSkillDmgTaken(const EQ::skills::SkillType skill_used, ExtraAttackOptions *opts = nullptr);
|
||||
int32 GetPositionalDmgTaken(Mob *attacker);
|
||||
int32 GetPositionalDmgTakenAmt(Mob *attacker);
|
||||
|
||||
@ -6929,58 +6929,6 @@ int32 Mob::GetFcDamageAmtIncoming(Mob *caster, uint32 spell_id, bool use_skill,
|
||||
return dmg;
|
||||
}
|
||||
|
||||
int32 Mob::GetFocusIncoming(focusType type, int effect, Mob *caster, uint32 spell_id) {
|
||||
|
||||
/*
|
||||
This is a general function for calculating best focus effect values for focus effects that exist on targets but modify incoming spells.
|
||||
Should be used when checking for foci that can exist on clients or npcs ect.
|
||||
Example: When your target has a focus limited buff that increases amount of healing on them.
|
||||
*/
|
||||
|
||||
if (!caster) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int value = 0;
|
||||
|
||||
if (spellbonuses.FocusEffects[type]){
|
||||
|
||||
int32 tmp_focus = 0;
|
||||
int tmp_buffslot = -1;
|
||||
|
||||
int buff_count = GetMaxTotalSlots();
|
||||
for(int i = 0; i < buff_count; i++) {
|
||||
|
||||
if((IsValidSpell(buffs[i].spellid) && IsEffectInSpell(buffs[i].spellid, effect))){
|
||||
|
||||
int32 focus = caster->CalcFocusEffect(type, buffs[i].spellid, spell_id);
|
||||
|
||||
if (!focus) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tmp_focus && focus > tmp_focus){
|
||||
tmp_focus = focus;
|
||||
tmp_buffslot = i;
|
||||
}
|
||||
|
||||
else if (!tmp_focus){
|
||||
tmp_focus = focus;
|
||||
tmp_buffslot = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
value = tmp_focus;
|
||||
|
||||
if (tmp_buffslot >= 0)
|
||||
CheckNumHitsRemaining(NumHit::MatchingSpells, tmp_buffslot);
|
||||
}
|
||||
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
int32 Mob::ApplySpellEffectiveness(int16 spell_id, int32 value, bool IsBard, uint16 caster_id) {
|
||||
|
||||
// 9-17-12: This is likely causing crashes, disabled till can resolve.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user