public void Refresh(ListView <InBattleInputChat.InBatChatEntity> chatEntityList) { if (chatEntityList == null) { return; } int i = 0; int num = 0; while (num < chatEntityList.Count && i < InBattleInputChat.CHAT_LINE_COUNT) { InBattleInputChat.InBatChatEntity inBatChatEntity = chatEntityList[num]; if (inBatChatEntity != null) { if (inBatChatEntity.type != InBattleInputChat.InBatChatEntity.EType.ParseAllColor) { inBatChatEntity.Shade(this.lineBuilder); } if (!string.IsNullOrEmpty(inBatChatEntity.line1) && this.ShowTextInLine(i, inBatChatEntity.line1, inBatChatEntity.camp, inBatChatEntity.type, inBatChatEntity.ullUid)) { inBatChatEntity.bShow = true; if (this.m_cacheNode[i] != null) { this.m_cacheNode[i].CustomSetActive(true); } if (!inBatChatEntity.IsInCoolDown()) { inBatChatEntity.StartCooldown(0u); } i++; } if (!string.IsNullOrEmpty(inBatChatEntity.line2) && this.ShowTextInLine(i, inBatChatEntity.line2, inBatChatEntity.camp, inBatChatEntity.type, inBatChatEntity.ullUid)) { inBatChatEntity.bShow = true; if (this.m_cacheNode[i] != null) { this.m_cacheNode[i].CustomSetActive(true); } if (!inBatChatEntity.IsInCoolDown()) { inBatChatEntity.StartCooldown(0u); } i++; } } num++; } while (i < InBattleInputChat.CHAT_LINE_COUNT) { if (this.m_cacheNode[i] != null) { this.m_cacheNode[i].CustomSetActive(false); } i++; } }
public void Refresh(ListView <InBattleInputChat.InBatChatEntity> chatEntityList) { if (chatEntityList != null) { int index = 0; for (int i = 0; (i < chatEntityList.Count) && (index < InBattleInputChat.CHAT_LINE_COUNT); i++) { InBattleInputChat.InBatChatEntity entity = chatEntityList[i]; if (entity != null) { entity.Shade(this.lineBuilder); if (!string.IsNullOrEmpty(entity.line1) && this.ShowTextInLine(index, entity.line1, entity.camp, entity.type, entity.ullUid)) { entity.bShow = true; if (this.m_cacheNode[index] != null) { this.m_cacheNode[index].CustomSetActive(true); } if (!entity.IsInCoolDown()) { entity.StartCooldown(0); } index++; } if (!string.IsNullOrEmpty(entity.line2) && this.ShowTextInLine(index, entity.line2, entity.camp, entity.type, entity.ullUid)) { entity.bShow = true; if (this.m_cacheNode[index] != null) { this.m_cacheNode[index].CustomSetActive(true); } if (!entity.IsInCoolDown()) { entity.StartCooldown(0); } index++; } } } while (index < InBattleInputChat.CHAT_LINE_COUNT) { if (this.m_cacheNode[index] != null) { this.m_cacheNode[index].CustomSetActive(false); } index++; } } }