mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-12 15:04:39 +00:00
re-organizing player unregistering when releasing while previously seated in vehicle
This commit is contained in:
parent
7ddd0214fe
commit
3812728948
1 changed files with 17 additions and 2 deletions
|
|
@ -304,7 +304,6 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
||||||
|
|
||||||
case AvatarResponse.ObjectDelete(item_guid, unk) =>
|
case AvatarResponse.ObjectDelete(item_guid, unk) =>
|
||||||
if(tplayer_guid != guid) {
|
if(tplayer_guid != guid) {
|
||||||
log.info(s"Made to delete item $item_guid")
|
|
||||||
sendResponse(ObjectDeleteMessage(item_guid, unk))
|
sendResponse(ObjectDeleteMessage(item_guid, unk))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1241,6 +1240,18 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
||||||
failWithError(s"${tplayer.Name} failed to load anywhere")
|
failWithError(s"${tplayer.Name} failed to load anywhere")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case UnregisterCorpseOnVehicleDisembark(corpse) =>
|
||||||
|
if(!corpse.isAlive && corpse.HasGUID) {
|
||||||
|
corpse.VehicleSeated match {
|
||||||
|
case Some(_) =>
|
||||||
|
import scala.concurrent.duration._
|
||||||
|
import scala.concurrent.ExecutionContext.Implicits.global
|
||||||
|
context.system.scheduler.scheduleOnce(50 milliseconds, self, UnregisterCorpseOnVehicleDisembark(corpse))
|
||||||
|
case None =>
|
||||||
|
taskResolver ! GUIDTask.UnregisterPlayer(corpse)(continent.GUID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case SetCurrentAvatar(tplayer) =>
|
case SetCurrentAvatar(tplayer) =>
|
||||||
player = tplayer
|
player = tplayer
|
||||||
val guid = tplayer.GUID
|
val guid = tplayer.GUID
|
||||||
|
|
@ -1621,8 +1632,11 @@ class WorldSessionActor extends Actor with MDCContextAware {
|
||||||
val player_guid = player.GUID
|
val player_guid = player.GUID
|
||||||
sendResponse(ObjectDeleteMessage(player_guid, 0))
|
sendResponse(ObjectDeleteMessage(player_guid, 0))
|
||||||
avatarService ! AvatarServiceMessage(continent.Id, AvatarAction.ObjectDelete(player_guid, player_guid, 0))
|
avatarService ! AvatarServiceMessage(continent.Id, AvatarAction.ObjectDelete(player_guid, player_guid, 0))
|
||||||
taskResolver ! GUIDTask.UnregisterPlayer(player)(continent.GUID)
|
|
||||||
self ! PacketCoding.CreateGamePacket(0, DismountVehicleMsg(player_guid, 0, true)) //let vehicle try to clean up its fields
|
self ! PacketCoding.CreateGamePacket(0, DismountVehicleMsg(player_guid, 0, true)) //let vehicle try to clean up its fields
|
||||||
|
|
||||||
|
import scala.concurrent.duration._
|
||||||
|
import scala.concurrent.ExecutionContext.Implicits.global
|
||||||
|
context.system.scheduler.scheduleOnce(50 milliseconds, self, UnregisterCorpseOnVehicleDisembark(player))
|
||||||
//sendResponse(ObjectDetachMessage(vehicle_guid, player.GUID, Vector3.Zero, 0, 0, 0))
|
//sendResponse(ObjectDetachMessage(vehicle_guid, player.GUID, Vector3.Zero, 0, 0, 0))
|
||||||
//sendResponse(PlayerStateShiftMessage(ShiftState(1, Vector3.Zero, 0)))
|
//sendResponse(PlayerStateShiftMessage(ShiftState(1, Vector3.Zero, 0)))
|
||||||
}
|
}
|
||||||
|
|
@ -3991,6 +4005,7 @@ object WorldSessionActor {
|
||||||
private final case class SetCurrentAvatar(tplayer : Player)
|
private final case class SetCurrentAvatar(tplayer : Player)
|
||||||
private final case class VehicleLoaded(vehicle : Vehicle)
|
private final case class VehicleLoaded(vehicle : Vehicle)
|
||||||
private final case class DelayedProximityUnitStop(unit : ProximityTerminal)
|
private final case class DelayedProximityUnitStop(unit : ProximityTerminal)
|
||||||
|
private final case class UnregisterCorpseOnVehicleDisembark(corpse : Player)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A message that indicates the user is using a remote electronics kit to hack some server object.
|
* A message that indicates the user is using a remote electronics kit to hack some server object.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue