Merge branch '4.3.4' of https://github.com/TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
commit
eff2a994b1
6 files changed
+21
-17
No files matched your search
@@ -1,5 +1,5 @@
|
||||
DELETE FROM `worldstates` WHERE `entry` IN (20004,20007,20050);
|
||||
INSERT INTO `worldstates` (`entry`, `value`, `comment`) VALUES
|
||||
(20004,0,'CleaningFlags'),
|
||||
(20007,0,'NextMonthlyQuestResetTime')
|
||||
(20007,0,'NextMonthlyQuestResetTime'),
|
||||
(20050,0,'NextWeeklyGuildResetTime');
|
||||
@@ -5829,7 +5829,7 @@ float Player::GetRatingBonusValue(CombatRating cr) const
|
||||
float baseResult = float(GetUInt32Value(PLAYER_FIELD_COMBAT_RATING_1 + cr)) * GetRatingMultiplier(cr);
|
||||
if (cr != CR_RESILIENCE_PLAYER_DAMAGE_TAKEN)
|
||||
return baseResult;
|
||||
return float(1.0f - pow(0.99f, baseResult));
|
||||
return float(1.0f - pow(0.99f, baseResult)) * 100.0f;
|
||||
}
|
||||
|
||||
float Player::GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
|
||||
@@ -5867,7 +5867,7 @@ float Player::OCTRegenMPPerSpirit()
|
||||
|
||||
void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
|
||||
{
|
||||
m_baseRatingValue[cr]+=(apply ? value : -value);
|
||||
m_baseRatingValue[cr] +=(apply ? value : -value);
|
||||
|
||||
// explicit affected values
|
||||
switch (cr)
|
||||
@@ -5883,14 +5883,12 @@ void Player::ApplyRatingMod(CombatRating cr, int32 value, bool apply)
|
||||
}
|
||||
case CR_HASTE_RANGED:
|
||||
{
|
||||
float RatingChange = value * GetRatingMultiplier(cr);
|
||||
ApplyAttackTimePercentMod(RANGED_ATTACK, RatingChange, apply);
|
||||
ApplyAttackTimePercentMod(RANGED_ATTACK, value * GetRatingMultiplier(cr), apply);
|
||||
break;
|
||||
}
|
||||
case CR_HASTE_SPELL:
|
||||
{
|
||||
float RatingChange = value * GetRatingMultiplier(cr);
|
||||
ApplyCastTimePercentMod(RatingChange, apply);
|
||||
ApplyCastTimePercentMod(value * GetRatingMultiplier(cr), apply);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -6220,6 +6218,9 @@ void Player::UpdateSkillsForLevel()
|
||||
if (GetSkillRangeType(pSkill, false) != SKILL_RANGE_LEVEL)
|
||||
continue;
|
||||
|
||||
if (IsWeaponSkill(pSkill->id))
|
||||
continue;
|
||||
|
||||
uint16 field = itr->second.pos / 2;
|
||||
uint8 offset = itr->second.pos & 1; // itr->second.pos % 2
|
||||
|
||||
@@ -6248,6 +6249,9 @@ void Player::UpdateSkillsToMaxSkillsForLevel()
|
||||
if (IsProfessionOrRidingSkill(pskill))
|
||||
continue;
|
||||
|
||||
if (IsWeaponSkill(pskill))
|
||||
continue;
|
||||
|
||||
uint16 field = itr->second.pos / 2;
|
||||
uint8 offset = itr->second.pos & 1; // itr->second.pos % 2
|
||||
|
||||
|
||||
@@ -15678,8 +15678,8 @@ void Unit::ApplyResilience(Unit const* victim, int32* damage, bool isCrit) const
|
||||
return;
|
||||
|
||||
if (isCrit)
|
||||
*damage = target->GetCritDamageReduction(*damage);
|
||||
*damage = target->GetDamageReduction(*damage);
|
||||
*damage -= target->GetCritDamageReduction(*damage);
|
||||
*damage -= target->GetDamageReduction(*damage);
|
||||
}
|
||||
|
||||
// Melee based spells can be miss, parry or dodge on this step
|
||||
|
||||
@@ -1451,8 +1451,6 @@ class Unit : public WorldObject
|
||||
|
||||
// player or player's pet resilience (-1%)
|
||||
uint32 GetCritDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_CRIT_TAKEN, 2.2f, 33.0f, damage); }
|
||||
|
||||
// player or player's pet resilience (-1%), cap 100%
|
||||
uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 2.0f, 100.0f, damage); }
|
||||
|
||||
void ApplyResilience(const Unit* victim, int32 * damage, bool isCrit) const;
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
bool IsPrimaryProfessionSkill(uint32 skill)
|
||||
{
|
||||
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
|
||||
if (!pSkill)
|
||||
return false;
|
||||
return pSkill && pSkill->categoryId == SKILL_CATEGORY_PROFESSION;
|
||||
}
|
||||
|
||||
if (pSkill->categoryId != SKILL_CATEGORY_PROFESSION)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
bool IsWeaponSkill(uint32 skill)
|
||||
{
|
||||
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
|
||||
return pSkill && pSkill->categoryId == SKILL_CATEGORY_WEAPON;
|
||||
}
|
||||
|
||||
bool IsPartOfSkillLine(uint32 skillId, uint32 spellId)
|
||||
|
||||
@@ -578,6 +578,8 @@ typedef std::map<int32, std::vector<int32> > SpellLinkedMap;
|
||||
|
||||
bool IsPrimaryProfessionSkill(uint32 skill);
|
||||
|
||||
bool IsWeaponSkill(uint32 skill);
|
||||
|
||||
inline bool IsProfessionSkill(uint32 skill)
|
||||
{
|
||||
return IsPrimaryProfessionSkill(skill) || skill == SKILL_FISHING || skill == SKILL_COOKING || skill == SKILL_FIRST_AID;
|
||||
|
||||
Reference in new issue
Block a user