• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Loot channel

How change to loot info on classic green broadcast and in loot channel?
In classic 8.60 loot go to serverlog, how change to loot channel, but with green message?
 
this will help player use 0.3777 or 0.4
in monsters.cpp
change
C++:
    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());
}

for
C++:
    std::stringstream ss;
    ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << ".";
    if(owner->getParty())
    {
    owner->getParty()->broadcastPartyLoot(ss.str());
    }
    else
    {
    owner->sendChannelMessage("", ss.str(), SPEAK_CHANNEL_Y, uint16_t (12)); // 12 is number for loot channel
    }
}


and in party.cpp add
after
void Party::broadcastMessage(MessageClasses messageClass, const std::string& text, bool sendToInvitations/* = false*/)
add
C++:
 void Party::broadcastPartyLoot(const std::string& loot)
{

    PlayerVector::iterator it;
    leader->sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); // 12 is number for loot channel
    if(!memberList.empty())
    {
        for(it = memberList.begin(); it != memberList.end(); ++it)
        (*it)-> sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12);
    }
}

and in party.h add
C++:
void broadcastPartyLoot(const std::string& loot);

same idea i saw for 1.3 source but i converted it for 0.777 or 0.4
Best
 
this will help player use 0.3777 or 0.4
in monsters.cpp
change
C++:
    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());
}

for
C++:
    std::stringstream ss;
    ss << "Loot of " << nameDescription << ": " << corpse->getContentDescription() << ".";
    if(owner->getParty())
    {
    owner->getParty()->broadcastPartyLoot(ss.str());
    }
    else
    {
    owner->sendChannelMessage("", ss.str(), SPEAK_CHANNEL_Y, uint16_t (12)); // 12 is number for loot channel
    }
}


and in party.cpp add
after
void Party::broadcastMessage(MessageClasses messageClass, const std::string& text, bool sendToInvitations/* = false*/)
add
C++:
 void Party::broadcastPartyLoot(const std::string& loot)
{

    PlayerVector::iterator it;
    leader->sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12); // 12 is number for loot channel
    if(!memberList.empty())
    {
        for(it = memberList.begin(); it != memberList.end(); ++it)
        (*it)-> sendChannelMessage("", loot, SPEAK_CHANNEL_Y, 12);
    }
}

and in party.h add
C++:
void broadcastPartyLoot(const std::string& loot);

same idea i saw for 1.3 source but i converted it for 0.777 or 0.4
After do this, loot channel works perfectly, but i got this warning every monster killed, on OTCv8:

"WARNING: message in channel id 12 which is unknown, this is a server bug, relogin if you want to see messages in this channel"

Is it server side? There's a way to fix?
 
Back
Top