Beispiel #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);
             }
         }
     }
 }
Beispiel #2
0
 public TownTradeItemInfo(DetectedTown dt, int tradeId, float currentTime, TradeObj[] needItems, TradeObj[] rewardItems)
 {
     this.pos         = dt.PosCenter;
     name             = dt.name;
     campId           = dt.campId;
     this.needItems   = needItems.ToList();
     this.rewardItems = rewardItems.ToList();
     csti             = CSTradeInfoData.GetData(tradeId);
     m_CurTime        = currentTime;
     m_Time           = csti.refreshTime;
     cs = null;
 }
Beispiel #3
0
    public void AddDetectedTown(VArtifactTown vat)
    {
        if (VArtifactTownManager.Instance.IsCaptured(vat.townId))
        {
            return;
        }
        if (detectedTowns.Contains(vat.PosCenter))
        {
            return;
        }
        detectedTowns.Add(vat.PosCenter);
        DetectedTown dt = new DetectedTown(vat);

        DTownsDict.Add(dt.PosCenter, dt);
        if (AddDetectedTownListener != null)
        {
            AddDetectedTownListener(dt.PosCenter);
        }
    }
Beispiel #4
0
    //story mission
    public void AddStoryCampByMission(int campId)
    {
        if (campId <= 0 || !CampTradeIdData.IsStoryMissionTradeCamp(campId))
        {
            return;
        }
        Camp camp = Camp.GetCamp(campId);

        if (camp == null)
        {
            return;
        }
        DetectedTown dt = new DetectedTown(camp.Pos, camp.Name, campId);

        DTownsDict.Add(dt.PosCenter, dt);
        if (AddDetectedTownListener != null)
        {
            AddDetectedTownListener(dt.PosCenter);
        }
    }
Beispiel #5
0
 public TownTradeItemInfo(DetectedTown dt)
 {
     this.pos = dt.PosCenter;
     name     = dt.name;
     campId   = dt.campId;
 }