Compare commits
No commits in common. "fed4752e0cd71db7faa4d6f9f4650f5377d2f31c" and "b9894eea1187c1865ad973f8e45b42d82a4f8ca9" have entirely different histories.
fed4752e0c
...
b9894eea11
1 changed files with 23 additions and 52 deletions
|
|
@ -64,10 +64,9 @@ config file for quick modifications.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Configuration/Config.h"
|
#include "Configuration/Config.h"
|
||||||
#include "Chat.h"
|
|
||||||
#include "Player.h"
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "WorldSessionMgr.h"
|
#include "Player.h"
|
||||||
|
#include "Chat.h"
|
||||||
|
|
||||||
struct COL
|
struct COL
|
||||||
{
|
{
|
||||||
|
|
@ -118,27 +117,25 @@ class CongratsAnnounce : public PlayerScript
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CongratsAnnounce() : PlayerScript("CongratsAnnounce", {
|
CongratsAnnounce() : PlayerScript("CongratsAnnounce") {}
|
||||||
PLAYERHOOK_ON_LOGIN
|
|
||||||
}) {}
|
|
||||||
|
|
||||||
void OnPlayerLogin(Player* player)
|
void OnLogin(Player* player)
|
||||||
{
|
{
|
||||||
// Announce Module
|
// Announce Module
|
||||||
if (col.congratsAnnounce)
|
if (col.congratsAnnounce)
|
||||||
|
{
|
||||||
ChatHandler(player->GetSession()).SendSysMessage(col.acoreMessageId);
|
ChatHandler(player->GetSession()).SendSysMessage(col.acoreMessageId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CongratsOnLevel : public PlayerScript
|
class CongratsOnLevel : public PlayerScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CongratsOnLevel() : PlayerScript("CongratsOnLevel", {
|
CongratsOnLevel() : PlayerScript("CongratsOnLevel") { }
|
||||||
PLAYERHOOK_ON_LEVEL_CHANGED
|
|
||||||
}) { }
|
|
||||||
|
|
||||||
// Level Up Rewards
|
// Level Up Rewards
|
||||||
void OnPlayerLevelChanged(Player* player, uint8 oldLevel) override
|
void OnLevelChanged(Player* player, uint8 oldLevel) override
|
||||||
{
|
{
|
||||||
// If enabled...
|
// If enabled...
|
||||||
if (col.congratsEnable)
|
if (col.congratsEnable)
|
||||||
|
|
@ -181,30 +178,22 @@ public:
|
||||||
case LOCALE_koKR:
|
case LOCALE_koKR:
|
||||||
case LOCALE_frFR:
|
case LOCALE_frFR:
|
||||||
case LOCALE_deDE:
|
case LOCALE_deDE:
|
||||||
|
case LOCALE_zhCN:
|
||||||
|
case LOCALE_zhTW:
|
||||||
case LOCALE_ruRU:
|
case LOCALE_ruRU:
|
||||||
{
|
{
|
||||||
ss << "|cffFFFFFF[ |cffFF0000C|cffFFA500O|cffFFFF00N|cff00FF00G|cff00FFFFR|cff6A5ACDA|cffFF00FFT|cff98FB98S|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFhas reached |cff4CFF00Level " << static_cast<int>(player->GetLevel()) << "|cffFFFFFF!";
|
ss << "|cffFFFFFF[ |cffFF0000C|cffFFA500O|cffFFFF00N|cff00FF00G|cff00FFFFR|cff6A5ACDA|cffFF00FFT|cff98FB98S|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFhas reached |cff4CFF00Level " << std::to_string(player->GetLevel()) << "|cffFFFFFF!";
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhCN:
|
|
||||||
{
|
|
||||||
ss << "|cffFFFFFF[ |cffFF0000恭|cffFFA500喜|cffFFFF00你|cff00FF00升|cff00FFFF级|cff6A5ACD啦|cffFF00FF! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFF已达到 |cff4CFF00" << static_cast<int>(player->GetLevel()) << " 级|cffFFFFFF!";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhTW:
|
|
||||||
{
|
|
||||||
ss << "|cffFFFFFF[ |cffFF0000恭|cffFFA500喜|cffFFFF00你|cff00FF00升|cff00FFFF級|cff6A5ACD啦|cffFF00FF! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFF已達到 |cff4CFF00" << static_cast<int>(player->GetLevel()) << " 級|cffFFFFFF!";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LOCALE_esES:
|
case LOCALE_esES:
|
||||||
case LOCALE_esMX:
|
case LOCALE_esMX:
|
||||||
{
|
{
|
||||||
ss << "|cffFFFFFF[ |cffFF0000F|cffFFA500E|cffFFFF00L|cff00FF00I|cff00FFFFC|cff6A5ACDI|cffFF00FFT|cff98FB98A|cff00FF00C|cff00FFFFI|cffFF0000O|cff00FF00N|cff00FFFFE|cffFF00FFS|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFha alcanzado |cff4CFF00el nivel " << static_cast<int>(player->GetLevel()) << "|cffFFFFFF!";
|
ss << "|cffFFFFFF[ |cffFF0000F|cffFFA500E|cffFFFF00L|cff00FF00I|cff00FFFFC|cff6A5ACDI|cffFF00FFT|cff98FB98A|cff00FF00C|cff00FFFFI|cffFF0000O|cff00FF00N|cff00FFFFE|cffFF00FFS|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFha alcanzado |cff4CFF00el nivel " << std::to_string(player->GetLevel()) << "|cffFFFFFF!";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, ss.str().c_str());
|
sWorld->SendServerMessage(SERVER_MSG_STRING, ss.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always send message on reward level up
|
// Always send message on reward level up
|
||||||
|
|
@ -218,30 +207,22 @@ public:
|
||||||
case LOCALE_koKR:
|
case LOCALE_koKR:
|
||||||
case LOCALE_frFR:
|
case LOCALE_frFR:
|
||||||
case LOCALE_deDE:
|
case LOCALE_deDE:
|
||||||
|
case LOCALE_zhCN:
|
||||||
|
case LOCALE_zhTW:
|
||||||
case LOCALE_ruRU:
|
case LOCALE_ruRU:
|
||||||
{
|
{
|
||||||
ss << "|cffFFFFFF[ |cffFF0000C|cffFFA500O|cffFFFF00N|cff00FF00G|cff00FFFFR|cff6A5ACDA|cffFF00FFT|cff98FB98S|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFhas reached |cff4CFF00Level " << static_cast<int>(player->GetLevel()) << "|cffFFFFFF!";
|
ss << "|cffFFFFFF[ |cffFF0000C|cffFFA500O|cffFFFF00N|cff00FF00G|cff00FFFFR|cff6A5ACDA|cffFF00FFT|cff98FB98S|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFhas reached |cff4CFF00Level " << level << "|cffFFFFFF!";
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhCN: // 简体中文
|
|
||||||
{
|
|
||||||
ss << "|cffFFFFFF[ |cffFF0000恭|cffFFA500喜|cffFFFF00你|cff00FF00升|cff00FFFF级|cff6A5ACD啦|cffFF00FF! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFF已达到 |cff4CFF00" << static_cast<int>(player->GetLevel()) << " 级|cffFFFFFF!";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhTW: // 繁体中文
|
|
||||||
{
|
|
||||||
ss << "|cffFFFFFF[ |cffFF0000恭|cffFFA500喜|cffFFFF00你|cff00FF00升|cff00FFFF級|cff6A5ACD啦|cffFF00FF! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFF已達到 |cff4CFF00" << static_cast<int>(player->GetLevel()) << " 級|cffFFFFFF!";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LOCALE_esES:
|
case LOCALE_esES:
|
||||||
case LOCALE_esMX:
|
case LOCALE_esMX:
|
||||||
{
|
{
|
||||||
ss << "|cffFFFFFF[ |cffFF0000F|cffFFA500E|cffFFFF00L|cff00FF00I|cff00FFFFC|cff6A5ACDI|cffFF00FFT|cff98FB98A|cff00FF00C|cff00FFFFI|cffFF0000O|cff00FF00N|cff00FFFFE|cffFF00FFS|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFha alcanzado |cff4CFF00el nivel " << static_cast<int>(player->GetLevel()) << "|cffFFFFFF!";
|
ss << "|cffFFFFFF[ |cffFF0000F|cffFFA500E|cffFFFF00L|cff00FF00I|cff00FFFFC|cff6A5ACDI|cffFF00FFT|cff98FB98A|cff00FF00C|cff00FFFFI|cffFF0000O|cff00FF00N|cff00FFFFE|cffFF00FFS|cffFF0000! |cffFFFFFF] : |cff4CFF00 " << player->GetName() << " |cffFFFFFFha alcanzado |cff4CFF00el nivel " << level << "|cffFFFFFF!";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sWorldSessionMgr->SendServerMessage(SERVER_MSG_STRING, ss.str().c_str());
|
sWorld->SendServerMessage(SERVER_MSG_STRING, ss.str().c_str());
|
||||||
|
|
||||||
// Issue a raid warning to the player
|
// Issue a raid warning to the player
|
||||||
std::ostringstream ss2;
|
std::ostringstream ss2;
|
||||||
|
|
@ -251,25 +232,17 @@ public:
|
||||||
case LOCALE_koKR:
|
case LOCALE_koKR:
|
||||||
case LOCALE_frFR:
|
case LOCALE_frFR:
|
||||||
case LOCALE_deDE:
|
case LOCALE_deDE:
|
||||||
|
case LOCALE_zhCN:
|
||||||
|
case LOCALE_zhTW:
|
||||||
case LOCALE_ruRU:
|
case LOCALE_ruRU:
|
||||||
{
|
{
|
||||||
ss2 << "Congrats on Level " << static_cast<int>(player->GetLevel()) << " " << player->GetName() << "! You've been awarded " << money << " Copper and a few treasures!";
|
ss2 << "Congrats on Level " << level << " " << player->GetName() << "! You've been awarded " << money << " gold and a few treasures!";
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhCN: // 简体中文
|
|
||||||
{
|
|
||||||
ss2 << "恭喜达到等级 " << static_cast<int>(player->GetLevel()) << "," << player->GetName() << "!您获得了 " << money << " 钱币和一些宝藏!";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LOCALE_zhTW: // 繁体中文
|
|
||||||
{
|
|
||||||
ss2 << "恭喜達到等級 " << static_cast<int>(player->GetLevel()) << "," << player->GetName() << "!您獲得了 " << money << " 錢幣和一些寶藏!";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LOCALE_esES:
|
case LOCALE_esES:
|
||||||
case LOCALE_esMX:
|
case LOCALE_esMX:
|
||||||
{
|
{
|
||||||
ss2 << "¡Felicidades por el nivel " << static_cast<int>(player->GetLevel()) << " " << player->GetName() << " Se le ha concedido " << money << " cobre y unos cuantos tesoros!";
|
ss2 << "¡Felicidades por el nivel " << level << " " << player->GetName() << " Se le ha concedido " << money << " oro y unos cuantos tesoros!";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -284,9 +257,7 @@ public:
|
||||||
class ModCongratsLevelWorldScript : public WorldScript
|
class ModCongratsLevelWorldScript : public WorldScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ModCongratsLevelWorldScript() : WorldScript("ModCongratsLevelWorldScript", {
|
ModCongratsLevelWorldScript() : WorldScript("ModCongratsLevelWorldScript") { }
|
||||||
WORLDHOOK_ON_BEFORE_CONFIG_LOAD
|
|
||||||
}) { }
|
|
||||||
|
|
||||||
void OnBeforeConfigLoad(bool reload) override
|
void OnBeforeConfigLoad(bool reload) override
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue