mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 23:38:54 -04:00
Merge branch '4.3.4' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -7415,8 +7415,8 @@ void Player::SendPvpRewards() const
|
||||
packet << GetCurrencyWeekCap(CURRENCY_TYPE_CONQUEST_POINTS, true);
|
||||
packet << GetCurrencyOnWeek(CURRENCY_TYPE_CONQUEST_POINTS, true);
|
||||
packet << GetCurrencyWeekCap(CURRENCY_TYPE_CONQUEST_META_ARENA, true);
|
||||
packet << GetCurrencyOnWeek(CURRENCY_TYPE_CONQUEST_META_ARENA, true);
|
||||
packet << GetCurrencyOnWeek(CURRENCY_TYPE_CONQUEST_META_RBG, true);
|
||||
packet << GetCurrencyOnWeek(CURRENCY_TYPE_CONQUEST_META_ARENA, true);
|
||||
packet << GetCurrencyWeekCap(CURRENCY_TYPE_CONQUEST_POINTS, true);
|
||||
packet << GetCurrencyWeekCap(CURRENCY_TYPE_CONQUEST_META_RBG, true);
|
||||
GetSession()->SendPacket(&packet);
|
||||
|
||||
@@ -1018,7 +1018,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
damage -= damageInfo->blocked;
|
||||
}
|
||||
|
||||
ApplyResilience(victim, &damage, crit);
|
||||
ApplyResilience(victim, &damage);
|
||||
break;
|
||||
}
|
||||
// Magical Attacks
|
||||
@@ -1032,7 +1032,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
|
||||
damage = SpellCriticalDamageBonus(spellInfo, damage, victim);
|
||||
}
|
||||
|
||||
ApplyResilience(victim, &damage, crit);
|
||||
ApplyResilience(victim, &damage);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -1244,7 +1244,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* dam
|
||||
damageInfo->HitInfo |= HITINFO_AFFECTS_VICTIM;
|
||||
|
||||
int32 resilienceReduction = damageInfo->damage;
|
||||
ApplyResilience(victim, &resilienceReduction, damageInfo->hitOutCome == MELEE_HIT_CRIT);
|
||||
ApplyResilience(victim, &resilienceReduction);
|
||||
resilienceReduction = damageInfo->damage - resilienceReduction;
|
||||
damageInfo->damage -= resilienceReduction;
|
||||
damageInfo->cleanDamage += resilienceReduction;
|
||||
@@ -14435,7 +14435,7 @@ void Unit::SendPlaySpellVisualKit(uint32 id, uint32 unkParam)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
|
||||
void Unit::ApplyResilience(Unit const* victim, int32* damage) const
|
||||
{
|
||||
// player mounted on multi-passenger mount is also classified as vehicle
|
||||
if (IsVehicle() || (victim->IsVehicle() && victim->GetTypeId() != TYPEID_PLAYER))
|
||||
@@ -14454,8 +14454,6 @@ void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
|
||||
if (!target)
|
||||
return;
|
||||
|
||||
if (isCrit)
|
||||
*damage -= target->GetCritDamageReduction(*damage);
|
||||
*damage -= target->GetDamageReduction(*damage);
|
||||
}
|
||||
|
||||
|
||||
@@ -1473,10 +1473,9 @@ class Unit : public WorldObject
|
||||
void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss);
|
||||
|
||||
// player or player's pet resilience (-1%)
|
||||
uint32 GetCritDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_CRIT_TAKEN, 2.2f, 33.0f, damage); }
|
||||
uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 2.0f, 100.0f, damage); }
|
||||
uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 1.0f, 100.0f, damage); }
|
||||
|
||||
void ApplyResilience(Unit const* victim, int32 * damage, bool isCrit) const;
|
||||
void ApplyResilience(Unit const* victim, int32* damage) const;
|
||||
|
||||
float MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, uint32 spellId) const;
|
||||
SpellMissInfo MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo);
|
||||
|
||||
@@ -85,9 +85,9 @@ void WorldSession::HandleArenaTeamCreateOpcode(WorldPacket & recvData)
|
||||
recvData >> slot;
|
||||
recvData >> iconcolor;
|
||||
recvData >> bordercolor;
|
||||
recvData >> icon;
|
||||
recvData >> background;
|
||||
recvData >> border;
|
||||
recvData >> background;
|
||||
recvData >> icon;
|
||||
name = recvData.ReadString(recvData.ReadBits(8));
|
||||
|
||||
uint8 type = ArenaTeam::GetTypeBySlot(slot);
|
||||
|
||||
@@ -161,6 +161,7 @@ void WorldSession::HandleVoidStorageQuery(WorldPacket& recvData)
|
||||
itemData.WriteByteSeq(itemId[0]);
|
||||
itemData.WriteByteSeq(itemId[6]);
|
||||
itemData.WriteByteSeq(creatorGuid[0]);
|
||||
itemData.WriteByteSeq(creatorGuid[1]);
|
||||
|
||||
itemData << uint32(item->ItemRandomPropertyId);
|
||||
|
||||
|
||||
@@ -5835,7 +5835,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
||||
damage = caster->SpellCriticalDamageBonus(m_spellInfo, damage, target);
|
||||
|
||||
int32 dmg = damage;
|
||||
caster->ApplyResilience(target, &dmg, crit);
|
||||
caster->ApplyResilience(target, &dmg);
|
||||
damage = dmg;
|
||||
|
||||
caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
|
||||
@@ -5902,7 +5902,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
|
||||
}
|
||||
|
||||
int32 dmg = damage;
|
||||
caster->ApplyResilience(target, &dmg, crit);
|
||||
caster->ApplyResilience(target, &dmg);
|
||||
damage = dmg;
|
||||
|
||||
caster->CalcAbsorbResist(target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, m_spellInfo);
|
||||
|
||||
@@ -613,22 +613,18 @@ bool SpellEffectInfo::HasMaxRadius() const
|
||||
|
||||
float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
|
||||
{
|
||||
if (!HasRadius())
|
||||
{
|
||||
if (HasMaxRadius())
|
||||
{
|
||||
//! Still not sure which to pick. Anyway at the current time (Patch 4.3.4) most of the spell effects
|
||||
//! have no radius mod per level, and RadiusMin is equal to RadiusMax.
|
||||
return MaxRadiusEntry->RadiusMin;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
const SpellRadiusEntry* entry = RadiusEntry;
|
||||
if (!HasRadius() && HasMaxRadius())
|
||||
entry = MaxRadiusEntry;
|
||||
|
||||
float radius = RadiusEntry->RadiusMin;
|
||||
if (!entry)
|
||||
return 0.0f;
|
||||
|
||||
float radius = entry->RadiusMin;
|
||||
if (caster)
|
||||
{
|
||||
radius += RadiusEntry->RadiusPerLevel * caster->getLevel();
|
||||
radius = std::min(radius, RadiusEntry->RadiusMax);
|
||||
radius += entry->RadiusPerLevel * caster->getLevel();
|
||||
radius = std::min(radius, entry->RadiusMax);
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_RADIUS, radius, spell);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user