private void QueueUpPieces(List <BasePiece> basePieces)
        {
            using (packetSender.Suppress <ConstructionAmountChanged>())
                using (packetSender.Suppress <ConstructionCompleted>())
                    using (packetSender.Suppress <PlaceBasePiece>())
                    {
                        foreach (BasePiece basePiece in basePieces)
                        {
                            buildEventQueue.EnqueueBasePiecePlaced(basePiece);

                            if (basePiece.ConstructionCompleted)
                            {
                                buildEventQueue.EnqueueConstructionCompleted(basePiece.Id, basePiece.BaseId);
                            }
                            else
                            {
                                buildEventQueue.EnqueueAmountChanged(basePiece.Id, basePiece.ConstructionAmount);
                            }
                        }
                    }
        }
Exemple #2
0
 public override void Process(ConstructionCompleted completedPacket)
 {
     Log.Debug("Processing ConstructionCompleted " + completedPacket.PieceId + " " + completedPacket.BaseId);
     buildEventQueue.EnqueueConstructionCompleted(completedPacket.PieceId, completedPacket.BaseId);
 }
 public override void Process(ConstructionCompleted completedPacket)
 {
     Log.Debug("Processing ConstructionCompleted " + completedPacket.Guid + " " + completedPacket.NewBaseCreatedGuid);
     buildEventQueue.EnqueueConstructionCompleted(completedPacket.Guid, completedPacket.NewBaseCreatedGuid);
 }
 public override void Process(ConstructionCompleted completedPacket)
 {
     buildEventQueue.EnqueueConstructionCompleted(completedPacket.PieceId, completedPacket.BaseId);
 }