mod-mxwow-token low level content token

This commit is contained in:
mikx
2023-11-13 21:25:12 -05:00
parent c61c671ecc
commit 38a7fad6d6
2 changed files with 13 additions and 6 deletions

View File

@@ -35,6 +35,7 @@ public:
void OnCreatureKill(Player* player, Creature* boss)
{
if (sConfigMgr->GetOption<bool>("MxWoW_Token.Enabled", true)) {
uint32 tokenQtyDungeonLowLevel = sConfigMgr->GetOption<int>("MxWoW_Token.Dungeon.LowLevel", true);
uint32 tokenQtyRaidHeroic = sConfigMgr->GetOption<int>("MxWoW_Token.Raid.Heroic", true);
uint32 tokenQtyRaidNormal = sConfigMgr->GetOption<int>("MxWoW_Token.Raid.Normal", true);
uint32 tokenQtyDungeonHeroic = sConfigMgr->GetOption<int>("MxWoW_Token.Dungeon.Heroic", true);
@@ -49,12 +50,17 @@ public:
}
}
else if (boss->IsDungeonBoss()) {
if (player->GetMap()->IsHeroic()) {
GiveToken(player, tokenQtyDungeonHeroic);
if (player->GetLevel() < 80) {
GiveToken(player, tokenQtyDungeonLowLevel);
}
else {
GiveToken(player, tokenQtyDungeonNormal);
}
if (player->GetMap()->IsHeroic()) {
GiveToken(player, tokenQtyDungeonHeroic);
}
else {
GiveToken(player, tokenQtyDungeonNormal);
}
}
}
}
}