Postado Outubro 30, 2020 4 anos Autor @RicK Sanchez Na linha 722 tenta substituir unsigned long lootListSize; por uint64_t lootListSize = 0; Em 26/10/2020 em 11:51, LeoTK disse: @Naze muito show parabéns se tivesse opção de limite de slot para free/premium para o jogador premium ter beneficio na quantidade de coleta seria bacana quem sabe para uma v2 Teria q colocar um configManager com numero de slots free numa verificação na parte de add do talkactions, depois edito esse post com essa modificação. Discord: Naze#3578 Ter Linux Dentro de Windows com Acesso 'localhost' para testes e + AutoLoot Otimizado Direto na Source (tfs 0.4/otx) // Pirataria é crime, original é roubo, compartilhar é legal.
Postado Outubro 30, 2020 4 anos Autor @RicK Sanchez em monsters.cpp usa esse dropLoot: Spoiler void MonsterType::dropLoot(Container* corpse) { uint32_t money = 0; Item* items; std::stringstream str; for(LootItems::const_iterator it = lootItems.begin(); it != lootItems.end() && !corpse->full(); ++it) { if(items = createLoot(*it)) { Item* tmpItem = items; if(Container* container = tmpItem->getContainer()) { Player* tmpPlayer = g_game.getPlayerByGuid(corpse->getCorpseOwner()); if(createChildLoot(container, (*it), money, str, tmpPlayer)) { corpse->__internalAddThing(tmpItem); } else { delete container; } } else { bool LootCatch = false; Player* tmpPlayer; if(tmpPlayer = g_game.getPlayerByGuid(corpse->getCorpseOwner())) { if(tmpPlayer->statusAutoLoot() == "On") { LootCatch = tmpPlayer->checkAutoLoot(tmpItem->getID()); if(LootCatch) { if(tmpPlayer->isMoneyAutoLoot(tmpItem, money)) { continue; } g_game.internalPlayerAddItem(NULL, tmpPlayer, tmpItem); str << " " << tmpItem->getNameDescription() << ","; continue; } } } corpse->__internalAddThing(tmpItem); } } } corpse->__startDecaying(); uint32_t ownerId = corpse->getCorpseOwner(); if(!ownerId) return; Player* owner = g_game.getPlayerByGuid(ownerId); if(!owner) return; if(money != 0) { if(owner->statusAutoMoneyCollect() == "Bank"){ owner->balance += money; } else { g_game.addMoney(owner, money); } str << " " << money << "x gold coins."; } else { str << " nothing gold coins."; } LootMessage_t message = lootMessage; if(message == LOOTMSG_IGNORE) message = (LootMessage_t)g_config.getNumber(ConfigManager::LOOT_MESSAGE); if(message < LOOTMSG_PLAYER) return; std::stringstream ss; ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << "."; if(owner->statusAutoLoot() == "On") { ss << "\nAutoLoot Colleted:" << str.str(); } if(owner->getParty() && message > LOOTMSG_PLAYER) owner->getParty()->broadcastMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); else if(message == LOOTMSG_PLAYER || message == LOOTMSG_BOTH) owner->sendTextMessage((MessageClasses)g_config.getNumber(ConfigManager::LOOT_MESSAGE_TYPE), ss.str()); } e esse createChildLoot : Spoiler bool MonsterType::createChildLoot(Container* parent, const LootBlock& lootBlock, uint32_t& money, std::stringstream& str, Player* player) { LootItems::const_iterator it = lootBlock.childLoot.begin(); if(it == lootBlock.childLoot.end()) return true; Item* items; for(; it != lootBlock.childLoot.end() && !parent->full(); ++it) { if(items = createLoot(*it)) { Item* tmpItem = items; if(Container* container = tmpItem->getContainer()) { if(createChildLoot(container, *it, money, str, player)) parent->__internalAddThing(tmpItem); else delete container; } else { bool LootCatch = false; if(player && (player->statusAutoLoot() == "On")) { LootCatch = player->checkAutoLoot(tmpItem->getID()); } if(LootCatch) { if(player->isMoneyAutoLoot(tmpItem, money)) { continue; } g_game.internalPlayerAddItem(NULL, player, tmpItem); str << " " << tmpItem->getNameDescription() << ","; continue; } parent->__internalAddThing(tmpItem); } } } return !parent->empty(); } Discord: Naze#3578 Ter Linux Dentro de Windows com Acesso 'localhost' para testes e + AutoLoot Otimizado Direto na Source (tfs 0.4/otx) // Pirataria é crime, original é roubo, compartilhar é legal.
Postado Fevereiro 4, 2021 4 anos Em 30/10/2020 em 12:22, Naze disse: @RicK Sanchez Na linha 722 tenta substituir unsigned long lootListSize; por uint64_t lootListSize = 0; Teria q colocar um configManager com numero de slots free numa verificação na parte de add do talkactions, depois edito esse post com essa modificação. da ese error mano
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.