Ir para conteúdo

Featured Replies

Postado
  • Autor

Você alterou algo no nome da função?

uint32_t Player::getAttackSpeed() const

 

nessa parte?

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

  • Respostas 12
  • Visualizações 4k
  • Created
  • Última resposta

Top Posters In This Topic

Posted Images

Postado

@Reds

 Então, eu testei dessa forma.

uint32_t Player::getAttackSpeed() const
{

	int32_t SpeedAttack;
	SpeedAttack = getSkill(SKILL_FIST, SKILL_LEVEL);

	if (SpeedAttack < 10)
		SpeedAttack = 2800;
	else if (SpeedAttack >= 10 && SpeedAttack < 20)
		SpeedAttack = 2600;
	else if (SpeedAttack >= 20 && SpeedAttack < 30)
		SpeedAttack = 2400;
	else if (SpeedAttack >= 30 && SpeedAttack < 40)
		SpeedAttack = 2200;
	else if (SpeedAttack >= 40 && SpeedAttack < 50)
		SpeedAttack = 2000;
	else if (SpeedAttack >= 50 && SpeedAttack < 60)
		SpeedAttack = 1800;
	else if (SpeedAttack >= 60 && SpeedAttack < 70)
		SpeedAttack = 1600;
	else if (SpeedAttack >= 70 && SpeedAttack < 80)
		SpeedAttack = 1400;
	else if (SpeedAttack >= 80 && SpeedAttack < 90)
		SpeedAttack = 1200;
	else if (SpeedAttack >= 90 && SpeedAttack < 100)
		SpeedAttack = 1100;
	else if (SpeedAttack >= 100 && SpeedAttack < 110)
		SpeedAttack = 900;
	else if (SpeedAttack >= 110 && SpeedAttack < 120)
		SpeedAttack = 800;
	else if (SpeedAttack >= 120 && SpeedAttack < 130)
		SpeedAttack = 700;
	else if (SpeedAttack >= 130 && SpeedAttack < 140)
	    SpeedAttack = 600;
	else if (SpeedAttack >= 140 && SpeedAttack < 150)
		SpeedAttack = 500;
	else
		SpeedAttack = 300;

	return SpeedAttack;
	
	int32_t attackSpeedValue = 0;
    std::string value;
    this->getStorage("8500", value);
    if (value != "-1") {
         attackSpeedValue = atoi(value.c_str()) * 5;
    }
    int32_t vocationAttackSpeed = vocation->getAttackSpeed();
    if (attackSpeedValue > vocationAttackSpeed/2){
       attackSpeedValue = vocationAttackSpeed/2;                
    }
	return vocation->getAttackSpeed() - attackSpeedValue;
}

Não dá nenhum erro mas não funcionou, não aumentou a velocidade.

Editado por diarmaint (veja o histórico de edições)

Postado

Olá, adicione como você indicou e ao compilá-lo me lança este erro
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp esperado unqualified-id antes do token '{'
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp *** [obj // player.o] Erro 1

Alguma solução?

error.png

Postado
Em 24/08/2020 em 04:49, piikedu disse:

Olá, adicione como você indicou e ao compilá-lo me lança este erro
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp esperado unqualified-id antes do token '{'
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp *** [obj // player.o] Erro 1

Alguma solução?

error.png

Tenta apagar esse {

e compila novamente.

Postado
Em 24/08/2020 em 04:49, piikedu disse:

Olá, adicione como você indicou e ao compilá-lo me lança este erro
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp esperado unqualified-id antes do token '{'
4320 ? \ Users \ HP \ Desktop \ trunk.r3884 \ player.cpp *** [obj // player.o] Erro 1

Alguma solução?

error.png

tenta apagar a tudo da pasta obj e tenta compilar

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo