Commit 192d1d1b authored by Jack Stupple's avatar Jack Stupple
Browse files

match the correct currency for base modifiers

parent 07192616
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@ class Character extends Model
    {
        $player = Player::where('session_id', '=', $_SERVER['HTTP_SESSION_ID'])->first();

        if ($player->currency_id) {
        if ($player->language) {
            return $this->hasMany(Modifier::class, 'model_id')
                ->where('model', '=', 'character')
                ->where('currency_id', '=', $player->currency_id);
                ->where('currency_id', '=', $player->language->currency_id);
        } else {
            $default_currency = Currency::where('currency_code', 'EUR')->firstOrFail();
            return $this->hasMany(Modifier::class, 'model_id')