// ACMD (do_restart) icerisinde ikinci switch (subcmd) blogunu bul.
// komple degistir
switch (subcmd)
{
case SCMD_RESTART_TOWN:
sys_log (0, "do_restart: restart town");
PIXEL_POSITION pos;
if (SECTREE_MANAGER::instance().GetRecallPositionByEmpire (ch->GetMapIndex(), ch->GetEmpire(), pos))
{
ch->WarpSet (pos.x, pos.y);
}
else
{
ch->WarpSet (EMPIRE_START_X (ch->GetEmpire()), EMPIRE_START_Y (ch->GetEmpire()));
}
ch->PointChange (POINT_HP, 50 - ch->GetHP());
ch->DeathPenalty (1);
break;
case SCMD_RESTART_HERE:
sys_log (0, "do_restart: restart here");
if (ch->CountSpecifyItem(19))
{
ch->RemoveSpecifyItem(19, 1);
ch->RestartAtSamePos();
//ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY());
ch->PointChange(POINT_HP, 50 - ch->GetHP());
ch->DeathPenalty(0);
ch->ReviveInvisible(5);
break;
}
else
{
sys_log(0, "do_restart: restart town");
BYTE empireMapIdx = ch->GetEmpireMapIndex();
if (empireMapIdx == 0)
empireMapIdx = ch->GetMapIndex();
PIXEL_POSITION pos;
if (SECTREE_MANAGER::instance().GetRecallPositionByEmpire(empireMapIdx, ch->GetEmpire(), pos))
{
ch->WarpSet(pos.x, pos.y);
}
ch->PointChange(POINT_HP, 50 - ch->GetHP());
ch->DeathPenalty(1);
break;
}
}