Beispiel #1
0
    // Token: 0x06000BD7 RID: 3031 RVA: 0x00114020 File Offset: 0x00112220
    public bool IsPowerSoccer(int LineTableID)
    {
        if (GameConstants.IsSoccerRunningLine(LineTableID) || GameConstants.IsPetSkillLine(LineTableID) || DataManager.MapDataController.MapLineTable[LineTableID].lineFlag != 30)
        {
            return(false);
        }
        int        num       = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID);
        POINT_KIND pointKind = (POINT_KIND)DataManager.MapDataController.LayoutMapInfo[num].pointKind;

        if (pointKind == POINT_KIND.PK_NPC)
        {
            ushort tableID = DataManager.MapDataController.LayoutMapInfo[num].tableID;
            if (DataManager.MapDataController.NPCPointTable[(int)tableID].Key == FootballManager.Instance.mFootballKickData.last_football_id && FootballManager.Instance.mFootballKickData.combo > 1)
            {
                return(true);
            }
        }
        return(false);
    }
Beispiel #2
0
    // Token: 0x06000BD4 RID: 3028 RVA: 0x001130E0 File Offset: 0x001112E0
    public void UpdatePoint(uint LayoutMapInfoID)
    {
        this.mapTileController.UpdatePoint(LayoutMapInfoID);
        POINT_KIND layoutMapInfoPointKind = DataManager.MapDataController.GetLayoutMapInfoPointKind(LayoutMapInfoID);

        if (this.mapLineController != null && (DataManager.MapDataController.IsCityOrCamp(LayoutMapInfoID) || layoutMapInfoPointKind == POINT_KIND.PK_YOLK))
        {
            int  tableID = (int)DataManager.MapDataController.LayoutMapInfo[(int)((UIntPtr)LayoutMapInfoID)].tableID;
            byte b       = 1;
            b |= 2;
            if ((DataManager.MapDataController.PlayerPointTable[tableID].capitalFlag & b) != 0 || layoutMapInfoPointKind == POINT_KIND.PK_YOLK)
            {
                PointCode code = default(PointCode);
                GameConstants.MapIDToPointCode((int)LayoutMapInfoID, out code.zoneID, out code.pointID);
                PointModifyNode item = default(PointModifyNode);
                item.Code = code;
                item.Kind = layoutMapInfoPointKind;
                this.mapLineController.PointModifyList.Add(item);
            }
        }
    }
Beispiel #3
0
    // Token: 0x06000BD6 RID: 3030 RVA: 0x00113A3C File Offset: 0x00111C3C
    public void AddLine(int LineTableID, bool show = true)
    {
        if (DataManager.MapDataController.MapLineTable[LineTableID].lineObject != null)
        {
            return;
        }
        EUnitSide? eunitSide  = null;
        ELineColor?elineColor = null;
        ushort     num        = 0;

        if (!GameConstants.IsPetSkillLine(LineTableID) && !GameConstants.IsSoccerRunningLine(LineTableID))
        {
            for (int i = 0; i < this.mapLineController.FakeRetreatList.Count; i++)
            {
                int        num2      = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID);
                POINT_KIND pointKind = (POINT_KIND)DataManager.MapDataController.LayoutMapInfo[num2].pointKind;
                PointCode  start     = DataManager.MapDataController.MapLineTable[LineTableID].start;
                if (start.pointID == this.mapLineController.FakeRetreatList[i].point.pointID && start.zoneID == this.mapLineController.FakeRetreatList[i].point.zoneID)
                {
                    if (this.mapLineController.FakeRetreatList[i].flag != 0)
                    {
                        eunitSide  = new EUnitSide?(this.mapLineController.FakeRetreatList[i].unitSide);
                        elineColor = new ELineColor?(this.mapLineController.FakeRetreatList[i].lineColor);
                    }
                    num = this.mapLineController.FakeRetreatList[i].emoji;
                    this.mapLineController.FakeRetreatList.RemoveAt(i);
                    break;
                }
                if (this.mapLineController.FakeRetreatList[i].lineFlag == EMarchEventType.EMET_RallyAttack && DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 17)
                {
                    int        num3       = GameConstants.PointCodeToMapID(this.mapLineController.FakeRetreatList[i].point.zoneID, this.mapLineController.FakeRetreatList[i].point.pointID);
                    POINT_KIND pointKind2 = (POINT_KIND)DataManager.MapDataController.LayoutMapInfo[num3].pointKind;
                    if (pointKind2 == POINT_KIND.PK_YOLK && DataManager.MapDataController.MapLineTable[LineTableID].end.pointID == this.mapLineController.FakeRetreatList[i].point2.pointID && DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID == this.mapLineController.FakeRetreatList[i].point2.zoneID)
                    {
                        this.mapLineController.FakeRetreatList.RemoveAt(i);
                        break;
                    }
                }
            }
        }
        bool       bEase    = true;
        ELineColor color    = ELineColor.BLUE;
        EUnitSide  unitSide = EUnitSide.BLUE;

        DataManager.checkLineColorID(LineTableID, out color, out unitSide, out bEase);
        if (eunitSide != null)
        {
            unitSide = eunitSide.Value;
            color    = elineColor.Value;
        }
        float   d      = DataManager.MapDataController.zoomSize * this.CanvasrectranScale;
        Vector2 vector = this.mapTileController.getTilePosition(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID) * d;
        Vector3 from   = new Vector3(vector.x, vector.y, 0f);

        vector = this.mapTileController.getTilePosition(DataManager.MapDataController.MapLineTable[LineTableID].end.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].end.pointID) * d;
        int   layoutMapInfoID = 0;
        sbyte b = 0;

        if (!GameConstants.IsPetSkillLine(LineTableID) && !GameConstants.IsSoccerRunningLine(LineTableID) && DataManager.MapDataController.MapLineTable[LineTableID].lineFlag == 27)
        {
            if (NetworkManager.ServerTime - DataManager.MapDataController.MapLineTable[LineTableID].begin < 5.0)
            {
                layoutMapInfoID = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID);
                b = this.mapTileController.getNPCDir((uint)layoutMapInfoID);
            }
            else
            {
                layoutMapInfoID = GameConstants.PointCodeToMapID(DataManager.MapDataController.MapLineTable[LineTableID].start.zoneID, DataManager.MapDataController.MapLineTable[LineTableID].start.pointID);
                this.mapTileController.UpdateMapNPCHurt((uint)layoutMapInfoID, false);
                layoutMapInfoID = 0;
            }
        }
        byte b2 = 0;

        if (this.IsPowerSoccer(LineTableID))
        {
            b2 |= 1;
        }
        LineNode lineNode = this.mapLineController.createLine(LineTableID, from, new Vector3(vector.x, vector.y, 0f), color, unitSide, bEase, show, ((int)b >= 0) ? EMonsterFace.LEFT : EMonsterFace.RIGHT, b2);

        DataManager.MapDataController.MapLineTable[LineTableID].lineObject = ((lineNode != null) ? lineNode.gameObject : null);
        if (lineNode != null && (int)b != 0)
        {
            this.mapTileController.setNPCLinenode((uint)layoutMapInfoID, lineNode);
        }
        if (num != 0 && lineNode.action != ELineAction.NORMAL)
        {
            MapLine mapLine = DataManager.MapDataController.MapLineTable[LineTableID];
            mapLine.baseFlag |= 1;
            DataManager.MapDataController.MapLineTable[LineTableID].emojiID = num;
            this.UpdateLineEmoji(LineTableID);
        }
        this.CheckShowMapWeaponLine(LineTableID);
    }
Beispiel #4
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);
     }
 }