Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Az player script#21020 updates #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/TimeIsTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class TimeIsTimeBeforeConfigLoad : public WorldScript {
TimeIsTimeBeforeConfigLoad() : WorldScript("TimeIsTimeBeforeConfigLoad") { }

void OnBeforeConfigLoad(bool /*reload*/) override {
stimeistime_enable = sConfigMgr->GetBoolDefault("TimeIsTime.Enable", true);
stimeistime_announce = sConfigMgr->GetBoolDefault("TimeIsTime.Announce", true);
stimeistime_speed_rate = sConfigMgr->GetFloatDefault("TimeIsTime.SpeedRate", 1.0);
stimeistime_hour_offset = sConfigMgr->GetFloatDefault("TimeIsTime.HourOffset", 0.0);
stimeistime_time_start = sConfigMgr->GetIntDefault("TimeIsTime.TimeStart", 0);
stimeistime_enable = sConfigMgr->GetOption<bool>("TimeIsTime.Enable", true);
stimeistime_announce = sConfigMgr->GetOption<bool>("TimeIsTime.Announce", true);
stimeistime_speed_rate = sConfigMgr->GetOption<float>("TimeIsTime.SpeedRate", 1.0);
stimeistime_hour_offset = sConfigMgr->GetOption<float>("TimeIsTime.HourOffset", 0.0);
stimeistime_time_start = sConfigMgr->GetOption<int>("TimeIsTime.TimeStart", 0);
}
};

Expand All @@ -37,12 +37,12 @@ class TimeIsTime : public PlayerScript {

TimeIsTime() : PlayerScript("TimeIsTime") { }

void OnLogin(Player* player) {
void OnPlayerLogin(Player* player) {
if (stimeistime_enable && stimeistime_announce)
ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00TimeIsTime |rmodule");
}

void OnSendInitialPacketsBeforeAddToMap(Player* player, WorldPacket& data) override {
void OnPlayerSendInitialPacketsBeforeAddToMap(Player* player, WorldPacket& data) override {
if (!stimeistime_enable)
return;

Expand Down