From de90245f271dbd3e8344d6c2e7b1e82669f651e0 Mon Sep 17 00:00:00 2001 From: Nuno Date: Fri, 16 Apr 2021 14:08:37 +0200 Subject: [PATCH 1/7] Added GvE and GvG to TPVPType enum --- code/ryzom/common/src/game_share/outpost.cpp | 2 ++ code/ryzom/common/src/game_share/outpost.h | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/outpost.cpp b/code/ryzom/common/src/game_share/outpost.cpp index b2cbde97f..d94254c83 100644 --- a/code/ryzom/common/src/game_share/outpost.cpp +++ b/code/ryzom/common/src/game_share/outpost.cpp @@ -33,6 +33,8 @@ namespace OUTPOSTENUMS NL_STRING_CONVERSION_TABLE_ENTRY(RVR) NL_STRING_CONVERSION_TABLE_ENTRY(Full) NL_STRING_CONVERSION_TABLE_ENTRY(UnknownPVPType) + NL_STRING_CONVERSION_TABLE_ENTRY(GVE) + NL_STRING_CONVERSION_TABLE_ENTRY(GVG) NL_END_STRING_CONVERSION_TABLE(TPVPType, StaticCOutpostTPVPTypeConversion, UnknownPVPType) NL_BEGIN_STRING_CONVERSION_TABLE (TPVPSide) diff --git a/code/ryzom/common/src/game_share/outpost.h b/code/ryzom/common/src/game_share/outpost.h index a951d1afb..391779ad0 100644 --- a/code/ryzom/common/src/game_share/outpost.h +++ b/code/ryzom/common/src/game_share/outpost.h @@ -50,7 +50,9 @@ namespace OUTPOSTENUMS PVE, // can only be attacked if the outpost is held by a tribe and if the attacking guild comes from the same continent as the outpost PVP, // can only be attacked if the attacking guild comes from the same continent as the outpost RVR, // can only be attacked if the attacking guild comes from another continent as the outpost - Full // same as RVR but cant be set by the high council + Full, // same as RVR but cant be set by the high council + GVE, // Only one guild vs tribes + GVG, // Only one guild vs another guild }; enum TPVPSide From 17f818eace40f2780e1727b166b8b8f8ca4da4e1 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 26 Apr 2021 17:38:27 +0200 Subject: [PATCH 2/7] Added GvE option --- code/ryzom/client/src/net_manager.cpp | 5 ++++- code/ryzom/client/src/outpost_manager.cpp | 20 ++++++++++++++++---- code/ryzom/client/src/outpost_manager.h | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 60a996954..ada437ec7 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -33,6 +33,7 @@ #include "game_share/chat_group.h" #include "game_share/character_summary.h" #include "game_share/sphrase_com.h" +#include "game_share/outpost.h" #include "game_share/msg_client_server.h" #include "game_share/ryzom_database_banks.h" #include "game_share/msg_encyclopedia.h" @@ -3205,9 +3206,11 @@ void impulseUserBars(NLMISC::CBitMemStream &impulse) void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse) { // read message + uint8 type; bool outpostInFire; bool playerGuildInConflict; bool playerGuildIsAttacker; + impulse.serial(type); impulse.serial(outpostInFire); impulse.serial(playerGuildInConflict); impulse.serial(playerGuildIsAttacker); @@ -3219,7 +3222,7 @@ void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse) impulse.serial( declTimer ); // start - OutpostManager.startPvpJoinProposal(outpostInFire, playerGuildInConflict, playerGuildIsAttacker, + OutpostManager.startPvpJoinProposal((OUTPOSTENUMS::TPVPType)type, outpostInFire, playerGuildInConflict, playerGuildIsAttacker, ownerGuildNameId, attackerGuildNameId, declTimer); } diff --git a/code/ryzom/client/src/outpost_manager.cpp b/code/ryzom/client/src/outpost_manager.cpp index 305cba650..f1e6a15b7 100644 --- a/code/ryzom/client/src/outpost_manager.cpp +++ b/code/ryzom/client/src/outpost_manager.cpp @@ -40,7 +40,7 @@ COutpostManager::COutpostManager() // *************************************************************************** -void COutpostManager::startPvpJoinProposal(bool outpostInFire, bool playerGuildInConflict, bool playerGuildIsAttacker, +void COutpostManager::startPvpJoinProposal(OUTPOSTENUMS::TPVPType type, bool outpostInFire, bool playerGuildInConflict, bool playerGuildIsAttacker, uint32 ownerGuildNameId, uint32 attackerGuildNameId, uint32 declTimer) { // reset counter that force player to be neutral (eg: 10 seconds) @@ -58,16 +58,28 @@ void COutpostManager::startPvpJoinProposal(bool outpostInFire, bool playerGuildI node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_DEFENDER"); if(node) node->setValue32(ownerGuildNameId); node= NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:PVP_PROPOSAL_TICK_END"); - if(node) node->setValue32(_EndTickForPvpJoinProposal); + if(node) node->setValue32(_EndTickForPvpJoinProposal); // open Popup CCtrlBase *ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:random")); if (ctrl) - ctrl->setActive(outpostInFire); + ctrl->setActive(type != OUTPOSTENUMS::GVE && outpostInFire); + ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:neutral")); if (ctrl) - ctrl->setActive(!outpostInFire); + ctrl->setActive(type != OUTPOSTENUMS::GVE || !outpostInFire); + + // GvE: only attacker guild can have the option + ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:attack")); + if (ctrl && type == OUTPOSTENUMS::GVE) + ctrl->setActive(playerGuildIsAttacker); + + // GvE : No defend option + ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:defend")); + if (ctrl && type == OUTPOSTENUMS::GVE) + ctrl->setActive(false); + CGroupContainer *pGC = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal")); if (pGC) diff --git a/code/ryzom/client/src/outpost_manager.h b/code/ryzom/client/src/outpost_manager.h index 3a1b59673..009a1221e 100644 --- a/code/ryzom/client/src/outpost_manager.h +++ b/code/ryzom/client/src/outpost_manager.h @@ -40,7 +40,7 @@ public: COutpostManager(); /// Called when the server ask to join for PVP in a Outpost Zone - void startPvpJoinProposal(bool outpostInFire, bool playerGuildInConflict, bool playerGuildIsAttacker, + void startPvpJoinProposal(OUTPOSTENUMS::TPVPType type, bool outpostInFire, bool playerGuildInConflict, bool playerGuildIsAttacker, uint32 ownerGuildNameId, uint32 attackerGuildNameId, uint32 declTimer); /// Called when the client answer to the join for PVP in a Outpost Zone From 5a7d067a71add62057859d959168888c727470ea Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 26 Apr 2021 19:09:27 +0200 Subject: [PATCH 3/7] Added Gen and Mar OP mats --- code/ryzom/common/src/game_share/brick_families.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/ryzom/common/src/game_share/brick_families.cpp b/code/ryzom/common/src/game_share/brick_families.cpp index c36593da0..796a2f590 100644 --- a/code/ryzom/common/src/game_share/brick_families.cpp +++ b/code/ryzom/common/src/game_share/brick_families.cpp @@ -264,6 +264,19 @@ namespace BRICK_FAMILIES NL_STRING_CONVERSION_TABLE_ENTRY(BCOKARM02) NL_STRING_CONVERSION_TABLE_ENTRY(BCOKARR02) NL_STRING_CONVERSION_TABLE_ENTRY(BCOKART02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMARM01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMARR01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMART01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMARM02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMARR02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOMART02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENM01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENR01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENT01) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENM02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENR02) + NL_STRING_CONVERSION_TABLE_ENTRY(BCOGENT02) + // Faber options NL_STRING_CONVERSION_TABLE_ENTRY(BCOA) From 868f462d5f6a108991f9d116b62e4c97fc2d22a8 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 26 Apr 2021 19:11:02 +0200 Subject: [PATCH 4/7] Added Gen and Mar OP mats --- code/ryzom/common/src/game_share/brick_families.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/code/ryzom/common/src/game_share/brick_families.h b/code/ryzom/common/src/game_share/brick_families.h index 7903f6e5e..bc1bf0238 100644 --- a/code/ryzom/common/src/game_share/brick_families.h +++ b/code/ryzom/common/src/game_share/brick_families.h @@ -297,6 +297,18 @@ namespace BRICK_FAMILIES BCOKARM02, BCOKARR02, BCOKART02, + BCOMARR01, + BCOMART01, + BCOMARM02, + BCOMARR02, + BCOMART02, + BCOGENM01, + BCOGENR01, + BCOGENT01, + BCOGENM02, + BCOGENR02, + BCOGENT02, + EndFaberMandatory = BCOKART02, // OPTION FABER From 629e8f52729b28dca5e414a1e9678976face3a33 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 26 Apr 2021 19:11:48 +0200 Subject: [PATCH 5/7] Added Gen and Mar OP mats --- code/ryzom/common/src/game_share/brick_families.h | 1 + 1 file changed, 1 insertion(+) diff --git a/code/ryzom/common/src/game_share/brick_families.h b/code/ryzom/common/src/game_share/brick_families.h index bc1bf0238..4dd124e6c 100644 --- a/code/ryzom/common/src/game_share/brick_families.h +++ b/code/ryzom/common/src/game_share/brick_families.h @@ -297,6 +297,7 @@ namespace BRICK_FAMILIES BCOKARM02, BCOKARR02, BCOKART02, + BCOMARM01, BCOMARR01, BCOMART01, BCOMARM02, From 540ab1ffc81dfd2b180c91d9bd4333e627f4c933 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 26 Apr 2021 21:16:06 +0200 Subject: [PATCH 6/7] Fixed issue with families --- code/ryzom/common/src/game_share/brick_families.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ryzom/common/src/game_share/brick_families.h b/code/ryzom/common/src/game_share/brick_families.h index 4dd124e6c..be5f521d4 100644 --- a/code/ryzom/common/src/game_share/brick_families.h +++ b/code/ryzom/common/src/game_share/brick_families.h @@ -310,7 +310,7 @@ namespace BRICK_FAMILIES BCOGENR02, BCOGENT02, - EndFaberMandatory = BCOKART02, + EndFaberMandatory = BCOGENT02, // OPTION FABER BeginFaberOption, From e9b7345ba5b9d51afe3bfc56bab9ff1cfa78e11a Mon Sep 17 00:00:00 2001 From: Nuno Date: Wed, 28 Apr 2021 14:43:26 +0200 Subject: [PATCH 7/7] Update GvE outpost options --- code/ryzom/client/src/client_sheets/sbrick_sheet.cpp | 2 +- code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp | 1 - code/ryzom/client/src/outpost_manager.cpp | 2 +- code/ryzom/common/src/game_share/outpost.cpp | 2 +- code/ryzom/common/src/game_share/player_visual_properties.h | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp b/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp index 6eae652df..81bd338fa 100644 --- a/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/sbrick_sheet.cpp @@ -549,6 +549,6 @@ bool CSBrickSheet::mustDisplayLevel() const // NB: Yoyo Hack. special interface with indexInFamily==63 means "want to display the level" return !( isMandatory() || isRoot() || - (BrickFamily>= BRICK_FAMILIES::BeginInterface && BrickFamily<= BRICK_FAMILIES::EndInterface && IndexInFamily!=63) || + //(BrickFamily>= BRICK_FAMILIES::BeginInterface && BrickFamily<= BRICK_FAMILIES::EndInterface && IndexInFamily!=63) || Level==0 ); } diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 9485cb2b7..603d0aec6 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -2456,7 +2456,6 @@ void CDBCtrlSheet::drawSheet (sint32 x, sint32 y, bool draging, bool showSelecti if ((i - 1) < _BoostIcons.size()) { - nlinfo("Boost icon = %s", rVR.getTextureNameFromId(_BoostIcons[i-1].TextureId).c_str()); rVR.drawRotFlipBitmap(_RenderLayer + 2, xIcon+wIcon-_BoostIcons[i-1].IconW, yIcon, _BoostIcons[i-1].IconW, _BoostIcons[i-1].IconH, 0, false, _BoostIcons[i-1].TextureId, fastMulRGB(curSheetColor, _BoostIcons[i-1].Color)); } } diff --git a/code/ryzom/client/src/outpost_manager.cpp b/code/ryzom/client/src/outpost_manager.cpp index f1e6a15b7..12d0d545f 100644 --- a/code/ryzom/client/src/outpost_manager.cpp +++ b/code/ryzom/client/src/outpost_manager.cpp @@ -68,7 +68,7 @@ void COutpostManager::startPvpJoinProposal(OUTPOSTENUMS::TPVPType type, bool out ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:neutral")); if (ctrl) - ctrl->setActive(type != OUTPOSTENUMS::GVE || !outpostInFire); + ctrl->setActive(type == OUTPOSTENUMS::GVE || !outpostInFire); // GvE: only attacker guild can have the option ctrl = dynamic_cast(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:attack")); diff --git a/code/ryzom/common/src/game_share/outpost.cpp b/code/ryzom/common/src/game_share/outpost.cpp index d94254c83..db7425c57 100644 --- a/code/ryzom/common/src/game_share/outpost.cpp +++ b/code/ryzom/common/src/game_share/outpost.cpp @@ -32,9 +32,9 @@ namespace OUTPOSTENUMS NL_STRING_CONVERSION_TABLE_ENTRY(PVP) NL_STRING_CONVERSION_TABLE_ENTRY(RVR) NL_STRING_CONVERSION_TABLE_ENTRY(Full) - NL_STRING_CONVERSION_TABLE_ENTRY(UnknownPVPType) NL_STRING_CONVERSION_TABLE_ENTRY(GVE) NL_STRING_CONVERSION_TABLE_ENTRY(GVG) + NL_STRING_CONVERSION_TABLE_ENTRY(UnknownPVPType) NL_END_STRING_CONVERSION_TABLE(TPVPType, StaticCOutpostTPVPTypeConversion, UnknownPVPType) NL_BEGIN_STRING_CONVERSION_TABLE (TPVPSide) diff --git a/code/ryzom/common/src/game_share/player_visual_properties.h b/code/ryzom/common/src/game_share/player_visual_properties.h index e6fa05762..14f245d97 100644 --- a/code/ryzom/common/src/game_share/player_visual_properties.h +++ b/code/ryzom/common/src/game_share/player_visual_properties.h @@ -37,7 +37,7 @@ struct SPropVisualA uint64 JacketColor : 3; // max: 8 current: 8 uint64 TrouserModel : 8; // max: 256 current: 104 uint64 TrouserColor : 3; // max: 8 current: 8 - uint64 WeaponRightHand : 10; // max: 1024 current: 457 + uint64 WeaponRightHand : 10; // max: 1024 current: 625 uint64 WeaponLeftHand : 8; // max: 256 current: 63 uint64 ArmModel : 8; // max: 256 current: 94 uint64 ArmColor : 3; // max: 8 current: 8