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

match the correct currency for base modifiers

parent 07192616
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment