From 4726e74dcd028de170f81d0117e41113065f18de Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 14 Jan 2021 16:04:54 +0100 Subject: [PATCH 1/2] Added marauder to static fames --- code/ryzom/common/src/game_share/fame.cpp | 13 +++++++++++-- code/ryzom/common/src/game_share/fame.h | 11 ++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/code/ryzom/common/src/game_share/fame.cpp b/code/ryzom/common/src/game_share/fame.cpp index cd9e2b850..19c3cbb80 100644 --- a/code/ryzom/common/src/game_share/fame.cpp +++ b/code/ryzom/common/src/game_share/fame.cpp @@ -534,7 +534,7 @@ void CStaticFames::loadTribeThreshold( const string& filename ) // check table structure uint nbTribe = ws.size()-2; nlassert(nbTribe<=_FameTableSize); - nlassert(ws.ColCount == 16); // 5 ( 4 people + neutral ) * 3 cult + 1 for tribe name + nlassert(ws.ColCount == 17); // 5 ( 4 people + neutral ) * 3 cult + 1 for tribe name + marauder _TribeCultThresholdPerCiv.resize(nbTribe); @@ -548,7 +548,7 @@ void CStaticFames::loadTribeThreshold( const string& filename ) _TribeCultThresholdPerCiv[i-2].FameIndex = index; - for( uint c=1; csetMarauder(thresholdMarauder*6000); } } } diff --git a/code/ryzom/common/src/game_share/fame.h b/code/ryzom/common/src/game_share/fame.h index fde8611b8..c0cc856bb 100644 --- a/code/ryzom/common/src/game_share/fame.h +++ b/code/ryzom/common/src/game_share/fame.h @@ -52,26 +52,30 @@ public: Kami = 0; Karavan = 0; Neutral = 0; + Marauder = 0; } void setKami(sint32 t) { Kami = t; } void setKaravan(sint32 t) { Karavan = t; } void setNeutral(sint32 t) { Neutral = t; } + void setMarauder(sint32 t) { Marauder = t; } sint32 getKami() const { return Kami; } sint32 getKaravan() const { return Karavan; } sint32 getNeutral() const { return Neutral; } + sint32 getMarauder() const { return Marauder; } private: sint32 Kami; sint32 Karavan; sint32 Neutral; + sint32 Marauder; }; class CTribeCultThresholdPerCiv { public: - bool getCultThresholdForCiv( PVP_CLAN::TPVPClan civ, sint32& kami, sint32& karavan, sint32& neutral) const + bool getCultThresholdForCiv( PVP_CLAN::TPVPClan civ, sint32& kami, sint32& karavan, sint32& neutral, sint32& marauder) const { const CTribeCultThreshold * tc = 0; switch( civ ) @@ -88,12 +92,16 @@ public: case PVP_CLAN::Neutral: tc = &Neutral; break; + case PVP_CLAN::Marauder: + tc = &Marauder; + break; default: return false; } kami = tc->getKami(); karavan = tc->getKaravan(); neutral = tc->getNeutral(); + marauder = tc->getMarauder(); return true; } @@ -103,6 +111,7 @@ public: CTribeCultThreshold Tryker; CTribeCultThreshold Zorai; CTribeCultThreshold Neutral; + CTribeCultThreshold Marauder; }; // declare scoped constant value From 951f000be4428e707eae5333305fcbbc47c341d3 Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 14 Jan 2021 16:05:40 +0100 Subject: [PATCH 2/2] Keep missions window open when player accept one of them --- code/ryzom/client/src/interface_v3/bot_chat_manager.cpp | 6 ++++++ code/ryzom/client/src/interface_v3/bot_chat_manager.h | 3 +++ .../ryzom/client/src/interface_v3/bot_chat_page_mission.cpp | 1 + code/ryzom/client/src/interface_v3/bot_chat_page_mission.h | 1 + 4 files changed, 11 insertions(+) diff --git a/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp b/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp index d25763bff..839381b91 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_manager.cpp @@ -86,6 +86,12 @@ void CBotChatManager::setCurrPage(CBotChatPage *page) UserEntity->trader(CLFECOMMON::INVALID_SLOT); } _CurrPage = page; + + if (page == NULL && !_AHAfterEnd.empty()) + { + CAHManager::getInstance()->runActionHandler(_AHAfterEnd, NULL, ""); + _AHAfterEnd = ""; + } } // ******************************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/bot_chat_manager.h b/code/ryzom/client/src/interface_v3/bot_chat_manager.h index cbd2713f8..9b9f996fc 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_manager.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_manager.h @@ -93,12 +93,15 @@ public: // Called for local client debugging void debugLocalReceiveMissionInfo(); + void setAHAfterEnd(const std::string &ah) { _AHAfterEnd = ah ;} + ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// private: CBotChatPage *_CurrPage; uint16 _SessionID; + std::string _AHAfterEnd; static CBotChatManager *_Instance; //uint _ChosenMissionFlags; diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp index ad95a35e5..4830fb096 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.cpp @@ -161,6 +161,7 @@ void CBotChatPageMission::acceptMission() /// close the botchat //CBotChatManager::getInstance()->setCurrPage(NULL); _CurrSel = NULL; + CBotChatManager::getInstance()->setAHAfterEnd("context_choose_mission"); } diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.h b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.h index 03cb8d95e..0e458fc7a 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_mission.h +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_mission.h @@ -51,6 +51,7 @@ private: // an observer to update big mission list from littles pages in server database CHugeListObs _MissionPagesObs; CDBCtrlSheet *_CurrSel; + bool _HaveAcceptedMission; MISSION_DESC::TClientMissionType _MType; };