Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKyle committed Sep 7, 2024
1 parent 21791bc commit 5076c93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/Flare/Calculators/XPCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function fetchXPFromMonster(Monster $monster, int $characterLevel, float
$xp = ($xpReduction !== 0.0 ? ($monster->xp - ($monster->xp * $xpReduction)) : $monster->xp);
} elseif ($characterLevel >= $monster->max_level) {
// The monster has a max exp level and the character is above it or equal to it, so they get 1/3rd xp.
$xp = ($xpReduction !== 0.0 ? (3.3333 - (3.3333 * $xpReduction)) : 3.3333);
$xp = ($xpReduction !== 0.0 ? $monster->xp * 0.333 : ($monster->xp - $monster->xp * $xpReduction) * 0.33);
}

return ceil($xp);
Expand Down
2 changes: 1 addition & 1 deletion app/Flare/Services/CharacterRewardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ protected function distributeXP(Monster $monster)

// Reduce The XP from the monster if needed.
$xp = XPCalculator::fetchXPFromMonster($monster, $this->character->level);

dump($xp);
if ($this->character->level >= $monster->max_level && $this->character->user->show_monster_to_low_level_message) {
ServerMessageHandler::sendBasicMessage($this->character->user, $monster->name.' has a max level of: '.number_format($monster->max_level).'. You are only getting 1/3rd of: '.number_format($monster->xp).' XP before all bonuses. Move down the list child.');

Expand Down
2 changes: 1 addition & 1 deletion app/Game/Skills/Services/DisenchantService.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function disenchantItem(Character $character, Item $item, bool $doNotSend
return $this->successResult([
'message' => 'Disenchanted item '.$item->affix_name.' Check server message tab for Gold Dust output.',
'inventory' => [
'inventory' => $inventory->getInventoryForType('inventory'),
'inventory' => $this->characterInventoryService->setCharacter($character)->getInventoryForType('inventory'),
],
]);
}
Expand Down

0 comments on commit 5076c93

Please sign in to comment.