Ejemplo n.º 1
0
    // Token: 0x06000AA3 RID: 2723 RVA: 0x000E49D0 File Offset: 0x000E2BD0
    public Color32 GetColorByMapDamageTb(ushort TbID, byte index)
    {
        MapDamageEffTb recordByKey = PetManager.Instance.MapDamageEffTable.GetRecordByKey(TbID);

        if (index >= 3)
        {
            return(Color.white);
        }
        return(new Color32(recordByKey.LineStyle[(int)index].R, recordByKey.LineStyle[(int)index].G, recordByKey.LineStyle[(int)index].B, byte.MaxValue));
    }
Ejemplo n.º 2
0
 // Token: 0x06000BD5 RID: 3029 RVA: 0x001131B0 File Offset: 0x001113B0
 public void DelLine(int LineTableID, byte Send = 1, byte bDelAll = 0)
 {
     if (this.mapLineController != null && DataManager.MapDataController.MapLineTable[LineTableID].lineObject != null)
     {
         bool forceRemove = false;
         if (!GameConstants.IsPetSkillLine(LineTableID) && !GameConstants.IsSoccerRunningLine(LineTableID))
         {
             if (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 27 && NetworkManager.ServerTime - DataManager.MapDataController.MapLineTable[LineTableID].begin < 5.0)
             {
                 this.mapTileController.UpdateMapNPCFighterLeave((uint)GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID), LineTableID);
             }
             else if (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 12)
             {
                 this.mapLineController.LastRallyName.ClearString();
                 this.mapLineController.LastRallyName.Append(DataManager.MapDataController.MapLineTable[LineTableID].playerName);
             }
             if (Send != 255 && (DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 5 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 6 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 7 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 12 || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 9))
             {
                 bool       flag      = true;
                 int        num       = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID);
                 POINT_KIND pointKind = (POINT_KIND)DataManager.MapDataController.LayoutMapInfo[num].pointKind;
                 if (pointKind == POINT_KIND.PK_NONE)
                 {
                     flag = false;
                 }
                 else if (DataManager.MapDataController.IsResources((uint)num))
                 {
                     int tableID = (int)DataManager.MapDataController.LayoutMapInfo[num].tableID;
                     if (DataManager.CompareStr(DataManager.MapDataController.ResourcesPointTable[tableID].playerName, string.Empty) == 0)
                     {
                         flag = false;
                     }
                 }
                 else if (pointKind == POINT_KIND.PK_CITY)
                 {
                     int tableID2 = (int)DataManager.MapDataController.LayoutMapInfo[num].tableID;
                     if (DataManager.CompareStr(DataManager.MapDataController.PlayerPointTable[tableID2].allianceTag, DataManager.MapDataController.MapLineTable[LineTableID].allianceTag) == 0)
                     {
                         flag = false;
                     }
                 }
                 if (flag)
                 {
                     FakeRetreat item = new FakeRetreat(0);
                     item.point    = DataManager.MapDataController.MapLineTable[LineTableID].end;
                     item.point2   = DataManager.MapDataController.MapLineTable[LineTableID].start;
                     item.lineFlag = (EMarchEventType)DataManager.MapDataController.MapLineTable[LineTableID].lineFlag;
                     bool       flag2     = true;
                     ELineColor lineColor = ELineColor.BLUE;
                     EUnitSide  unitSide  = EUnitSide.BLUE;
                     DataManager.checkLineColorID(LineTableID, out lineColor, out unitSide, out flag2);
                     item.unitSide  = unitSide;
                     item.lineColor = lineColor;
                     item.playerName.ClearString();
                     item.playerName.Append(DataManager.MapDataController.MapLineTable[LineTableID].playerName);
                     item.allianceTag.ClearString();
                     item.allianceTag.Append(DataManager.MapDataController.MapLineTable[LineTableID].allianceTag);
                     item.emoji = DataManager.MapDataController.MapLineTable[LineTableID].emojiID;
                     this.mapLineController.FakeRetreatList.Add(item);
                 }
             }
         }
         else if (GameConstants.IsPetSkillLine(LineTableID))
         {
             long num2   = (long)(DataManager.MapDataController.MapLineTable[LineTableID].begin + (ulong)DataManager.MapDataController.MapLineTable[LineTableID].during);
             uint during = DataManager.MapDataController.MapLineTable[LineTableID].during;
             if (during <= 2u || Math.Abs(num2 - DataManager.Instance.ServerTime) <= 1L)
             {
                 Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;
                 if (door == null || door.m_eMode == EUIOriginMode.Show)
                 {
                     byte           lineFlag    = DataManager.MapDataController.MapLineTable[LineTableID].lineFlag;
                     MapDamageEffTb recordByKey = PetManager.Instance.MapDamageEffTable.GetRecordByKey((ushort)lineFlag);
                     if (recordByKey.ID == (ushort)lineFlag)
                     {
                         float   d       = DataManager.MapDataController.zoomSize * this.CanvasrectranScale;
                         Vector2 vector  = this.mapTileController.getTilePosition(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID) * d;
                         Vector3 value   = new Vector3(vector.x, vector.y, 0f);
                         CString cstring = StringManager.Instance.SpawnString(30);
                         if (recordByKey.SoundPakNO != 0)
                         {
                             cstring.ClearString();
                             cstring.StringToFormat("Role/");
                             cstring.IntToFormat((long)recordByKey.SoundPakNO, 3, false);
                             cstring.AppendFormat("{0}{1}");
                             if (AssetManager.GetAssetBundleDownload(cstring, AssetPath.Role, AssetType.HeroSFX, recordByKey.SoundPakNO, false))
                             {
                                 AudioManager.Instance.PlaySFX(recordByKey.HitSound, 0f, PitchKind.NoPitch, null, new Vector3?(value));
                             }
                         }
                         else
                         {
                             AudioManager.Instance.PlaySFX(recordByKey.HitSound, 0f, PitchKind.NoPitch, null, new Vector3?(value));
                         }
                         if (recordByKey.ParticlePakNO != 0)
                         {
                             cstring.ClearString();
                             cstring.StringToFormat("Particle/Monster_Effects_");
                             cstring.IntToFormat((long)recordByKey.ParticlePakNO, 3, false);
                             cstring.AppendFormat("{0}{1}");
                             if (AssetManager.GetAssetBundleDownload(cstring, AssetPath.Particle, AssetType.Effects, recordByKey.ParticlePakNO, false))
                             {
                                 DataManager.MapDataController.MapWeaponDefense(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID, recordByKey.HitParticle, (float)recordByKey.HitParticleDuring * 0.001f);
                             }
                         }
                         else
                         {
                             DataManager.MapDataController.MapWeaponDefense(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID, recordByKey.HitParticle, (float)recordByKey.HitParticleDuring * 0.001f);
                         }
                         StringManager.Instance.DeSpawnString(cstring);
                     }
                 }
             }
         }
         else
         {
             forceRemove = true;
             if (bDelAll == 0)
             {
                 MapLine mapLine = DataManager.MapDataController.MapLineTable[LineTableID];
                 if ((mapLine.lineFlag & 56) == 56)
                 {
                     if (mapLine.start.zoneID != mapLine.end.zoneID || mapLine.start.pointID != mapLine.end.pointID)
                     {
                         Vector3 b       = this.PointCodeToWorldPosition(mapLine.start.zoneID, mapLine.start.pointID);
                         Vector3 vector2 = this.PointCodeToWorldPosition(mapLine.end.zoneID, mapLine.end.pointID);
                         this.mapLineController.addSoccerFakeLine(vector2, new Vector3?(vector2 - b), 0);
                     }
                 }
                 else
                 {
                     long num3    = (long)(mapLine.begin + (ulong)mapLine.during);
                     uint during2 = mapLine.during;
                     long num4    = Math.Abs(num3 - DataManager.Instance.ServerTime);
                     if (during2 <= 2u || num4 <= 1L)
                     {
                         this.mapLineController.CheckTouchDownPosEffect(mapLine.end.zoneID, mapLine.end.pointID);
                     }
                     LineNode nodeByGameObject = this.mapLineController.GetNodeByGameObject(DataManager.MapDataController.MapLineTable[LineTableID].lineObject, false);
                     this.mapLineController.PlaySoccerArrive(nodeByGameObject);
                 }
             }
         }
         Send = ((Send != byte.MaxValue) ? Send : 1);
         if (bDelAll != 0)
         {
             forceRemove = true;
         }
         this.mapTileController.CheckDelFocusGroup(LineTableID, Send);
         this.mapLineController.CheckRemoveLine(DataManager.MapDataController.MapLineTable[LineTableID].lineObject, forceRemove);
     }
 }