Ejemplo n.º 1
0
        public static void OnMapTagAdded(IMapTag tag)
        {
            if (Sim.ActiveActor == null || Sim.ActiveActor.MapTagManager == null || !CameraController.IsMapViewModeEnabled())
            {
                return;
            }

            if (tag.TagType == MapTagType.Venue)
            {
                MapTagsModel model = MapTagsModel.Singleton;
                MapTagManager manager = Sim.ActiveActor.MapTagManager;
                MapTag mTag = tag as MapTag;
                if (model != null && manager != null && mTag != null)
                {
                    Lot lot = LotManager.GetLot(mTag.LotId);
                    if (lot != null && ShouldReplace(lot))
                    {                        
                        CustomTagNRaas customTag = new CustomTagNRaas(lot, mTag.Owner);
                        manager.RemoveTag(tag.ObjectGuid);
                        Tagger.sReplaced.Add(lot.LotId);
                        manager.AddTag(customTag);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public static void OnMapTagAdded(IMapTag tag)
        {
            if (Sim.ActiveActor == null || Sim.ActiveActor.MapTagManager == null || !CameraController.IsMapViewModeEnabled())
            {
                return;
            }

            if (tag.TagType == MapTagType.Venue)
            {
                MapTagsModel  model   = MapTagsModel.Singleton;
                MapTagManager manager = Sim.ActiveActor.MapTagManager;
                MapTag        mTag    = tag as MapTag;
                if (model != null && manager != null && mTag != null)
                {
                    Lot lot = LotManager.GetLot(mTag.LotId);
                    if (lot != null && ShouldReplace(lot))
                    {
                        CustomTagNRaas customTag = new CustomTagNRaas(lot, mTag.Owner);
                        manager.RemoveTag(tag.ObjectGuid);
                        Tagger.sReplaced.Add(lot.LotId);
                        manager.AddTag(customTag);
                    }
                }
            }
        }