public const ushort CHAT_RESULT = Begin + 51; //聊天结果 public static void RegisterPools() { PacketPools.Register(PING_NET, "ss2c.PingNet"); PacketPools.Register(CLIENT_EVENT, "ss2c.ClientEvent"); PacketPools.Register(GAME_ERROR, "ss2c.GameError"); PacketPools.Register(ENUM_CHAR, "ss2c.EnumCharacter"); PacketPools.Register(CHARACTER_INFO, "ss2c.CharacterInfo"); PacketPools.Register(ENTER_SCENE, "ss2c.EnterScene"); PacketPools.Register(UNIT_MOVE, "ss2c.UnitMove"); PacketPools.Register(ENTER_AOI, "ss2c.UnitEnterAOI"); PacketPools.Register(LEAVE_AOI, "ss2c.UnitLeaveAOI"); PacketPools.Register(UNIT_MODIFY_INT, "ss2c.NotifyUpdatePlayerAttribInteger"); PacketPools.Register(UNIT_MODIFY_STRING, "ss2c.NotifyUpdatePlayerAttribString"); PacketPools.Register(MAIL_COUNT, "ss2c.MailCount"); PacketPools.Register(MAIL_LIST, "ss2c.MailList"); PacketPools.Register(MAIL_READ, "ss2c.MailRead"); PacketPools.Register(MAIL_COMMAND, "ss2c.MailCommand"); PacketPools.Register(RELATION_ADD, "ss2c.RelationAdd"); PacketPools.Register(RELATION_REMOVE, "ss2c.RelationRemove"); PacketPools.Register(RELATION_LIST, "ss2c.RelationList"); PacketPools.Register(RELATION_GIVE, "ss2c.RelationGive"); PacketPools.Register(COUNTER_LIST, "ss2c.CounterList"); PacketPools.Register(COUNTER_MODIFY, "ss2c.CounterModify"); PacketPools.Register(CHAT_RECV, "ss2c.ChatRecv"); PacketPools.Register(CHAT_RESULT, "ss2c.ChatResult"); }
public const ushort REQ_KICK_ACCOUNT = Begin + 4; //踢号 public static void RegisterPools() { PacketPools.Register(PROXY_WS_MSG, "ProxyS2CMsg"); PacketPools.Register(ROBOT_TEST, "ws2gs.RobotTest"); PacketPools.Register(CLIENT_LOGIN, "ws2gs.ClientLogin"); PacketPools.Register(REQ_KICK_ACCOUNT, "ws2gs.ReqKickoutAccount"); }
public const ushort ONLINE_COUNT = Begin + 5; //在线数 public static void RegisterPools() { PacketPools.Register(PROXY_CLIENT_MSG, "ProxyC2SMsg"); PacketPools.Register(ROBOT_TEST, "gs2ws.RobotTest"); PacketPools.Register(CLIENT_LOGIN, "gs2ws.ClientLogin"); PacketPools.Register(ONLINE_COUNT, "gs2ws.OnlineCount"); }
public const ushort SERVER_TIME = Begin + 4; //服务器当前时间 public static void RegisterPools() { PacketPools.Register(PING_NET, "ws2c.PingNet"); PacketPools.Register(CLIENT_EVENT, "ws2c.ClientEvent"); PacketPools.Register(GAME_ERROR, "ws2c.GameError"); PacketPools.Register(SHUTDOWN_SERVER, "ws2c.ShutdownServer"); PacketPools.Register(SERVER_TIME, "ws2c.ServerTime"); }
public const ushort NOTIFY_SERVER = Begin + 6; //分配给玩家的fs public static void RegisterPools() { PacketPools.Register(PROXY_SS_MSG, "ProxyS2CMsg"); PacketPools.Register(ROBOT_TEST, "ss2gs.RobotTest"); PacketPools.Register(CREATE_CHARACTER, "ss2gs.CreateCharacter"); PacketPools.Register(REQ_KICK_ACCOUNT, "ss2gs.ReqKickoutAccount"); PacketPools.Register(ENTER_GAME, "ss2gs.EnterGame"); PacketPools.Register(NOTIFY_SERVER, "ss2gs.NotifyServer"); }
public const ushort RELATION_GIVE = Begin + 33; //赠送 public static void RegisterPools() { PacketPools.Register(PING_NET, "gl2ss.PingNet"); PacketPools.Register(RELATION_ADD, "gl2ss.RelationAdd"); PacketPools.Register(RELATION_REMOVE, "gl2ss.RelationRemove"); PacketPools.Register(RELATION_LIST, "gl2ss.RelationList"); PacketPools.Register(RELATION_GIVE, "gl2ss.RelationGive"); }
public const ushort UNIT_MODIFY_STRING = Begin + 11; //属性改变 public static void RegisterPools() { PacketPools.Register(LOGIN_CLIENT, "ss2fs.LoginClient"); PacketPools.Register(LOGOUT_CLIENT, "ss2fs.LogoutClient"); PacketPools.Register(CLIENT_ONLINE, "ss2fs.ClientOnline"); PacketPools.Register(UNIT_MODIFY_INT, "ss2ws.NotifyUpdatePlayerAttribInteger"); PacketPools.Register(UNIT_MODIFY_STRING, "ss2ws.NotifyUpdatePlayerAttribString"); }
public static void RegisterPools() { PacketPools.Register(PROXY_CLIENT_MSG, "ProxyC2SMsg"); PacketPools.Register(ROBOT_TEST, "gs2ss.RobotTest"); PacketPools.Register(ENUM_CHAR, "gs2ss.EnumCharacter"); PacketPools.Register(ENTER_GAME, "gs2ss.EnterGame"); PacketPools.Register(LOGOUT_ACCOUNT, "gs2ss.LogoutAccount"); PacketPools.Register(KICK_ACCOUNT, "gs2ss.KickoutAccount"); }
public static void RegisterPools() { //注册消息池 PacketPools.Register(REQ_LOGIN, "inner.ReqLogin"); PacketPools.Register(REP_LOGIN, "inner.RepLogin"); PacketPools.Register(APPSERVER_LIST, "inner.AppServerList"); PacketPools.Register(APPSERVER_ADD, "inner.AppServerAdd"); PacketPools.Register(APPSERVER_REMOVE, "inner.AppServerRemove"); PacketPools.Register(APPSERVER_SHUTDOWN, "inner.AppServerShutdown"); }
public const ushort SPEED_CHECK = Begin + 9; //加速检测 public static void RegisterPools() { PacketPools.Register(PING_NET, "c2gs.PingNet"); PacketPools.Register(ENCRYPT, "c2gs.EncryptInfo"); PacketPools.Register(CLIENT_LOGIN, "c2gs.ClientLogin"); PacketPools.Register(ENUM_CHAR, "c2gs.EnumCharacter"); PacketPools.Register(CREATE_CHARACTER, "c2gs.CreateCharacter"); PacketPools.Register(ENTER_GAME, "c2gs.EnterGame"); PacketPools.Register(ROBOT_TEST, "c2gs.RobotTest"); PacketPools.Register(SPEED_CHECK, "c2gs.SpeedCheck"); }
public const ushort GAME_ERROR = Begin + 11; //游戏错误 public static void RegisterPools() { PacketPools.Register(PING_NET, "gs2c.PingNet"); PacketPools.Register(ENCRYPT, "gs2c.EncryptInfo"); PacketPools.Register(CLIENT_LOGIN, "gs2c.ClientLogin"); PacketPools.Register(CREATE_CHARACTER, "gs2c.CreateCharacter"); PacketPools.Register(ENTER_GAME, "gs2c.EnterGame"); PacketPools.Register(ROBOT_TEST, "gs2c.RobotTest"); PacketPools.Register(SPEED_CHECK, "gs2c.SpeedCheck"); PacketPools.Register(CLIENT_EVENT, "gs2c.ClientEvent"); PacketPools.Register(GAME_ERROR, "gs2c.GameError"); }
public const ushort RELATION_APPLY_CMD = Begin + 33; //请求操作 public static void RegisterPools() { PacketPools.Register(PING_NET, "ss2gl.PingNet"); PacketPools.Register(LOGIN_CLIENT, "ss2gl.LoginClient"); PacketPools.Register(LOGOUT_CLIENT, "ss2gl.LogoutClient"); PacketPools.Register(UNIT_MODIFY_INT, "ss2gl.NotifyUpdatePlayerAttribInteger"); PacketPools.Register(UNIT_MODIFY_STRING, "ss2gl.NotifyUpdatePlayerAttribString"); PacketPools.Register(RELATION_ADD, "ss2gl.RelationAdd"); PacketPools.Register(RELATION_REMOVE, "ss2gl.RelationRemove"); PacketPools.Register(RELATION_GIVE, "ss2gl.RelationGive"); PacketPools.Register(RELATION_APPLY_CMD, "ss2gl.RelationApplyCmd"); }
public const ushort CHAT_SEND = Begin + 50; //聊天 public static void RegisterPools() { PacketPools.Register(PING_NET, "c2ss.PingNet"); PacketPools.Register(RESOURCE_LOADED, "c2ss.ResourceLoaded"); PacketPools.Register(ENTER_SCENE, "c2ss.EnterScene"); PacketPools.Register(UNIT_MOVE, "c2ss.UnitMove"); PacketPools.Register(UNIT_MODIFY_INT, "c2ss.NotifyUpdatePlayerAttribInteger"); PacketPools.Register(UNIT_MODIFY_STRING, "c2ss.NotifyUpdatePlayerAttribString"); PacketPools.Register(MAIL_LIST, "c2ss.MailList"); PacketPools.Register(MAIL_READ, "c2ss.MailRead"); PacketPools.Register(MAIL_WRITE, "c2ss.MailWrite"); PacketPools.Register(MAIL_TAKE, "c2ss.MailTake"); PacketPools.Register(MAIL_DELETE, "c2ss.MailDelete"); PacketPools.Register(RELATION_ADD, "c2ss.RelationAdd"); PacketPools.Register(RELATION_REMOVE, "c2ss.RelationRemove"); PacketPools.Register(RELATION_LIST, "c2ss.RelationList"); PacketPools.Register(RELATION_GIVE, "c2ss.RelationGive"); PacketPools.Register(RELATION_APPLY_CMD, "c2ss.RelationApplyCmd"); PacketPools.Register(CHAT_SEND, "c2ss.ChatSend"); }
public static void RegisterPools() { PacketPools.Register(PROXY_CLIENT_MSG, "ProxyC2SMsg"); }
internal void PurgeAll() { FutureEvents.Purge((int)Tick); PurgeTerminalSystem(); foreach (var reports in Reporter.ReportData.Values) { foreach (var report in reports) { report.Clean(); Reporter.ReportPool.Return(report); } reports.Clear(); } Reporter.ReportData.Clear(); Reporter.ReportPool.Clean(); PacketsToClient.Clear(); PacketsToServer.Clear(); foreach (var suit in (PacketType[])Enum.GetValues(typeof(PacketType))) { foreach (var pool in PacketPools.Values) { pool.Clean(); } PacketPools.Clear(); } foreach (var item in _effectedCubes) { var cubeid = item.Key; var blockInfo = item.Value; var functBlock = blockInfo.FunctBlock; var cube = blockInfo.CubeBlock; if (cube == null || cube.MarkedForClose) { _effectPurge.Enqueue(cubeid); continue; } functBlock.EnabledChanged -= ForceDisable; functBlock.Enabled = blockInfo.FirstState; cube.SetDamageEffect(false); _effectPurge.Enqueue(cubeid); } while (_effectPurge.Count != 0) { _effectedCubes.Remove(_effectPurge.Dequeue()); } Av.Glows.Clear(); Av.AvShotPool.Clean(); DeferedUpBlockTypeCleanUp(true); BlockTypeCleanUp.Clear(); foreach (var map in GridToFatMap.Keys) { RemoveGridFromMap(map); } GridToFatMap.Clear(); FatMapPool.Clean(); DirtyGridsTmp.Clear(); foreach (var structure in WeaponPlatforms.Values) { foreach (var system in structure.WeaponSystems) { foreach (var ammo in system.Value.WeaponAmmoTypes) { ammo.AmmoDef.Const.PrimeEntityPool?.Clean(); } } structure.WeaponSystems.Clear(); } WeaponPlatforms.Clear(); foreach (var gridToMap in GridToBlockTypeMap) { foreach (var map in gridToMap.Value) { map.Value.ClearImmediate(); ConcurrentListPool.Return(map.Value); } gridToMap.Value.Clear(); BlockTypePool.Return(gridToMap.Value); } GridToBlockTypeMap.Clear(); foreach (var playerGrids in PlayerEntityIdInRange) { playerGrids.Value.Clear(); } PlayerEntityIdInRange.Clear(); DirtyGrids.Clear(); DsUtil.Purge(); DsUtil2.Purge(); _effectActive = false; ShootingWeapons.Clear(); AcquireTargets.Clear(); RemoveEffectsFromGrid.Clear(); WeaponAmmoPullQueue.Clear(); AmmoToPullQueue.Clear(); Hits.Clear(); AllArmorBaseDefinitions.Clear(); HeavyArmorBaseDefinitions.Clear(); AllArmorBaseDefinitions.Clear(); AcquireTargets.Clear(); ChargingWeapons.Clear(); LargeBlockSphereDb.Clear(); SmallBlockSphereDb.Clear(); AnimationsToProcess.Clear(); _subTypeIdToWeaponDefs.Clear(); WeaponDefinitions.Clear(); SlimsSortedList.Clear(); _destroyedSlims.Clear(); _destroyedSlimsClient.Clear(); _slimHealthClient.Clear(); _slimsSet.Clear(); _turretDefinitions.Clear(); foreach (var comp in CompsToStart) { PlatFormPool.Return(comp.Platform); comp.Platform = null; } foreach (var readd in CompReAdds) { PlatFormPool.Return(readd.Comp.Platform); readd.Comp.Platform = null; } foreach (var comp in CompsDelayed) { PlatFormPool.Return(comp.Platform); comp.Platform = null; } PlatFormPool.Clean(); CompsToStart.ClearImmediate(); CompsDelayed.Clear(); CompReAdds.Clear(); GridAiPool.Clean(); Av.RipMap.Clear(); foreach (var mess in Av.KeensBrokenParticles) { Av.KeenMessPool.Return(mess); } Av.KeensBrokenParticles.Clear(); foreach (var av in Av.AvShots) { av.GlowSteps.Clear(); Av.AvShotPool.Return(av); } Av.AvShotPool.Clean(); Av.AvBarrels1.Clear(); Av.AvBarrels2.Clear(); Av.AvShots.Clear(); Av.HitSounds.Clear(); foreach (var errorpkt in ClientSideErrorPktList) { errorpkt.Packet.CleanUp(); } ClientSideErrorPktList.Clear(); GridEffectPool.Clean(); GridEffectsPool.Clean(); BlockTypePool.Clean(); ConcurrentListPool.Clean(); GroupInfoPool.Clean(); TargetInfoPool.Clean(); Projectiles.Clean(); WeaponCoreBlockDefs.Clear(); VanillaIds.Clear(); VanillaCoreIds.Clear(); WeaponCoreFixedBlockDefs.Clear(); WeaponCoreTurretBlockDefs.Clear(); foreach (var p in Projectiles.ProjectilePool) { p.AmmoEffect?.Stop(); } Projectiles.ShrapnelToSpawn.Clear(); Projectiles.ShrapnelPool.Clean(); Projectiles.FragmentPool.Clean(); Projectiles.ActiveProjetiles.ApplyChanges(); Projectiles.ActiveProjetiles.Clear(); Projectiles.ProjectilePool.Clear(); Projectiles.HitEntityPool.Clean(); Projectiles.CleanUp.Clear(); Projectiles.VirtInfoPool.Clean(); DbsToUpdate.Clear(); GridTargetingAIs.Clear(); DsUtil = null; DsUtil2 = null; SlimsSortedList = null; Enforced = null; StallReporter = null; Proccessor = null; Physics = null; Camera = null; Projectiles = null; TrackingAi = null; UiInput = null; TargetUi = null; Placer = null; WheelUi = null; TargetGps = null; SApi.Unload(); SApi = null; Api = null; ApiServer = null; Reporter = null; WeaponDefinitions = null; AnimationsToProcess = null; ProjectileTree.Clear(); ProjectileTree = null; Av = null; HudUi = null; AllDefinitions = null; SoundDefinitions = null; ActiveCockPit = null; ActiveControlBlock = null; ControlledEntity = null; }
public const ushort PING_NET = Begin; //ping网络 public static void RegisterPools() { PacketPools.Register(PING_NET, "c2fs.PingNet"); }
public const ushort SERVER_TIME = Begin + 1; //服务器当前时间 public static void RegisterPools() { PacketPools.Register(PING_NET, "c2ws.PingNet"); PacketPools.Register(SERVER_TIME, "c2ws.ServerTime"); }
public static void RegisterPools() { PacketPools.Register(PROXY_WS_MSG, "ProxyS2CMsg"); }
public const ushort CLIENT_ONLINE = Begin + 3; //检测是否在线 public static void RegisterPools() { PacketPools.Register(CLIENT_ONLINE, "ws2ss.ClientOnline"); }