reward contributors still in zone

This commit is contained in:
ScrawnyRonnie 2025-01-23 13:31:21 -05:00
parent 3969543cde
commit ed09a9a4e5
2 changed files with 8 additions and 5 deletions

View file

@ -119,7 +119,7 @@ class SessionAvatarHandlers(
Some(modifiedExp)
}*/
//if not in squad (temporary)
exp.ToDatabase.reportFacilityCapture(charId, buildingId, zoneNumber, cep, expType="bep")
exp.ToDatabase.reportFacilityCapture(charId, zoneNumber, buildingId, cep, expType="bep")
avatarActor ! AvatarActor.AwardFacilityCaptureBep(cep)
}

View file

@ -251,11 +251,14 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
overallTimeMultiplier *
Config.app.game.experience.cep.rate + competitionBonus
).toLong
//8. reward participants
//Classically, only players in the SOI are rewarded, and the llu runner too
//8. reward participants that are still in the zone
val hackerId = hacker.CharId
val contributingPlayers = contributionVictor
.filter { case (player, _, _) => player.Zone.id == building.Zone.id }
.map { case (player, _, _) => player }
.toList
//terminal hacker (always cep)
if (playersInSoi.exists(_.CharId == hackerId) && flagCarrier.map(_.CharId).getOrElse(0L) != hackerId) {
if (contributingPlayers.exists(_.CharId == hackerId) && flagCarrier.map(_.CharId).getOrElse(0L) != hackerId) {
ToDatabase.reportFacilityCapture(
hackerId,
zoneNumber,
@ -266,7 +269,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
events ! AvatarServiceMessage(hacker.Name, AvatarAction.AwardCep(hackerId, finalCep))
}
//bystanders (cep if squad leader, bep otherwise)
playersInSoi
contributingPlayers
.filterNot { _.CharId == hackerId }
.foreach { player =>
val charId = player.CharId