Postado Abril 26, 2018 7 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS 1.3; Base: 1.3 Qual erro está surgindo/O que você procura? Alguem ajuda a adaptar esse sistema para tfs 1.3 Você tem o código disponível? Se tiver publique-o aqui: monsters.h Spoiler Código (C ++): bool isSummonable, isIllusionable, isConvinceable, isAttackable, isHostile, isLureable, isWalkable, canPushItems, canPushCreatures, pushable, hideName, hideHealth ; Substituir com: Código (C ++): bool isSummonable, isIllusionable, isConvinceable, isAttackable, isHostile, isLureable, isWalkable, canPushItems, canPushCreatures, pushable, hideName, hideHealth, hideLevel ; Procurar por: Código (C ++): int32_t defesa, armadura, saúde, saúdeMax, baseSpeed, lookCorpse, cadseUnique, corpseAction, maxSummons, targetDistance, runAwayHealth, conditionImmunities, damageImmunities, lightLevel, lightColor, changeTargetSpeed, changeTargetChance ; Substituir com: Código (C ++): int32_t defesa, armadura, saúde, saúdeMax, baseSpeed, lookCorpse, cadseUnique, corpseAction, maxSummons, targetDistance, runAwayHealth, conditionImmunities, damageImmunities, lightLevel, lightColor, changeTargetSpeed, changeTargetChance, levelMin, levelMax ; monsters.cpp Spoiler Procurar por: Código (C ++): canPushItems = canPushCreatures = isSummonable = isIllusionable = isConvinceable = isLureable = isWalkable = ocultarName = ocultarHealth = false ; Substituir com: Código (C ++): canPushItems = canPushCreatures = isSummonable = isIllusionable = isConvinceable = isLureable = isWalkable = ocultarName = ocultarSaúde = ocultarNível = falso ; Procurar por: Código (C ++): baseSpeed = 200 ; Abaixo, adicione: Código (C ++): levelMin = levelMax = 1 ; Encontre: Código (C ++): bool Monstros :: loadMonster Dentro da função, procure por: Código (C ++): para ( xmlNodePtr p = root - > filhos ; p ; p = p - > próximo ) { if ( p - > tipo ! = XML_ELEMENT_NODE ) continue ; if ( ! xmlStrcmp ( p - > nome, ( const xmlChar * ) "saúde" ) ) { if ( ! readXMLInteger ( p, "max" , intValue ) ) { SHOW_XML_ERROR ( " Health.max em falta" ) ; monsterLoad = false ; pausa ; } mType - > healthMax = intValue ; if ( ! readXMLInteger ( p, "agora" , intValue ) ) mType - > health = mType - > healthMax ; outro mType - > health = intValue ; } Abaixo, adicione: Código (C ++): else if ( ! xmlStrcmp ( p - > nome, ( const xmlChar * ) "nível" ) ) { if ( ! readXMLInteger ( p, "max" , intValue ) ) mType - > levelMax = 1 ; outro mType - > levelMax = intValue ; if ( ! readXMLInteger ( p, "min" , intValue ) ) mType - > levelMin = mType - > levelMax ; outro mType - > levelMin = intValue ; } Procurar por: Código (C ++): if ( readXMLString ( tmpNode, "emblema" , strValue ) ) mType - > guildEmblem = getEmblems ( strValue ) ; Abaixo, adicione: Código (C ++): if ( readXMLString ( tmpNode, "hidelevel" , strValue ) ) mType - > hideLevel = booleanString ( strValue ) ; monster.h Spoiler Encontre: Código (C ++): Classe Monstro : Criatura pública { Logo abaixo: Código (C ++): público : #ifdef __ENABLE_SERVER_DIAGNOSTIC__ static uint32_t monsterCount ; #fim se virtual ~ Monster ( ) ; Adicionar: Código (C ++): std :: string name, nameDescription ; int32_t level ; double bonusAttack, bonusDefense ; Substituir: Código (C ++): virtual const std :: string & getNome ( ) const { return mType - > nome ; } virtual const std :: string & getNameDescription ( ) const { retornar mType - > nomeDescrição ; } virtual std :: string getDescription ( int32_t ) const { retornar mType - > nameDescription + "." ; } Por: Código (C ++): Const virtual std :: string & getName ( ) const { nome do retorno ; } Virtual const std :: corda & getNameDescription ( ) const { retornar nameDescription ; } Virtual std :: string de getDescription ( int32_t ) const { return nameDescription + "" ; } monster.cpp Spoiler Procurar por: Código (Texto): Monstro :: Monstro (MonsterType * _mType): Logo abaixo: Código (C ++): isIdle = true ; Adicionar: Código (C ++): name = _mType - > name ; nameDescription = _mType - > nameDescription ; level = ( int32_t ) random_range ( _mType - > levelMin, _mType - > levelMax, DISTRO_NORMAL ) ; bonusAttack = 1,0 ; bonusDefense = 1,0 ; Procurar por: Código (C ++): Monstro :: onCreatureAppear Substitua a função inteira por: Código (C ++): vazio Monstro :: onCreatureAppear ( const Criatura * criatura ) { Criatura :: onCreatureAppear ( criatura ) ; if ( criatura == isso ) { // Acabamos de gerar vamos olhar em volta para ver quem está lá. if ( isSummon ( ) ) { valor std :: string ; this - > master - > getStorage ( ( std :: string ) "nível_superior" , valor ) ; uint8_t intValue = atoi ( valor. c_str ( ) ) ; if ( intValue || valor == "0" ) level = intValue ; outro nível = 1 ; isMasterInRange = canSee ( master - > getPosition ( ) ) ; } if ( g_config. getBool ( ConfigManager :: MONSTER_HAS_LEVEL ) ) { este - > healthMax = std :: andar ( este - > getMaxHealth ( ) * ( 1 . + ( 0,1 * ( nível - 1 ) ) ) ) ; isso - > saúde = isso - > healthMax ; this - > bonusAttack + = ( 0,01 * ( nível - 1 ) ) ; isto - > bonusDefense + = ( 0.005 * ( level - 1 ) ) ; } updateTargetList ( ) ; updateIdleStatus ( ) ; } outro onCreatureEnter ( const_cast < Criatura * > ( criatura ) ) ; } Substitua tudo: Código (C ++): g_config. getDouble ( ConfigManager :: RATE_MONSTER_DEFENSE ) Por: Código (C ++): g_config. getDouble ( ConfigManager :: RATE_MONSTER_DEFENSE ) * bonusDefense Substitua tudo: Código (C ++): g_config. getDouble ( ConfigManager :: RATE_MONSTER_ATTACK ) Por: Código (C ++): g_config. getDouble ( ConfigManager :: RATE_MONSTER_ATTACK ) * bonusAttack map.cpp Spoiler Procurar por: Código (C ++): #include "game.h" Adicionar: Código (C ++): #include "configmanager.h" Procurar por: Código (C ++): extern Jogo g_game ; Adicione abaixo: Código (C ++): extern ConfigManager g_config ; Procure a função: Código (C ++): bool Map :: placeCreature { Adicione logo depois: Código (C ++): Monstro * monstro = criatura - > getMonster ( ) ; if ( monstro && g_config. getBool ( ConfigManager :: MONSTER_HAS_LEVEL ) ) { nível uint8_t ; if ( ! monstro - > getMonsterType ( ) - > hideLevel ) { if ( monstro - > isSummon ( ) ) { valor std :: string ; monstro - > getMaster ( ) - > getStorage ( ( std :: string ) "nível_de_superficial" , valor ) ; uint8_t intValue = atoi ( valor. c_str ( ) ) ; if ( intValue || valor == "0" ) level = intValue ; outro nível = 1 ; } outro nível = monstro - > nível ; buffer de caracteres [ 10 ] ; monstro - > nome = monstro - > getName ( ) + "[" + itoa ( nível, buffer, 10 ) + "]" ; } } configmanager.h Spoiler Procurar por: Código (C ++): MONSTER_SPAWN_WALKBACK, E adicione abaixo: Código (C ++): MONSTER_HAS_LEVEL, configmanager.cpp Spoiler Procurar por: Código (C ++): m_loaded = true ; Adicione um pouco antes: Código (C ++): m_confBool [ MONSTER_HAS_LEVEL ] = getGlobalBool ( "monsterHasLevel" , true ) ; Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Abril 27, 2018 7 anos Cara, essa feature é do Static, esse sistema funciona perfeitamente no TFS 1.3
Postado Abril 27, 2018 7 anos Autor 15 horas atrás, FlavioHulk disse: Cara, essa feature é do Static, esse sistema funciona perfeitamente no TFS 1.3 errado já logo de cara no monster.h essas linhas não existe no 1.3
Postado Abril 28, 2018 7 anos Então já que tu se acha o espertalhão, coisa que já vi agora, procura mais e vê se alguém te atende
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.