Postado Julho 27, 2021 3 anos @D i M i T r E s C u oque falei acima é uma parte que você terá que fazer, estou te tando o caminho, agora é só olhar na src. respondendo sua pergunta, a parte que falei outfit.h é porque outfit.level = intValue; isso está acessando o level da struct outfit e colocando um valor nele. Have no idea! freelance? go to my discord: sun#8860
Postado Julho 27, 2021 3 anos Autor @Sun então sun não manjo mt, eu achei que so adicionando aquela parte ja poderia adicionar no xml o level que cada outfit seria disponibilizada. em outfit.cpp estão todos mais ou menos assim if(readXMLString(p, "premium", strValue)) newOutfit.isPremium = booleanString(strValue); if(readXMLInteger(p, "access", intValue)) newOutfit.accessLevel = intValue; Conteúdos Tragos Por Mim ao Fórum: • Venda de Vocações [Modern Aac] • • Comando !Saga • • [Modern Aac] DragonBall • • Esconder • • Naruto 2018 • • • • • • • 'NtoProject - Breve' [Show OFF] Disponível
Postado Julho 27, 2021 3 anos @D i M i T r E s C u me manda seu outfit.h Have no idea! freelance? go to my discord: sun#8860
Postado Julho 27, 2021 3 anos Autor Spoiler //////////////////////////////////////////////////////////////////////// // OpenTibia - an opensource roleplaying game //////////////////////////////////////////////////////////////////////// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////// #ifndef __OUTFIT__ #define __OUTFIT__ #include "otsystem.h" #include "enums.h" #define OUTFITS_MAX_NUMBER 25 enum AddonRequirement_t { REQUIREMENT_NONE = 0, REQUIREMENT_FIRST, REQUIREMENT_SECOND, REQUIREMENT_BOTH, REQUIREMENT_ANY }; struct Outfit { Outfit() { memset(skills, 0, sizeof(skills)); memset(skillsPercent, 0, sizeof(skillsPercent)); memset(stats, 0 , sizeof(stats)); memset(statsPercent, 0, sizeof(statsPercent)); memset(absorb, 0, sizeof(absorb)); memset(reflect[REFLECT_PERCENT], 0, sizeof(reflect[REFLECT_PERCENT])); memset(reflect[REFLECT_CHANCE], 0, sizeof(reflect[REFLECT_CHANCE])); isDefault = true; requirement = REQUIREMENT_BOTH; isPremium = manaShield = invisible = regeneration = false; outfitId = lookType = addons = accessLevel = storageId = 0; speed = healthGain = healthTicks = manaGain = manaTicks = conditionSuppressions = 0; } bool isDefault, isPremium, manaShield, invisible, regeneration; AddonRequirement_t requirement; int16_t absorb[COMBAT_LAST + 1], reflect[REFLECT_LAST + 1][COMBAT_LAST + 1]; uint16_t accessLevel, addons; int32_t skills[SKILL_LAST + 1], skillsPercent[SKILL_LAST + 1], stats[STAT_LAST + 1], statsPercent[STAT_LAST + 1], speed, healthGain, healthTicks, manaGain, manaTicks, conditionSuppressions; uint32_t outfitId, lookType, storageId; std::string name, storageValue; }; typedef std::list<Outfit> OutfitList; typedef std::map<uint32_t, Outfit> OutfitMap; class Outfits { public: virtual ~Outfits() {} static Outfits* getInstance() { static Outfits instance; return &instance; } bool loadFromXml(); bool parseOutfitNode(xmlNodePtr p); const OutfitMap& getOutfits(uint16_t sex) {return outfitsMap[sex];} bool getOutfit(uint32_t outfitId, uint16_t sex, Outfit& outfit); bool getOutfit(uint32_t lookType, Outfit& outfit); bool addAttributes(uint32_t playerId, uint32_t outfitId, uint16_t sex, uint16_t addons); bool removeAttributes(uint32_t playerId, uint32_t outfitId, uint16_t sex); uint32_t getOutfitId(uint32_t lookType); int16_t getOutfitAbsorb(uint32_t lookType, uint16_t sex, CombatType_t combat); int16_t getOutfitReflect(uint32_t lookType, uint16_t sex, CombatType_t combat); private: Outfits() {} OutfitList allOutfits; std::map<uint16_t, OutfitMap> outfitsMap; }; #endif @Sun Editado Julho 27, 2021 3 anos por D i M i T r E s C u (veja o histórico de edições) Conteúdos Tragos Por Mim ao Fórum: • Venda de Vocações [Modern Aac] • • Comando !Saga • • [Modern Aac] DragonBall • • Esconder • • Naruto 2018 • • • • • • • 'NtoProject - Breve' [Show OFF] Disponível
Postado Julho 27, 2021 3 anos uint32_t outfitId, lookType, storageId; std::string name, storageValue; abaixo disso /\ coloque uint16_t level; não entendi essa parte do newOutfit, me mostra seu outfit.cpp @D i M i T r E s C u Have no idea! freelance? go to my discord: sun#8860
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.