From 38a7fad6d68b172b54cc31e541f4ab9b8b838e27 Mon Sep 17 00:00:00 2001 From: mikx Date: Mon, 13 Nov 2023 21:25:12 -0500 Subject: [PATCH] mod-mxwow-token low level content token --- .../mod-mxwow-token/conf/mod_mxwow_token.conf.dist | 5 +++-- modules/mod-mxwow-token/src/mxwow_token.cpp | 14 ++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/mod-mxwow-token/conf/mod_mxwow_token.conf.dist b/modules/mod-mxwow-token/conf/mod_mxwow_token.conf.dist index 95e8b3b..37a2772 100644 --- a/modules/mod-mxwow-token/conf/mod_mxwow_token.conf.dist +++ b/modules/mod-mxwow-token/conf/mod_mxwow_token.conf.dist @@ -11,8 +11,9 @@ MxWoW_Token.Enabled = 1 # # # # MxWoW - Token (Enable / Disable) # # Description: Specified amount of token given on each boss type kill. # -# Exemple: "MxWoW_Token.Raid.Normal = 300" will give 300 token on heroic boss kill. # -# # +# Exemple: "MxWoW_Token.Raid.Normal = 300" will give 300 token on raid normal boss kill. # +# # +MxWoW_Token.Dungeon.LowLevel = 50 # MxWoW_Token.Raid.Heroic = 400 # MxWoW_Token.Raid.Normal = 300 # MxWoW_Token.Dungeon.Heroic = 200 # diff --git a/modules/mod-mxwow-token/src/mxwow_token.cpp b/modules/mod-mxwow-token/src/mxwow_token.cpp index 0c0f633..cc5df69 100644 --- a/modules/mod-mxwow-token/src/mxwow_token.cpp +++ b/modules/mod-mxwow-token/src/mxwow_token.cpp @@ -35,6 +35,7 @@ public: void OnCreatureKill(Player* player, Creature* boss) { if (sConfigMgr->GetOption("MxWoW_Token.Enabled", true)) { + uint32 tokenQtyDungeonLowLevel = sConfigMgr->GetOption("MxWoW_Token.Dungeon.LowLevel", true); uint32 tokenQtyRaidHeroic = sConfigMgr->GetOption("MxWoW_Token.Raid.Heroic", true); uint32 tokenQtyRaidNormal = sConfigMgr->GetOption("MxWoW_Token.Raid.Normal", true); uint32 tokenQtyDungeonHeroic = sConfigMgr->GetOption("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); + } + } } } }