mirror of
https://github.com/noisiver/mod-weekendbonus.git
synced 2026-02-07 20:51:12 +00:00
Changes
Changed the module to match my other modules. It's not as clean but it helps me.
This commit is contained in:
@@ -17,10 +17,10 @@ enum Day
|
|||||||
SATURDAY
|
SATURDAY
|
||||||
};
|
};
|
||||||
|
|
||||||
class WeekendBonus : public PlayerScript
|
class WeekendBonusPlayer : public PlayerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WeekendBonus() : PlayerScript("WeekendBonus") {}
|
WeekendBonusPlayer() : PlayerScript("WeekendBonusPlayer") {}
|
||||||
|
|
||||||
void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/) override
|
void OnGiveXP(Player* player, uint32& amount, Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
@@ -62,22 +62,16 @@ class WeekendBonus : public PlayerScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class WeekendBonusConfig : WorldScript
|
class WeekendBonusWorld : WorldScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WeekendBonusConfig() : WorldScript("WeekendBonusConfig") {}
|
WeekendBonusWorld() : WorldScript("WeekendBonusWorld") {}
|
||||||
|
|
||||||
void OnAfterConfigLoad(bool /*reload*/) override
|
void OnAfterConfigLoad(bool /*reload*/) override
|
||||||
{
|
{
|
||||||
multiplierExperience = sConfigMgr->GetOption<int32>("WeekendBonus.Multiplier.Experience", 1);
|
multiplierExperience = sConfigMgr->GetOption<int32>("WeekendBonus.Multiplier.Experience", 1);
|
||||||
multiplierReputation = sConfigMgr->GetOption<int32>("WeekendBonus.Multiplier.Reputation", 1);
|
multiplierReputation = sConfigMgr->GetOption<int32>("WeekendBonus.Multiplier.Reputation", 1);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
class WeekendBonusAnnouncement : WorldScript
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
WeekendBonusAnnouncement() : WorldScript("WeekendBonusAnnouncement") {}
|
|
||||||
|
|
||||||
void OnStartup() override
|
void OnStartup() override
|
||||||
{
|
{
|
||||||
@@ -135,7 +129,6 @@ class WeekendBonusAnnouncement : WorldScript
|
|||||||
|
|
||||||
void AddWeekendBonusScripts()
|
void AddWeekendBonusScripts()
|
||||||
{
|
{
|
||||||
new WeekendBonus();
|
new WeekendBonusPlayer();
|
||||||
new WeekendBonusConfig();
|
new WeekendBonusWorld();
|
||||||
new WeekendBonusAnnouncement();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user