Skip to content

Commit

Permalink
Merge pull request #15 from cjmellor/fix/check-multipliers-folder
Browse files Browse the repository at this point in the history
fix: Bypass Multiplier Folder Check
  • Loading branch information
cjmellor committed Jul 22, 2023
2 parents 7b2e78f + 454781c commit da7a40f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Concerns/GiveExperience.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function addPoints(
/**
* If the Multiplier Service is enabled, apply the Multipliers.
*/
if (config(key: 'level-up.multiplier.enabled')) {
if (config(key: 'level-up.multiplier.enabled') && file_exists(filename: config(key: 'level-up.multiplier.path'))) {
$amount = $this->getMultipliers(amount: $amount);
}

Expand Down Expand Up @@ -176,13 +176,13 @@ public function levelUp(): void
event(new UserLevelledUp(user: $this, level: $this->getLevel()));
}

public function level(): BelongsTo
public function experienceHistory(): HasMany
{
return $this->belongsTo(related: Level::class);
return $this->hasMany(related: ExperienceAudit::class);
}

public function experienceHistory(): HasMany
public function level(): BelongsTo
{
return $this->hasMany(related: ExperienceAudit::class);
return $this->belongsTo(related: Level::class);
}
}

0 comments on commit da7a40f

Please sign in to comment.