Exemple #1
0
 //story
 public void AddStoryCampByLabel(object sender, LabelMgr.Args arg)
 {
     if (arg.add == true)
     {
         StaticPoint sp = arg.label as StaticPoint;
         if (sp != null)
         {
             if (sp.campId <= 0)
             {
                 return;
             }
             int campId = sp.campId;
             if (!CampTradeIdData.IsStoryDetectTradeCamp(campId))
             {
                 return;
             }
             Vector3 pos  = sp.position;
             Camp    camp = Camp.GetCamp(campId);
             if (camp == null)
             {
                 return;
             }
             DetectedTown dt = new DetectedTown(pos, camp.Name, campId);
             DTownsDict.Add(dt.PosCenter, dt);
             if (AddDetectedTownListener != null)
             {
                 AddDetectedTownListener(dt.PosCenter);
             }
         }
     }
 }
Exemple #2
0
 void AddOrRemoveLable(object sender, LabelMgr.Args arg)
 {
     if (arg == null || arg.label == null)
     {
         return;
     }
     if (arg.add)
     {
         AddMapLabel(arg.label);
     }
     else
     {
         RemvoeMapLabel(arg.label);
     }
 }
 void AddOrRemoveLable(object sender, LabelMgr.Args arg)
 {
     if (arg == null || arg.label == null)
     {
         return;
     }
     if (PeGameMgr.playerType == PeGameMgr.EPlayerType.Tutorial &&
         arg.label.GetType() == ELabelType.Npc)
     {
         if (((MapCmpt)(arg.label)).Common.entityProto.proto == EEntityProto.Monster)
         {
             return;
         }
     }
     if (arg.add)
     {
         if (arg.label.GetType() == ELabelType.Mission)
         {
             MissionLabel tmp = (arg.label as MissionLabel);
             MinMapMissionLabelRealation(tmp, arg.add);
         }
         else
         {
             AddMapLabel(arg.label);
             AddArrowLabel(arg.label);
         }
     }
     else
     {
         if (arg.label.GetType() == ELabelType.Mission)
         {
             MissionLabel tmp = (arg.label as MissionLabel);
             MinMapMissionLabelRealation(tmp, arg.add);
         }
         else
         {
             RemvoeMapLabel(arg.label);
             RemvoArrowLabel(arg.label);
         }
     }
 }