// Token: 0x06001416 RID: 5142 RVA: 0x0023460C File Offset: 0x0023280C public void RecvBlackMarket_Data(MessagePacket MP) { GUIManager.Instance.HideUILock(EUILock.BlackMarket); MP.ReadLong(-1); this.TradeLocks = MP.ReadByte(-1); this.TradeStatus = MP.ReadByte(-1); for (int i = 0; i < 4; i++) { this.MerchantmanData[i].itemID = MP.ReadUShort(-1); this.MerchantmanData[i].itemCount = MP.ReadUShort(-1); this.MerchantmanData[i].ResourceKind = MP.ReadByte(-1); this.MerchantmanData[i].ResourceCount = MP.ReadUInt(-1); this.MerchantmanData[i].Rare = MP.ReadByte(-1); } this.ExtraData = MP.ReadByte(-1); this.ExtraTreasureID = MallManager.Instance.TreasureIDTransToNew(MP.ReadUInt(-1)); if (this.ExtraData != 1) { this.ClearSendCheckBuy(); this.bNeedUpDateExtra = false; GUIManager.Instance.UpdateUI(EGUIWindow.UI_Merchantman, 1, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_OpenBox, 3, 0); GUIManager.Instance.BuildingData.UpdateBuildState(5, 255); } }
// Token: 0x06000110 RID: 272 RVA: 0x00012320 File Offset: 0x00010520 public void Recv_MSG_RESP_ALLIANCEWAR_MEMBER_DATA(MessagePacket MP) { this.m_AllianceWarHintData.bMain = false; this.m_AllianceWarHintData.Head = MP.ReadUShort(-1); for (int i = 0; i < 5; i++) { this.m_AllianceWarHintData.HeroData[i].ID = MP.ReadUShort(-1); this.m_AllianceWarHintData.HeroData[i].Rank = MP.ReadByte(-1); this.m_AllianceWarHintData.HeroData[i].Star = MP.ReadByte(-1); } if (this.m_AllianceWarHintData.HeroData[0].ID != 0) { this.m_AllianceWarHintData.bMain = (this.m_AllianceWarHintData.Head == this.m_AllianceWarHintData.HeroData[0].ID); } else { this.m_AllianceWarHintData.bMain = false; } for (int j = 0; j < 16; j++) { this.m_AllianceWarHintData.TroopData[j] = MP.ReadUInt(-1); } this.m_AllianceWarHintData.ArmyCoordIndex = MP.ReadByte(-1); this.m_AllianceWarHintData.ArmyCoordIndex = (byte)Mathf.Clamp((int)this.m_AllianceWarHintData.ArmyCoordIndex, 0, 5); GUIManager.Instance.UpdateUI(EGUIWindow.UI_AllianceWarRegister, 4, 0); }
// Token: 0x06001068 RID: 4200 RVA: 0x001D4894 File Offset: 0x001D2A94 public void RecvAmbushInfo(MessagePacket MP) { this.ClearAmbushData(); byte b = MP.ReadByte(-1); MP.ReadStringPlus(13, this.m_AmbushPlayerName, -1); this.m_AmbushPlayerCapitalPos.zoneID = MP.ReadUShort(-1); this.m_AmbushPlayerCapitalPos.pointID = MP.ReadByte(-1); this.m_AmbushPlayerHead = MP.ReadUShort(-1); for (int i = 0; i < this.m_HeroInfo.Length; i++) { this.m_HeroInfo[i].HeroID = MP.ReadUShort(-1); this.m_HeroInfo[i].Rank = MP.ReadByte(-1); this.m_HeroInfo[i].Star = MP.ReadByte(-1); } this.m_TroopFlag = MP.ReadUShort(-1); for (int j = 0; j < this.m_TroopData.Length; j++) { if ((this.m_TroopFlag >> j & 1) == 1) { this.m_TroopData[j] = MP.ReadUInt(-1); } } GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 0, 0); GUIManager.Instance.BuildingData.UpdateBuildState(5, 255); if (b == 0) { this.m_Str.ClearString(); this.m_Str.StringToFormat(this.m_AmbushPlayerName); this.m_Str.AppendFormat(this.DM.mStringTable.GetStringByID(9742u)); this.GM.AddHUDMessage(this.m_Str.ToString(), 29, true); } }
// Token: 0x060002F3 RID: 755 RVA: 0x00027E24 File Offset: 0x00026024 public void InitNpc(MessagePacket MP) { this.Kind = MP.ReadByte(-1); this.EventTime.BeginTime = MP.ReadLong(-1); this.EventTime.RequireTime = MP.ReadUInt(-1); this.AllyCapitalPoint.zoneID = MP.ReadUShort(-1); this.AllyCapitalPoint.pointID = MP.ReadByte(-1); this.AllyHead = MP.ReadUShort(-1); MP.ReadStringPlus(13, this.AllyName, -1); this.AllyNameID = this.AllyName.GetHashCode(false); this.AllyVIP = MP.ReadByte(-1); this.AllyRank = MP.ReadByte(-1); if (this.PositionInfo != 1) { this.AllyCurrTroop = MP.ReadUInt(-1); } this.AllyMAXTroop = MP.ReadUInt(-1); if (this.PositionInfo != 1) { this.AllyHomeKingdom = MP.ReadUShort(-1); } this.EnemyHead = 255; this.EnemyCapitalPoint.zoneID = MP.ReadUShort(-1); this.EnemyCapitalPoint.pointID = MP.ReadByte(-1); this.EnemyVIP = MP.ReadByte(-1); this.EnemyNPCID = MP.ReadUShort(-1); this.EnemyName.ClearString(); this.EnemyName.IntToFormat((long)this.EnemyVIP, 1, false); this.EnemyName.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(12021u)); }
// Token: 0x060012E2 RID: 4834 RVA: 0x0020EEE0 File Offset: 0x0020D0E0 public void Recv_MSG_RESP_FEDERAL_HISTORYKINGDATA(MessagePacket MP) { this.MobiWorldKingBoard.Clear(); if (MP.ReadByte(-1) == 0) { byte b = MP.ReadByte(-1); this.KingHead = MP.ReadUShort(-1); this.HistoryKingDataNum = MP.ReadByte(-1); for (int i = 0; i < (int)this.HistoryKingDataNum; i++) { HistoryWorldKingDataType historyWorldKingDataType = new HistoryWorldKingDataType(); historyWorldKingDataType.HomeKingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, historyWorldKingDataType.AllianceTag, -1); MP.ReadStringPlus(13, historyWorldKingDataType.Name, -1); historyWorldKingDataType.OccupyTime = MP.ReadUInt(-1); historyWorldKingDataType.TakeOfficeTime = MP.ReadLong(-1); this.MobiWorldKingBoard.Add(historyWorldKingDataType); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_NobilityBoard, 0, 0); } else { GUIManager.Instance.UpdateUI(EGUIWindow.UI_NobilityBoard, 0, 2); } }
// Token: 0x06000114 RID: 276 RVA: 0x00012688 File Offset: 0x00010888 public void Recv_MSG_RESP_ALLIANCEWAR_COMBAT_REPORT(MessagePacket MP) { GUIManager.Instance.HideUILock(EUILock.AllianceWar_Fs); this.mReportRandSeed = MP.ReadUShort(-1); this.mReportRandGap = MP.ReadByte(-1); this.mReportResult = MP.ReadByte(-1); for (int i = 0; i < 2; i++) { this.m_CombatPlayerData[i].Name = MP.ReadString(13, -1); this.m_CombatPlayerData[i].KingdomID = MP.ReadUShort(-1); this.m_CombatPlayerData[i].StrongholdLevel = MP.ReadByte(-1); this.m_CombatPlayerData[i].Level = MP.ReadByte(-1); this.m_CombatPlayerData[i].Head = MP.ReadUShort(-1); this.m_CombatPlayerData[i].VIPLevel = MP.ReadByte(-1); this.m_CombatPlayerData[i].AllianceRank = MP.ReadByte(-1); for (int j = 0; j < 5; j++) { this.m_CombatPlayerData[i].HeroInfo[j].ID = MP.ReadUShort(-1); this.m_CombatPlayerData[i].HeroInfo[j].Rank = MP.ReadByte(-1); this.m_CombatPlayerData[i].HeroInfo[j].Star = MP.ReadByte(-1); } if (this.m_CombatPlayerData[i].HeroInfo[0].ID != 0) { this.m_CombatPlayerData[i].bMain = (this.m_CombatPlayerData[i].Head == this.m_CombatPlayerData[i].HeroInfo[0].ID); } else { this.m_CombatPlayerData[i].bMain = false; } this.m_CombatPlayerData[i].LosePower = MP.ReadULong(-1); for (int k = 0; k < 16; k++) { this.m_CombatPlayerData[i].SurviveTroop[k] = MP.ReadUInt(-1); } for (int l = 0; l < 16; l++) { this.m_CombatPlayerData[i].DeadTroop[l] = MP.ReadUInt(-1); } for (int m = 0; m < 4; m++) { this.m_CombatPlayerData[i].AttackAttr[m] = MP.ReadUInt(-1); } for (int n = 0; n < 4; n++) { this.m_CombatPlayerData[i].DefenceAttr[n] = MP.ReadUInt(-1); } for (int num = 0; num < 4; num++) { this.m_CombatPlayerData[i].HealthAttr[num] = MP.ReadUInt(-1); } this.m_CombatPlayerData[i].ArmyCoordIndex = MP.ReadByte(-1); this.m_CombatPlayerData[i].ArmyCoordIndex = (byte)Mathf.Clamp((int)this.m_CombatPlayerData[i].ArmyCoordIndex, 0, 5); } Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; if (door != null) { door.OpenMenu(EGUIWindow.UI_Alliance_FS, 0, 0, false); } }
// Token: 0x060012A3 RID: 4771 RVA: 0x0020B368 File Offset: 0x00209568 public static void readPrisonerData(MessagePacket MP) { byte b = MP.ReadByte(-1); if (!GameConstants.IsBetween((int)b, 0, 30)) { return; } if (DataManager.Instance.PrisonerList[(int)b].AlliTag == null) { DataManager.Instance.PrisonerList[(int)b].AlliTag = StringManager.Instance.SpawnString(30); } if (DataManager.Instance.PrisonerList[(int)b].name == null) { DataManager.Instance.PrisonerList[(int)b].name = StringManager.Instance.SpawnString(30); } DataManager.Instance.PrisonerList[(int)b].AlliTag.ClearString(); DataManager.Instance.PrisonerList[(int)b].name.ClearString(); DataManager.Instance.PrisonerList[(int)b].KingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, DataManager.Instance.PrisonerList[(int)b].AlliTag, -1); MP.ReadStringPlus(13, DataManager.Instance.PrisonerList[(int)b].name, -1); DataManager.Instance.PrisonerList[(int)b].LordLevel = MP.ReadByte(-1); DataManager.Instance.PrisonerList[(int)b].head = MP.ReadUShort(-1); byte nowStat = MP.ReadByte(-1); DataManager.Instance.PrisonerList[(int)b].nowStat = (PrisonerState)nowStat; DataManager.Instance.PrisonerList[(int)b].StartActionTime = MP.ReadLong(-1); DataManager.Instance.PrisonerList[(int)b].TotalTime = MP.ReadUInt(-1); DataManager.Instance.PrisonerList[(int)b].Ransom = MP.ReadUInt(-1); MP.ReadUInt(-1); }
// Token: 0x060012D5 RID: 4821 RVA: 0x0020D7C4 File Offset: 0x0020B9C4 public void Recv_MSG_RESP_LEADERBOARDS_CLIENT(MessagePacket MP) { this.TopBoard.SortTime = MP.ReadLong(-1); MP.ReadStringPlus(3, this.TopBoard.PowerTop.AlliaceTag, -1); MP.ReadStringPlus(13, this.TopBoard.PowerTop.Name, -1); this.TopBoard.PowerTop.Value = MP.ReadULong(-1); this.TopBoard.PowerTopHead = MP.ReadUShort(-1); MP.ReadStringPlus(3, this.TopBoard.KillsTop.AlliaceTag, -1); MP.ReadStringPlus(13, this.TopBoard.KillsTop.Name, -1); this.TopBoard.KillsTop.Value = MP.ReadULong(-1); this.TopBoard.KillTopHead = MP.ReadUShort(-1); MP.ReadStringPlus(3, this.TopBoard.AlliPowerTop.AlliaceTag, -1); MP.ReadStringPlus(20, this.TopBoard.AlliPowerTop.Name, -1); this.TopBoard.AlliPowerTop.Value = MP.ReadULong(-1); MP.ReadUInt(-1); this.TopBoard.PowerTopEmblem = MP.ReadUShort(-1); MP.ReadStringPlus(3, this.TopBoard.AlliKillsTop.AlliaceTag, -1); MP.ReadStringPlus(20, this.TopBoard.AlliKillsTop.Name, -1); this.TopBoard.AlliKillsTop.Value = MP.ReadULong(-1); MP.ReadUInt(-1); this.TopBoard.KillsTopEmblem = MP.ReadUShort(-1); MP.ReadStringPlus(3, this.TopBoard.ArenaTop.AlliaceTag, -1); MP.ReadStringPlus(13, this.TopBoard.ArenaTop.Name, -1); this.TopBoard.ArenaTop.Value = MP.ReadULong(-1); this.TopBoard.ArenaTopHead = MP.ReadUShort(-1); GUIManager.Instance.UpdateUI(EGUIWindow.UI_LeaderBoard, 2, 0); }
// Token: 0x060002EF RID: 751 RVA: 0x00027AC8 File Offset: 0x00025CC8 public void Init(MessagePacket MP) { this.Kind = MP.ReadByte(-1); this.EventTime.BeginTime = MP.ReadLong(-1); this.EventTime.RequireTime = MP.ReadUInt(-1); this.AllyCapitalPoint.zoneID = MP.ReadUShort(-1); this.AllyCapitalPoint.pointID = MP.ReadByte(-1); this.AllyHead = MP.ReadUShort(-1); MP.ReadStringPlus(13, this.AllyName, -1); this.AllyNameID = this.AllyName.GetHashCode(false); this.AllyVIP = MP.ReadByte(-1); this.AllyRank = MP.ReadByte(-1); if (this.PositionInfo != 1) { this.AllyCurrTroop = MP.ReadUInt(-1); } this.AllyMAXTroop = MP.ReadUInt(-1); this.EnemyCapitalPoint.zoneID = MP.ReadUShort(-1); this.EnemyCapitalPoint.pointID = MP.ReadByte(-1); this.EnemyHead = MP.ReadUShort(-1); MP.ReadStringPlus(13, this.EnemyName, -1); this.EnemyVIP = MP.ReadByte(-1); this.EnemyRank = MP.ReadByte(-1); MP.ReadStringPlus(3, this.EnemyAllianceTag, -1); this.EnemyHomeKingdom = MP.ReadUShort(-1); this.WonderID = byte.MaxValue; this.UIWonderID = byte.MaxValue; this.AddCombatPower = 0u; }
// Token: 0x060008C9 RID: 2249 RVA: 0x000B4EDC File Offset: 0x000B30DC public static void RecvInitBattleEx(MessagePacket MP) { DataManager instance = DataManager.Instance; GUIManager.Instance.HideUILock(EUILock.Battle); BATTLEINIT_RESULT battleinit_RESULT = (BATTLEINIT_RESULT)MP.ReadByte(-1); if (battleinit_RESULT == BATTLEINIT_RESULT.BATTLEINIT_RESULT_SUCCESS) { instance.BattleSeqID = MP.ReadULong(-1); byte b = MP.ReadByte(-1); ushort num = MP.ReadUShort(-1); byte b2 = MP.ReadByte(-1); ushort randomSeed = MP.ReadUShort(-1); byte randomGap = MP.ReadByte(-1); for (int i = 0; i < 5; i++) { instance.heroBattleData[i].HeroID = MP.ReadUShort(-1); } for (int j = 0; j < 5; j++) { instance.heroBattleData[j].AttrData.SkillLV1 = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.SkillLV2 = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.SkillLV3 = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.SkillLV4 = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.LV = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.Star = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.Enhance = MP.ReadByte(-1); instance.heroBattleData[j].AttrData.Equip = MP.ReadByte(-1); } instance.battleInfo.RandomSeed = randomSeed; instance.battleInfo.RandomGap = (ushort)randomGap; instance.battleInfo.BattleType = 6; BattleNetwork.SendBattleEndStatus = 0; GameManager.OnRefresh(NetworkNews.Refresh, null); if (!BattleNetwork.bReplay) { GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 0, 0); } else { BattleNetwork.bReplay = false; GUIManager.Instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.BattleReplay); AudioManager.Instance.LoadAndPlayBGM(BGMType.War, 1, false); } } else if (!BattleNetwork.bReplay) { GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 1, 0); uint id = (uint)((byte)660 + battleinit_RESULT); GUIManager.Instance.AddHUDMessage(instance.mStringTable.GetStringByID(id), 2, true); } else { BattleNetwork.bReplay = false; uint id2 = (uint)((byte)660 + battleinit_RESULT); GUIManager.Instance.AddHUDMessage(instance.mStringTable.GetStringByID(id2), 2, true); } }
// Token: 0x060024C3 RID: 9411 RVA: 0x00423B08 File Offset: 0x00421D08 public void RecvKingGiftRecived(MessagePacket MP) { ushort itemID = MP.ReadUShort(-1); ushort quantity = MP.ReadUShort(-1); DataManager.Instance.SetCurItemQuantity(itemID, quantity, 0, 0L); this.SetGiftList(itemID, DataManager.Instance.RoleAttr.Name, 0L); GameManager.OnRefresh(NetworkNews.Refresh_Item, null); GUIManager.Instance.UpdateUI(EGUIWindow.UI_BagFilter, 9, 1); }
// Token: 0x060002F0 RID: 752 RVA: 0x00027C2C File Offset: 0x00025E2C public void InitWonder(MessagePacket MP) { this.AllyCapitalPoint.zoneID = MP.ReadUShort(-1); this.AllyCapitalPoint.pointID = MP.ReadByte(-1); this.AllyHead = MP.ReadUShort(-1); MP.ReadStringPlus(13, this.AllyName, -1); this.AllyNameID = this.AllyName.GetHashCode(false); this.AllyMAXTroop = MP.ReadUInt(-1); this.WonderID = MP.ReadByte(-1); this.UIWonderID = this.WonderID; }
// Token: 0x0600020D RID: 525 RVA: 0x0001C838 File Offset: 0x0001AA38 public void RecvBookMarkModify(MessagePacket MP) { GUIManager.Instance.HideUILock(EUILock.BookMark); if (MP.ReadUShort(-1) == 0) { return; } this.UpdateTime = MP.ReadLong(-1); ushort num = MP.ReadUShort(-1); if (num == 0 || (int)num > this.AllData.Length) { return; } BookMarkData[] allData = this.AllData; int num2 = (int)(num - 1); ushort num3 = num; num = num3 - 1; allData[num2].ID = num3; byte b = MP.ReadByte(-1); if (b > 2) { b = 0; } if (b != this.AllData[(int)num].Type) { this.RemoveDataIndex(num, BookMark.eBookType.Role); this.AllData[(int)num].Type = b; this.InsertDataIndex(num); } MP.ReadStringPlus((int)this.NameSize, this.AllData[(int)num].Name, -1); DataManager.Instance.RoleAttr.BookmarkTime = this.UpdateTime; if (this.OverWriteID == 0) { if (GUIManager.Instance.FindMenu(EGUIWindow.UI_BookMark) == null) { Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door; door.OpenMenu(EGUIWindow.UI_BookMark, 589824 | (int)(this.AllData[(int)num].Type + 1), this.GetMapID(this.AllData[(int)num].ID, BookMark.eBookType.Role), false); } else { GUIManager.Instance.UpdateUI(EGUIWindow.UI_BookMark, 589824 | (int)(this.AllData[(int)num].Type + 1), this.GetMapID(this.AllData[(int)num].ID, BookMark.eBookType.Role)); } GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(787u), 255, true); } else { GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(12629u), 255, true); } this.OverWriteID = 0; }
// Token: 0x0600128D RID: 4749 RVA: 0x0020A15C File Offset: 0x0020835C public static void MSG_RESP_UPDATE_CAPTIVE(MessagePacket MP) { switch (MP.ReadByte(-1)) { case 0: DataManager.Instance.beCaptured.head = MP.ReadUShort(-1); break; case 1: DataManager.Instance.beCaptured.AlliTag.ClearString(); MP.ReadStringPlus(3, DataManager.Instance.beCaptured.AlliTag, -1); break; case 2: DataManager.Instance.beCaptured.name.ClearString(); MP.ReadStringPlus(13, DataManager.Instance.beCaptured.name, -1); break; case 3: { PointCode pointCode = default(PointCode); pointCode.zoneID = MP.ReadUShort(-1); pointCode.pointID = MP.ReadByte(-1); DataManager.Instance.beCaptured.MapID = GameConstants.PointCodeToMapID(pointCode.zoneID, pointCode.pointID); break; } case 4: DataManager.Instance.beCaptured.prisonerStat = (PrisonerState)MP.ReadByte(-1); DataManager.Instance.beCaptured.StartActionTime = MP.ReadLong(-1); DataManager.Instance.beCaptured.TotalTime = MP.ReadUInt(-1); break; case 5: DataManager.Instance.beCaptured.Ransom = MP.ReadUInt(-1); break; case 6: { PointCode pointCode2 = default(PointCode); pointCode2.zoneID = MP.ReadUShort(-1); pointCode2.pointID = MP.ReadByte(-1); DataManager.Instance.beCaptured.MapID = GameConstants.PointCodeToMapID(pointCode2.zoneID, pointCode2.pointID); DataManager.Instance.beCaptured.KingdomID = MP.ReadUShort(-1); DataManager.Instance.beCaptured.HomeKingdomID = MP.ReadUShort(-1); break; } } GUIManager.Instance.UpdateUI(EGUIWindow.UI_LordInfo, 0, 0); }
// Token: 0x06001069 RID: 4201 RVA: 0x001D4A18 File Offset: 0x001D2C18 public void RecvAmbushUpdate(MessagePacket MP) { byte b = MP.ReadByte(-1); switch (b) { case 0: case 1: if (b == 0) { this.m_Str.ClearString(); this.m_Str.StringToFormat(this.m_AmbushPlayerName); this.m_Str.AppendFormat(this.DM.mStringTable.GetStringByID(9738u)); this.GM.AddHUDMessage(this.m_Str.ToString(), 29, true); } this.ClearAmbushData(); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 1, 0); break; case 2: this.m_TroopFlag = MP.ReadUShort(-1); Array.Clear(this.m_TroopData, 0, this.m_TroopData.Length); for (int i = 0; i < this.m_TroopData.Length; i++) { if ((this.m_TroopFlag >> i & 1) == 1) { this.m_TroopData[i] = MP.ReadUInt(-1); } } GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 0, 0); break; case 3: this.m_AmbushPlayerCapitalPos.zoneID = MP.ReadUShort(-1); this.m_AmbushPlayerCapitalPos.pointID = MP.ReadByte(-1); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 0, 0); break; case 4: this.m_AmbushPlayerHead = MP.ReadUShort(-1); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 2, 0); break; case 5: MP.ReadStringPlus(13, this.m_AmbushPlayerName, -1); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Ambush, 3, 0); break; } GUIManager.Instance.BuildingData.UpdateBuildState(5, 255); }
// Token: 0x06001826 RID: 6182 RVA: 0x0028C15C File Offset: 0x0028A35C public void RecvShieldLogList(MessagePacket MP) { byte b = MP.ReadByte(-1); for (int i = 0; i < 10; i++) { this.m_ShieldLogData[i].Clear(); if (i < (int)b) { this.m_ShieldLogData[i].ItemID = MP.ReadUShort(-1); this.m_ShieldLogData[i].BeginTime = MP.ReadLong(-1); this.m_ShieldLogData[i].EndTime = MP.ReadLong(-1); this.m_ShieldLogData[i].CheckActive(); this.m_ShieldLogData[i].SetEmpty(false); } else { this.m_ShieldLogData[i].ItemID = 0; this.m_ShieldLogData[i].BeginTime = 0L; this.m_ShieldLogData[i].EndTime = 0L; this.m_ShieldLogData[i].SetEmpty(true); } } if (b > 0) { this.m_DataState = ShieldLogManager.eDataState.Ready; GUIManager.Instance.UpdateUI(EGUIWindow.UI_ShieldLog, (int)this.m_DataState, 0); } else { this.m_DataState = ShieldLogManager.eDataState.Empty; GUIManager.Instance.UpdateUI(EGUIWindow.UI_ShieldLog, (int)this.m_DataState, 0); } }
// Token: 0x060012D7 RID: 4823 RVA: 0x0020DE64 File Offset: 0x0020C064 public void Recv_MSG_RESP_ARENA_BOARDDATA(MessagePacket MP) { ArenaManager.Instance.m_ArenaTargetHint.AllianceTagTag = MP.ReadString(3, -1); ArenaManager.Instance.m_ArenaTargetHint.Name = MP.ReadString(13, -1); ArenaManager.Instance.m_ArenaTargetHint.Place = (uint)((byte)MP.ReadULong(-1)); ArenaManager.Instance.m_ArenaTargetHint.HeroData = new ArenaTargetHeroDataType[5]; ArenaManager instance = ArenaManager.Instance; instance.m_ArenaTargetHint.Place = instance.m_ArenaTargetHint.Place + 1u; for (int i = 0; i < 5; i++) { ArenaManager.Instance.m_ArenaTargetHint.HeroData[i].ID = MP.ReadUShort(-1); ArenaManager.Instance.m_ArenaTargetHint.HeroData[i].Level = MP.ReadByte(-1); ArenaManager.Instance.m_ArenaTargetHint.HeroData[i].Rank = MP.ReadByte(-1); ArenaManager.Instance.m_ArenaTargetHint.HeroData[i].Star = MP.ReadByte(-1); ArenaManager.Instance.m_ArenaTargetHint.HeroData[i].Equip = MP.ReadByte(-1); MP.ReadInt(-1); } ArenaManager.Instance.m_ArenaTargetHint.Head = ArenaManager.Instance.m_ArenaTargetHint.HeroData[0].ID; Transform parent = this.hintTarget.transform.parent; this.hintTarget.transform.SetParent(this.hintCenter); Vector2 anchoredPosition = this.hintTarget.GetComponent <RectTransform>().anchoredPosition; this.hintTarget.transform.SetParent(parent); this.hintTarget.transform.SetSiblingIndex(11); float num = anchoredPosition.y + 410f; num = Mathf.Clamp(num, -190f, 150f); GUIManager.Instance.m_Arena_Hint.Show(this.hintTarget, -40f, num, 0); }
// Token: 0x06001291 RID: 4753 RVA: 0x0020A4B8 File Offset: 0x002086B8 public static void MSG_RESP_LORD_BEINGRELEASED(MessagePacket MP) { PointCode pointCode = default(PointCode); pointCode.zoneID = MP.ReadUShort(-1); pointCode.pointID = MP.ReadByte(-1); DataManager.Instance.beCaptured.nowCaptureStat = LoadCaptureState.Returning; DataManager.Instance.beCaptured.MapID = GameConstants.PointCodeToMapID(pointCode.zoneID, pointCode.pointID); DataManager.Instance.beCaptured.StartActionTime = MP.ReadLong(-1); DataManager.Instance.beCaptured.TotalTime = MP.ReadUInt(-1); byte b = MP.ReadByte(-1); DataManager.Instance.SetQueueBarData(EQueueBarIndex.LordReturn, true, DataManager.Instance.beCaptured.StartActionTime, DataManager.Instance.beCaptured.TotalTime); DataManager.Instance.SetRecvQueueBarData(30); DataManager.Instance.CheckTroolCount(); GUIManager.Instance.UpdateUI(EGUIWindow.UI_ArmyInfo, 0, 0); ushort leaderID = DataManager.Instance.GetLeaderID(); if (leaderID != 0) { DataManager.Instance.TempFightHeroID[(int)leaderID] = 1; DataManager.Instance.SetFightHeroData(); GameManager.OnRefresh(NetworkNews.Refresh_Hero, null); GUIManager.Instance.UpdateUI(EGUIWindow.UI_HeroList_Soldier2, 0, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 2, 0); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_LordInfo, 0, 0); GUIManager.Instance.UpdateUI(EGUIWindow.Door, 18, 0); DataManager.Instance.AttribVal.UpdateAttrVal(UpdateAttrKind.Hero); DataManager.Instance.AttribVal.UpdateLordEquipData(); GUIManager.Instance.CloseMenu(EGUIWindow.UI_SuicideBox); }
// Token: 0x060012E3 RID: 4835 RVA: 0x0020EFC0 File Offset: 0x0020D1C0 public void Recv_MSG_RESP_KINGOFTHEWORLD_RANKDATA(MessagePacket MP) { this.KingofWorldTime = DataManager.Instance.ServerTime + 21600L; this.KingofWorldHead = MP.ReadUShort(-1); this.KingofWorldBoard.Clear(); for (int i = 0; i < 10; i++) { KingofWorldBoardUnit kingofWorldBoardUnit = new KingofWorldBoardUnit(); kingofWorldBoardUnit.HomeKingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, kingofWorldBoardUnit.AllianceTag, -1); MP.ReadStringPlus(13, kingofWorldBoardUnit.Name, -1); kingofWorldBoardUnit.OccupyTime = MP.ReadUInt(-1); this.KingofWorldBoard.Add(kingofWorldBoardUnit); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_LeaderBoard, 10, 0); }
// Token: 0x060002F7 RID: 759 RVA: 0x000280AC File Offset: 0x000262AC public void Init(MessagePacket MP) { MP.ReadStringPlus(13, this.AllyName, -1); this.AllyNameID = this.AllyName.GetHashCode(false); this.AllyVIP = MP.ReadByte(-1); this.AllyRank = MP.ReadByte(-1); this.MarchTime.BeginTime = MP.ReadLong(-1); this.MarchTime.RequireTime = MP.ReadUInt(-1); this.TroopFlag = MP.ReadUShort(-1); this.TroopSize = 0; this.TotalTroopNum = 0u; for (int i = 0; i < 16; i++) { if ((this.TroopFlag >> i & 1) == 1) { this.TroopData[i >> 2][i & 3] = MP.ReadUInt(-1); this.TotalTroopNum += this.TroopData[i >> 2][i & 3]; this.TroopSize += 1; } else { this.TroopData[i >> 2][i & 3] = 0u; } } }
// Token: 0x060008DE RID: 2270 RVA: 0x000B6004 File Offset: 0x000B4204 public void Recv_MSG_GAMBLE_HISTORY(MessagePacket MP) { if (this.m_GamebleJackpots == null) { return; } this.m_GamebleJackpots.Clear(); GamblingManager.GamebleJackpot[] array = new GamblingManager.GamebleJackpot[3]; for (int i = 0; i < 3; i++) { array[i] = new GamblingManager.GamebleJackpot(); array[i].KingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, array[i].Tag, -1); MP.ReadStringPlus(13, array[i].Name, -1); array[i].PrizeWins = MP.ReadUInt(-1); array[i].GameType = (UIBattle_Gambling.eMode)MP.ReadByte(-1); array[i].WonTime = MP.ReadLong(-1); } int num = 2; while (num >= 0 && num < array.Length) { if (array[num].PrizeWins != 0u) { this.AddJackpotData(array[num]); } num--; } GUIManager.Instance.UpdateUI(EGUIWindow.UI_Battle_Gambling, 0, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Battle_Gambling, 2, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_MonsterCrypt, 0, 0); }
// Token: 0x060002F2 RID: 754 RVA: 0x00027D7C File Offset: 0x00025F7C public void InitWonderDefence(MessagePacket MP) { this.WonderID = MP.ReadByte(-1); this.UIWonderID = this.WonderID; if (this.PositionInfo != 1) { this.AllyCurrTroop = MP.ReadUInt(-1); } this.AllyMAXTroop = MP.ReadUInt(-1); this.EnemyCapitalPoint.zoneID = MP.ReadUShort(-1); this.EnemyCapitalPoint.pointID = MP.ReadByte(-1); this.EnemyHead = MP.ReadUShort(-1); MP.ReadStringPlus(13, this.EnemyName, -1); MP.ReadStringPlus(3, this.EnemyAllianceTag, -1); this.EnemyHomeKingdom = MP.ReadUShort(-1); }
// Token: 0x06001073 RID: 4211 RVA: 0x001D56E8 File Offset: 0x001D38E8 public void RecvAmbushReturn(MessagePacket MP) { byte b = MP.ReadByte(-1); byte b2 = MP.ReadByte(-1); if (b2 >= 8) { return; } this.DM.MarchEventData[(int)b2].Point.zoneID = MP.ReadUShort(-1); this.DM.MarchEventData[(int)b2].Point.pointID = MP.ReadByte(-1); this.DM.MarchEventTime[(int)b2].BeginTime = MP.ReadLong(-1); this.DM.MarchEventTime[(int)b2].RequireTime = MP.ReadUInt(-1); this.DM.MarchEventData[(int)b2].PointKind = POINT_KIND.PK_CITY; this.DM.MarchEventData[(int)b2].bRallyHost = 1; this.DM.SetQueueBarData(EQueueBarIndex.MarchingBegin + (int)b2, true, this.DM.MarchEventTime[(int)b2].BeginTime, this.DM.MarchEventTime[(int)b2].RequireTime); switch (b) { case 0: this.DM.MarchEventData[(int)b2].Type = EMarchEventType.EMET_CampReturn; break; case 1: this.DM.MarchEventData[(int)b2].Type = EMarchEventType.EMET_CampReturn; GUIManager.Instance.AddHUDMessage(this.DM.mStringTable.GetStringByID(9730u), 14, true); break; case 2: this.DM.MarchEventData[(int)b2].Type = EMarchEventType.EMET_CampRetreat; break; } GUIManager.Instance.HideUILock(EUILock.Ambush); GUIManager.Instance.UpdateUI(EGUIWindow.UI_ArmyInfo, 0, 0); }
// Token: 0x060024C2 RID: 9410 RVA: 0x00423A20 File Offset: 0x00421C20 public void RecvKingGift(MessagePacket MP) { CString cstring = StringManager.Instance.StaticString1024(); GUIManager.Instance.HideUILock(EUILock.KingGift); byte b = MP.ReadByte(-1); if (b == 0) { ushort itemID = MP.ReadUShort(-1); long userID = MP.ReadLong(-1); MP.ReadStringPlus(13, cstring, -1); this.SetGiftList(itemID, cstring, userID); GUIManager.Instance.UpdateUI(EGUIWindow.UI_Alliance_List, 3, 0); } else { byte b2 = b; if (b2 != 1) { if (b2 == 6) { GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(744u), 255, true); } } else { GUIManager.Instance.AddHUDMessage(DataManager.Instance.mStringTable.GetStringByID(9718u), 255, true); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_Alliance_List, 4, 0); } }
// Token: 0x06000206 RID: 518 RVA: 0x0001BC5C File Offset: 0x00019E5C public void RecvBookMarkInfo(MessagePacket MP) { DataManager instance = DataManager.Instance; this.RecvDataCount = MP.ReadUShort(-1); ushort num = MP.ReadUShort(-1); this.UpdateTime = MP.ReadLong(-1); instance.RoleAttr.BookmarkNum = this.RecvDataCount; if (this.AllData == null) { this.AllData = new BookMarkData[100]; for (int i = 0; i < this.KindDataIDIndex.Length; i++) { this.KindDataIDIndex[i] = new byte[100]; } for (byte b = 0; b < 100; b += 1) { this.AllData[(int)b] = new BookMarkData((ushort)this.NameSize); } this.MessageStr = new CString(200); } else { byte b2 = 0; while ((ushort)b2 < num) { if (this.AllData.Length <= (int)b2) { break; } this.AllData[(int)b2].Clear(); b2 += 1; } for (int j = 0; j < this.KindDataIDIndex.Length; j++) { Array.Clear(this.KindDataIDIndex[j], 0, this.KindDataIDIndex[j].Length); } Array.Clear(this.KindDataCount, 0, this.KindDataCount.Length); } instance.RoleAttr.BookmarkLimit = num; instance.RoleAttr.BookmarkTime = this.UpdateTime; if (instance.RoleAttr.BookmarkNum == 0) { GUIManager.Instance.HideUILock(EUILock.BookMark); } }
// Token: 0x0600128C RID: 4748 RVA: 0x00209F04 File Offset: 0x00208104 public static void MSG_RESP_LORD_BEINGCAPTIVE(MessagePacket MP) { if (DataManager.Instance.beCaptured.AlliTag == null) { DataManager.Instance.beCaptured.AlliTag = StringManager.Instance.SpawnString(30); } if (DataManager.Instance.beCaptured.name == null) { DataManager.Instance.beCaptured.name = StringManager.Instance.SpawnString(30); } DataManager.Instance.beCaptured.AlliTag.ClearString(); DataManager.Instance.beCaptured.name.ClearString(); DataManager.Instance.beCaptured.KingdomID = MP.ReadUShort(-1); DataManager.Instance.beCaptured.head = MP.ReadUShort(-1); MP.ReadStringPlus(3, DataManager.Instance.beCaptured.AlliTag, -1); MP.ReadStringPlus(13, DataManager.Instance.beCaptured.name, -1); PointCode pointCode = default(PointCode); pointCode.zoneID = MP.ReadUShort(-1); pointCode.pointID = MP.ReadByte(-1); DataManager.Instance.beCaptured.MapID = GameConstants.PointCodeToMapID(pointCode.zoneID, pointCode.pointID); byte prisonerStat = MP.ReadByte(-1); DataManager.Instance.beCaptured.prisonerStat = (PrisonerState)prisonerStat; DataManager.Instance.beCaptured.nowCaptureStat = LoadCaptureState.Captured; DataManager.Instance.beCaptured.StartActionTime = MP.ReadLong(-1); DataManager.Instance.beCaptured.TotalTime = MP.ReadUInt(-1); DataManager.Instance.beCaptured.Ransom = MP.ReadUInt(-1); DataManager.Instance.beCaptured.Bounty = MP.ReadUInt(-1); byte b = MP.ReadByte(-1); DataManager.Instance.beCaptured.HomeKingdomID = MP.ReadUShort(-1); ushort leaderID = DataManager.Instance.GetLeaderID(); if (leaderID != 0) { DataManager.Instance.TempFightHeroID[(int)leaderID] = 1; DataManager.Instance.SetFightHeroData(); GameManager.OnRefresh(NetworkNews.Refresh_Hero, null); GUIManager.Instance.UpdateUI(EGUIWindow.UI_HeroList_Soldier2, 1, 0); GUIManager.Instance.UpdateUI(EGUIWindow.UI_BattleHeroSelect, 3, 0); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_LordInfo, 0, 0); GUIManager.Instance.UpdateUI(EGUIWindow.Door, 18, 0); DataManager.Instance.AttribVal.UpdateAttrVal(UpdateAttrKind.Hero); DataManager.Instance.AttribVal.UpdateLordEquipData(); }
// Token: 0x060012E4 RID: 4836 RVA: 0x0020F068 File Offset: 0x0020D268 public void Recv_MSG_RESP_Nobile_RANKDATA(MessagePacket MP) { this.NobileWonderId = (ushort)MP.ReadByte(-1); this.NobileTime = DataManager.Instance.ServerTime + 21600L; this.NobileHead = MP.ReadUShort(-1); this.NobileBoard.Clear(); for (int i = 0; i < 10; i++) { KingofWorldBoardUnit kingofWorldBoardUnit = new KingofWorldBoardUnit(); kingofWorldBoardUnit.HomeKingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, kingofWorldBoardUnit.AllianceTag, -1); MP.ReadStringPlus(13, kingofWorldBoardUnit.Name, -1); kingofWorldBoardUnit.OccupyTime = MP.ReadUInt(-1); this.NobileBoard.Add(kingofWorldBoardUnit); } GUIManager.Instance.UpdateUI(EGUIWindow.UI_NobilityOccupyBoard, (int)this.NobileWonderId, 0); }
// Token: 0x060012E9 RID: 4841 RVA: 0x0020F850 File Offset: 0x0020DA50 public void Recv_MSG_RESP_ALLIANCEMOBILIZATION_LEGENDRANK(MessagePacket MP) { byte b = MP.ReadByte(-1); if (b == 0) { ushort mobilizationAlliWorldRank = MP.ReadUShort(-1); ushort mobilizationAlliWorldLastRank = MP.ReadUShort(-1); byte b2 = MP.ReadByte(-1); ushort num = MP.ReadUShort(-1); if ((b2 & 1) > 0) { this.ClearMobiAlliWorldBoard(); this.MobilizationAlliWorldRank = 0; this.MobilizationAlliWorldLastRank = 0; this.MobiAlliWorldAllianceID = DataManager.Instance.RoleAlliance.Id; } this.MobilizationAlliWorldRank = (int)mobilizationAlliWorldRank; this.MobilizationAlliWorldLastRank = (int)mobilizationAlliWorldLastRank; for (int i = 0; i < (int)num; i++) { MobilizationAlliWorldBroudUnit mobilizationAlliWorldBroudUnit = new MobilizationAlliWorldBroudUnit(); mobilizationAlliWorldBroudUnit.AlliacneID = MP.ReadUInt(-1); mobilizationAlliWorldBroudUnit.State = MP.ReadByte(-1); mobilizationAlliWorldBroudUnit.ChangeRank = MP.ReadByte(-1); mobilizationAlliWorldBroudUnit.KingdomID = MP.ReadUShort(-1); MP.ReadStringPlus(3, mobilizationAlliWorldBroudUnit.AllianceTag, -1); MP.ReadStringPlus(20, mobilizationAlliWorldBroudUnit.Name, -1); mobilizationAlliWorldBroudUnit.Score = MP.ReadUInt(-1); this.MobilizationAlliWorldBoard.Add(mobilizationAlliWorldBroudUnit); } if (b2 >= 2) { this.MobilizationAlliWorldBoardTime = ActivityManager.Instance.ServerEventTime + 43200L; GUIManager.Instance.UpdateUI(EGUIWindow.UI_AlliMobi_WorldBoard, 0, 0); } } else if (b == 2) { GUIManager.Instance.UpdateUI(EGUIWindow.UI_AlliMobi_WorldBoard, 2, 0); } else { GUIManager.Instance.UpdateUI(EGUIWindow.UI_AlliMobi_WorldBoard, 5, 0); } }
// Token: 0x0600181E RID: 6174 RVA: 0x0028BEB0 File Offset: 0x0028A0B0 public void Recv_MSG_RESP_FOOTBALL_PREPUSH_INFO(MessagePacket MP) { this.FootBallGameType = MP.ReadByte(-1); this.FootBallGameType -= 1; this.FootBallEventBeginTime = MP.ReadLong(-1); this.FootBallWaveCount = MP.ReadByte(-1); this.FootBallWaveGap = (int)MP.ReadUShort(-1); this.FootBallWaveGap *= 60; }
// Token: 0x060008CB RID: 2251 RVA: 0x000B51F4 File Offset: 0x000B33F4 public static void RecvBattleEndEx(MessagePacket MP) { GUIManager.Instance.HideUILock(EUILock.Battle); DataManager instance = DataManager.Instance; byte b = MP.ReadByte(-1); instance.BattleFailureIndex = MP.ReadByte(-1); instance.lastBattleResult = (short)b; instance.BattleSeqID = 0UL; BattleNetwork.SendBattleEndStatus = 0; if (b != 0) { instance.RWMoney = 0u; instance.KingOldLv = instance.RoleAttr.Level; instance.KingOldExp = instance.RoleAttr.Exp; byte b2 = MP.ReadByte(-1); ushort num = MP.ReadUShort(-1); byte b3 = MP.ReadByte(-1); ushort num2 = MP.ReadUShort(-1); if (b2 == 1) { DataManager.StageDataController.UpdateStageRecord(StageMode.Dare, num); } else if (b2 == 2) { DataManager.StageDataController.SetStagePoint(BattleNetwork.battlePointID, b3, 1); } if (num2 > 0) { DataManager instance2 = DataManager.Instance; instance2.RoleAttr.Diamond = instance2.RoleAttr.Diamond + (uint)num2; GUIManager.Instance.SetChallegeRewardUI((int)num2, num, b3); } GameManager.OnRefresh(NetworkNews.Refresh, null); GameManager.OnRefresh(NetworkNews.Refresh_Item, null); if (instance.KingOldLv != instance.RoleAttr.Level) { GameManager.OnRefresh(NetworkNews.Refresh_Attr, null); } DataManager.msgBuffer[0] = 32; DataManager.msgBuffer[1] = 2; GameManager.notifyObservers(1, 0, DataManager.msgBuffer); } }