Changed: Minor changes

This commit is contained in:
kervala 2014-12-26 13:12:56 +01:00
parent 5190cbf8ff
commit fe9e52931d
21 changed files with 254 additions and 212 deletions

View file

@ -1,4 +1,3 @@
# Supporting modules and libraries.
# Need servershare for build packed collision tool
# Need aishare for build wmap tool

View file

@ -4821,9 +4821,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
for( uint32 i = 0; i < inventory->getSlotCount(); ++ i)
{
const CGameItemPtr itemPtr = inventory->getItem(i);
if( itemPtr != NULL )
if ( itemPtr != NULL )
{
if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) )
if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) )
{
numberItem += itemPtr->getStackSize();
}
@ -4841,9 +4841,9 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
for( uint32 i = 0; i < inventory->getSlotCount(); ++ i)
{
const CGameItemPtr itemPtr = inventory->getItem(i);
if( itemPtr != NULL )
if ( itemPtr != NULL )
{
if( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) )
if ( (itemPtr->getSheetId() == sheetId) && (itemPtr->quality() == quality) )
{
numberItem -= inventory->deleteStackItem(i, quantity);
if(numberItem == 0)
@ -5053,7 +5053,8 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
}
CSheetId creatureSheetId(command_args[2]);
CCreature *creature = CreatureManager.getCreature(target);
if (creature == NULL || creatureSheetId == CSheetId::Unknown || creatureSheetId != creature->getType())
if (creature == NULL || creatureSheetId == CSheetId::Unknown || creatureSheetId != creature->getType())
{
if (send_url)
c->sendUrl(web_app_url+"&player_eid="+c->getId().toString()+"&event=failed&desc=bad_sheet", getSalt());
@ -5686,7 +5687,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
{
CEntityBase *entityBase = PlayerManager.getCharacterByName (CShardNames::getInstance().makeFullNameFromRelative(c->getHomeMainlandSessionId(), value));
if (entityBase == 0)
if (entityBase == NULL)
{
// try to find the bot name
vector<TAIAlias> aliases;
@ -5711,7 +5712,7 @@ NLMISC_COMMAND (webExecCommand, "Execute a web command", "<user id> <web_app_url
}
}
if (entityBase != 0)
if (entityBase != NULL)
{
x = entityBase->getState().X + sint32 (cos (entityBase->getState ().Heading) * 2000);
y = entityBase->getState().Y + sint32 (sin (entityBase->getState ().Heading) * 2000);

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !
@ -347,7 +362,7 @@ void CBankAccessor_PLR::TUSER::init(ICDBStructNode *parent)
node = parent->getNode( ICDBStructNode::CTextId("IS_INVISIBLE"), false );
nlassert(node != NULL);
_IS_INVISIBLE = node;
node = parent->getNode( ICDBStructNode::CTextId("COUNTER"), false );
nlassert(node != NULL);
_COUNTER = node;
@ -3124,11 +3139,10 @@ void CBankAccessor_PLR::TPACK_ANIMAL::TBEAST::init(ICDBStructNode *parent, uint
node = parent->getNode( ICDBStructNode::CTextId("DESPAWN"), false );
nlassert(node != NULL);
_DESPAWN = node;
node = parent->getNode( ICDBStructNode::CTextId("NAME"), false );
nlassert(node != NULL);
_NAME = node;
// branch init

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef INCLUDED_DATABASE_PLR_H
@ -941,8 +956,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setIS_INVISIBLE(CCDBSynchronised &dbGroup, bool value, bool forceSending = false)
{
_setProp(dbGroup, _IS_INVISIBLE, value, forceSending);
}
@ -958,7 +971,7 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _IS_INVISIBLE;
}
void setCOUNTER(CCDBSynchronised &dbGroup, uint8 value, bool forceSending = false)
{
@ -1300,13 +1313,14 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _DODGE;
}
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
TBRICK_TICK_RANGE &getBRICK_TICK_RANGE()
{
return _BRICK_TICK_RANGE;
}
};
class TTARGET
{
public:
@ -3457,8 +3471,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -4560,8 +4572,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -4572,14 +4582,12 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return value;
}
ICDBStructNode *getMONEYCDBNode()
{
return _MONEY;
}
};
private:
ICDBStructNode *_BranchNode;
@ -4602,11 +4610,8 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return _BranchNode;
}
void setMONEY(CCDBSynchronised &dbGroup, uint64 value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY, value, forceSending);
}
@ -6000,8 +6005,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
void setMONEY_SHEET(CCDBSynchronised &dbGroup, NLMISC::CSheetId value, bool forceSending = false)
{
_setProp(dbGroup, _MONEY_SHEET, value, forceSending);
}
@ -8858,7 +8861,6 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
ICDBStructNode *_HUNGER;
ICDBStructNode *_DESPAWN;
ICDBStructNode *_NAME;
public:
void init(ICDBStructNode *parent, uint index);
@ -9047,11 +9049,9 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
{
return _DESPAWN;
}
void setNAME(CCDBSynchronised &dbGroup, uint32 value, bool forceSending = false)
{
_setProp(dbGroup, _NAME, value, forceSending);
}
@ -9062,12 +9062,11 @@ inline void _getProp(const CCDBSynchronised &db, ICDBStructNode *node, NLMISC::C
return value;
}
ICDBStructNode *getNAMECDBNode()
{
return _NAME;
}
};

View file

@ -559,7 +559,8 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const
}
// if the user is online reset its guild id
CGuildMemberModule * module = NULL;
if ( member->getReferencingModule( module ) )
if (member->getReferencingModule(module))
{
module->clearOnlineGuildProperties();
}
@ -568,7 +569,7 @@ void CGuildMemberModule::kickMember( uint16 index,uint8 session )const
params[0].setEIdAIAlias( proxy.getId(), CAIAliasTranslator::getInstance()->getAIAlias(proxy.getId()) );
params[1].StringId = CEntityIdTranslator::getInstance()->getEntityNameStringId(member->getIngameEId());
sendMessageToGuildMembers("GUILD_KICK_MEMBER",params);
guild->deleteMember( member );
}

View file

@ -236,6 +236,7 @@ void cbClientGroupAbandonMission( NLNET::CMessage& msgin, const std::string &ser
MISLOG("user:%s cbClientGroupAbandonMission : Invalid team", userId.toString().c_str());
return;
}
if ( team->getLeader() != userId )
{
CCharacter::sendDynamicSystemMessage( user->getEntityRowId(), "REQ_LEADER_TO_ABANDON_MISSION" );

View file

@ -767,7 +767,7 @@ class CMissionActionRecvItem : public IMissionAction
freeSlotcount -= invTemp->getUsedSlotCount();
maxBulk -= invTemp->getInventoryBulk();
}
if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) )
{
fail = false;
@ -862,7 +862,7 @@ class CMissionActionRecvItem : public IMissionAction
}
params[2].Int = _Item.getQuality();
}
params[0].SheetId = _SheetId;
params[1].Int = _Quantity;
PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_ITEM", params);
@ -1050,7 +1050,7 @@ class CMissionActionRecvNamedItem : public IMissionAction
sint16 neededSlotCount = (sint16) ceil( (float)_Quantity / itemTmp->getMaxStackSize() );
uint32 neededBulk = _Quantity * itemTmp->getStackBulk();
itemTmp.deleteItem();
bool fail = true;
for ( uint i = 0; i < entities.size(); i++ )
{
@ -1067,15 +1067,15 @@ class CMissionActionRecvNamedItem : public IMissionAction
freeSlotcount -= invTemp->getUsedSlotCount();
maxBulk -= invTemp->getInventoryBulk();
}
if( (neededSlotCount <= freeSlotcount) && ( neededBulk + invBag->getInventoryBulk() <= maxBulk) )
{
fail = false;
break;
}
}
}
if( fail )
{
CMissionTemplate * templ = CMissionManager::getInstance()->getTemplate( instance->getTemplateId() );
@ -1274,7 +1274,6 @@ class CMissionActionDestroyItem :
// If the "guild" parameter is not set, we destroy the items for the users
if (!_Guild)
{
for ( uint i = 0; i < entities.size(); i++ )
{
CCharacter * user = PlayerManager.getChar( entities[i] );
@ -1303,7 +1302,6 @@ class CMissionActionDestroyItem :
PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_DESTROY_ITEM", params);
}
}
}
// We destroy the item in the guild
else
@ -1909,7 +1907,6 @@ class CMissionActionRecvMoney : public IMissionAction
// If the guild parameter is not set we just divide the money and give it to each entity
if (!_Guild)
{
uint amount = _Amount / (uint)entities.size();
if ( amount == 0 || _Amount % entities.size() )
amount++;
@ -1924,7 +1921,6 @@ class CMissionActionRecvMoney : public IMissionAction
PHRASE_UTILITIES::sendDynamicSystemMessage(user->getEntityRowId(),"MIS_RECV_MONEY",params);
}
}
}
// Else we give the money to the guild
else
@ -2026,7 +2022,6 @@ class CMissionActionRecvFame : public IMissionAction
// If there is no "guild" parameter we give the fame to every user
if (!_Guild)
{
for ( uint i = 0; i < entities.size(); i++ )
{
CEntityId eid = TheDataset.getEntityId(entities[i]);
@ -2037,12 +2032,10 @@ class CMissionActionRecvFame : public IMissionAction
if (character)
character->sendEventForMissionAvailabilityCheck();
}
}
// Else we just give it to the guild
else
{
if (entities.size() == 0)
return;
@ -2072,7 +2065,6 @@ class CMissionActionRecvFame : public IMissionAction
if (character)
character->sendEventForMissionAvailabilityCheck();
}
}
};

View file

@ -170,7 +170,6 @@ uint32 IMissionStepTemplate::sendStepText(CCharacter * user,const std::vector<ui
params = _AdditionalParams;
textPtr = &_OverridenText;
}
}
if( !textPtr )

View file

@ -388,7 +388,7 @@ protected:
// compute success factor
sint deltaLvl;
float successFactor = CFaberActionCommon::getSuccessFactor( character, phrase, deltaLvl );
// final item quality, depending of recommended skill of action used and lower quality of raw materials used and success factor of action
uint16 finalItemQuality = max( (uint16)1, (uint16) (min(phrase->getLowerRmQuality(),(uint16)phrase->getRecommendedSkill()) * successFactor) );

View file

@ -652,7 +652,9 @@ void CCharacterVersionAdapter::adaptToVersion11(CCharacter &character) const
case EGSPD::CPeople::Zorai :
mission = CAIAliasTranslator::getInstance()->getMissionUniqueIdFromName( "ZORAI_NEWB_WELCOME_SHENG_WO_1" );
CAIAliasTranslator::getInstance()->getNPCAliasesFromName("welcomer_sheng_wo_1", bots);
break;
break;
default:
break;
}
}
// other give him a rite intro mission

View file

@ -94,21 +94,21 @@ void CChatManager::onServiceDown(const std::string &serviceShortName)
switch (cg.Type)
{
case CChatGroup::universe:
case CChatGroup::say:
case CChatGroup::shout:
continue;
case CChatGroup::team:
case CChatGroup::guild:
case CChatGroup::civilization:
case CChatGroup::territory:
case CChatGroup::tell:
case CChatGroup::arround:
case CChatGroup::system:
case CChatGroup::region:
case CChatGroup::dyn_chat:
groupToRemove.push_back(gid);
break;
case CChatGroup::universe:
case CChatGroup::say:
case CChatGroup::shout:
continue;
case CChatGroup::team:
case CChatGroup::guild:
case CChatGroup::civilization:
case CChatGroup::territory:
case CChatGroup::tell:
case CChatGroup::arround:
case CChatGroup::system:
case CChatGroup::region:
case CChatGroup::dyn_chat:
groupToRemove.push_back(gid);
break;
}
}
@ -121,7 +121,7 @@ void CChatManager::onServiceDown(const std::string &serviceShortName)
// clear muted players table
_MutedUsers.clear();
// clear the dyn chats
_DynChat.removeAllChannels();
}
@ -151,9 +151,11 @@ bool CChatManager::checkClient( const TDataSetRow& id )
void CChatManager::addClient( const TDataSetRow& id )
{
if (VerboseChatManagement)
nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.",
{
nldebug("IOSCM: addClient : adding client %s:%x into chat manager and universe group.",
TheDataset.getEntityId(id).toString().c_str(),
id.getIndex());
}
if(id.getIndex() == 0xffffff)
{
@ -197,10 +199,11 @@ void CChatManager::addClient( const TDataSetRow& id )
void CChatManager::removeClient( const TDataSetRow& id )
{
if (VerboseChatManagement)
nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !",
{
nldebug("IOSCM: removeClient : removing the client %s:%x from chat manager !",
TheDataset.getEntityId(id).toString().c_str(),
id.getIndex());
}
TClientInfoCont::iterator itCl = _Clients.find( id );
if( itCl != _Clients.end() )
@ -214,7 +217,7 @@ void CChatManager::removeClient( const TDataSetRow& id )
}
else
{
nlwarning("CChatManager::removeClient : The client %s:%x is unknown !",
nlwarning("CChatManager::removeClient : The client %s:%x is unknown !",
TheDataset.getEntityId(id).toString().c_str(),
id.getIndex());
}
@ -233,7 +236,7 @@ CChatClient& CChatManager::getClient( const TDataSetRow& id )
TClientInfoCont::iterator itCl = _Clients.find( id );
if( itCl != _Clients.end() )
{
return *(itCl->second);
return *(itCl->second);
}
else
{
@ -259,15 +262,15 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s
{
if (!groupName.empty())
nldebug("IOSCM: addGroup : adding %s named chat group %s as '%s'",
CChatGroup::groupTypeToString(gType).c_str(),
CChatGroup::groupTypeToString(gType).c_str(),
gId.toString().c_str(),
groupName.c_str());
else
nldebug("IOSCM: addGroup : adding %s anonymous chat group %s",
CChatGroup::groupTypeToString(gType).c_str(),
CChatGroup::groupTypeToString(gType).c_str(),
gId.toString().c_str());
}
map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId );
if( itGrp == _Groups.end() )
{
@ -290,7 +293,7 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s
{
nlwarning("CChatManager::addGroup : the group %s already exists", gId.toString().c_str());
}
} // addGroup //
@ -302,8 +305,10 @@ void CChatManager::addGroup( TGroupId gId, CChatGroup::TGroupType gType, const s
void CChatManager::removeGroup( TGroupId gId )
{
if (VerboseChatManagement)
{
nldebug("IOSCM: removeGroup : removing group %s",
gId.toString().c_str());
}
map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId );
if( itGrp != _Groups.end() )
@ -338,10 +343,12 @@ void CChatManager::removeGroup( TGroupId gId )
void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId )
{
if (VerboseChatManagement)
{
nldebug("IOSCM: addtoGroup : adding player %s:%x to group %s",
TheDataset.getEntityId(charId).toString().c_str(),
charId.getIndex(),
gId.toString().c_str());
}
map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId );
if( itGrp != _Groups.end() )
@ -372,7 +379,7 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId )
}
else
{
nlwarning("CChatManager::addToGroup : client %s:%x is unknown",
nlwarning("CChatManager::addToGroup : client %s:%x is unknown",
TheDataset.getEntityId(charId).toString().c_str(),
charId.getIndex());
// remove it from the group (don't leave bad client...)
@ -396,10 +403,12 @@ void CChatManager::addToGroup( TGroupId gId, const TDataSetRow &charId )
void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId )
{
if (VerboseChatManagement)
{
nldebug("IOSCM: removeFromGroup : removing player %s:%x from group %s",
TheDataset.getEntityId(charId).toString().c_str(),
charId.getIndex(),
charId.getIndex(),
gId.toString().c_str());
}
map< TGroupId, CChatGroup >::iterator itGrp = _Groups.find( gId );
if( itGrp != _Groups.end() )
@ -443,7 +452,7 @@ void CChatManager::removeFromGroup( TGroupId gId, const TDataSetRow &charId )
} // removeFromGroup //
//-----------------------------------------------
@ -486,7 +495,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
}
// CEntityId eid = TheDataset.getEntityId(sender);
// Get the char info
// Get the char info
//WARNING: can be NULL
CCharacterInfos *ci = IOS->getCharInfos(eid);
@ -525,7 +534,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
// clean up container
_DestUsers.clear();
switch( itCl->second->getChatMode() )
{
// dynamic group
@ -533,7 +542,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
case CChatGroup::say :
{
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -566,7 +575,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
// so even after teleporting in a remote region the previous around people were still receiving
// the messages.
TGroupId grpId = itCl->second->getRegionChatGroup();
TGroupId grpId = itCl->second->getRegionChatGroup();
_DestUsers.push_back(grpId);
_Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() );
@ -599,7 +608,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
// }
// }
TGroupId grpId = CEntityId(RYZOMID::chatGroup,0);
TGroupId grpId = CEntityId(RYZOMID::chatGroup, 0);
_Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second->getChatMode()], ucstr.toString().c_str() );
_DestUsers.push_back(grpId);
@ -621,15 +630,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
TGroupId grpId = itCl->second->getGuildChatGroup();
_DestUsers.push_back(grpId);
_Log.displayNL("'%s' (%s) : \t\"%s\"",
senderName.c_str(),
groupNames[itCl->second->getChatMode()],
_Log.displayNL("'%s' (%s) : \t\"%s\"",
senderName.c_str(),
groupNames[itCl->second->getChatMode()],
ucstr.toString().c_str() );
chatInGroup( grpId, ucstr, sender );
}
break;
case CChatGroup::dyn_chat:
{
{
TChanID chanID = itCl->second->getDynChatChan();
CDynChatSession *session = _DynChat.getSession(chanID, sender);
if (session) // player must have a session in that channel
@ -650,7 +659,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
if (!session->getChan()->getDontBroadcastPlayerInputs())
{
// add msg to the historic
// add msg to the historic
CDynChatChan::CHistoricEntry entry;
entry.String = ucstr;
if (ci != NULL)
@ -671,15 +680,15 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
ucstring tmp("{no_bubble}");
if (ucstr.find(tmp) == ucstring::npos)
{
tmp += ucstr;
tmp += ucstr;
content.swap(tmp);
}
else
{
content = ucstr;
}
}
}
// broadcast to other client in the channel
CDynChatSession *dcc = session->getChan()->getFirstSession();
@ -687,7 +696,7 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
{
sendChat(itCl->second->getChatMode(), dcc->getClient()->getID(), content, sender, chanID);
dcc = dcc->getNextChannelSession(); // next session in this channel
}
}
}
else
{
@ -702,11 +711,11 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
TPlayerInputForward pif;
pif.ChanID = chanID;
pif.Sender = sender;
pif.Content = ucstr;
pif.Content = ucstr;
CMessage msgout( "DYN_CHAT:FORWARD");
msgout.serial(pif);
CUnifiedNetwork::getInstance()->send(serviceId, msgout);
}
if (session->getChan()->getUnifiedChannel())
@ -716,19 +725,19 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
IChatUnifierClient::getInstance()->sendUnifiedDynChat(session->getChan()->getID(), senderName, ucstr);
}
}
}
}
}
break;
// static group
default :
nlwarning("<CChatManager::chat> client %u chat in %s ! don't know how to handle it.",
sender.getIndex(),
sender.getIndex(),
groupNames[itCl->second->getChatMode()]);
/* {
TGroupId grpId = itCl->second.getChatGroup();
_Log.displayNL("'%s' (%s) : \t\"%s\"", senderName.c_str(), groupNames[itCl->second.getChatMode()], ucstr.toString().c_str() );
chatInGroup( grpId, ucstr, sender );
}
*/ }
@ -736,8 +745,8 @@ void CChatManager::chat( const TDataSetRow& sender, const ucstring& ucstr )
// log chat to PDS system
// IOSPD::logChat(ucstr, itCl->second->getId(), _DestUsers);
log_Chat_Chat(CChatGroup::groupTypeToString(itCl->second->getChatMode()),
TheDataset.getEntityId(sender),
ucstr.toUtf8(),
TheDataset.getEntityId(sender),
ucstr.toUtf8(),
_DestUsers);
}
@ -770,7 +779,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD
CMirrorPropValueRO<uint32> instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE );
// check the ai instance for region chat
if (chatGrp.Type != CChatGroup::region
if (chatGrp.Type != CChatGroup::region
|| instanceId == senderInstanceId)
{
// check homeSessionId for universe
@ -795,7 +804,7 @@ void CChatManager::chatInGroup( TGroupId& grpId, const ucstring& ucstr, const TD
_DestUsers.push_back(TheDataset.getEntityId(*itM));
}
}
}
}
if (chatGrp.Type == CChatGroup::guild)
{
@ -855,7 +864,7 @@ void CChatManager::farChatInGroup(TGroupId &grpId, uint32 homeSessionId, const u
continue;
}
sendFarChat( itGrp->second.Type, *itM, text, senderName );
}
}
}
else
{
@ -885,7 +894,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId
case CChatGroup::shout :
{
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -900,7 +909,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId
chatInGroup2( grpId, phraseId, sender );
}
break;
case CChatGroup::universe:
{
@ -937,7 +946,7 @@ void CChatManager::chat2( const TDataSetRow& sender, const std::string &phraseId
{
nlwarning("<CChatManager::chat> client %s:%x chat in mode %u ! don't know how to handle it.",
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex(),
sender.getIndex(),
itCl->second->getChatMode());
}
}
@ -973,7 +982,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra
case CChatGroup::shout :
{
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -988,7 +997,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra
chatParamInGroup( grpId, phraseId, params, sender );
}
break;
case CChatGroup::universe:
{
@ -1025,7 +1034,7 @@ void CChatManager::chatParam( const TDataSetRow& sender, const std::string &phra
{
nlwarning("<CChatManager::chat> client %s:%x chat in mode %u ! don't know how to handle it.",
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex(),
sender.getIndex(),
itCl->second->getChatMode());
}
}
@ -1049,7 +1058,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId)
CEntityId eid = TheDataset.getEntityId(sender);
if(_MutedUsers.find( eid ) != _MutedUsers.end())
{
nldebug("IOSCM: chat2Ex The player %s:%x is muted",
nldebug("IOSCM: chat2Ex The player %s:%x is muted",
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex());
return;
@ -1061,7 +1070,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId)
case CChatGroup::shout :
{
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -1076,7 +1085,7 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId)
chatInGroup2Ex( grpId, phraseId, sender );
}
break;
case CChatGroup::universe:
{
CEntityId eid = TheDataset.getEntityId(sender);
@ -1098,21 +1107,21 @@ void CChatManager::chat2Ex( const TDataSetRow& sender, uint32 phraseId)
chatInGroup2Ex( grpId, phraseId, sender );
}
break;
case CChatGroup::guild:
{
TGroupId grpId = itCl->second->getGuildChatGroup();
chatInGroup2Ex( grpId, phraseId, sender );
}
break;
// static group
default :
{
nlwarning("<CChatManager::chat> client %s:%x chat in mode %u ! don't know how to handle it.",
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex(),
sender.getIndex(),
itCl->second->getChatMode());
// TGroupId grpId = (*itCl).second.getChatGroup();
// chatInGroup2( grpId, phraseId, sender );
@ -1141,7 +1150,7 @@ void CChatManager::chatInGroup2Ex( TGroupId& grpId, uint32 phraseId, const TData
{
CMirrorPropValueRO<uint32> instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE );
if (chatGrp.Type != CChatGroup::region
if (chatGrp.Type != CChatGroup::region
|| instanceId == senderInstanceId)
{
const CEntityId &eid = TheDataset.getEntityId(*itM);
@ -1184,14 +1193,14 @@ void CChatManager::chatInGroup2( TGroupId& grpId, const std::string & phraseId,
CMirrorPropValueRO<uint32> instanceId( TheDataset, *itM, DSPropertyAI_INSTANCE );
// check the ai instance for region chat
if (chatGrp.Type != CChatGroup::region
if (chatGrp.Type != CChatGroup::region
|| instanceId == senderInstanceId)
{
const CEntityId &eid = TheDataset.getEntityId(*itM);
if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() )
sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender );
}
}
}
if (chatGrp.Type == CChatGroup::guild)
{
CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender));
@ -1232,7 +1241,7 @@ void CChatManager::chatParamInGroup( TGroupId& grpId, const std::string & phrase
if (eid.getType() == RYZOMID::player && std::find( excluded.begin(), excluded.end(), *itM ) == excluded.end() )
sendChat2( (*itGrp ).second.Type, *itM, phraseId, sender );
}
}
}
if (chatGrp.Type == CChatGroup::guild)
{
CCharacterInfos *charInfos = IOS->getCharInfos(TheDataset.getEntityId(sender));
@ -1278,10 +1287,10 @@ void CChatManager::sendEmoteTextToAudience( const TDataSetRow& sender,const std
TChanID oldChan = itCl->second->getDynChatChan();
itCl->second->setChatMode(CChatGroup::say);
itCl->second->updateAudience();
// get audience around the emoting player
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -1329,10 +1338,10 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc
TChanID oldChan = itCl->second->getDynChatChan();
itCl->second->setChatMode(CChatGroup::say);
itCl->second->updateAudience();
// get audience around the emoting player
CChatGroup::TMemberCont::iterator itA;
for( itA = itCl->second->getAudience().Members.begin();
for( itA = itCl->second->getAudience().Members.begin();
itA != itCl->second->getAudience().Members.end();
++itA )
{
@ -1347,7 +1356,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc
TheDataset.getEntityId(sender).toString().c_str(),
sender.getIndex());
}
}
@ -1386,7 +1395,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc
// bms.serial( index );
// bms.serial( infos->Str );
// }
//
//
//// nldebug("<CChatManager::addDynStr> sending association [%s,%d] to %s",infos->Str.c_str(),index,receiver.toString().c_str());
// msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
// sendMessageViaMirror(frontendId, msgout);
@ -1406,7 +1415,7 @@ void CChatManager::sendEmoteCustomTextToAll( const TDataSetRow& sender, const uc
//
//-----------------------------------------------
void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender, TChanID chanID, const ucstring &senderName)
{
{
//if( receiver != sender )
{
CCharacterInfos * charInfos = NULL;
@ -1440,14 +1449,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS
}
uint32 senderNameIndex;
// if the sender exists
// if the sender exists
if( charInfos )
{
senderNameIndex = charInfos->NameIndex;
}
else
{
// if no sender, we use a special name
// if no sender, we use a special name
ucstring senderName("<BROADCAST MESSAGE>");
senderNameIndex = SM->storeString( senderName );
}
@ -1466,14 +1475,14 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms );
CChatMsg chatMsg;
chatMsg.CompressedIndex = sender.getCompressedIndex();
chatMsg.SenderNameId = senderNameIndex;
chatMsg.ChatMode = (uint8) senderChatMode;
if (senderChatMode == CChatGroup::dyn_chat)
{
chatMsg.DynChatChanID = chanID;
{
chatMsg.DynChatChanID = chanID;
}
chatMsg.Content = ucstr;
bms.serial( chatMsg );
@ -1483,7 +1492,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS
chatMsg.Sender,
receiver.toString().c_str(),
chatMsg.ChatMode);
*/
*/
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout);
}
@ -1500,7 +1509,7 @@ void CChatManager::sendChat( CChatGroup::TGroupType senderChatMode, const TDataS
nlwarning("<CChatManager::chat> The character %s:%x is unknown, no chat msg sent",
TheDataset.getEntityId(receiver).toString().c_str(),
receiver.getIndex());
}
}
}
} // sendChat //
@ -1526,14 +1535,14 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms );
CChatMsg chatMsg;
chatMsg.CompressedIndex = 0xFFFFF;
chatMsg.SenderNameId = senderNameIndex;
chatMsg.ChatMode = (uint8) senderChatMode;
if (senderChatMode == CChatGroup::dyn_chat)
{
chatMsg.DynChatChanID = chanID;
{
chatMsg.DynChatChanID = chanID;
}
chatMsg.Content = ucstr;
bms.serial( chatMsg );
@ -1554,7 +1563,7 @@ void CChatManager::sendFarChat( CChatGroup::TGroupType senderChatMode, const TDa
nlwarning("<CChatManager::chat> The character %s:%x is unknown, no chat msg sent",
TheDataset.getEntityId(receiver).toString().c_str(),
receiver.getIndex());
}
}
}
@ -1584,7 +1593,7 @@ void CChatManager::sendChatParam( CChatGroup::TGroupType senderChatMode, const T
{
TVectorParamCheck params2;
params2.resize( params.size() + 1);
// send the chat phrase to the client
// send the chat phrase to the client
params2[0].Type = STRING_MANAGER::bot;
params2[0].setEId( TheDataset.getEntityId(sender) );
uint32 first = 0, last = (uint32)params.size();
@ -1643,7 +1652,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT2", bms );
CChatMsg2 chatMsg;
chatMsg.CompressedIndex = sender.getCompressedIndex();
chatMsg.SenderNameId = charInfos ? charInfos->NameIndex : 0; // empty string if there is no sender
@ -1651,7 +1660,7 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa
chatMsg.PhraseId = phraseId;
chatMsg.CustomTxt = customTxt;
bms.serial( chatMsg );
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout);
}
@ -1677,9 +1686,9 @@ void CChatManager::sendChat2Ex( CChatGroup::TGroupType senderChatMode, const TDa
//
//-----------------------------------------------
void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSetRow &receiver, const ucstring& ucstr )
{
{
TDataSetRow senderFake = TDataSetRow::createFromRawIndex( INVALID_DATASET_ROW );
CCharacterInfos * receiverInfos = IOS->getCharInfos( TheDataset.getEntityId(receiver) );
CCharacterInfos * senderInfos = IOS->getCharInfos( TheDataset.getEntityId(sender) );
if( receiverInfos )
@ -1698,7 +1707,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe
{
return;
}
// send the string to FE
CMessage msgout( "IMPULS_CH_ID" );
uint8 channel = 1;
@ -1707,7 +1716,7 @@ void CChatManager::sendChatCustomEmote( const TDataSetRow &sender, const TDataSe
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:CHAT", bms );
CChatMsg chatMsg;
chatMsg.CompressedIndex = senderFake.getCompressedIndex();
chatMsg.SenderNameId = 0;
@ -1785,7 +1794,7 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver
TheDataset.getEntityId(receiver).toString().c_str() );
return;
}
// check if the sender is CSR or is not in the ignore list of the receiver
if(senderInfos->HavePrivilege || !itCl->second->isInIgnoreList(sender) )
{
@ -1802,10 +1811,10 @@ void CChatManager::tell2( const TDataSetRow& sender, const TDataSetRow& receiver
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL2", bms);
bms.serial( senderInfos->NameIndex );
bms.serial( id);
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
CUnifiedNetwork::getInstance()->send(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout);
}
@ -1938,8 +1947,8 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co
*/
_Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() );
// if the client doesn't know this dynamic string(name of sender), we send it to him
// send the string to FE
CMessage msgout( "IMPULS_CH_ID" );
@ -1948,12 +1957,12 @@ void CChatManager::tell( const TDataSetRow& sender, const string& receiverIn, co
msgout.serial( channel );
CBitMemStream bms;
GenericXmlMsgHeaderMngr.pushNameToStream( "STRING:TELL", bms);
TDataSetIndex dsi = senderInfos->DataSetIndex.getCompressedIndex();
bms.serial( dsi );
bms.serial( senderInfos->NameIndex );
bms.serial( const_cast<ucstring&>(ucstr) );
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout);
@ -2088,8 +2097,8 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin
string receiverName = receiverInfos->Name.toString();
_Log.displayNL("'%s' to '%s' (%s) : \t\"%s\"", senderName.toUtf8().c_str(), receiverName.c_str(), "tell", ucstr.toString().c_str() );
// if the client doesn't know this dynamic string(name of sender), we send it to him
// send the string to FE
CMessage msgout( "IMPULS_CH_ID" );
@ -2103,7 +2112,7 @@ void CChatManager::farTell( const NLMISC::CEntityId &senderCharId, const ucstrin
ftm.SenderName = senderName;
ftm.Text = ucstr;
ftm.serial(bms);
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
sendMessageViaMirror(TServiceId(receiverInfos->EntityId.getDynamicId()), msgout);
@ -2134,19 +2143,19 @@ void CChatManager::displayChatClients(NLMISC::CLog &log)
if (ci != NULL)
{
if (ci->EntityId.getType() == RYZOMID::player)
log.displayNL("'%s' %s:%x %s mode '%s'",
ci->Name.toString().c_str(),
ci->EntityId.toString().c_str(),
im->first.getIndex(),
im->second->isMuted()?"(muted)":"",
log.displayNL("'%s' %s:%x %s mode '%s'",
ci->Name.toString().c_str(),
ci->EntityId.toString().c_str(),
im->first.getIndex(),
im->second->isMuted()?"(muted)":"",
CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() );
}
else
{
log.displayNL("*no name* %s:%x %s mode '%s'",
ci->EntityId.toString().c_str(),
im->first.getIndex(),
im->second->isMuted()?"(muted)":"",
log.displayNL("*no name* %s:%x %s mode '%s'",
ci->EntityId.toString().c_str(),
im->first.getIndex(),
im->second->isMuted()?"(muted)":"",
CChatGroup::groupTypeToString(im->second->getChatMode()).c_str() );
}
}
@ -2157,17 +2166,17 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup
{
if (chatGroup.GroupName == CStringMapper::emptyId())
{
log.displayNL("Group : anonym (%s), %s : %u clients :",
log.displayNL("Group : anonym (%s), %s : %u clients :",
gid.toString().c_str(),
CChatGroup::groupTypeToString(chatGroup.Type).c_str(),
CChatGroup::groupTypeToString(chatGroup.Type).c_str(),
chatGroup.Members.size());
}
else
{
log.displayNL("Group : '%s' (%s), %s : %u clients :",
log.displayNL("Group : '%s' (%s), %s : %u clients :",
CStringMapper::unmap(chatGroup.GroupName).c_str(),
gid.toString().c_str(),
CChatGroup::groupTypeToString(chatGroup.Type).c_str(),
gid.toString().c_str(),
CChatGroup::groupTypeToString(chatGroup.Type).c_str(),
chatGroup.Members.size());
}
@ -2179,12 +2188,12 @@ void CChatManager::displayChatGroup(NLMISC::CLog &log, TGroupId gid, CChatGroup
{
CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first));
if (ci != NULL)
log.displayNL(" '%s' %s:%x",
ci->Name.toString().c_str(),
log.displayNL(" '%s' %s:%x",
ci->Name.toString().c_str(),
ci->EntityId.toString().c_str(),
first->getIndex());
else
log.displayNL(" *unknow* %s:%x",
log.displayNL(" *unknow* %s:%x",
eid.toString().c_str(),
first->getIndex());
}
@ -2262,13 +2271,13 @@ void CChatManager::displayChatAudience(NLMISC::CLog &log, const CEntityId &eid,
{
CCharacterInfos *ci = IOS->getCharInfos(TheDataset.getEntityId(*first));
if (ci != NULL)
log.displayNL(" '%s' %s:%x",
ci->Name.toString().c_str(),
log.displayNL(" '%s' %s:%x",
ci->Name.toString().c_str(),
TheDataset.getEntityId(*first).toString().c_str(),
first->getIndex());
else
log.displayNL(" *unknow* %s:%x",
log.displayNL(" *unknow* %s:%x",
TheDataset.getEntityId(*first).toString().c_str(),
first->getIndex());
}
@ -2301,9 +2310,9 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text)
{
ucstring result;
result.reserve(text.size());
ucstring::size_type pos = 0;
for (; pos < text.size(); ++pos)
{
if (text[pos] == '@' && pos < text.size()-1 && text[pos+1] == '{')
@ -2316,7 +2325,7 @@ ucstring CChatManager::filterClientInputColorCode(ucstring &text)
result += text[pos];
}
}
return result;
}
@ -2340,7 +2349,7 @@ ucstring CChatManager::filterClientInput(ucstring &text)
bool lastIsWhite = false;
for (; pos < text.size(); ++pos)
{
bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t');
bool currentIsWhite = (text[pos] == ' ' || text[pos] == '\t');
if (!(lastIsWhite && currentIsWhite))
{
// any double white skipped
@ -2353,7 +2362,7 @@ ucstring CChatManager::filterClientInput(ucstring &text)
hasBrackets = (text[pos-1] == '>') &&
(text[pos-5] == '<');
}
// Filter out '&' at the first non-whitespace position to remove
// Filter out '&' at the first non-whitespace position to remove
// system color code (like '&SYS&' )
bool disallowAmpersand = (result.size() == 0) || hasBrackets;
if (disallowAmpersand)

View file

@ -42,14 +42,14 @@
/**
* CChatManager
* \author Stephane Coutelas
* \author Nevrax France
* \date 2002
*/
class CChatManager
class CChatManager
{
public :
@ -72,7 +72,7 @@ public :
*/
void init( /*const std::string& staticDBFileName, const std::string& dynDBFileName*/ );
/** A service has gone down
/** A service has gone down
*/
void onServiceDown(const std::string &serviceShortName);
@ -80,7 +80,7 @@ public :
* Reset ChatLog management
*/
void resetChatLog();
/**
* Check if the client is already registered in the chat manager.
*/
@ -102,7 +102,7 @@ public :
* \param id is the client character id
*/
CChatClient& getClient( const TDataSetRow& id ); //throw (EChatClient);
/**
* Return a reference on the static database
*/
@ -195,7 +195,7 @@ public :
void chat2( const TDataSetRow& sender, const std::string &phraseId );
/**
* Transmit a chat message
* \param sender is the id of the talking char
@ -334,7 +334,7 @@ public :
private :
typedef std::map< TDataSetRow, CChatClient*> TClientInfoCont;
/// client infos
TClientInfoCont _Clients;
@ -377,7 +377,7 @@ protected:
friend void cbNpcTellEx( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId );
friend void cbDynChatServiceChat( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId );
friend void cbDynChatServiceTell( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId );
public:
/**
* Send a chat message
@ -389,7 +389,7 @@ public:
* \param senderName Can be used to replace the sender name with a specific string
*/
void sendChat( CChatGroup::TGroupType senderChatMode, const TDataSetRow &receiver, const ucstring& ucstr, const TDataSetRow &sender = TDataSetRow(), TChanID chanID = NLMISC::CEntityId::Unknown, const ucstring &senderName = ucstring());
/**
* Send a far chat message

View file

@ -162,7 +162,7 @@ public:
/// Init whole continent container
void init(uint gridWidth, uint gridHeight, double primitiveMaxSize, uint nbWorldImages, const std::string &packedSheetsDirectory, double cellSize=0.0, bool loadPacsPrims = true);
/// Build sheets
void buildSheets(const std::string &packedSheetsDirectory);

View file

@ -116,7 +116,7 @@ namespace MSW
if (MSWAutoReconnect)
{
addOption(MYSQL_OPT_RECONNECT, "1");
}
}
return _connect();
}

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !
@ -303,7 +318,7 @@ namespace RSMGR
}
else if (cmd == NOPE::cc_instance_count)
{
return _ObjectCache.size();
return (uint32)_ObjectCache.size();
}
// default return value
@ -321,7 +336,7 @@ namespace RSMGR
TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end());
for (; first != last; ++first)
{
nbReleased += first->second.size();
nbReleased += (uint32)first->second.size();
}
nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased);
@ -781,7 +796,7 @@ namespace RSMGR
}
else if (cmd == NOPE::cc_instance_count)
{
return _ObjectCache.size();
return (uint32)_ObjectCache.size();
}
// default return value
@ -799,7 +814,7 @@ namespace RSMGR
TReleasedObject::iterator first(_ReleasedObject.begin()), last(_ReleasedObject.end());
for (; first != last; ++first)
{
nbReleased += first->second.size();
nbReleased += (uint32)first->second.size();
}
nlinfo(" There are %u object instances in cache not referenced (waiting deletion or re-use))", nbReleased);

View file

@ -1,3 +1,18 @@
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////
// WARNING : this is a generated file, don't change it !
@ -661,7 +676,6 @@ namespace RSMGR
setPersistentState(NOPE::os_dirty);
_DomainId = value;
}
}

View file

@ -1,10 +1,9 @@
IF(WITH_RYZOM_CLIENT)
ADD_SUBDIRECTORY( client_patcher )
IF( WITH_QT )
ADD_SUBDIRECTORY( client_config_qt )
ENDIF( WITH_QT )
ENDIF(WITH_RYZOM_CLIENT)
ADD_SUBDIRECTORY(client_patcher)
ADD_SUBDIRECTORY( r2_islands_textures )
IF(WITH_QT)
ADD_SUBDIRECTORY(client_config_qt)
ENDIF()
ENDIF()
ADD_SUBDIRECTORY(r2_islands_textures)

View file

@ -1540,7 +1540,6 @@ void CScreenshotIslands::buildIslandsTextures()
CIFile proxFS(proxFileName.c_str());
proxBitmap.load(proxFS);
// resize proximity bitmap
CBitmap tempBitmap;
int newWidth = islandBitmap.getWidth();
@ -1568,7 +1567,7 @@ void CScreenshotIslands::buildIslandsTextures()
// swap them
proxBitmap.resize(newWidth, newHeight, proxBitmap.PixelFormat);
proxBitmap.swap(tempBitmap);
//proxBitmap.resample(newWidth, newHeight);

View file

@ -1,4 +1,3 @@
ADD_SUBDIRECTORY(uni_conv)
ADD_SUBDIRECTORY(csv_transform)
ADD_SUBDIRECTORY(icon_search)

View file

@ -1,4 +1,3 @@
IF(WITH_LIGO)
ADD_SUBDIRECTORY(ai_build_wmap)
ENDIF(WITH_LIGO)

View file

@ -508,7 +508,7 @@ void COutputFile::generateOutput() const
}
outbuff+="#endif\n\n";
// read in the previous version of the output file
char *inbuff=NULL;
FILE *inf=fopen(_FileName.c_str(),"rb");