mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 00:06:16 +00:00
Changed: Merged code from official client
This commit is contained in:
parent
bd7ce1d852
commit
25c9f41ab9
2 changed files with 37 additions and 31 deletions
|
@ -925,32 +925,27 @@ void CChatGroupWindow::saveFreeTeller(NLMISC::IStream &f)
|
||||||
{
|
{
|
||||||
f.serialVersion(2);
|
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);
|
f.serial(nNbFreeTellerSaved);
|
||||||
|
|
||||||
// Don't save the free tellers
|
for (i = 0; i < _FreeTellers.size(); ++i)
|
||||||
//// 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
|
CGroupContainer *pGC = _FreeTellers[i];
|
||||||
//// 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);
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
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;
|
ucstring sTitle;
|
||||||
f.serial(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".
|
// With version 1 all tells are active because windows information have "title based" ids and no "sID based".
|
||||||
//if ((ver == 1) && (pGC != NULL))
|
if ((ver == 1) && (pGC != NULL))
|
||||||
// pGC->setActive(false);
|
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 (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())
|
if (!session->getChan()->getDontBroadcastPlayerInputs())
|
||||||
{
|
{
|
||||||
// add msg to the historic
|
// add msg to the historic
|
||||||
|
|
Loading…
Reference in a new issue