Dynamic Things Posted June 21, 2015 at 12:48 PM Share Posted June 21, 2015 at 12:48 PM Adicionar essa função no char.h (abaixo de public:) void ClearPMCounter(void) { m_iPMCounter = 0; } void IncreasePMCounter(void) { m_iPMCounter++; } void SetLastPMPulse(void); int GetPMCounter(void) const { return m_iPMCounter; } int GetLastPMPulse(void) const { return m_iLastPMPulse; } Adicionar essa função no char.h (abaixo de protected:) int m_iLastPMPulse; int m_iPMCounter; Adicionar essa função ao char.cpp void CHARACTER::SetLastPMPulse(void) { m_iLastPMPulse = thecore_pulse() + 25; } Ainda no char.cpp Procurar por Initialize E adicionem essa função: m_iLastPMPulse = 0; m_iPMCounter = 0; Agora em input_main.cpp adicionar essa variável depois da verificação iExtraLen no topo if (ch->GetLastPMPulse() < thecore_pulse()) ch->ClearPMCounter(); if (ch->GetPMCounter() > 3 && ch->GetLastPMPulse() > thecore_pulse()) { ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; } Pesquisar ainda na função Whisper : if (pkChr == ch) return (iExtraLen); Adicionar este código em seguida: ch->IncreasePMCounter(); ch->SetLastPMPulse(); obs: A minha tradução pode não ter sido das melhores caso haja duvidas, podem as esclarecer através do tópico. Cumprimentos Dynamic Things Fonte: devlime Link to comment Share on other sites More sharing options...
pedrorrr Posted November 25, 2015 at 07:08 PM Share Posted November 25, 2015 at 07:08 PM Tenho uma duvida isso de adicionar abaixo de "public" e "protect" é em todos os campos que tenham isso ou basta em um? Fiquei confuso <_< Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted November 25, 2015 at 07:32 PM Share Posted November 25, 2015 at 07:32 PM É colocar num deles. Na src existem vários mas apenas para organização Link to comment Share on other sites More sharing options...
pedrorrr Posted November 25, 2015 at 10:53 PM Share Posted November 25, 2015 at 10:53 PM Obrigado tierrilopes Link to comment Share on other sites More sharing options...
xabugas123 Posted July 17, 2018 at 11:15 AM Share Posted July 17, 2018 at 11:15 AM Em 25/11/2015 em 22:53, pedrorrr disse: Obrigado tierrilopes Agora em input_main.cpp adicionar essa variável depois da verificação iExtraLen no topo essa parte existe varios. não entendi em qual deles tenho de meter. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now