From dc66068f94d01458311f7cd679612c3faec378bf Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 4 Jun 2011 13:23:14 +0200 Subject: [PATCH] Changed: Merge changes from next patch --- code/ryzom/client/src/client_chat_manager.cpp | 6 ++++++ code/ryzom/client/src/interface_v3/chat_filter.cpp | 2 +- code/ryzom/client/src/interface_v3/guild_manager.cpp | 6 ++++++ .../entities_game_service/game_item_manager/game_item.cpp | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/client_chat_manager.cpp b/code/ryzom/client/src/client_chat_manager.cpp index 878017436..fa4159b1f 100644 --- a/code/ryzom/client/src/client_chat_manager.cpp +++ b/code/ryzom/client/src/client_chat_manager.cpp @@ -1267,6 +1267,12 @@ void CClientChatManager::updateChatModeAndButton(uint mode, uint32 dynamicChanne const bool teamActive = pIM->getDbProp("SERVER:GROUP:0:PRESENT")->getValueBool(); const bool guildActive = pIM->getDbProp("SERVER:GUILD:NAME")->getValueBool(); + if (m == CChatGroup::team && ! teamActive) + m = PeopleInterraction.TheUserChat.Filter.getTargetGroup(); + + if (m == CChatGroup::guild && ! guildActive) + m = PeopleInterraction.TheUserChat.Filter.getTargetGroup(); + if (pUserBut) { switch(m) diff --git a/code/ryzom/client/src/interface_v3/chat_filter.cpp b/code/ryzom/client/src/interface_v3/chat_filter.cpp index ef370b689..fc2e6c9c3 100644 --- a/code/ryzom/client/src/interface_v3/chat_filter.cpp +++ b/code/ryzom/client/src/interface_v3/chat_filter.cpp @@ -382,7 +382,7 @@ void CChatTargetFilter::setTargetGroup(CChatGroup::TGroupType groupType, uint32 case CChatGroup::say: entry+="SAY"; break; case CChatGroup::shout: entry+="SHOUT"; break; case CChatGroup::team: if(!teamActive) return; entry+="GROUP"; break; - case CChatGroup::guild: if(!guildActive) return; entry+="CLADE"; break; + case CChatGroup::guild: entry+="CLADE"; break; case CChatGroup::civilization: entry+="CIVILIZATION"; break; case CChatGroup::territory: entry+="TERRITORY"; break; case CChatGroup::universe: diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index c9bb4ec01..6abd0c029 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -29,6 +29,7 @@ #include "group_html.h" #include "../init_main_loop.h" #include "inventory_manager.h" +#include "../client_chat_manager.h" #include "../connection.h" #include "../entity_cl.h" @@ -48,6 +49,7 @@ using namespace std; using namespace NLMISC; extern CPeopleInterraction PeopleInterraction; +extern CClientChatManager ChatMngr; NLMISC_REGISTER_OBJECT(CViewBase, CDBGroupListAscensor, std::string, "list_sheet_guild"); @@ -539,6 +541,10 @@ void CGuildManager::closeAllInterfaces() CGroupContainer *pGuildChat = dynamic_cast(pIM->getElementFromId(WIN_GUILD_CHAT)); if (pGuildChat != NULL) pGuildChat->setActive(false); + + if (PeopleInterraction.TheUserChat.Filter.getTargetGroup() == CChatGroup::guild) + ChatMngr.updateChatModeAndButton(CChatGroup::say); + } // *************************************************************************** diff --git a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp index eb30c4e76..da14bf244 100644 --- a/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp +++ b/code/ryzom/server/src/entities_game_service/game_item_manager/game_item.cpp @@ -2956,6 +2956,7 @@ uint32 CGameItem::weight() const case ITEMFAMILY::HARVEST_TOOL: case ITEMFAMILY::MISSION_ITEM: case ITEMFAMILY::GENERIC_ITEM: + case ITEMFAMILY::ITEM_SAP_RECHARGE: return _Form->Weight; default: return 0;