mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 07:06:23 +00:00
revert(Core/Player): Revert Delayed Damage System (#16246)
* Revert "fix(Core/Spells): Delayed Damage system (#16183)" This reverts commitd282cce4af. * Revert "fix: Crash on ProcessDelayedDamages (#16166)" This reverts commit3dbdea5e28. * Revert "fix(core\player): Missing combat animation (#14199)" This reverts commita238e5e27b.
This commit is contained in:
@@ -812,14 +812,8 @@ void Unit::DealDamageMods(Unit const* victim, uint32& damage, uint32* absorb)
|
||||
}
|
||||
}
|
||||
|
||||
uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellInfo const* spellProto, bool durabilityLoss, bool /*allowGM*/, Spell const* damageSpell /*= nullptr*/, bool delayed)
|
||||
uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellInfo const* spellProto, bool durabilityLoss, bool /*allowGM*/, Spell const* damageSpell /*= nullptr*/)
|
||||
{
|
||||
if (delayed && attacker && attacker->GetTypeId() == TYPEID_PLAYER && attacker->GetGUID() != victim->GetGUID())
|
||||
{
|
||||
sWorld->AddDelayedDamage(attacker->GetGUID(), victim->GetGUID(), damage, cleanDamage, damagetype, damageSchoolMask, spellProto, durabilityLoss, attacker->GetMapId(), attacker->GetInstanceId());
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Xinef: initialize damage done for rage calculations
|
||||
// Xinef: its rare to modify damage in hooks, however training dummy's sets damage to 0
|
||||
uint32 rage_damage = damage + ((cleanDamage != nullptr) ? cleanDamage->absorbed_damage : 0);
|
||||
@@ -1460,7 +1454,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss,
|
||||
|
||||
// Call default DealDamage
|
||||
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->absorb, BASE_ATTACK, MELEE_HIT_NORMAL);
|
||||
Unit::DealDamage(this, victim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss, false, spell, true);
|
||||
Unit::DealDamage(this, victim, damageInfo->damage, &cleanDamage, SPELL_DIRECT_DAMAGE, SpellSchoolMask(damageInfo->schoolMask), spellProto, durabilityLoss, false, spell);
|
||||
}
|
||||
|
||||
// @todo for melee need create structure as in
|
||||
|
||||
@@ -757,20 +757,6 @@ struct CleanDamage
|
||||
struct CalcDamageInfo;
|
||||
struct SpellNonMeleeDamage;
|
||||
|
||||
struct DelayedDamage
|
||||
{
|
||||
ObjectGuid attacker;
|
||||
ObjectGuid victim;
|
||||
uint32 damage;
|
||||
CleanDamage const* cleanDamage;
|
||||
DamageEffectType damagetype;
|
||||
SpellSchoolMask damageSchoolMask;
|
||||
SpellInfo const* spellProto;
|
||||
bool durabilityLoss;
|
||||
uint32 mapId;
|
||||
uint32 instanceId;
|
||||
};
|
||||
|
||||
class DamageInfo
|
||||
{
|
||||
private:
|
||||
@@ -1572,7 +1558,7 @@ public:
|
||||
|
||||
uint16 GetMaxSkillValueForLevel(Unit const* target = nullptr) const { return (target ? getLevelForTarget(target) : GetLevel()) * 5; }
|
||||
static void DealDamageMods(Unit const* victim, uint32& damage, uint32* absorb);
|
||||
static uint32 DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage = nullptr, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = nullptr, bool durabilityLoss = true, bool allowGM = false, Spell const* spell = nullptr, bool delayed = false);
|
||||
static uint32 DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage = nullptr, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = nullptr, bool durabilityLoss = true, bool allowGM = false, Spell const* spell = nullptr);
|
||||
static void Kill(Unit* killer, Unit* victim, bool durabilityLoss = true, WeaponAttackType attackType = BASE_ATTACK, SpellInfo const* spellProto = nullptr, Spell const* spell = nullptr);
|
||||
void KillSelf(bool durabilityLoss = true, WeaponAttackType attackType = BASE_ATTACK, SpellInfo const* spellProto = nullptr, Spell const* spell = nullptr) { Kill(this, this, durabilityLoss, attackType, spellProto, spell); };
|
||||
static int32 DealHeal(Unit* healer, Unit* victim, uint32 addhealth);
|
||||
|
||||
Reference in New Issue
Block a user