public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Skip != false) { hash ^= Skip.GetHashCode(); } if (Hide != false) { hash ^= Hide.GetHashCode(); } if (RenameTo.Length != 0) { hash ^= RenameTo.GetHashCode(); } hash ^= alias_.GetHashCode(); hash ^= attrDefault_.GetHashCode(); hash ^= attrRename_.GetHashCode(); hash ^= inputRename_.GetHashCode(); hash ^= outputRename_.GetHashCode(); return(hash); }
void Update() { if (Input.GetButtonDown("Interact")) { RaycastHit hit; if (Physics.Raycast(this.transform.position, transform.TransformDirection(Vector3.forward), out hit, 2)) { if (hit.collider.GetComponent <Door>()) { print("this is a door"); hit.collider.GetComponent <Door>().Interact(); } else if (hit.collider.CompareTag("Hiding")) { print("this is a bed"); Hide hide = hit.collider.GetComponent <Hide>(); Transform hidingSpot = hide.HidingSpot; Vector3 hidingPos = hidingSpot.transform.position; Hide(hidingPos); } else { print("interaction attempt"); } } else { //nothing detected } } }
public void Execute() { // just ignore this... as you add and remove components, you'll loose the reference, that's why this is here if (_agentsHide == null) { _agentsHide = _agent.GetComponent <Hide>(); } if (_agentsHide == null) { return; } // get all object in a sphere from certain distance var results = Physics.SphereCastAll(_agentsTransform.position, Constants.CHASER_THRESHOLD, Vector3.forward, 2).Where(hit => hit.transform.CompareTag("Chaser")).ToList(); if (results.Count == 0) { _agentsHide.Target = null; return; } var closest = results[0]; foreach (var hit in results) { if (Vector3.Distance(hit.transform.position, _agentsTransform.position) < Vector3.Distance(closest.transform.position, _agentsTransform.position)) { closest = hit; } } _agentsHide.Target = closest.rigidbody; }
private void Start() { movement = GetComponent <Movement>(); climbing = GetComponent <Climbing>(); jump = GetComponent <Jump>(); hide = GetComponent <Hide>(); }
public object ToJsObject() { var jObj = this.ToDynamic(); if (!Script.IsNaN(Classes)) { jObj.classes = Classes.ToJsDynamic(); } if (!Script.IsNaN(Event)) { jObj["event"] = Event.ToString(); } if (!Script.IsNaN(HeightStyle)) { jObj.heightStyle = HeightStyle.ToString(); } if (!Script.IsNaN(Hide)) { jObj.hide = Hide.ToJsObject(); } if (!Script.IsNaN(Show)) { jObj.show = Show.ToJsObject(); } return(jObj); }
public TextShow(string account, string password, string address, WindowHideMode hide) { this.account = account; this.password = password; this.address = address; this.hide = new Hide(hide); }
/// <summary> /// /// </summary> /// <param name="lines"></param> /// <returns></returns> protected static List <LioInfo> CreateLioList(List <List <String> > lines) { List <LioInfo> lios = new List <LioInfo>(); foreach (List <String> values in lines) { LioInfo lio; switch (CSVReader.GetInt(values[0])) { case (int)Types.Door: lio = new Door(); break; case (int)Types.Flag: lio = new Flag(); break; case (int)Types.Hide: lio = new Hide(); break; case (int)Types.Nested: lio = new Nested(); break; case (int)Types.Parallax: lio = new Parallax(); break; case (int)Types.Portal: lio = new Portal(); break; case (int)Types.Sound: lio = new Sound(); break; case (int)Types.Switch: lio = new Switch(); break; case (int)Types.Text: lio = new Text(); break; case (int)Types.WarpField: lio = new WarpField(); break; default: throw new InvalidDataException("No valid type provided to LioInfo"); } lio.ExtractCsvLine(values); lios.Add(lio); } return(lios); }
private void mouseMove(object sender, MouseEventArgs e) { if (_control.IsDragging()) { Hide?.Invoke(); return; } _control.GetTabIndex(e.Location, out int hoveredIndex, out bool hoveredClose); var model = new TooltipModel { Id = "tab", Control = _control, Text = "Add tab: Ctrl+T or click '+' button\r\n" + "Remove tab: Ctrl + F4 or click 'x' button or Middle mouse click\r\n" + "Select next tab: Ctrl + Tab\r\n\r\n" + "Drag tab headers to reorder tabs.\r\n\r\n" + "Move the tab to another window by dragging it to another window title.\r\n\r\n" + "Drag the card here to select or create another tab where you want to drop the card." }; if ((hoveredIndex < 0 || hoveredIndex >= _control.Count) && hoveredIndex != _control.AddButtonIndex) { model.ObjectBounds = new Rectangle(default, _control.Size);
public InternalSellInfo() { Add(typeof(Hide), Hide.GetSBSellValue()); Add(typeof(SkinningKnife), SkinningKnife.GetSBSellValue()); Add(typeof(LeatherCap), LeatherCap.GetSBSellValue()); Add(typeof(LeatherGorget), LeatherGorget.GetSBSellValue()); Add(typeof(LeatherArms), LeatherArms.GetSBSellValue()); Add(typeof(LeatherGloves), LeatherGloves.GetSBSellValue()); Add(typeof(LeatherChest), LeatherChest.GetSBSellValue()); Add(typeof(FemaleLeatherChest), FemaleLeatherChest.GetSBSellValue()); Add(typeof(LeatherBustier), LeatherBustier.GetSBSellValue()); Add(typeof(LeatherLegs), LeatherLegs.GetSBSellValue()); Add(typeof(LeatherSkirt), LeatherSkirt.GetSBSellValue()); Add(typeof(LeatherShorts), LeatherShorts.GetSBSellValue()); Add(typeof(StuddedCap), StuddedCap.GetSBSellValue()); Add(typeof(StuddedGorget), StuddedGorget.GetSBSellValue()); Add(typeof(StuddedArms), StuddedArms.GetSBSellValue()); Add(typeof(StuddedGloves), StuddedGloves.GetSBSellValue()); Add(typeof(StuddedChest), StuddedChest.GetSBSellValue()); Add(typeof(FemaleStuddedChest), FemaleStuddedChest.GetSBSellValue()); Add(typeof(StuddedBustier), StuddedBustier.GetSBSellValue()); Add(typeof(StuddedLegs), StuddedLegs.GetSBSellValue()); Add(typeof(Shoes), Shoes.GetSBSellValue()); Add(typeof(Sandals), Sandals.GetSBSellValue()); Add(typeof(Boots), Boots.GetSBSellValue()); Add(typeof(ThighBoots), ThighBoots.GetSBSellValue()); }
public bool IsSeen(GameObject obj, float maxDetectionDistance) { Hide hide = obj.GetComponent <Hide>(); if (hide != null && hide.IsObjectHidden()) { return(false); } Vector3 direction = (obj.transform.position - transform.position).normalized; float angle = Vector3.Angle(gameObject.transform.forward, direction); // Debug.Log(angle); if (angle > viewAngle) { return(false); } RaycastHit raycastHit = new RaycastHit(); bool rayHitted = Physics.Raycast(transform.position, direction, out raycastHit, maxDetectionDistance); if (!rayHitted || raycastHit.collider.gameObject.name != obj.name) { return(false); } return(true); }
private void UC_Action_Hide(object sender, RoutedEventArgs e) { if (Hide != null) { Hide?.Invoke(sender, e); } }
public override int GetHashCode() { unchecked { var hashCode = CardsFixedAtLevel?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (ComputerDifficulty != null ? ComputerDifficulty.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (DisplayInfo != null ? DisplayInfo.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Hide.GetHashCode(); hashCode = (hashCode * 397) ^ (Id?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Image != null ? Image.GetHashCode() : 0); hashCode = (hashCode * 397) ^ IsNew.GetHashCode(); hashCode = (hashCode * 397) ^ IsQuickmatchPlaylist.GetHashCode(); hashCode = (hashCode * 397) ^ IsTeamGamePlaylist.GetHashCode(); hashCode = (hashCode * 397) ^ LonelyPartyUsesWildcard.GetHashCode(); hashCode = (hashCode * 397) ^ MatchTicketTimeoutDurationSeconds; hashCode = (hashCode * 397) ^ MaxPartySize; hashCode = (hashCode * 397) ^ MaxPlayerCount; hashCode = (hashCode * 397) ^ MinPartySize; hashCode = (hashCode * 397) ^ MinPlayerCount; hashCode = (hashCode * 397) ^ (MpsdHopperName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (MpsdHopperStatName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PlaylistEntries?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (StatsClassification?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (TargetPlatform?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ThumbnailImage != null ? ThumbnailImage.GetHashCode() : 0); hashCode = (hashCode * 397) ^ UsesBanRules.GetHashCode(); hashCode = (hashCode * 397) ^ Voting.GetHashCode(); return(hashCode); } }
public static void Exception(Exception ex, string description = null, params object[] args) { if (description != null) { if (Hide.HasFlag(LogLevel.Exception)) { description += " See log file for more details."; } WriteLine(LogLevel.Error, description, args); } WriteLine(LogLevel.Exception, ex.ToString()); #if !DEBUG if (!File.Exists(Log.LogFile)) { return; } Console.WriteLine("Press any key to upload files to pastebin"); Console.ReadKey(); var url = PastebinApi.Publish(File.ReadAllText(Log.LogFile)); Console.WriteLine($"Your logfile has been uploaded to: {url}"); #endif }
public static Steering GetSteering(Agent target, Agent npc, float maxDist, float distanceBoundary, float maxAccel, float evadePrediction, float faceTimeToTarget) { float minDist = maxDist; Vector3 bestHidingSpot = Vector3.zero; bool changed = false; LayerMask obstacleMask = LayerMask.GetMask("Wall"); Collider[] hits = Physics.OverlapSphere(npc.position, minDist + distanceBoundary + 0.5f, obstacleMask); foreach (Collider coll in hits) { Vector3 hidingSpot = Hide.GetHidingPosition(coll.GetComponent <Body>(), npc.interiorRadius, target.position, distanceBoundary); float distance = Vector3.Distance(hidingSpot, npc.position); if (distance < minDist) { minDist = distance; bestHidingSpot = hidingSpot; changed = true; } } if (changed == false) { return(Evade.GetSteering(target, npc, maxAccel, evadePrediction, true)); } else { return(Arrive.GetSteering(bestHidingSpot, npc, npc.exteriorRadius, maxAccel)); } }
private void SlideCommandHandler(object parameter) { Reveal.Stop(); Hide.Stop(); if (parameter is bool) { if (!_shouldShow) { Hide.Begin(); _shouldShow = true; } return; } if (_shouldShow) { Reveal.Begin(); } else { Hide.Begin(); } _shouldShow = !_shouldShow; }
public object ToJsObject() { var jObj = this.ToDynamic(); if (!Script.IsNaN(Classes)) { jObj.classes = Classes.ToJsDynamic(); } if (!Script.IsNaN(Content)) { jObj.content = new jQuery2.jQuery(Content); } if (!Script.IsNaN(Hide)) { jObj.hide = Hide.ToJsObject(); } if (!Script.IsNaN(Position)) { jObj.position = Position.ToJsObject(); } if (!Script.IsNaN(Show)) { jObj.show = Show.ToJsObject(); } return(jObj); }
private void Hide_Completed(object sender, object e) { if (gloablvalue.DeviceState == "-2") { Show.Stop(); Hide.Stop(); Devicestate_txt.Text = "An error occurred, try again."; ConnectBTN.Content = "connect"; ConnectBTN.Tag = "connect"; ConnectBTN.IsEnabled = true; gloablvalue.DeviceState = "-1"; } else if (gloablvalue.DeviceState == "-1") { Show.Begin(); } else if (gloablvalue.DeviceState == "0") { BTImg.Opacity = 1; Show.Stop(); Hide.Stop(); Devicestate_txt.Text = "' " + gloablvalue.DeviceName + " ' " + " Dissconnected"; ConnectBTN.Content = "connect"; ConnectBTN.Tag = "connect"; ConnectBTN.IsEnabled = true; gloablvalue.DeviceState = "-1"; } else if (gloablvalue.DeviceState == "1") { Show.Stop(); Hide.Stop(); Devicestate_txt.Text = "' " + gloablvalue.DeviceName + " ' " + " Connected"; ConnectBTN.Content = "Dissconnect"; ConnectBTN.Tag = "Dissconnect"; ConnectBTN.IsEnabled = true; //await BluetoothConnection.SendCommand("*"); newrec_txt.Text = gloablvalue.checksend(gloablvalue.RecivedText); } else if (gloablvalue.DeviceState == "2") { Show.Stop(); Hide.Stop(); Devicestate_txt.Text = "' " + gloablvalue.DeviceName + " ' " + " Bluetooth device not found, try again."; ConnectBTN.Content = "connect"; ConnectBTN.Tag = "connect"; ConnectBTN.IsEnabled = true; gloablvalue.DeviceState = "-1"; } else if (gloablvalue.DeviceState == "3") { Show.Stop(); Hide.Stop(); Devicestate_txt.Text = "Not found any device paired, try again."; ConnectBTN.Content = "connect"; ConnectBTN.Tag = "connect"; ConnectBTN.IsEnabled = true; gloablvalue.DeviceState = "-1"; } }
// Use this for initialization void Start() { steeringBasics = GetComponent<SteeringBasics>(); hide = GetComponent<Hide>(); //obstacleSpawner = GameObject.Find("ObstacleSpawner").GetComponent<Spawner>(); wallAvoid = GetComponent<WallAvoidance>(); }
// Use this for initialization void Start() { steeringBasics = GetComponent <SteeringBasics>(); hide = GetComponent <Hide>(); obstacleSpawner = GameObject.Find("ObstacleSpawner").GetComponent <Spawner>(); wallAvoid = GetComponent <WallAvoidance>(); }
protected override void Start() { base.Start(); // Utility AI setup // ****** VALUES ****** UAIV_AgentHealth agentHealth = new UAIV_AgentHealth(this, _AgentController._AgentStats.HealthPoints); UAIV_AgentFood agentFood = new UAIV_AgentFood(this, _AgentController._AgentStats.FoodPoints); UAIV_AgentEnergy agentEnergy = new UAIV_AgentEnergy(this, _AgentController._AgentStats.EnergyPoints); UAIV_FarmPlaced farmPlaced = new UAIV_FarmPlaced(this, 1); UAIV_DistanceTo distanceToHQ = new UAIV_DistanceTo(_AgentController._PlayerOwner.GetBuilding_ByTag(GameCache._Cache.GetData("Headquarters").tag), this, 20); UAIV_InventorySize inventorySize = new UAIV_InventorySize(this, _AgentController._Inventory._MaxInventorySize); UAIV_SoldierEnemyCount enemySoldierCount = new UAIV_SoldierEnemyCount(this, 3.0f); // ****** SCORERS ****** UtilityScorer scorer_AgentHealth = new UtilityScorer(agentHealth, _HealthCurve); UtilityScorer scorer_AgentFood = new UtilityScorer(agentFood, _FoodCurve); UtilityScorer scorer_AgentEnergy = new UtilityScorer(agentEnergy, _EnergyCurve); UtilityScorer scorer_FarmBoolCheck = new UtilityScorer(farmPlaced, _FarmPlacedCurve); UtilityScorer scorer_DistanceToHQ = new UtilityScorer(distanceToHQ, _DistanceToHQCurve); UtilityScorer scorer_InventorySize = new UtilityScorer(inventorySize, _InventorySizeCurve); UtilityScorer scorer_enemySoldierThreatLevel = new UtilityScorer(enemySoldierCount, _EnemySoldierThreatCurve); // ****** ACTIONS ****** RoamAround roamAction_SearchFarmSpot = new RoamAround(this, 0.0f); roamAction_SearchFarmSpot.AddScorer(scorer_DistanceToHQ); roamAction_SearchFarmSpot.AddScorer(scorer_FarmBoolCheck); FarmField farmFieldAction = new FarmField(this, 0.5f); DeliverResources deliverResourceAction = new DeliverResources(GameCache._Cache.GetData("Headquarters").tag, this, 0.0f); deliverResourceAction.AddScorer(scorer_InventorySize); EatFood eatFoodAction = new EatFood(this, 0.0f); eatFoodAction.AddScorer(scorer_AgentFood); eatFoodAction.SetWeight(2); SleepAndRest sleepRestAction = new SleepAndRest("Field", this, 0.0f); sleepRestAction.AddScorer(scorer_AgentEnergy); Hide hideAction = new Hide("Headquarters", this, 0.0f); hideAction.AddScorer(scorer_enemySoldierThreatLevel); hideAction.SetWeight(3); // ****** REGISTER ACTIONS ****** _AgentActions.Add(roamAction_SearchFarmSpot); _AgentActions.Add(farmFieldAction); _AgentActions.Add(deliverResourceAction); _AgentActions.Add(eatFoodAction); _AgentActions.Add(sleepRestAction); _AgentActions.Add(hideAction); }
protected override void Start() { base.Start(); // Utility AI setup // ****** VALUES ****** UAIV_AgentHealth agentHealth = new UAIV_AgentHealth(this, _AgentController._AgentStats.HealthPoints); UAIV_AgentFood agentFood = new UAIV_AgentFood(this, _AgentController._AgentStats.FoodPoints); UAIV_AgentEnergy agentEnergy = new UAIV_AgentEnergy(this, _AgentController._AgentStats.EnergyPoints); UAIV_MinePlaced minePlaced = new UAIV_MinePlaced(this, 1); UAIV_ResourceCount oreCount = new UAIV_ResourceCount(GameCache._Cache.GetData("Ore").tag, this, 1); UAIV_InventorySize inventorySize = new UAIV_InventorySize(this, _AgentController._Inventory._MaxInventorySize); UAIV_SoldierEnemyCount enemySoldierCount = new UAIV_SoldierEnemyCount(this, 3.0f); // ****** SCORERS ****** UtilityScorer scorer_AgentHealth = new UtilityScorer(agentHealth, _HealthCurve); UtilityScorer scorer_AgentFood = new UtilityScorer(agentFood, _FoodCurve); UtilityScorer scorer_AgentEnergy = new UtilityScorer(agentEnergy, _EnergyCurve); UtilityScorer scorer_OreBoolCheck = new UtilityScorer(minePlaced, _MinePlacedCurve); UtilityScorer scorer_OreCount = new UtilityScorer(oreCount, _OreCountCurve); UtilityScorer scorer_InventorySize = new UtilityScorer(inventorySize, _InventorySizeCurve); UtilityScorer scorer_enemySoldierThreatLevel = new UtilityScorer(enemySoldierCount, _EnemySoldierThreatCurve); // ****** ACTIONS ****** RoamAround roamAction_SearchOres = new RoamAround(this, 1.0f); roamAction_SearchOres.AddScorer(scorer_OreCount); roamAction_SearchOres.AddScorer(scorer_OreBoolCheck); MineOre mineOreAction = new MineOre(this, 0.5f); DeliverResources deliverResourceAction = new DeliverResources(GameCache._Cache.GetData("Mine").tag, this, 0.0f); deliverResourceAction.AddScorer(scorer_InventorySize); EatFood eatFoodAction = new EatFood(this, 0.0f); eatFoodAction.AddScorer(scorer_AgentFood); eatFoodAction.SetWeight(2); SleepAndRest sleepRestAction = new SleepAndRest("Mine", this, 0.0f); sleepRestAction.AddScorer(scorer_AgentEnergy); Hide hideAction = new Hide("Headquarters", this, 0.0f); hideAction.AddScorer(scorer_enemySoldierThreatLevel); hideAction.SetWeight(3); // ****** REGISTER ACTIONS ****** _AgentActions.Add(roamAction_SearchOres); _AgentActions.Add(mineOreAction); _AgentActions.Add(deliverResourceAction); _AgentActions.Add(eatFoodAction); _AgentActions.Add(sleepRestAction); _AgentActions.Add(hideAction); }
public void Stop() { try { Busy1.IsActive = Busy2.IsActive = false; Hide.Begin(); } catch { } }
void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); door = GameObject.Find("Player").GetComponent <Door>(); hide = GameObject.Find("Player").GetComponent <Hide>(); seeker = GetComponent <Seeker>(); rb = GetComponent <Rigidbody2D>(); InvokeRepeating("UpdatePath", 1f, 0.5f); }
static void Main(string[] args) { Hello hello = new Hello(); Hide hide = new Hide(); hello.Greeting(); hide.HideGreet(); Console.ReadKey(); }
/// <summary> /// Draws a circle around the agent /// </summary> private void OnSceneGUI() { Hide hide = (Hide)target; // Agent hide script is attached to Handles.color = Color.white; // Set draw colour to white // Draw reach distance Handles.DrawWireArc(hide.transform.position, Vector3.up, Vector3.forward, 360, hide.reach); // Draw a circle of reach around agent }
private void UnClicked() { if (!_active) { return; } Hide.Invoke(); _active = false; }
void Awake() { jump = GetComponent <Jump>(); bounce = GetComponent <Bounce>(); patrol = GetComponent <Patrol>(); chase = GetComponent <Chase>(); _hide = GetComponent <Hide>(); shape = GetComponent <ChipmunkShape>(); PauseGameManager.Instance.register(this, gameObject); }
public CensusQuery HideFields(params string[] fields) { if (Hide == null) { Hide = new List <string>(); } Hide.AddRange(fields); return(this); }
public IActionResult AddHide(int RecipeId) { RegisterUser fromLogin = HttpContext.Session.GetObjectFromJson <RegisterUser>("LoggedInUser"); Hide Hide = new Hide(); Hide.RecipeId = RecipeId; Hide.UserId = fromLogin.UserId; dbContext.Add(Hide); dbContext.SaveChanges(); return(RedirectToAction("Main")); }
private void mouseMove(object sender, MouseEventArgs e) { if (_view.IsSelectingText()) { Hide?.Invoke(); } else { showFieldTooltip(Cursor.Position); } }
public void OnShowOrHide(bool item) { if (item) { Show?.Invoke(); } else { Hide?.Invoke(); } }
/// <summary> /// Creates a new instance /// </summary> public Behaviors() { Alignment = new Alignment(); Arrive = new Arrive(); Cohesion = new Cohesion(); Evade = new Evade(); Flee = new Flee(); Hide = new Hide(); Interpose = new Interpose(); ObstacleAvoidance = new ObstacleAvoidance(); OffsetPursuit = new OffsetPursuit(); PathFollowing = new PathFollowing(); Pursuit = new Pursuit(); Seek = new Seek(); Separation = new Separation(); WallAvoidance = new WallAvoidance(); Wander = new Wander(); }
/// <summary> /// Sends dialog to player's client. /// </summary> /// <param name="message"></param> /// <param name="elements"></param> public void Msg(Hide hide, string message, params DialogElement[] elements) { var mes = new DialogElement(); mes.Add(new DialogText(message)); mes.Add(elements); this.Msg(hide, mes); }
/// <summary> /// Sends NpcTalkEndR but doesn't leave NPC. /// </summary> /// <param name="hide"></param> /// <param name="message">Dialog closes immediately if null.</param> public void Close2(Hide hide, string message) { if (message != null) { if (hide == Hide.Face || hide == Hide.Both) message = new DialogPortrait(null).ToString() + message; else if (this.NPC.DialogPortrait != null) message = new DialogPortrait(this.NPC.DialogPortrait).ToString() + message; if (hide == Hide.Name || hide == Hide.Both) message = new DialogTitle(null).ToString() + message; } Send.NpcTalkEndR(this.Player, this.NPC.EntityId, message); }
/// <summary> /// Closes dialog box, by sending NpcTalkEndR, and leaves the NPC. /// </summary> /// <param name="hide"></param> /// <param name="message">Dialog closes immediately if null.</param> public void Close(Hide hide, string message) { this.Close2(hide, message); this.Exit(); }
/// <summary> /// Sends dialog to player's client. /// </summary> /// <param name="hide"></param> /// <param name="elements"></param> public void Msg(Hide hide, params DialogElement[] elements) { var element = new DialogElement(); if (hide == Hide.Face || hide == Hide.Both) element.Add(new DialogPortrait(null)); else if (this.NPC.DialogPortrait != null) element.Add(new DialogPortrait(this.NPC.DialogPortrait)); if (hide == Hide.Name || hide == Hide.Both) element.Add(new DialogTitle(null)); element.Add(elements); var xml = string.Format( "<call convention='thiscall' syncmode='non-sync'>" + "<this type='character'>{0}</this>" + "<function>" + "<prototype>void character::ShowTalkMessage(character, string)</prototype>" + "<arguments>" + "<argument type='character'>{0}</argument>" + "<argument type='string'>{1}</argument>" + "</arguments>" + "</function>" + "</call>", this.Player.EntityId, HtmlEncode(element.ToString())); Send.NpcTalk(this.Player, xml); }