mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
feat(Core/Unit): Enable/Disable Daze config (#19454)
* daze * bruh * bruhx2
This commit is contained in:
@@ -4413,6 +4413,13 @@ DailyRBGArenaPoints.MinLevel = 71
|
||||
|
||||
MunchingBlizzlike.Enabled = 1
|
||||
|
||||
#
|
||||
# Daze.Enabled
|
||||
# Description: Enable or disable the chance for mob melee attacks to daze the victim.
|
||||
# Default: 1 - (Blizzlike)
|
||||
|
||||
Daze.Enabled = 1
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -186,6 +186,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_STRICT_NAMES_PROFANITY,
|
||||
CONFIG_ALLOWS_RANK_MOD_FOR_PET_HEALTH,
|
||||
CONFIG_MUNCHING_BLIZZLIKE,
|
||||
CONFIG_ENABLE_DAZE,
|
||||
BOOL_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -1284,6 +1284,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
_bool_configs[CONFIG_MUNCHING_BLIZZLIKE] = sConfigMgr->GetOption<bool>("MunchingBlizzlike.Enabled", true);
|
||||
|
||||
_bool_configs[CONFIG_ENABLE_DAZE] = sConfigMgr->GetOption<bool>("Daze.Enabled", true);
|
||||
|
||||
_int_configs[CONFIG_DAILY_RBG_MIN_LEVEL_AP_REWARD] = sConfigMgr->GetOption<uint32>("DailyRBGArenaPoints.MinLevel", 71);
|
||||
|
||||
_int_configs[CONFIG_AUCTION_HOUSE_SEARCH_TIMEOUT] = sConfigMgr->GetOption<uint32>("AuctionHouse.SearchTimeout", 1000);
|
||||
|
||||
Reference in New Issue
Block a user