public PortalSpecifierMessage(string[] Data) { Id = 0x004B; Field0 = int.Parse(Data[0]); Field1 = new ResolvedPortalDestination() { snoWorld = int.Parse(Data[1]), Field1 = int.Parse(Data[2]), snoDestLevelArea = int.Parse(Data[3]), }; }
public Portal(World world, int snoId, TagMap tags) : base(world, snoId, tags) { try { this.Destination = new ResolvedPortalDestination { WorldSNO = tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } catch (KeyNotFoundException) { Logger.Warn("Portal {0} has incomplete definition", this.ActorSNO.Id); } this.Field2 = 16; // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga //this.Attributes[GameAttribute.MinimapActive] = true; //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f; //this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f; //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f; //this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f; //this.Attributes[GameAttribute.Level] = 1; // EREKOSE STUFF //Logger.Debug(" (Portal ctor) position is {0}", this._position); //Logger.Debug(" (Portal ctor) quest range is {0}", this._questRange); // Logger.Debug(" (Portal ctor) is in scene SNO {0}", this.CurrentScene.SceneSNO); //Logger.Debug(" (Portal Ctor) portal used has actor SNO {3}, SNO Name {0}, exists in world sno {1}, has dest world sno {2}", this.ActorSNO.Name, tags[MarkerKeys.DestinationWorld].Id, tags[MarkerKeys.DestinationWorld].Id, snoId); }
public Portal(World world, int snoId, TagMap tags) : base(world, snoId, tags) { try { this.Destination = new ResolvedPortalDestination { WorldSNO = tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } catch (KeyNotFoundException) { Logger.Warn("Portal {0} has incomplete definition", this.ActorSNO.Id); } this.Field2 = 16; // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga //this.Attributes[GameAttribute.MinimapActive] = true; //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f; //this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f; //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f; //this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f; //this.Attributes[GameAttribute.Level] = 1; }
public override void Parse(GameBitBuffer buffer) { ActorID = buffer.ReadUInt(32); Destination = new ResolvedPortalDestination(); Destination.Parse(buffer); }
public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); Field1 = new ResolvedPortalDestination(); Field1.Parse(buffer); }
public void Parse(GameBitBuffer buffer) { Field0 = new RequiredMessageHeader(); Field0.Parse(buffer); Field1 = buffer.ReadInt(32); Field2 = new ResolvedPortalDestination(); Field2.Parse(buffer); }
public void Parse(GameBitBuffer buffer) { Field0 = new ResolvedPortalDestination(); Field0.Parse(buffer); snoQuestRange = buffer.ReadInt(32); }
public void Parse(GameBitBuffer buffer) { serQuests = new SerializeData(); serQuests.Parse(buffer); Field1 = new DT_VARIABLEARRAY(); Field1.Parse(buffer); Field2 = new WaypointInfo[25]; for(int i = 0;i < _Field2.Length;i++) { _Field2[i] = new WaypointInfo(); _Field2[i].Parse(buffer); } Field3 = new ResolvedPortalDestination(); Field3.Parse(buffer); Field4 = new ActStartLocOverride[6]; for(int i = 0;i < _Field4.Length;i++) { _Field4[i] = new ActStartLocOverride(); _Field4[i].Parse(buffer); } }
public Portal(World world, int snoId, TagMap tags) : base(world, snoId, tags) { try { // Порталы на кладбище if (world.WorldSNO.Id == 71150 && this.ActorSNO.Id == 176002) { #region андомим положение var portals = world.GetActorsBySNO(176002); int IdofPortal = 0; foreach (var portal in portals) { if (portal.CurrentScene.SceneSNO.Name.Contains("Wilderness_MainGraveyard")) { if (portal.CurrentScene.SceneSNO.Id != IdofPortal) { IdofPortal = portal.CurrentScene.SceneSNO.Id; } else { portal.Destroy(); } } } #endregion if (portals.Count == 0) { this.Destination = new ResolvedPortalDestination { WorldSNO = 72636,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } else if (portals.Count == 1) { this.Destination = new ResolvedPortalDestination { WorldSNO = 72637,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = 172 }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } else if (portals.Count == 2) { this.Destination = new ResolvedPortalDestination { WorldSNO = 154587,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } else if (portals.Count == 3) { this.Destination = new ResolvedPortalDestination { WorldSNO = 102299,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } else { this.Destination = new ResolvedPortalDestination { WorldSNO = tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } //Повторная прочистка от дублирующих порталов. portals = world.GetActorsBySNO(176002); IdofPortal = 0; foreach (var portal in portals) { if (portal.CurrentScene.SceneSNO.Name.Contains("Wilderness_MainGraveyard")) { if (portal.CurrentScene.SceneSNO.Id != IdofPortal) { IdofPortal = portal.CurrentScene.SceneSNO.Id; } else { portal.Destroy(); } } } if (portals.Count == 4) { (portals[3] as Portal).Destination = new ResolvedPortalDestination { WorldSNO = 72637, DestLevelAreaSNO = 83265, StartingPointActorTag = 172 } } ; IdofPortal = 0; } //Патч выхода из колодца else if (world.WorldSNO.Id == 161961 && this.ActorSNO.Id == 176537) { this.Destination = new ResolvedPortalDestination { WorldSNO = 71150, DestLevelAreaSNO = 91324, StartingPointActorTag = 172 }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } else if (world.WorldSNO.Id == 166640 && this.ActorSNO.Id == 204901) { this.Destination = new ResolvedPortalDestination { WorldSNO = 109513,//tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = 109514, StartingPointActorTag = 172 }; } //Стандартная генерация else { this.Destination = new ResolvedPortalDestination { WorldSNO = tags[MarkerKeys.DestinationWorld].Id, DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id, StartingPointActorTag = tags[MarkerKeys.DestinationActorTag] }; // Override minimap icon in merkerset tags if (tags.ContainsKey(MarkerKeys.MinimapTexture)) { MinimapIcon = tags[MarkerKeys.MinimapTexture].Id; } else { MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id; } } } catch (KeyNotFoundException) { #region Портальная система if (this.ActorSNO.Id == 5648) { //Generate Portal foreach (var player in this.World.Players.Values) { var dbQuestProgress = DBSessions.AccountSession.Get <DBProgressToon>(player.Toon.PersistentID); if (dbQuestProgress.ActiveAct == 0) { this.Destination = new ResolvedPortalDestination { WorldSNO = 71150, DestLevelAreaSNO = 19947, StartingPointActorTag = -100 }; } else if (dbQuestProgress.ActiveAct == 100) { this.Destination = new ResolvedPortalDestination { WorldSNO = 161472, DestLevelAreaSNO = 168314, StartingPointActorTag = -100 }; } if (dbQuestProgress.ActiveAct == 200) { this.Destination = new ResolvedPortalDestination { WorldSNO = 172909, DestLevelAreaSNO = 92945, StartingPointActorTag = -100 }; } if (dbQuestProgress.ActiveAct == 300) { this.Destination = new ResolvedPortalDestination { WorldSNO = 178152, DestLevelAreaSNO = 197101, StartingPointActorTag = -100 }; } DBSessions.AccountSession.Flush(); } Logger.Warn("Portal to Home {0} created", this.ActorSNO.Id); } #endregion #region Спуск на второй уровень в подземелье на кладбище else if (world.WorldSNO.Id == 154587 && world.GetActorsBySNO(176002) != null) { var Portal = world.GetActorBySNO(176002); if (Portal != null) { this.Destination = new ResolvedPortalDestination { WorldSNO = 60600, DestLevelAreaSNO = 60601, StartingPointActorTag = 172 //30 }; } else { int ScenetoDest = 0; int LevelArea = 0; int World = 0; foreach (var Gamer in this.World.Game.Players.Values) { if (Gamer.PlayerIndex == 0) { World = Gamer.World.WorldSNO.Id; ScenetoDest = Gamer.CurrentScene.SceneSNO.Id; if (Gamer.CurrentScene.Specification.SNOLevelAreas[1] != -1) { LevelArea = Gamer.CurrentScene.Specification.SNOLevelAreas[1]; } else { LevelArea = Gamer.CurrentScene.Specification.SNOLevelAreas[0]; } } } this.Destination = new ResolvedPortalDestination { WorldSNO = World, DestLevelAreaSNO = LevelArea, StartingPointActorTag = ScenetoDest }; } } else if (world.WorldSNO.Id == 60600) { this.Destination = new ResolvedPortalDestination { WorldSNO = 154587, DestLevelAreaSNO = 154588, StartingPointActorTag = 171 //30 }; } #endregion #region Умное вычисление выхода else { //102231 - Пустыня Logger.Warn("Портал - {0} Не определён до конца, исполнение функции ''умного'' вычисления для выхода.", this.ActorSNO.Id); int ScenetoDest = 0; int LevelArea = 0; int World = 0; foreach (var Gamer in this.World.Game.Players.Values) { if (Gamer.PlayerIndex == 0) { World = Gamer.World.WorldSNO.Id; ScenetoDest = Gamer.CurrentScene.SceneSNO.Id; if (Gamer.CurrentScene.Specification.SNOLevelAreas[1] != -1) { LevelArea = Gamer.CurrentScene.Specification.SNOLevelAreas[1]; } else { LevelArea = Gamer.CurrentScene.Specification.SNOLevelAreas[0]; } } } this.Destination = new ResolvedPortalDestination { WorldSNO = World, DestLevelAreaSNO = LevelArea, StartingPointActorTag = ScenetoDest }; } #endregion } this.Field2 = 16; // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga //this.Attributes[GameAttribute.MinimapActive] = true; //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f; //this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f; //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f; //this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f; //this.Attributes[GameAttribute.Level] = 1; // EREKOSE STUFF //Logger.Debug(" (Portal ctor) position is {0}", this._position); //Logger.Debug(" (Portal ctor) quest range is {0}", this._questRange); // Logger.Debug(" (Portal ctor) is in scene SNO {0}", this.CurrentScene.SceneSNO); //Logger.Debug(" (Portal Ctor) portal used has actor SNO {3}, SNO Name {0}, exists in world sno {1}, has dest world sno {2}", this.ActorSNO.Name, tags[MarkerKeys.DestinationWorld].Id, tags[MarkerKeys.DestinationWorld].Id, snoId); }