Skip to content

Commit

Permalink
fix: healthbar not always showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragonisser committed Jun 25, 2022
1 parent a942002 commit e4bbba7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{ player.value.name }}
<div *ngIf="isOwner(player.value.id)" id="app-group-member-leader"></div>
<div class="app-group-member-health"
*ngIf="(player.value.health && player.value.health !== 0) && player.value.isLoaded">
*ngIf="(player.value.health !== undefined) && player.value.isLoaded">
<div class="app-group-member-health-value" [app-health]="player.value.health">
</div>
</div>
Expand Down
21 changes: 18 additions & 3 deletions Code/skyrim_ui/src/app/components/root/root.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ export class RootComponent implements OnInit, OnDestroy {
cellName: 'Whiterun'
}
));
this.client.playerConnectedChange.next(new Player(
{
id: 3,
name: 'Cosideci',
online: true,
connected: true,
level: 69,
cellName: 'Whiterun'
}
));
this.client.isLoadedChange.next(new Player(
{
id: 1,
Expand All @@ -179,15 +189,20 @@ export class RootComponent implements OnInit, OnDestroy {
health: 75
}
));
this.client.isLoadedChange.next(new Player(
{
id: 3,
isLoaded: true,
health: 0
}
));

/*
this.client.partyInfoChange.next(new PartyInfo(
{
playerIds: [1,2],
playerIds: [1,2,3],
leaderId: 1
}
));
*/

this.client.localPlayerId = 0;

Expand Down

0 comments on commit e4bbba7

Please sign in to comment.