protected BaseUserControlWithWindow ClientOpenUI(ClientObjectData data) { return(WindowMedicalStation.Open( new ViewModelWindowMedicalStation())); }
protected override void ClientInteractStart(ClientObjectData data) { InteractableStaticWorldObjectHelper.ClientStartInteract(data.GameObject); }
protected override void ClientObserving(ClientObjectData data, bool isObserving) { base.ClientObserving(data, isObserving); StructureLandClaimIndicatorManager.ClientObserving(data.GameObject, isObserving); }
protected override void ClientInteractStart(ClientObjectData data) { GatheringSystem.Instance.ClientTryStartAction(); }
protected virtual BaseUserControlWithWindow ClientOpenUI(ClientObjectData data) { return(WindowSign.Open( new ViewModelWindowSign(data.GameObject))); }
protected override void ClientObserving(ClientObjectData data, bool isObserving) { ClientMeteoriteTooltipHelper.Refresh(data.GameObject, isObserving); }
public void Update(ClientObjectData ob) { if (GameScene.Game.MapControl.MapInfo == null) { return; } DXControl control; if (!MapInfoObjects.TryGetValue(ob, out control)) { if (ob.MapIndex != GameScene.Game.MapControl.MapInfo.Index) { return; } if (ob.ItemInfo != null && ob.ItemInfo.Rarity <= Rarity.Common) { return; } if (ob.MonsterInfo != null && ob.Dead) { return; } MapInfoObjects[ob] = control = new DXControl { DrawTexture = true, Parent = Image, Opacity = Opacity, //MonsterInfo.AI < 0 ? Color.FromArgb(150, 200, 255) : Color.Red, }; } else if (ob.MapIndex != GameScene.Game.MapControl.MapInfo.Index || (ob.MonsterInfo != null && ob.Dead) || (ob.ItemInfo != null && ob.ItemInfo.Rarity <= Rarity.Common)) { control.Dispose(); MapInfoObjects.Remove(ob); return; } Size size = new Size(3, 3); Color colour = Color.White; string name = ob.Name; if (ob.MonsterInfo != null) { name = $"{ob.MonsterInfo.MonsterName}"; if (ob.MonsterInfo.AI < 0) { colour = Color.LightBlue; } else { colour = Color.Red; if (GameScene.Game.HasQuest(ob.MonsterInfo, GameScene.Game.MapControl.MapInfo)) { colour = Color.Orange; } } if (ob.MonsterInfo.IsBoss) { size = new Size(5, 5); if (control.Controls.Count == 0) // This is disgusting but its cheap { new DXControl { Parent = control, Location = new Point(1, 1), BackColour = colour, DrawTexture = true, Size = new Size(3, 3) }; } else { control.Controls[0].BackColour = colour; } colour = Color.White; } if (!string.IsNullOrEmpty(ob.PetOwner)) { name += $" ({ob.PetOwner})"; control.DrawTexture = false; } } else if (ob.ItemInfo != null) { colour = Color.DarkBlue; } else { if (MapObject.User.ObjectID == ob.ObjectID) { colour = Color.Cyan; } else if (GameScene.Game.Observer) { control.Visible = false; } else if (GameScene.Game.GroupBox.Members.Any(x => x.ObjectID == ob.ObjectID)) { colour = Color.Blue; } else if (GameScene.Game.Partner != null && GameScene.Game.Partner.ObjectID == ob.ObjectID) { colour = Color.DeepPink; } else if (GameScene.Game.GuildBox.GuildInfo != null && GameScene.Game.GuildBox.GuildInfo.Members.Any(x => x.ObjectID == ob.ObjectID)) { colour = Color.DeepSkyBlue; } } control.Hint = name; control.BackColour = colour; control.Size = size; control.Location = new Point((int)(ScaleX * ob.Location.X) - size.Width / 2, (int)(ScaleY * ob.Location.Y) - size.Height / 2); if (MapObject.User.ObjectID != ob.ObjectID) { return; } Image.Location = new Point(-control.Location.X + Area.Width / 2, -control.Location.Y + Area.Height / 2); }
protected BaseUserControlWithWindow ClientOpenUI(ClientObjectData data) { return(WindowLandClaim.Open( new ViewModelWindowLandClaim(data.GameObject, data.PublicState.LandClaimAreaObject))); }
protected BaseUserControlWithWindow ClientOpenUI(ClientObjectData data) { return(WindowDoor.Open( new ViewModelWindowDoor(data.GameObject))); }
protected override BaseUserControlWithWindow ClientOpenUI(ClientObjectData data) { return(WindowSignPicture.Open( new ViewModelWindowSignPicture(data.GameObject))); }
protected virtual void ClientObserving(ClientObjectData data, bool isObserving) { }