Merge branch 'fixes' into atys

merge-requests/6/head
Nuno 4 years ago
commit 8fa5de61e3

@ -86,6 +86,12 @@ void CBotChatManager::setCurrPage(CBotChatPage *page)
UserEntity->trader(CLFECOMMON::INVALID_SLOT); UserEntity->trader(CLFECOMMON::INVALID_SLOT);
} }
_CurrPage = page; _CurrPage = page;
if (page == NULL && !_AHAfterEnd.empty())
{
CAHManager::getInstance()->runActionHandler(_AHAfterEnd, NULL, "");
_AHAfterEnd = "";
}
} }
// ******************************************************************************************** // ********************************************************************************************

@ -93,12 +93,15 @@ public:
// Called for local client debugging // Called for local client debugging
void debugLocalReceiveMissionInfo(); void debugLocalReceiveMissionInfo();
void setAHAfterEnd(const std::string &ah) { _AHAfterEnd = ah ;}
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
private: private:
CBotChatPage *_CurrPage; CBotChatPage *_CurrPage;
uint16 _SessionID; uint16 _SessionID;
std::string _AHAfterEnd;
static CBotChatManager *_Instance; static CBotChatManager *_Instance;
//uint _ChosenMissionFlags; //uint _ChosenMissionFlags;

@ -161,6 +161,7 @@ void CBotChatPageMission::acceptMission()
/// close the botchat /// close the botchat
//CBotChatManager::getInstance()->setCurrPage(NULL); //CBotChatManager::getInstance()->setCurrPage(NULL);
_CurrSel = NULL; _CurrSel = NULL;
CBotChatManager::getInstance()->setAHAfterEnd("context_choose_mission");
} }

@ -51,6 +51,7 @@ private:
// an observer to update big mission list from littles pages in server database // an observer to update big mission list from littles pages in server database
CHugeListObs _MissionPagesObs; CHugeListObs _MissionPagesObs;
CDBCtrlSheet *_CurrSel; CDBCtrlSheet *_CurrSel;
bool _HaveAcceptedMission;
MISSION_DESC::TClientMissionType _MType; MISSION_DESC::TClientMissionType _MType;
}; };

@ -534,7 +534,7 @@ void CStaticFames::loadTribeThreshold( const string& filename )
// check table structure // check table structure
uint nbTribe = ws.size()-2; uint nbTribe = ws.size()-2;
nlassert(nbTribe<=_FameTableSize); 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); _TribeCultThresholdPerCiv.resize(nbTribe);
@ -548,7 +548,7 @@ void CStaticFames::loadTribeThreshold( const string& filename )
_TribeCultThresholdPerCiv[i-2].FameIndex = index; _TribeCultThresholdPerCiv[i-2].FameIndex = index;
for( uint c=1; c<ws.ColCount; c+=3) for( uint c=1; c<ws.ColCount-1; c+=3)
{ {
sint32 thresholdKami, thresholdKaravan, thresholdNeutral; sint32 thresholdKami, thresholdKaravan, thresholdNeutral;
fromString(ws.getData(i, c).toString(), thresholdKami); fromString(ws.getData(i, c).toString(), thresholdKami);
@ -585,6 +585,15 @@ void CStaticFames::loadTribeThreshold( const string& filename )
// This message removed by Sadge because there is no context displayed, meaning that message must be useless // This message removed by Sadge because there is no context displayed, meaning that message must be useless
// nldebug(" %s", ws.getData(i, c).toString().c_str() ); // nldebug(" %s", ws.getData(i, c).toString().c_str() );
} }
// Special case for Marauders
sint32 thresholdMarauder;
fromString(ws.getData(i, ws.ColCount-1).toString(), thresholdMarauder);
CTribeCultThreshold * tc;
tc = &_TribeCultThresholdPerCiv[i-2].Marauder;
tc->setMarauder(thresholdMarauder*6000);
} }
} }
} }

@ -52,26 +52,30 @@ public:
Kami = 0; Kami = 0;
Karavan = 0; Karavan = 0;
Neutral = 0; Neutral = 0;
Marauder = 0;
} }
void setKami(sint32 t) { Kami = t; } void setKami(sint32 t) { Kami = t; }
void setKaravan(sint32 t) { Karavan = t; } void setKaravan(sint32 t) { Karavan = t; }
void setNeutral(sint32 t) { Neutral = t; } void setNeutral(sint32 t) { Neutral = t; }
void setMarauder(sint32 t) { Marauder = t; }
sint32 getKami() const { return Kami; } sint32 getKami() const { return Kami; }
sint32 getKaravan() const { return Karavan; } sint32 getKaravan() const { return Karavan; }
sint32 getNeutral() const { return Neutral; } sint32 getNeutral() const { return Neutral; }
sint32 getMarauder() const { return Marauder; }
private: private:
sint32 Kami; sint32 Kami;
sint32 Karavan; sint32 Karavan;
sint32 Neutral; sint32 Neutral;
sint32 Marauder;
}; };
class CTribeCultThresholdPerCiv class CTribeCultThresholdPerCiv
{ {
public: 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; const CTribeCultThreshold * tc = 0;
switch( civ ) switch( civ )
@ -88,12 +92,16 @@ public:
case PVP_CLAN::Neutral: case PVP_CLAN::Neutral:
tc = &Neutral; tc = &Neutral;
break; break;
case PVP_CLAN::Marauder:
tc = &Marauder;
break;
default: default:
return false; return false;
} }
kami = tc->getKami(); kami = tc->getKami();
karavan = tc->getKaravan(); karavan = tc->getKaravan();
neutral = tc->getNeutral(); neutral = tc->getNeutral();
marauder = tc->getMarauder();
return true; return true;
} }
@ -103,6 +111,7 @@ public:
CTribeCultThreshold Tryker; CTribeCultThreshold Tryker;
CTribeCultThreshold Zorai; CTribeCultThreshold Zorai;
CTribeCultThreshold Neutral; CTribeCultThreshold Neutral;
CTribeCultThreshold Marauder;
}; };
// declare scoped constant value // declare scoped constant value

Loading…
Cancel
Save