06-16-2013, 10:29 AM
Код:
int[] par = {-1, 1};
int Radius = 400;
if (activeChar.getRace() != Race.Human)
loc = new Location(Config.HUMAN_X+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.HUMAN_Y+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.HUMAN_Z);
else if(activeChar.getRace() != Race.Darkelf)
loc = new Location(Config.DARKELF_X+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.DARKELF_Y+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.DARKELF_Z);
else if(activeChar.getRace() != Race.Elf)
loc = new Location(Config.ELF_X+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.ELF_Y+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.ELF_Z);
else if(activeChar.getRace() != Race.Orc)
loc = new Location(Config.ORC_X+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.ORC_Y+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.ORC_Z);
else if(activeChar.getRace() != Race.Dwarf)
loc = new Location(Config.DWARF_X+(par[Rnd.get(2)]*Rnd.get(Radius)), Config. DWARF_Y+(par[Rnd.get(2)]*Rnd.get(Radius)), Config.DWARF_Z);