Skip to content

Commit

Permalink
fix: Improve on the check (#24)
Browse files Browse the repository at this point in the history
* fix: Improve on the check

* Update mod-double-xp-weekend.cpp
  • Loading branch information
Nyeriah authored Jul 21, 2023
1 parent cb34c49 commit 5cd5ad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mod-double-xp-weekend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ class DoubleXpWeekend : public PlayerScript
}


void OnGiveXP(Player* player, uint32& amount, Unit* victim, uint8 /*xpSource*/) override
void OnGiveXP(Player* player, uint32& amount, Unit* victim, uint8 xpSource) override
{
if (!IsEventActive())
{
return;
}

if (sConfigMgr->GetOption<bool>("XPWeekend.QuestOnly", false) && victim && victim->GetTypeId() == TYPEID_UNIT)
if (sConfigMgr->GetOption<bool>("XPWeekend.QuestOnly", false) && xpSource != PlayerXPSource::XPSOURCE_QUEST)
{
return;
}
Expand Down

0 comments on commit 5cd5ad5

Please sign in to comment.