mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-27 23:05:21 +00:00
Sync resource silo charge level on continent map with clients on zone entry
This commit is contained in:
parent
d55cd6ef9f
commit
aa81116260
1 changed files with 26 additions and 20 deletions
|
|
@ -4276,29 +4276,35 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
||||||
* @param building the building object
|
* @param building the building object
|
||||||
*/
|
*/
|
||||||
def initFacility(continentNumber : Int, buildingNumber : Int, building : Building) : Unit = {
|
def initFacility(continentNumber : Int, buildingNumber : Int, building : Building) : Unit = {
|
||||||
|
var ntuLevel = 0
|
||||||
|
building.Amenities.filter(x => (x.Definition == GlobalDefinitions.resource_silo)).headOption.asInstanceOf[Option[ResourceSilo]] match {
|
||||||
|
case Some(obj: ResourceSilo) => ntuLevel = obj.CapacitorDisplay.toInt
|
||||||
|
case _ => ;
|
||||||
|
}
|
||||||
|
|
||||||
sendResponse(
|
sendResponse(
|
||||||
BuildingInfoUpdateMessage(
|
BuildingInfoUpdateMessage(
|
||||||
continentNumber, //Zone
|
continent_id = continentNumber, //Zone
|
||||||
buildingNumber, //Facility
|
building_id = buildingNumber, //Facility
|
||||||
8, //NTU%
|
ntu_level = ntuLevel,
|
||||||
false, //Hacked
|
is_hacked = false, //Hacked
|
||||||
PlanetSideEmpire.NEUTRAL, //Base hacked by
|
PlanetSideEmpire.NEUTRAL, //Base hacked by
|
||||||
0, //Time remaining for hack (ms)
|
hack_time_remaining = 0, //Time remaining for hack (ms)
|
||||||
building.Faction, //Base owned by
|
empire_own = building.Faction, //Base owned by
|
||||||
0, //!! Field != 0 will cause malformed packet. See class def.
|
unk1 = 0, //!! Field != 0 will cause malformed packet. See class def.
|
||||||
None,
|
unk1x = None,
|
||||||
PlanetSideGeneratorState.Normal, //Generator state
|
generator_state = PlanetSideGeneratorState.Normal, //Generator state
|
||||||
true, //Respawn tubes operating state
|
spawn_tubes_normal = true, //Respawn tubes operating state
|
||||||
false, //Force dome state
|
force_dome_active = false, //Force dome state
|
||||||
0, //Lattice benefits
|
lattice_benefit = 0, //Lattice benefits
|
||||||
0, //!! Field > 0 will cause malformed packet. See class def.
|
cavern_benefit = 0, //!! Field > 0 will cause malformed packet. See class def.
|
||||||
Nil,
|
unk4 = Nil,
|
||||||
0,
|
unk5 = 0,
|
||||||
false,
|
unk6 = false,
|
||||||
8, //!! Field != 8 will cause malformed packet. See class def.
|
unk7 = 8, //!! Field != 8 will cause malformed packet. See class def.
|
||||||
None,
|
unk7x = None,
|
||||||
false, //Boosted spawn room pain field
|
boost_spawn_pain = false, //Boosted spawn room pain field
|
||||||
false //Boosted generator room pain field
|
boost_generator_pain = false //Boosted generator room pain field
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
sendResponse(DensityLevelUpdateMessage(continentNumber, buildingNumber, List(0,0, 0,0, 0,0, 0,0)))
|
sendResponse(DensityLevelUpdateMessage(continentNumber, buildingNumber, List(0,0, 0,0, 0,0, 0,0)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue