mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
reward contributors still in zone
This commit is contained in:
parent
3969543cde
commit
ed09a9a4e5
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue