mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
@@ -451,7 +451,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const* quest, ObjectGuid npcGU
|
||||
|
||||
uint32 moneyRew = 0;
|
||||
Player* player = _session->GetPlayer();
|
||||
if (player && (player->getLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player)))
|
||||
if (player && (player->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL) || sScriptMgr->ShouldBeRewardedWithMoneyInsteadOfExp(player)))
|
||||
{
|
||||
moneyRew = quest->GetRewMoneyMaxLevel();
|
||||
}
|
||||
|
||||
@@ -1915,8 +1915,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
||||
if (Probability > 40.0f)
|
||||
Probability = 40.0f;
|
||||
|
||||
if (roll_chance_f(std::max(0.0f, Probability)))
|
||||
CastSpell(victim, 1604, true);
|
||||
// Daze application
|
||||
if (sWorld->getBoolConfig(CONFIG_ENABLE_DAZE))
|
||||
if (roll_chance_f(std::max(0.0f, Probability)))
|
||||
CastSpell(victim, 1604, true);
|
||||
}
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -3054,9 +3056,8 @@ void Unit::SendMeleeAttackStop(Unit* victim)
|
||||
|
||||
if (victim)
|
||||
{
|
||||
uint8 nowDead = victim->isDead();
|
||||
data << victim->GetPackGUID();
|
||||
data << nowDead;
|
||||
data << (uint32)victim->isDead();
|
||||
}
|
||||
SendMessageToSet(&data, true);
|
||||
LOG_DEBUG("entities.unit", "WORLD: Sent SMSG_ATTACKSTOP");
|
||||
|
||||
@@ -1506,9 +1506,7 @@ public:
|
||||
[[nodiscard]] bool IsTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; }
|
||||
[[nodiscard]] bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; }
|
||||
|
||||
/// @deprecated Use GetLevel() instead!
|
||||
[[nodiscard]] uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
|
||||
[[nodiscard]] uint8 GetLevel() const { return getLevel(); }
|
||||
[[nodiscard]] uint8 GetLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); }
|
||||
uint8 getLevelForTarget(WorldObject const* /*target*/) const override { return GetLevel(); }
|
||||
void SetLevel(uint8 lvl, bool showLevelChange = true);
|
||||
[[nodiscard]] uint8 getRace(bool original = false) const;
|
||||
|
||||
Reference in New Issue
Block a user