diff --git a/conf/mod_account_mount.conf.dist b/conf/mod_account_mount.conf.dist index 02a2e28..a18e944 100644 --- a/conf/mod_account_mount.conf.dist +++ b/conf/mod_account_mount.conf.dist @@ -15,4 +15,10 @@ Account.Mounts.Announce = 0 # Excluded Spell IDs (comma-separated, no space). See example below # Account.Mounts.ExcludedSpellIDs = 470,578,6777 -Account.Mounts.ExcludedSpellIDs = 0 \ No newline at end of file +Account.Mounts.ExcludedSpellIDs = 0 + +# Limit race and class specific mounts? (1: true | 0: false) +# 0 = will allow any race/class to own other racial/class-specific mounts. +# 1 = will enforce the limit. + +Account.Mounts.LimitRace = 0 diff --git a/src/mod_account_mount.cpp b/src/mod_account_mount.cpp index 3e84e86..13427d2 100644 --- a/src/mod_account_mount.cpp +++ b/src/mod_account_mount.cpp @@ -8,7 +8,7 @@ class AccountMounts : public PlayerScript { - static const bool limitrace = true; // This set to true will only learn mounts from chars on the same team, do what you want. + bool limitrace; // Boolean to hold limit race option std::set excludedSpellIds; // Set to hold the Spell IDs to be excluded public: @@ -16,6 +16,8 @@ public: PLAYERHOOK_ON_LOGIN }) { + // Retrieve limitrace option from the config file + limitrace = sConfigMgr->GetOption("Account.Mounts.LimitRace", false); // Retrieve the string of excluded Spell IDs from the config file std::string excludedSpellsStr = sConfigMgr->GetOption("Account.Mounts.ExcludedSpellIDs", ""); // Proceed only if the configuration is not "0" or empty, indicating exclusions are specified