private void OnCS_PvE_EnterDungeon_Req(SecurePacketRequest reqPacket)
{
Int32 dungeonId = reqPacket.GetInt32();
SecurePacketResponse resPacket = new SecurePacketResponse(reqPacket);
try
{
EnterDungeon(dungeonId);
resPacket.ResultCodeNo = ResultCode.Ok;
Int32 roundCount = 0, idxRoundCount = resPacket.PutInt32(0);
foreach (var playingRound in PlayingRounds)
{
resPacket.PutInt32(playingRound.Round.RoundId);
resPacket.PutStringAsUtf16(playingRound.Round.Name);
resPacket.PutBoolean(playingRound.Round.IsBossRound);
Int32 monsterCount = 0, idxMonsterCount = resPacket.PutInt32(0);
foreach (var monster in playingRound.Monsters)
{
resPacket.PutInt32(monster.MonsterNo);
resPacket.PutInt32(monster.MonsterId);
resPacket.PutStringAsUtf16(monster.Base.Name);
resPacket.PutInt32(monster.Base.GradeId);
resPacket.PutInt32(monster.Base.PromotionId);
resPacket.PutInt32(monster.Level);
++monsterCount;
}
resPacket.OverwriteInt32(idxMonsterCount, monsterCount);
++roundCount;
}
resPacket.OverwriteInt32(idxRoundCount, roundCount);
}
catch (AegisException e)
{
resPacket.Clear();
resPacket.ResultCodeNo = e.ResultCodeNo;
}
SendPacket(resPacket);
}