public void PushFront(QueueLogic _this, QueueCharacter queueC) { if (_this.mCharacters.Count == 0) { _this.StartTrigger(); } PlayerLog.WriteLog((int)LogType.QueueMessage, "PushFront queueC={1},character={0}", queueC.mDatas[0].Id, queueC.Guid); queueC.result = null; #if DEBUG foreach (var data in queueC.mDatas) { var t = QueueManager.GetMatchingCharacter(data.Id); if (t == null) { PlayerLog.WriteLog((ulong)LogType.QueueMessage, "PushFront t == null!! c = {0} ids = {1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); } } foreach (var queueCharacter in _this.mCharacters) { foreach (var datas in queueCharacter.mDatas) { foreach (var data in queueC.mDatas) { if (datas.Id == data.Id) { PlayerLog.WriteLog((ulong)LogType.QueueMessage, "PushFront datas.Id == data.Id!! c = {0} ids = {1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); } } } } #endif PlayerLog.WriteLog((int)LogType.QueueMessage, "PushFront mCharacters.Insert c={0}, ids={1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); _this.mCharacters.Insert(0, queueC); }
public void PushBack(QueueLogic _this, QueueCharacter queueC) { if (_this.mCharacters.Count == 0) { _this.StartTrigger(); } #if DEBUG foreach (var data in queueC.mDatas) { var t = QueueManager.GetMatchingCharacter(data.Id); if (t == null) { PlayerLog.WriteLog((ulong)LogType.QueueMessage, "PushBack t == null!! c = {0} ids = {1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); } } foreach (var queueCharacter in _this.mCharacters) { foreach (var datas in queueCharacter.mDatas) { foreach (var data in queueC.mDatas) { if (datas.Id == data.Id) { PlayerLog.WriteLog((ulong)LogType.QueueMessage, "PushBack datas.Id == data.Id!! c = {0} ids = {1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); } } } } #endif PlayerLog.WriteLog((int)LogType.QueueMessage, "PushBack mCharacters.Add c={0}, ids={1}", queueC.Guid, queueC.mDatas.Select(d => d.Id).GetDataString()); _this.mCharacters.Add(queueC); }