mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-29 15:55:23 +00:00
reward contributors still in zone
This commit is contained in:
parent
3969543cde
commit
ed09a9a4e5
2 changed files with 8 additions and 5 deletions
|
|
@ -119,7 +119,7 @@ class SessionAvatarHandlers(
|
||||||
Some(modifiedExp)
|
Some(modifiedExp)
|
||||||
}*/
|
}*/
|
||||||
//if not in squad (temporary)
|
//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)
|
avatarActor ! AvatarActor.AwardFacilityCaptureBep(cep)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -251,11 +251,14 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
||||||
overallTimeMultiplier *
|
overallTimeMultiplier *
|
||||||
Config.app.game.experience.cep.rate + competitionBonus
|
Config.app.game.experience.cep.rate + competitionBonus
|
||||||
).toLong
|
).toLong
|
||||||
//8. reward participants
|
//8. reward participants that are still in the zone
|
||||||
//Classically, only players in the SOI are rewarded, and the llu runner too
|
|
||||||
val hackerId = hacker.CharId
|
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)
|
//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(
|
ToDatabase.reportFacilityCapture(
|
||||||
hackerId,
|
hackerId,
|
||||||
zoneNumber,
|
zoneNumber,
|
||||||
|
|
@ -266,7 +269,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
||||||
events ! AvatarServiceMessage(hacker.Name, AvatarAction.AwardCep(hackerId, finalCep))
|
events ! AvatarServiceMessage(hacker.Name, AvatarAction.AwardCep(hackerId, finalCep))
|
||||||
}
|
}
|
||||||
//bystanders (cep if squad leader, bep otherwise)
|
//bystanders (cep if squad leader, bep otherwise)
|
||||||
playersInSoi
|
contributingPlayers
|
||||||
.filterNot { _.CharId == hackerId }
|
.filterNot { _.CharId == hackerId }
|
||||||
.foreach { player =>
|
.foreach { player =>
|
||||||
val charId = player.CharId
|
val charId = player.CharId
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue