Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamKyle committed Dec 3, 2023
1 parent 7093be8 commit 1c59732
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ protected function updateMonstersForRaid(Character $character, ?Location $locati
}
}

$raidMonsters = $raidEvent->raid->getMonstersForSelection($locationIds);
if (in_array($location->id, $locationIds)) {
$raidMonsters = $raidEvent->raid->getMonstersForSelection($locationIds);

event(new UpdateRaidMonsters($raidMonsters, $character->user));
event(new UpdateRaidMonsters($raidMonsters, $character->user));

return true;
return true;
}

}

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default class ServerFight extends React.Component<ServerFightProps, {}> {
<div className={clsx('mb-4 max-w-md m-auto', {
'mt-4': this.attackButtonDisabled()
})}>
<HealthMeters is_enemy={true} name={this.props.monster_name} current_health={this.props.monster_health} max_health={this.props.monster_max_health} />
<HealthMeters is_enemy={false} name={this.props.character_name} current_health={this.props.character_health} max_health={this.props.character_max_health} />
<HealthMeters is_enemy={true} name={this.props.monster_name} current_health={Math.floor(this.props.monster_health)} max_health={Math.floor(this.props.monster_max_health)} />
<HealthMeters is_enemy={false} name={this.props.character_name} current_health={Math.floor(this.props.character_health)} max_health={Math.floor(this.props.character_max_health)} />
</div>
: null
}
Expand All @@ -64,7 +64,7 @@ export default class ServerFight extends React.Component<ServerFightProps, {}> {
<DangerButton button_label={'Leave Fight'} on_click={this.props.manage_server_fight} additional_css={'mr-4'} disabled={this.props.is_dead}/>
: null
}

{
this.props.is_dead ?
<PrimaryButton button_label={'Revive'} on_click={this.props.revive.bind(this)} disabled={!this.props.can_attack}/>
Expand All @@ -74,4 +74,4 @@ export default class ServerFight extends React.Component<ServerFightProps, {}> {
</div>
);
}
}
}

0 comments on commit 1c59732

Please sign in to comment.