public override void OnResponse(NetState sender, RelayInfo info) { Race raca = null; switch (info.ButtonID) { case (int)Buttons.bOkHumano: { raca = Race.Races[32]; break; } case (int)Buttons.bOkElfo: { raca = Race.Races[33]; break; } case (int)Buttons.bOkMeioOrc: { raca = Race.Races[34]; break; } case (int)Buttons.bOkElfoNegro: { raca = Race.Races[35]; break; } } SistemaRaca sistemaRaca = caller.getSistemaRaca(); sistemaRaca.aplicarRaca(raca); }
public override void Deserialize(GenericReader reader) { RegistroModule.registrarModuleJogador(this); sistemaTalento = new SistemaTalento(this); sistemaClasse = new SistemaClasse(this); sistemaPropriedade = new SistemaPropriedade(this); sistemaAventura = new SistemaAventura(this); sistemaMorte = new SistemaMorte(this); sistemaRaca = new SistemaRaca(this); // a inicializacao dos sistemas devem ficar antes deste método. Pois ele invoca métodos como max hits quqe utiliza os sistemas. base.Deserialize(reader); int versao = reader.ReadInt(); }
public Jogador() { sistemaClasse = new SistemaClasse(this); sistemaTalento = new SistemaTalento(this); sistemaPropriedade = new SistemaPropriedade(this); sistemaAventura = new SistemaAventura(this); sistemaMorte = new SistemaMorte(this); sistemaRaca = new SistemaRaca(this); RegistroModule.registrarModuleJogador(this); setClasse = classe.Aldeao; //maximo de status StatCap = getSistemaRaca().StatusCap; inicializarAtributos(); }