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

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
ulukyn 6 years ago
parent 2d83507b55
commit 11132f08e6

@ -3196,8 +3196,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;
@ -3208,7 +3210,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)
@ -58,6 +58,14 @@ void COutpostManager::startPvpJoinProposal(bool playerGuildInConflict, bool play
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