Nimbus effects will now be reapplied after zoning.

Nimbus effects will now fade when associated buff is removed.
Fix for ReduceAllDamage function.
This commit is contained in:
KayenEQ 2014-09-15 16:05:57 -04:00
parent e256175ce6
commit 03485ef1e0
5 changed files with 24 additions and 3 deletions

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 09/15/2014 ==
Kayen: Nimbus effects will now be reapplied after zoning and will be removed when associated buff fades.
== 09/13/2014 == == 09/13/2014 ==
demonstar55: Fix rogues not having Thieves' Cant demonstar55: Fix rogues not having Thieves' Cant

View File

@ -3516,7 +3516,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
if(spell_id == SPELL_UNKNOWN) { if(spell_id == SPELL_UNKNOWN) {
damage = ReduceDamage(damage); damage = ReduceDamage(damage);
mlog(COMBAT__HITS, "Melee Damage reduced to %d", damage); mlog(COMBAT__HITS, "Melee Damage reduced to %d", damage);
ReduceAllDamage(damage); damage = ReduceAllDamage(damage);
TryTriggerThreshHold(damage, SE_TriggerMeleeThreshold, attacker); TryTriggerThreshHold(damage, SE_TriggerMeleeThreshold, attacker);
} else { } else {
int32 origdmg = damage; int32 origdmg = damage;
@ -3529,7 +3529,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
//Kayen: Probably need to add a filter for this - Not sure if this msg is correct but there should be a message for spell negate/runes. //Kayen: Probably need to add a filter for this - Not sure if this msg is correct but there should be a message for spell negate/runes.
Message(263, "%s tries to cast on YOU, but YOUR magical skin absorbs the spell.",attacker->GetCleanName()); Message(263, "%s tries to cast on YOU, but YOUR magical skin absorbs the spell.",attacker->GetCleanName());
} }
ReduceAllDamage(damage); damage = ReduceAllDamage(damage);
TryTriggerThreshHold(damage, SE_TriggerSpellThreshold, attacker); TryTriggerThreshHold(damage, SE_TriggerSpellThreshold, attacker);
} }

View File

@ -9574,11 +9574,17 @@ void Client::CompleteConnect() {
//reapply some buffs //reapply some buffs
uint32 buff_count = GetMaxTotalSlots(); uint32 buff_count = GetMaxTotalSlots();
for (uint32 j1 = 0; j1 < buff_count; j1++) { for (uint32 j1 = 0; j1 < buff_count; j1++) {
if (buffs[j1].spellid >(uint32)SPDAT_RECORDS) if (!IsValidSpell(buffs[j1].spellid))
continue; continue;
const SPDat_Spell_Struct &spell = spells[buffs[j1].spellid]; const SPDat_Spell_Struct &spell = spells[buffs[j1].spellid];
int NimbusEffect = GetNimbusEffect(buffs[j1].spellid);
if(NimbusEffect) {
if(!IsNimbusEffectActive(NimbusEffect))
SendSpellEffect(NimbusEffect, 500, 0, 1, 3000, true);
}
for (int x1 = 0; x1 < EFFECT_COUNT; x1++) { for (int x1 = 0; x1 < EFFECT_COUNT; x1++) {
switch (spell.effectid[x1]) { switch (spell.effectid[x1]) {
case SE_IllusionCopy: case SE_IllusionCopy:

View File

@ -4375,6 +4375,15 @@ void Mob::SpreadVirus(uint16 spell_id, uint16 casterID)
void Mob::RemoveNimbusEffect(int effectid) void Mob::RemoveNimbusEffect(int effectid)
{ {
if (effectid == nimbus_effect1)
nimbus_effect1 = 0;
else if (effectid == nimbus_effect2)
nimbus_effect2 = 0;
else if (effectid == nimbus_effect3)
nimbus_effect3 = 0;
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RemoveNimbusEffect, sizeof(RemoveNimbusEffect_Struct)); EQApplicationPacket* outapp = new EQApplicationPacket(OP_RemoveNimbusEffect, sizeof(RemoveNimbusEffect_Struct));
RemoveNimbusEffect_Struct* rne = (RemoveNimbusEffect_Struct*)outapp->pBuffer; RemoveNimbusEffect_Struct* rne = (RemoveNimbusEffect_Struct*)outapp->pBuffer;
rne->spawnid = GetID(); rne->spawnid = GetID();

View File

@ -4016,6 +4016,9 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if (!found_numhits) if (!found_numhits)
Numhits(false); Numhits(false);
} }
if (spells[buffs[slot].spellid].NimbusEffect > 0)
RemoveNimbusEffect(spells[buffs[slot].spellid].NimbusEffect);
buffs[slot].spellid = SPELL_UNKNOWN; buffs[slot].spellid = SPELL_UNKNOWN;
if(IsPet() && GetOwner() && GetOwner()->IsClient()) { if(IsPet() && GetOwner() && GetOwner()->IsClient()) {