mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
SE_MeleeVulnerability really really is Max Mana limit
Also found the cause of bard song tick increase and removed the uneeded code Also removed the IsBardSong check from GetFocusEffect, it really shouldn't be needed, but will need to keep an eye out. The focus effects should most often limit out the bard songs anyways
This commit is contained in:
parent
d34b4a786b
commit
c0ea82f9e1
@ -544,7 +544,7 @@ typedef enum {
|
||||
//#define SE_SummonCorpseZone 388 // *not implemented - summons a corpse from any zone(nec AA)
|
||||
#define SE_FcTimerRefresh 389 // implemented - Refresh spell icons
|
||||
//#define SE_FcTimerLockout 390 // *not implemented - Sets recast timers to specific value, focus limited.
|
||||
#define SE_MeleeVulnerability 391 // implemented [Live SPA has this as LimitManaMax however that is clearly not the effect used]
|
||||
#define SE_LimitManaMax 391 // implemented
|
||||
#define SE_FcHealAmt 392 // implemented - Adds or removes healing from spells
|
||||
#define SE_FcHealPctIncoming 393 // implemented - HealRate with focus restrictions.
|
||||
#define SE_FcHealAmtIncoming 394 // implemented - Adds/Removes amount of healing on target by X value with foucs restrictions.
|
||||
|
||||
@ -1333,10 +1333,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
|
||||
newbon->PetMeleeMitigation += base1;
|
||||
break;
|
||||
|
||||
case SE_MeleeVulnerability:
|
||||
newbon->MeleeVulnerability += base1;
|
||||
break;
|
||||
|
||||
case SE_FactionModPct: {
|
||||
if ((base1 < 0) && (newbon->FactionModPct > base1))
|
||||
newbon->FactionModPct = base1;
|
||||
@ -3008,10 +3004,6 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
|
||||
new_bonus->PetMeleeMitigation += effect_value;
|
||||
break;
|
||||
|
||||
case SE_MeleeVulnerability:
|
||||
new_bonus->MeleeVulnerability += effect_value;
|
||||
break;
|
||||
|
||||
case SE_Sanctuary:
|
||||
new_bonus->Sanctuary = true;
|
||||
break;
|
||||
@ -4588,12 +4580,6 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
aabonuses.FactionModPct = effect_value;
|
||||
break;
|
||||
|
||||
case SE_MeleeVulnerability:
|
||||
spellbonuses.MeleeVulnerability = effect_value;
|
||||
itembonuses.MeleeVulnerability = effect_value;
|
||||
aabonuses.MeleeVulnerability = effect_value;
|
||||
break;
|
||||
|
||||
case SE_IllusionPersistence:
|
||||
spellbonuses.IllusionPersistence = false;
|
||||
itembonuses.IllusionPersistence = false;
|
||||
|
||||
@ -400,7 +400,6 @@ struct StatBonuses {
|
||||
int32 Metabolism; // Food/drink consumption rates.
|
||||
bool Sanctuary; // Sanctuary effect, lowers place on hate list until cast on others.
|
||||
int32 FactionModPct; // Modifies amount of faction gained.
|
||||
int32 MeleeVulnerability; // Weakness/mitigation to melee damage
|
||||
bool LimitToSkill[HIGHEST_SKILL+2]; // Determines if we need to search for a skill proc.
|
||||
uint32 SkillProc[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs.
|
||||
uint32 SkillProcSuccess[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs_success.
|
||||
|
||||
@ -421,12 +421,6 @@ int32 Mob::GetActSpellDuration(uint16 spell_id, int32 duration)
|
||||
int tic_inc = 0;
|
||||
tic_inc = GetFocusEffect(focusSpellDurByTic, spell_id);
|
||||
|
||||
// unsure on the exact details, but bard songs that don't cost mana at some point get an extra tick, 60 for now
|
||||
// a level 53 bard reported getting 2 tics
|
||||
// bard DOTs do get this extra tick, but beneficial long bard songs don't? (invul, crescendo)
|
||||
if ((IsShortDurationBuff(spell_id) || IsDetrimentalSpell(spell_id)) && IsBardSong(spell_id) &&
|
||||
spells[spell_id].mana == 0 && GetClass() == BARD && GetLevel() > 60)
|
||||
tic_inc++;
|
||||
float focused = ((duration * increase) / 100.0f) + tic_inc;
|
||||
int ifocused = static_cast<int>(focused);
|
||||
|
||||
|
||||
@ -3769,11 +3769,8 @@ int16 Mob::GetSkillDmgTaken(const SkillUseTypes skill_used)
|
||||
skilldmg_mod += itembonuses.SkillDmgTaken[HIGHEST_SKILL+1] + spellbonuses.SkillDmgTaken[HIGHEST_SKILL+1] +
|
||||
itembonuses.SkillDmgTaken[skill_used] + spellbonuses.SkillDmgTaken[skill_used];
|
||||
|
||||
|
||||
skilldmg_mod += SkillDmgTaken_Mod[skill_used] + SkillDmgTaken_Mod[HIGHEST_SKILL+1];
|
||||
|
||||
skilldmg_mod += spellbonuses.MeleeVulnerability + itembonuses.MeleeVulnerability + aabonuses.MeleeVulnerability;
|
||||
|
||||
if(skilldmg_mod < -100)
|
||||
skilldmg_mod = -100;
|
||||
|
||||
|
||||
@ -2948,7 +2948,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
case SE_FcIncreaseNumHits:
|
||||
case SE_CastonFocusEffect:
|
||||
case SE_FcHealAmtIncoming:
|
||||
case SE_MeleeVulnerability:
|
||||
case SE_LimitManaMax:
|
||||
case SE_DoubleRangedAttack:
|
||||
case SE_ShieldEquipHateMod:
|
||||
case SE_ShieldEquipDmgMod:
|
||||
@ -3356,7 +3356,7 @@ void Mob::BuffProcess()
|
||||
{
|
||||
--buffs[buffs_i].ticsremaining;
|
||||
|
||||
if ((buffs[buffs_i].ticsremaining == 0 && !IsShortDurationBuff(buffs[buffs_i].spellid)) || buffs[buffs_i].ticsremaining < 0) {
|
||||
if ((buffs[buffs_i].ticsremaining == 0 && !(IsShortDurationBuff(buffs[buffs_i].spellid) || IsBardSong(buffs[buffs_i].spellid))) || buffs[buffs_i].ticsremaining < 0) {
|
||||
Log.Out(Logs::Detail, Logs::Spells, "Buff %d in slot %d has expired. Fading.", buffs[buffs_i].spellid, buffs_i);
|
||||
BuffFadeBySlot(buffs_i);
|
||||
}
|
||||
@ -4301,6 +4301,11 @@ int16 Client::CalcAAFocus(focusType type, const AA::Rank &rank, uint16 spell_id)
|
||||
LimitFailure = true;
|
||||
break;
|
||||
|
||||
case SE_LimitManaMax:
|
||||
if (spell.mana > base1)
|
||||
LimitFailure = true;
|
||||
break;
|
||||
|
||||
case SE_LimitTarget:
|
||||
if (base1 < 0) {
|
||||
if (-base1 == spell.targettype) // Exclude
|
||||
@ -4719,6 +4724,11 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case SE_LimitManaMax:
|
||||
if (spell.mana > focus_spell.base[i])
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case SE_LimitTarget:
|
||||
if (focus_spell.base[i] < 0) {
|
||||
if (-focus_spell.base[i] == spell.targettype) // Exclude
|
||||
@ -5178,11 +5188,8 @@ uint16 Client::GetSympatheticFocusEffect(focusType type, uint16 spell_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int16 Client::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
|
||||
if (IsBardSong(spell_id) && type != focusFcBaseEffects)
|
||||
return 0;
|
||||
|
||||
int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
|
||||
{
|
||||
int16 realTotal = 0;
|
||||
int16 realTotal2 = 0;
|
||||
int16 realTotal3 = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user