Fixed error in Splatoon 2 schedule data if Salmon Run has special weapons.
This commit is contained in:
parent
4f1a8c43ab
commit
069ac97f71
1 changed files with 2 additions and 2 deletions
|
@ -16,11 +16,11 @@ class Splatoon2Weapon implements ISplatoonWeapon {
|
||||||
public function getName(): string {
|
public function getName(): string {
|
||||||
return $this->locale->getString(
|
return $this->locale->getString(
|
||||||
sprintf('weapons:%s:name', $this->weaponInfo['id']),
|
sprintf('weapons:%s:name', $this->weaponInfo['id']),
|
||||||
$this->weaponInfo['weapon']['name']
|
$this->weaponInfo['weapon']['name'] ?? $this->weaponInfo['coop_special_weapon']['name']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getImage(): string {
|
public function getImage(): string {
|
||||||
return $this->weaponInfo['weapon']['image'];
|
return $this->weaponInfo['weapon']['image'] ?? $this->weaponInfo['coop_special_weapon']['image'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue