コード例 #1
0
ファイル: FootballManager.cs プロジェクト: gsoec/lm-source
    // Token: 0x060011AE RID: 4526 RVA: 0x001EE340 File Offset: 0x001EC540
    public void RecvFootBallKickFailedReturn(MessagePacket MP)
    {
        DataManager   dataManager   = DataManager.Instance;
        GUIManager    guimanager    = GUIManager.Instance;
        FAILED_REASON failed_REASON = (FAILED_REASON)MP.ReadByte(-1);
        byte          b             = MP.ReadByte(-1);

        if (b >= 8)
        {
            return;
        }
        dataManager.MarchEventData[(int)b].Type        = (EMarchEventType)MP.ReadByte(-1);
        dataManager.MarchEventTime[(int)b].BeginTime   = MP.ReadLong(-1);
        dataManager.MarchEventTime[(int)b].RequireTime = MP.ReadUInt(-1);
        dataManager.SetQueueBarData(EQueueBarIndex.MarchingBegin + (int)b, true, dataManager.MarchEventTime[(int)b].BeginTime, dataManager.MarchEventTime[(int)b].RequireTime);
        dataManager.CheckTroolCount();
        guimanager.UpdateUI(EGUIWindow.UI_ArmyInfo, 0, 0);
        guimanager.UpdateUI(EGUIWindow.UI_BagFilter, -1, (int)(2 + b));
        guimanager.UpdateUI(EGUIWindow.UI_Rally, 0, 0);
        if (failed_REASON == FAILED_REASON.FAILED_REASON_KICK_AWAY)
        {
            guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(14737u), 255, true);
        }
        else if (failed_REASON == FAILED_REASON.FAILED_REASON_KICK_VANISH)
        {
            guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(14738u), 255, true);
        }
    }
コード例 #2
0
ファイル: FootballManager.cs プロジェクト: gsoec/lm-source
    // Token: 0x060011B1 RID: 4529 RVA: 0x001EE568 File Offset: 0x001EC768
    public void RecvFootballeKick_Member_Goal(MessagePacket MP)
    {
        CString cstring = StringManager.Instance.StaticString1024();

        MP.ReadStringPlus(13, cstring, -1);
        byte        wonderID    = MP.ReadByte(-1);
        GUIManager  guimanager  = GUIManager.Instance;
        DataManager dataManager = DataManager.Instance;
        CString     cstring2    = StringManager.Instance.StaticString1024();

        cstring2.StringToFormat(cstring);
        cstring2.StringToFormat(DataManager.MapDataController.GetYolkName((ushort)wonderID, DataManager.MapDataController.OtherKingdomData.kingdomID));
        cstring2.AppendFormat(dataManager.mStringTable.GetStringByID(14743u));
        guimanager.AddHUDMessage(cstring2.ToString(), 255, true);
    }
コード例 #3
0
 // Token: 0x06001147 RID: 4423 RVA: 0x001E7CB4 File Offset: 0x001E5EB4
 public void RecvCastleSkinChange(MessagePacket Mp)
 {
     if (Mp.ReadByte(-1) == 0)
     {
         DataManager instance  = DataManager.Instance;
         GUIManager  instance2 = GUIManager.Instance;
         instance2.BuildingData.CastleID = Mp.ReadByte(-1);
         CString cstring = StringManager.Instance.StaticString1024();
         cstring.StringToFormat(instance.mStringTable.GetStringByID((uint)instance2.BuildingData.castleSkin.CastleSkinTable.GetRecordByKey((ushort)instance2.BuildingData.CastleID).Name));
         cstring.AppendFormat(instance.mStringTable.GetStringByID(9686u));
         instance2.AddHUDMessage(cstring.ToString(), 255, true);
         instance2.UpdateUI(EGUIWindow.UI_CastleSkin, 3, (int)instance2.BuildingData.CastleID);
         instance2.HideUILock(EUILock.CastleSkin);
         instance.AttribVal.UpdateAttrVal(UpdateAttrKind.CastleSkin);
         AudioManager.Instance.PlayUISFX(UIKind.ItemUse);
     }
 }
コード例 #4
0
ファイル: FootballManager.cs プロジェクト: gsoec/lm-source
    // Token: 0x060011A9 RID: 4521 RVA: 0x001EDDB8 File Offset: 0x001EBFB8
    public void RecvFootBall_Skill_Use(MessagePacket MP)
    {
        GUIManager  guimanager  = GUIManager.Instance;
        DataManager dataManager = DataManager.Instance;

        guimanager.HideUILock(EUILock.FootBallSkill);
        byte b = MP.ReadByte(-1);

        if (b == 0)
        {
            ushort num = MP.ReadUShort(-1);
            num = (ushort)Mathf.Clamp((int)(num - 1), 0, this.mFootballSkillCDTime.Length - 1);
            this.mFootballSkillCDTime[(int)num] = MP.ReadLong(-1);
            byte b2 = MP.ReadByte(-1);
            b2 = (byte)Mathf.Clamp((int)b2, 0, dataManager.MarchEventData.Length - 1);
            dataManager.MarchEventData[(int)b2].Type          = EMarchEventType.EMET_FooballMarching;
            dataManager.MarchEventData[(int)b2].Point.zoneID  = MP.ReadUShort(-1);
            dataManager.MarchEventData[(int)b2].Point.pointID = MP.ReadByte(-1);
            dataManager.MarchEventData[(int)b2].PointKind     = POINT_KIND.PK_NPC;
            dataManager.MarchEventTime[(int)b2].BeginTime     = MP.ReadLong(-1);
            dataManager.MarchEventTime[(int)b2].RequireTime   = MP.ReadUInt(-1);
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    dataManager.MarchEventData[(int)b2].TroopData[i][j] = MP.ReadUInt(-1);
                    dataManager.RoleAttr.m_Soldier[i * 4 + j]          -= dataManager.MarchEventData[(int)b2].TroopData[i][j];
                    dataManager.SoldierTotal -= (long)((ulong)dataManager.MarchEventData[(int)b2].TroopData[i][j]);
                }
            }
            dataManager.CheckTroolCount();
            dataManager.SetQueueBarData(EQueueBarIndex.MarchingBegin + (int)b2, true, dataManager.MarchEventTime[(int)b2].BeginTime, dataManager.MarchEventTime[(int)b2].RequireTime);
            dataManager.SetRecvQueueBarData((int)(2 + b2));
            guimanager.UpdateUI(EGUIWindow.UI_FootBall, 3, 0);
            DataManager.msgBuffer[0] = 81;
            GameConstants.GetBytes((ushort)b2, DataManager.msgBuffer, 1);
            GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
            guimanager.UpdateUI(EGUIWindow.UI_ArmyInfo, 0, 0);
            AudioManager.Instance.PlayUISFX(UIKind.Expedition);
            DataManager.MapDataController.MyFocusBallLineTableID = -1;
        }
        else
        {
            switch (b)
            {
            case 1:
            case 2:
            case 7:
            case 8:
            case 10:
                guimanager.MsgStr.ClearString();
                guimanager.MsgStr.IntToFormat((long)b, 1, false);
                guimanager.MsgStr.AppendFormat(dataManager.mStringTable.GetStringByID(17207u));
                guimanager.AddHUDMessage(guimanager.MsgStr.ToString(), 255, true);
                break;

            case 3:
                guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(17211u), 255, true);
                break;

            case 4:
                guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(8351u), 255, true);
                break;

            case 5:
                guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(17198u), 255, true);
                break;

            case 6:
                guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(17208u), 255, true);
                break;

            case 9:
                guimanager.AddHUDMessage(dataManager.mStringTable.GetStringByID(119u), 255, true);
                break;
            }
            guimanager.UpdateUI(EGUIWindow.UI_FootBall, 4, 0);
        }
    }
コード例 #5
0
    // Token: 0x06000DDC RID: 3548 RVA: 0x00162B84 File Offset: 0x00160D84
    public void Recv_MSG_RESP_REDPOCKET_GET(MessagePacket MP)
    {
        byte b   = MP.ReadByte(-1);
        uint num = MP.ReadUInt(-1);
        byte b2  = MP.ReadByte(-1);

        if (b2 == 0)
        {
            DataManager dataManager = DataManager.Instance;
            GUIManager  guimanager  = GUIManager.Instance;
            uint        num2        = MP.ReadUInt(-1);
            uint        num3        = MP.ReadUInt(-1);
            ushort      num4        = MP.ReadUShort(-1);
            ushort      num5        = MP.ReadUShort(-1);
            byte        b3          = MP.ReadByte(-1);
            ushort      num6        = num5;
            if (num2 > 0u)
            {
                GUIManager.Instance.SetRoleAttrDiamond(num2 + dataManager.RoleAttr.Diamond, 0, eSpentCredits.eMax);
                GameManager.OnRefresh(NetworkNews.Refresh, null);
            }
            else if (num3 > 0u)
            {
                DataManager dataManager2 = dataManager;
                dataManager2.RoleAlliance.Money = dataManager2.RoleAlliance.Money + num3;
                GameManager.OnRefresh(NetworkNews.Refresh_Alliance, null);
            }
            else
            {
                num5 += dataManager.GetCurItemQuantity(num4, b3);
                dataManager.SetCurItemQuantity(num4, num5, b3, 0L);
                GameManager.OnRefresh(NetworkNews.Refresh_Item, null);
            }
            for (int i = 0; i < this.mListActGift.Count; i++)
            {
                if (this.mListActGift[i].serverIndex == b)
                {
                    this.mListActGift[i].Status = 1;
                    break;
                }
            }
            this.RecountGift();
            Equip recordByKey = dataManager.EquipTable.GetRecordByKey(num4);
            bool  flag        = guimanager.IsLeadItem(recordByKey.EquipKind);
            GUIManager.Instance.m_SpeciallyEffect.mDiamondValue = 0u;
            if (recordByKey.EquipKind != 11)
            {
                if (flag)
                {
                    guimanager.SE_Item_L_Color[0] = b3;
                    guimanager.m_SpeciallyEffect.AddIconShow(false, guimanager.mStartV2, SpeciallyEffect_Kind.Item_Material, 0, recordByKey.EquipKey, true, 2f);
                }
                else
                {
                    guimanager.m_SpeciallyEffect.AddIconShow(false, guimanager.mStartV2, SpeciallyEffect_Kind.Item, 0, recordByKey.EquipKey, true, 2f);
                }
            }
            else if (recordByKey.PropertiesInfo[0].Propertieskey < 6)
            {
                guimanager.m_SpeciallyEffect.AddIconShow(false, guimanager.mStartV2, SpeciallyEffect_Kind.Item, 0, recordByKey.EquipKey, true, 2f);
            }
            else if (recordByKey.PropertiesInfo[0].Propertieskey == 6)
            {
                guimanager.m_SpeciallyEffect.mDiamondValue = (uint)(recordByKey.PropertiesInfo[1].Propertieskey * recordByKey.PropertiesInfo[1].PropertiesValue);
                guimanager.m_SpeciallyEffect.AddIconShow(false, guimanager.mStartV2, SpeciallyEffect_Kind.Diamond, 0, 0, true, 2f);
            }
            else
            {
                guimanager.m_SpeciallyEffect.AddIconShow(false, guimanager.mStartV2, SpeciallyEffect_Kind.AllianceMoney, 0, 0, true, 2f);
            }
            CString cstring = StringManager.Instance.StaticString1024();
            cstring.ClearString();
            cstring.Append(DataManager.Instance.mStringTable.GetStringByID(840u));
            if (num6 > 1)
            {
                cstring.StringToFormat(DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey.EquipName));
                cstring.IntToFormat((long)num6, 1, true);
                cstring.AppendFormat("{0} x {1}");
            }
            else
            {
                cstring.Append(DataManager.Instance.mStringTable.GetStringByID((uint)recordByKey.EquipName));
            }
            guimanager.AddHUDMessage(cstring.ToString(), 255, true);
            AudioManager.Instance.PlayUISFX(UIKind.ItemUse);
            GUIManager.Instance.UpdateUI(EGUIWindow.UI_Alliance_ActivityGift, 1, 0);
        }
        else if (b2 == 1)
        {
            DataManager         dataManager3        = DataManager.Instance;
            FastivalSpecialData fastivalSpecialData = default(FastivalSpecialData);
            bool flag2 = false;
            for (int j = 0; j < dataManager3.FastivalSpecialDataTable.TableCount; j++)
            {
                fastivalSpecialData = dataManager3.FastivalSpecialDataTable.GetRecordByIndex(j);
                if (fastivalSpecialData.GroupID == this.GroupID)
                {
                    if (fastivalSpecialData.StoreID == 0u)
                    {
                        flag2 = true;
                        break;
                    }
                }
            }
            if (!flag2)
            {
                return;
            }
            CString cstring2 = StringManager.Instance.StaticString1024();
            cstring2.StringToFormat(dataManager3.mStringTable.GetStringByID((uint)fastivalSpecialData.ItemName));
            cstring2.AppendFormat(dataManager3.mStringTable.GetStringByID(11206u));
            GUIManager.Instance.AddHUDMessage(cstring2.ToString(), 255, true);
        }
        else if (b2 == 4)
        {
            CString cstring3 = StringManager.Instance.StaticString1024();
            cstring3.Append(DataManager.Instance.mStringTable.GetStringByID(11227u));
            GUIManager.Instance.AddHUDMessage(cstring3.ToString(), 255, true);
        }
        else if (b2 == 6)
        {
            CString cstring4 = StringManager.Instance.StaticString1024();
            cstring4.Append(DataManager.Instance.mStringTable.GetStringByID(11226u));
            GUIManager.Instance.AddHUDMessage(cstring4.ToString(), 255, true);
        }
    }