/// <summary> /// Tries to get the hate of the mob. /// </summary> /// <param name="cpkt"></param> private void CM_REQUESTSHOWNPCLOCATION(CMSG_NPCLOCATIONSELECT cpkt) { List <GuidePoint> guidepoints = this.character.Tag as List <GuidePoint>; if (guidepoints != null && cpkt.LocationId < guidepoints.Count) { GuidePoint point = guidepoints[cpkt.LocationId]; GuideNpc npoint = point as GuideNpc; GuidePosition ppoint = point as GuidePosition; if (npoint != null) { //Predicated used searching Predicate <MapObject> FindActor = delegate(MapObject actor) { return(actor.ModelId == npoint.Map); }; List <MapObject> matchingactors = new List <MapObject>(); Regiontree tree = this.character.currentzone.Regiontree; matchingactors.AddRange(tree.SearchActors(FindActor, SearchFlags.Npcs)); if (matchingactors.Count > 0) { MapObject matchingactor = matchingactors[0]; SMSG_NPCASKLOCATIONSRC spkt = new SMSG_NPCASKLOCATIONSRC(); spkt.SessionId = this.character.id; spkt.Result = 0; spkt.DialogScript = 0; spkt.NpcId = npoint.Map; spkt.X = matchingactor.Position.x; spkt.Y = matchingactor.Position.y; spkt.Z = matchingactor.Position.z; this.Send((byte[])spkt); } } else if (ppoint != null) { SMSG_NPCASKLOCATIONSRC spkt = new SMSG_NPCASKLOCATIONSRC(); spkt.SessionId = this.character.id; spkt.Result = 2; spkt.DialogScript = 0; spkt.NpcId = ppoint.Npc; spkt.X = ppoint.x; spkt.Y = ppoint.y; spkt.Z = ppoint.z; spkt.Result2 = 6; this.Send((byte[])spkt); } } }
public IGuider Make(string elementId, string content, GuidePosition guidePosition = GuidePosition.Right) { return(Make(new GuideStep(elementId, content, guidePosition))); }
public IGuider Make(ElementReference element, string content, GuidePosition guidePosition = GuidePosition.Right) { return(Make(new GuideStep(element, content, guidePosition))); }
public ValueTask <object> Show(double x, double y, string content, GuidePosition guidePosition = GuidePosition.Right) { return(_jSRuntime.InvokeAsync <object>("guiderJsFunctions.showWithXY", Setting, Id, x, y, content, guidePosition, DotNetObjectReference.Create(this))); }
public GuideStep(double x, double y, string content, GuidePosition guidePosition = GuidePosition.Right) : this(content, guidePosition) { this.X = x; this.Y = y; this.GuideType = GuideType.Coordination; }
public GuideStep(ElementReference elementRef, string content, GuidePosition guidePosition = GuidePosition.Right) : this(content, guidePosition) { this.ElementRef = elementRef; this.GuideType = GuideType.Ref; }
public GuideStep(string elementId, string content, GuidePosition guidePosition = GuidePosition.Right) : this(content, guidePosition) { this.ElementId = elementId; this.GuideType = GuideType.Id; }
private GuideStep(string content, GuidePosition guidePosition) { this.Content = content; this.GuidePosition = guidePosition; }
public IGuider Make(double x, double y, string content, GuidePosition guidePosition = GuidePosition.Right) { return(Make(new GuideStep(x, y, content, guidePosition))); }