Changed: Players when Outpost is in active war (OutpostInFire) can't be Neutrals

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 6 years ago
parent e4b83a4724
commit ce83c0ae51

@ -3197,8 +3197,10 @@ void impulseUserBars(NLMISC::CBitMemStream &impulse)
void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse)
{
// read message
bool outpostInFire;
bool playerGuildInConflict;
bool playerGuildIsAttacker;
impulse.serial(outpostInFire);
impulse.serial(playerGuildInConflict);
impulse.serial(playerGuildIsAttacker);
uint32 ownerGuildNameId;
@ -3209,7 +3211,7 @@ void impulseOutpostChooseSide(NLMISC::CBitMemStream &impulse)
impulse.serial( declTimer );
// start
OutpostManager.startPvpJoinProposal(playerGuildInConflict, playerGuildIsAttacker,
OutpostManager.startPvpJoinProposal(outpostInFire, playerGuildInConflict, playerGuildIsAttacker,
ownerGuildNameId, attackerGuildNameId, declTimer);
}

@ -37,7 +37,7 @@ COutpostManager::COutpostManager()
// ***************************************************************************
void COutpostManager::startPvpJoinProposal(bool playerGuildInConflict, bool playerGuildIsAttacker,
void COutpostManager::startPvpJoinProposal(bool outpostInFire, bool playerGuildInConflict, bool playerGuildIsAttacker,
uint32 ownerGuildNameId, uint32 attackerGuildNameId, uint32 declTimer)
{
// reset counter that force player to be neutral (eg: 10 seconds)
@ -55,9 +55,17 @@ void COutpostManager::startPvpJoinProposal(bool playerGuildInConflict, bool play
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<CCtrlBase *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:random"));
if (ctrl)
ctrl->setActive(outpostInFire);
ctrl = dynamic_cast<CCtrlBase *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal:content:neutral"));
if (ctrl)
ctrl->setActive(!outpostInFire);
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal"));
if (pGC)
{

@ -40,7 +40,7 @@ public:
COutpostManager();
/// Called when the server ask to join for PVP in a Outpost Zone
void startPvpJoinProposal(bool playerGuildInConflict, bool playerGuildIsAttacker,
void startPvpJoinProposal(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

Loading…
Cancel
Save