mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-01-19 18:44:45 +00:00
grant exp for captures
This commit is contained in:
parent
2b7648c1f0
commit
d9c913e3ff
|
|
@ -59,7 +59,7 @@ class SessionAvatarHandlers(
|
|||
//TODO squad services deactivated, participation trophy rewards for now - 11-20-2023
|
||||
//must be in a squad to earn experience
|
||||
val charId = player.CharId
|
||||
val squadUI = sessionLogic.squad.squadUI
|
||||
/*val squadUI = sessionLogic.squad.squadUI
|
||||
val participation = continent
|
||||
.Building(buildingId)
|
||||
.map { building =>
|
||||
|
|
@ -117,7 +117,10 @@ class SessionAvatarHandlers(
|
|||
exp.ToDatabase.reportFacilityCapture(charId, buildingId, zoneNumber, modifiedExp, expType="bep")
|
||||
avatarActor ! AvatarActor.AwardFacilityCaptureBep(modifiedExp)
|
||||
Some(modifiedExp)
|
||||
}
|
||||
}*/
|
||||
//if not in squad (temporary)
|
||||
exp.ToDatabase.reportFacilityCapture(charId, buildingId, zoneNumber, cep, expType="bep")
|
||||
avatarActor ! AvatarActor.AwardFacilityCaptureBep(cep)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ trait FacilityHackParticipation extends ParticipationLogic {
|
|||
.filterNot { case (_, (_, _, t)) => curr - t > hackTime }
|
||||
.partition { case (p, _) => uniqueList2.contains(p) }
|
||||
}
|
||||
val newParticipaants = list
|
||||
val newParticipants = list
|
||||
.filterNot { p =>
|
||||
playerContribution.exists { case (u, _) => p.CharId == u }
|
||||
}
|
||||
playerContribution =
|
||||
vanguardParticipants.map { case (u, (p, d, _)) => (u, (p, d + 1, curr)) } ++
|
||||
newParticipaants.map { p => (p.CharId, (p, 1, curr)) } ++
|
||||
newParticipants.map { p => (p.CharId, (p, 1, curr)) } ++
|
||||
missingParticipants
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
|
||||
def TryUpdate(): Unit = {
|
||||
val list = building.PlayersInSOI
|
||||
updatePlayers(list)
|
||||
if (list.nonEmpty) {
|
||||
updatePlayers(list)
|
||||
}
|
||||
val now = System.currentTimeMillis()
|
||||
if (now - lastInfoRequest > 60000L) {
|
||||
updatePopulationOverTime(list, now, before = 900000L)
|
||||
|
|
@ -123,7 +125,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
hackStart,
|
||||
completionTime,
|
||||
opposingFaction,
|
||||
contributionOpposing
|
||||
contributionVictor
|
||||
)
|
||||
)
|
||||
//1) experience from killing opposingFaction across duration of hack
|
||||
|
|
@ -336,7 +338,7 @@ final case class MajorFacilityHackParticipation(building: Building) extends Faci
|
|||
val towerRadius = math.pow(tower.Definition.SOIRadius.toDouble * 0.7d, 2d).toFloat
|
||||
list
|
||||
.map { case (p, f, kills) =>
|
||||
val filteredKills = kills.filter { kill => Vector3.DistanceSquared(kill.victim.Position.xy, towerPosition) <= towerRadius }
|
||||
val filteredKills = kills.filter { kill => Vector3.DistanceSquared(kill.victim.Position.xy, towerPosition) >= towerRadius }
|
||||
(p, f, filteredKills)
|
||||
}
|
||||
.filter { case (_, _, kills) => kills.nonEmpty }
|
||||
|
|
|
|||
|
|
@ -11,11 +11,14 @@ import net.psforever.util.Config
|
|||
final case class TowerHackParticipation(building: Building) extends FacilityHackParticipation {
|
||||
def TryUpdate(): Unit = {
|
||||
val list = building.PlayersInSOI
|
||||
updatePlayers(building.PlayersInSOI)
|
||||
if (list.nonEmpty) {
|
||||
updatePlayers(list)
|
||||
}
|
||||
val now = System.currentTimeMillis()
|
||||
if (now - lastInfoRequest > 60000L) {
|
||||
updatePopulationOverTime(list, now, before = 300000L)
|
||||
}
|
||||
lastInfoRequest = now
|
||||
}
|
||||
|
||||
def RewardFacilityCapture(
|
||||
|
|
|
|||
Loading…
Reference in a new issue