From 5076c937a9d57dae48d66bacbffa9843641326db Mon Sep 17 00:00:00 2001 From: Adam Balan Date: Sat, 7 Sep 2024 16:24:44 -0600 Subject: [PATCH] Minor changes --- app/Flare/Calculators/XPCalculator.php | 2 +- app/Flare/Services/CharacterRewardService.php | 2 +- app/Game/Skills/Services/DisenchantService.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Flare/Calculators/XPCalculator.php b/app/Flare/Calculators/XPCalculator.php index e4c1fbe2b..a82f3a924 100755 --- a/app/Flare/Calculators/XPCalculator.php +++ b/app/Flare/Calculators/XPCalculator.php @@ -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); diff --git a/app/Flare/Services/CharacterRewardService.php b/app/Flare/Services/CharacterRewardService.php index 34ef001f5..bfe0ed714 100755 --- a/app/Flare/Services/CharacterRewardService.php +++ b/app/Flare/Services/CharacterRewardService.php @@ -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.'); diff --git a/app/Game/Skills/Services/DisenchantService.php b/app/Game/Skills/Services/DisenchantService.php index 48bc05224..8ccbde2ff 100755 --- a/app/Game/Skills/Services/DisenchantService.php +++ b/app/Game/Skills/Services/DisenchantService.php @@ -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'), ], ]); }