mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-06 05:50:23 +00:00
using three Terminals known to the continent home3
This commit is contained in:
parent
0c7c4dc58f
commit
981acadae5
4 changed files with 30 additions and 19 deletions
|
|
@ -25,9 +25,9 @@ class IntergalacticCluster(continents : List[Zone]) extends Actor {
|
|||
|
||||
case IntergalacticCluster.RequestZoneInitialization(tplayer) =>
|
||||
continents.foreach(zone => {
|
||||
sender ! Zone.ZoneInitialization(zone.ZoneInitialization())
|
||||
sender ! Zone.ClientInitialization(zone.ClientInitialization())
|
||||
})
|
||||
sender ! IntergalacticCluster.ZoneInitializationComplete(tplayer)
|
||||
sender ! IntergalacticCluster.ClientInitializationComplete(tplayer)
|
||||
|
||||
case _ => ;
|
||||
}
|
||||
|
|
@ -55,5 +55,5 @@ object IntergalacticCluster {
|
|||
|
||||
final case class RequestZoneInitialization(tplayer : Player)
|
||||
|
||||
final case class ZoneInitializationComplete(tplayer : Player)
|
||||
final case class ClientInitializationComplete(tplayer : Player)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
package net.psforever.objects.continent
|
||||
|
||||
import akka.actor.{ActorContext, ActorRef, Props}
|
||||
import net.psforever.objects.Player
|
||||
import net.psforever.objects.{PlanetSideGameObject, Player}
|
||||
import net.psforever.objects.entity.IdentifiableEntity
|
||||
import net.psforever.objects.equipment.Equipment
|
||||
import net.psforever.objects.guid.NumberPoolHub
|
||||
|
|
@ -25,12 +25,12 @@ class Zone(id : String, zoneNumber : Int, map : String) {
|
|||
if(actor == ActorRef.noSender) {
|
||||
actor = context.actorOf(Props(classOf[ZoneActor], this), s"$id-actor")
|
||||
|
||||
val pool = guid.AddPool("pool", (200 to 400).toList)
|
||||
val pool = guid.AddPool("pool", (200 to 1000).toList)
|
||||
val poolActor = context.actorOf(Props(classOf[NumberPoolActor], pool), name = s"$ZoneId-poolActor")
|
||||
pool.Selector = new RandomSelector
|
||||
accessor = context.actorOf(Props(classOf[NumberPoolAccessorActor], guid, pool, poolActor), s"$ZoneId-accessor")
|
||||
|
||||
startupUtilities.foreach({case ((obj, uid)) => accessor ! Register(obj, uid, actor)})
|
||||
startupUtilities.foreach({case ((obj, uid)) => accessor ! Register(obj, uid, actor) })
|
||||
}
|
||||
actor
|
||||
}
|
||||
|
|
@ -52,7 +52,12 @@ class Zone(id : String, zoneNumber : Int, map : String) {
|
|||
accessor
|
||||
}
|
||||
|
||||
def GUID(object_guid : PlanetSideGUID) : Option[IdentifiableEntity] = guid(object_guid.guid)
|
||||
def GUID(object_guid : PlanetSideGUID) : Option[PlanetSideGameObject] = guid(object_guid.guid) match {
|
||||
case Some(obj) =>
|
||||
Some(obj.asInstanceOf[PlanetSideGameObject]) //potential casting error
|
||||
case None =>
|
||||
None
|
||||
}
|
||||
|
||||
def EquipmentOnGround : ListBuffer[Equipment] = equipmentOnGround
|
||||
|
||||
|
|
@ -60,11 +65,11 @@ class Zone(id : String, zoneNumber : Int, map : String) {
|
|||
startupUtilities = startupUtilities :+ (obj, id)
|
||||
}
|
||||
|
||||
def ZoneInitialization() : List[GamePacket] = {
|
||||
def ClientInitialization() : List[GamePacket] = {
|
||||
List.empty[GamePacket]
|
||||
}
|
||||
|
||||
def ZoneConfiguration() : List[GamePacket] = {
|
||||
def ClientConfiguration() : List[GamePacket] = {
|
||||
List.empty[GamePacket]
|
||||
}
|
||||
}
|
||||
|
|
@ -79,7 +84,7 @@ object Zone {
|
|||
|
||||
final case class ItemFromGround(player : Player, item : Equipment)
|
||||
|
||||
final case class ZoneInitialization(list : List[GamePacket])
|
||||
final case class ClientInitialization(list : List[GamePacket])
|
||||
|
||||
def apply(zoneId : String, zoneNumber : Int, map : String) : Zone = {
|
||||
new Zone(zoneId, zoneNumber, map)
|
||||
|
|
|
|||
|
|
@ -223,7 +223,10 @@ object PsLogin {
|
|||
|
||||
def createContinents() : List[Zone] = {
|
||||
val home3 = Zone("home3",13,"map13")
|
||||
home3.AddUtility(Terminal(new OrderTerminalDefinition), 336)
|
||||
val orderTerm = new OrderTerminalDefinition
|
||||
home3.AddUtility(Terminal(orderTerm), 853)
|
||||
home3.AddUtility(Terminal(orderTerm), 855)
|
||||
home3.AddUtility(Terminal(orderTerm), 860)
|
||||
|
||||
home3 ::
|
||||
Nil
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import net.psforever.objects.equipment._
|
|||
import net.psforever.objects.guid.{Task, TaskResolver}
|
||||
import net.psforever.objects.guid.actor.{Register, Unregister}
|
||||
import net.psforever.objects.inventory.{GridInventory, InventoryItem}
|
||||
import net.psforever.objects.terminals.{OrderTerminalDefinition, Terminal}
|
||||
import net.psforever.objects.terminals.Terminal
|
||||
import net.psforever.packet.game.objectcreate._
|
||||
import net.psforever.types._
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
galaxy ! IntergalacticCluster.GetWorld("home3")
|
||||
}
|
||||
|
||||
case Zone.ZoneInitialization(/*initList*/_) =>
|
||||
case Zone.ClientInitialization(/*initList*/_) =>
|
||||
//TODO iterate over initList; for now, just do this
|
||||
sendResponse(
|
||||
PacketCoding.CreateGamePacket(0,
|
||||
|
|
@ -468,7 +468,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
sendResponse(PacketCoding.CreateGamePacket(0, BroadcastWarpgateUpdateMessage(PlanetSideGUID(13), PlanetSideGUID(1), false, false, true))) // VS Sanctuary: Inactive Warpgate -> Broadcast Warpgate
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, ZonePopulationUpdateMessage(PlanetSideGUID(13), 414, 138, 0, 138, 0, 138, 0, 138, 0)))
|
||||
|
||||
case IntergalacticCluster.ZoneInitializationComplete(tplayer)=>
|
||||
case IntergalacticCluster.ClientInitializationComplete(tplayer)=>
|
||||
//this will cause the client to send back a BeginZoningMessage packet (see below)
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, LoadMapMessage(continent.Map, continent.ZoneId, 40100,25,true,3770441820L))) //VS Sanctuary
|
||||
log.info("Load the now-registered player")
|
||||
|
|
@ -584,8 +584,6 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
}
|
||||
}
|
||||
|
||||
val terminal = Terminal(PlanetSideGUID(55000), new OrderTerminalDefinition)
|
||||
|
||||
import net.psforever.objects.GlobalDefinitions._
|
||||
//this part is created by the player (should be in case of ConnectToWorldRequestMessage, maybe)
|
||||
val energy_cell_box1 = AmmoBox(energy_cell)
|
||||
|
|
@ -711,7 +709,7 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case msg @ BeginZoningMessage() =>
|
||||
log.info("Reticulating splines ...")
|
||||
//map-specific initializations
|
||||
//TODO continent.ZoneConfiguration()
|
||||
//TODO continent.ClientConfiguration()
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, SetEmpireMessage(PlanetSideGUID(2), PlanetSideEmpire.VS))) //HART building C
|
||||
sendResponse(PacketCoding.CreateGamePacket(0, SetEmpireMessage(PlanetSideGUID(29), PlanetSideEmpire.NC))) //South Villa Gun Tower
|
||||
//sendResponse(PacketCoding.CreateGamePacket(0, object2Hex))
|
||||
|
|
@ -990,9 +988,14 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
|||
case msg @ GenericObjectStateMsg(object_guid, unk1) =>
|
||||
log.info("GenericObjectState: " + msg)
|
||||
|
||||
case msg @ ItemTransactionMessage(terminal_guid, transaction_type, item_page, item_name, unk1, item_guid) =>
|
||||
terminal.Actor ! Terminal.Request(player, msg)
|
||||
case msg @ ItemTransactionMessage(terminal_guid, _, _, _, _, _) =>
|
||||
log.info("ItemTransaction: " + msg)
|
||||
continent.GUID(terminal_guid) match {
|
||||
case Some(term : Terminal) =>
|
||||
term.Actor ! Terminal.Request(player, msg)
|
||||
case Some(obj : PlanetSideGameObject) => ;
|
||||
case None => ;
|
||||
}
|
||||
|
||||
case msg @ FavoritesRequest(player_guid, unk, action, line, label) =>
|
||||
if(player.GUID == player_guid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue