Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 57
Need help to change my loot description.. I'm using otx3 8.60...
I found this
"ss << nameDescription << " dropped " << corpse->getContentDescription() << ".";"
I want to change the content description... Currently its like "a swarm dropped 4 gold pieces, 2 egg." and I want to change for "A swarm dropped gold pieces (4), egg (2)."
Any idea?
I found this
"ss << nameDescription << " dropped " << corpse->getContentDescription() << ".";"
I want to change the content description... Currently its like "a swarm dropped 4 gold pieces, 2 egg." and I want to change for "A swarm dropped gold pieces (4), egg (2)."
Any idea?
C++:
Player* owner = g_game.getPlayerByID(corpse->getCorpseOwner());
if (!owner || owner->getStaminaMinutes() > 840) {
for (auto it = info.lootItems.rbegin(), end = info.lootItems.rend(); it != end; ++it) {
auto itemList = createLootItem(*it);
if (itemList.empty()) {
continue;
}
for (Item* item : itemList) {
//check containers
if (Container* container = item->getContainer()) {
if (!createLootContainer(container, *it)) {
delete container;
continue;
}
}
if (g_game.internalAddItem(corpse, item) != RETURNVALUE_NOERROR) {
corpse->internalAddThing(item);
}
}
}
if (owner) {
std::ostringstream ss;
ss << nameDescription << " dropped " << corpse->getContentDescription() << ".";
if (owner->getParty()) {
owner->getParty()->broadcastPartyLoot(ss.str());
} else {
owner->sendTextMessage(MESSAGE_INFO_DESCR, ss.str());
}
}
} else {
std::ostringstream ss;
ss << "Loot of " << nameDescription << ": nothing (due to low stamina)";
if (owner->getParty()) {
owner->getParty()->broadcastPartyLoot(ss.str());
} else {
owner->sendTextMessage(MESSAGE_INFO_DESCR, ss.str());
}
}
corpse->startDecaying();
}
Last edited: