mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implement persist death spell field
This commit is contained in:
+1
-1
@@ -1601,7 +1601,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes att
|
||||
}
|
||||
|
||||
//this generates a lot of 'updates' to the client that the client does not need
|
||||
BuffFadeAll();
|
||||
BuffFadeNonPersistDeath();
|
||||
if((GetClientVersionBit() & BIT_SoFAndLater) && RuleB(Character, RespawnFromHover))
|
||||
UnmemSpellAll(true);
|
||||
else
|
||||
|
||||
@@ -1139,7 +1139,7 @@ void Client::OPRezzAnswer(uint32 Action, uint32 SpellID, uint16 ZoneID, uint16 I
|
||||
this->name, (uint16)spells[SpellID].base[0],
|
||||
SpellID, ZoneID, InstanceID);
|
||||
|
||||
this->BuffFadeAll();
|
||||
this->BuffFadeNonPersistDeath();
|
||||
int SpellEffectDescNum = GetSpellEffectDescNum(SpellID);
|
||||
// Rez spells with Rez effects have this DescNum (first is Titanium, second is 6.2 Client)
|
||||
if((SpellEffectDescNum == 82) || (SpellEffectDescNum == 39067)) {
|
||||
|
||||
@@ -213,6 +213,7 @@ public:
|
||||
void BuffFadeBySpellID(uint16 spell_id);
|
||||
void BuffFadeByEffect(int effectid, int skipslot = -1);
|
||||
void BuffFadeAll();
|
||||
void BuffFadeNonPersistDeath();
|
||||
void BuffFadeDetrimental();
|
||||
void BuffFadeBySlot(int slot, bool iRecalcBonuses = true);
|
||||
void BuffFadeDetrimentalByCaster(Mob *caster);
|
||||
|
||||
@@ -3752,6 +3752,17 @@ void Mob::BuffFadeAll()
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
void Mob::BuffFadeNonPersistDeath()
|
||||
{
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
for (int j = 0; j < buff_count; j++) {
|
||||
if (buffs[j].spellid != SPELL_UNKNOWN && !IsPersistDeathSpell(buffs[j].spellid))
|
||||
BuffFadeBySlot(j, false);
|
||||
}
|
||||
//we tell BuffFadeBySlot not to recalc, so we can do it only once when were done
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
void Mob::BuffFadeDetrimental() {
|
||||
uint32 buff_count = GetMaxTotalSlots();
|
||||
for (int j = 0; j < buff_count; j++) {
|
||||
|
||||
Reference in New Issue
Block a user