mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 07:16:15 +00:00
Changed: Merged code from official client
This commit is contained in:
parent
a886559bf6
commit
2a0d588cb5
2 changed files with 37 additions and 31 deletions
|
@ -925,32 +925,27 @@ void CChatGroupWindow::saveFreeTeller(NLMISC::IStream &f)
|
|||
{
|
||||
f.serialVersion(2);
|
||||
|
||||
uint32 nNbFreeTellerSaved = 0;
|
||||
// Save the free teller only if it is present in the friend list to avoid the only-growing situation
|
||||
// because free tellers are never deleted in game if we save/load all the free tellers, we just create more
|
||||
// and more container.
|
||||
|
||||
uint32 i, nNbFreeTellerSaved = 0;
|
||||
for (i = 0; i < _FreeTellers.size(); ++i)
|
||||
if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1)
|
||||
nNbFreeTellerSaved++;
|
||||
|
||||
f.serial(nNbFreeTellerSaved);
|
||||
|
||||
// Don't save the free tellers
|
||||
//// Save the free teller only if it is present in the friend list to avoid the only-growing situation
|
||||
//// because free tellers are never deleted in game if we save/load all the free tellers, we just create more
|
||||
//// and more container.
|
||||
|
||||
//uint32 i, nNbFreeTellerSaved = 0;
|
||||
//for (i = 0; i < _FreeTellers.size(); ++i)
|
||||
// if (PeopleInterraction.FriendList.getIndexFromName(_FreeTellers[i]->getUCTitle()) != -1)
|
||||
// nNbFreeTellerSaved++;
|
||||
|
||||
//f.serial(nNbFreeTellerSaved);
|
||||
|
||||
//for (i = 0; i < _FreeTellers.size(); ++i)
|
||||
//{
|
||||
// CGroupContainer *pGC = _FreeTellers[i];
|
||||
// if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1)
|
||||
// {
|
||||
// ucstring sTitle = pGC->getUCTitle();
|
||||
// f.serial(sTitle);
|
||||
// }
|
||||
//}
|
||||
for (i = 0; i < _FreeTellers.size(); ++i)
|
||||
{
|
||||
CGroupContainer *pGC = _FreeTellers[i];
|
||||
|
||||
if (PeopleInterraction.FriendList.getIndexFromName(pGC->getUCTitle()) != -1)
|
||||
{
|
||||
ucstring sTitle = pGC->getUCTitle();
|
||||
f.serial(sTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -979,12 +974,11 @@ void CChatGroupWindow::loadFreeTeller(NLMISC::IStream &f)
|
|||
ucstring sTitle;
|
||||
f.serial(sTitle);
|
||||
|
||||
// Don't actually create the free teller
|
||||
//CGroupContainer *pGC = createFreeTeller(sTitle, "");
|
||||
CGroupContainer *pGC = createFreeTeller(sTitle, "");
|
||||
|
||||
//// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
|
||||
//if ((ver == 1) && (pGC != NULL))
|
||||
// pGC->setActive(false);
|
||||
// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
|
||||
if ((ver == 1) && (pGC != NULL))
|
||||
pGC->setActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -636,6 +636,18 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
|
|||
{
|
||||
if (session->WriteRight) // player must have the right to speak in the channel
|
||||
{
|
||||
// If universal channel check if player muted
|
||||
if (session->getChan()->UniversalChannel)
|
||||
{
|
||||
if(_MutedUsers.find( eid ) != _MutedUsers.end())
|
||||
{
|
||||
nldebug("IOSCM: chat The player %s:%x is muted",
|
||||
TheDataset.getEntityId(sender).toString().c_str(),
|
||||
sender.getIndex());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!session->getChan()->getDontBroadcastPlayerInputs())
|
||||
{
|
||||
// add msg to the historic
|
||||
|
|
Loading…
Reference in a new issue