Ir para conteúdo

Posts Recomendados

nessa parte "Vá em player.h na função:" seria em Player.cpp não é? e nessa aqui "...Vá em monster.cpp e procure:..." fais oq? '-' da erro se eu coloco oq ta no codigo ai

Link para o comentário
https://xtibia.com/forum/topic/230926-ondroplootcid-item/page/2/#findComment-1674495
Compartilhar em outros sites

nessa parte "Vá em player.h na função:" seria em Player.cpp não é? e nessa aqui "...Vá em monster.cpp e procure:..." fais oq? '-' da erro se eu coloco oq ta no codigo ai

Em monster.cpp procure:

void MonsterType::dropLoot(Container* corpse)
{
if(corpse && lootDrop == LOOT_DROP_FULL)
mType->dropLoot(corpse);
}

Troque por:

void MonsterType::dropLoot(Container* corpse)
{
Item* tmpItem = NULL;
for(LootItems::const_iterator it = lootItems.begin(); it != lootItems.end() && !corpse->full(); ++it)
{
uint32_t owner = corpse->getCorpseOwner();
Creature* creature = g_game.getCreatureByID(owner);
if((tmpItem = createLoot(*it)))
{
if(Container* container = tmpItem->getContainer())
{
if(createChildLoot(container, (*it)))
corpse->__internalAddThing(tmpItem);
else
delete container;
}
else
corpse->__internalAddThing(tmpItem);
}
}


corpse->__startDecaying();
uint32_t ownerId = corpse->getCorpseOwner();
if(!ownerId)
return;


Player* owner = g_game.getPlayerByID(ownerId);
if(!owner)
return;


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->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());
}
Editado por Danny0
Link para o comentário
https://xtibia.com/forum/topic/230926-ondroplootcid-item/page/2/#findComment-1674631
Compartilhar em outros sites

  • 10 months later...

Olha, no meu deu esse erro aqui.

 

112 C:\Users\Luquinhas Brito\Desktop\Sources 7.0\creatureevent.cpp no 'bool CreatureEvents::dropLoot(Creature*, Item*)' member function declared in class 'CreatureEvents' 

Link para o comentário
https://xtibia.com/forum/topic/230926-ondroplootcid-item/page/2/#findComment-1703791
Compartilhar em outros sites

×
×
  • Criar Novo...