Merge branch 'ark'

feature/prepare-cross-merge
Ulukyn 5 years ago committed by kaetemi
parent 653a8fb472
commit ae685b3d68
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -53,7 +53,7 @@ map< pair<uint16, uint16>, CSheetId > CStaticBrick::_Bricks;
NL_INSTANCE_COUNTER_IMPL(CFaber); NL_INSTANCE_COUNTER_IMPL(CFaber);
//-------------------------------------------------------------- //--------------------------------------------------------------
// constructor // constructor
//-------------------------------------------------------------- //--------------------------------------------------------------
CStaticBrick::CStaticBrick() CStaticBrick::CStaticBrick()
{ {
@ -79,7 +79,7 @@ CStaticBrick::CStaticBrick()
//-------------------------------------------------------------- //--------------------------------------------------------------
// destructor // destructor
//-------------------------------------------------------------- //--------------------------------------------------------------
CStaticBrick::~CStaticBrick() CStaticBrick::~CStaticBrick()
{ {
@ -88,7 +88,7 @@ CStaticBrick::~CStaticBrick()
//-------------------------------------------------------------- //--------------------------------------------------------------
// serial() // serial()
//-------------------------------------------------------------- //--------------------------------------------------------------
void CStaticBrick::serial(class NLMISC::IStream &f) void CStaticBrick::serial(class NLMISC::IStream &f)
{ {
@ -104,7 +104,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
f.serial(MinCastTime); f.serial(MinCastTime);
f.serial(MaxCastTime); f.serial(MaxCastTime);
f.serial(MinRange); f.serial(MinRange);
f.serial(MaxRange); f.serial(MaxRange);
f.serialCont( StringParams ); f.serialCont( StringParams );
f.serial(ForbiddenDef); f.serial(ForbiddenDef);
f.serial(ForbiddenExclude); f.serial(ForbiddenExclude);
@ -137,11 +137,11 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
addParam(StringParams[i], Params); addParam(StringParams[i], Params);
} }
// Grammar // Grammar
// mandatory // mandatory
f.serial(size); f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i) for ( uint16 i = 0 ; i < size ; ++i)
{ {
f.serial(str); f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str); BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -156,7 +156,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// optional // optional
f.serial(size); f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i) for ( uint16 i = 0 ; i < size ; ++i)
{ {
f.serial(str); f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str); BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -171,7 +171,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// credit // credit
f.serial(size); f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i) for ( uint16 i = 0 ; i < size ; ++i)
{ {
f.serial(str); f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str); BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -217,7 +217,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
} }
} }
else else
{ {
// family // family
string str = BRICK_FAMILIES::toString(Family); string str = BRICK_FAMILIES::toString(Family);
f.serial( str ); f.serial( str );
@ -225,7 +225,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// localisation // localisation
str = SLOT_EQUIPMENT::toString(ForcedLocalisation); str = SLOT_EQUIPMENT::toString(ForcedLocalisation);
f.serial( str ); f.serial( str );
// params // params
// nothing to do -> keep params and only serialize the param as strings // nothing to do -> keep params and only serialize the param as strings
@ -292,7 +292,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
//-------------------------------------------------------------- //--------------------------------------------------------------
// readGeorges() // readGeorges()
//-------------------------------------------------------------- //--------------------------------------------------------------
void CStaticBrick::readGeorges (const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const NLMISC::CSheetId &sheetId) void CStaticBrick::readGeorges (const NLMISC::CSmartPtr<NLGEORGES::UForm> &form, const NLMISC::CSheetId &sheetId)
{ {
@ -324,11 +324,11 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
// FamilyId // FamilyId
//if( root.getValueByName (value, "Basics.FamilyId") ) //if( root.getValueByName (value, "Basics.FamilyId") )
//{ //{
//Family = BRICK_FAMILIES::toSBrickFamily( sheetName.substr( 0, sheetName.size() - NB_LETTERS_AFTER_FAMILY ) ); //Family = BRICK_FAMILIES::toSBrickFamily( sheetName.substr( 0, sheetName.size() - NB_LETTERS_AFTER_FAMILY ) );
//} //}
if( root.getValueByName (value, "Basics.FamilyId") ) if( root.getValueByName (value, "Basics.FamilyId") )
{ {
Family = BRICK_FAMILIES::toSBrickFamily( value ); Family = BRICK_FAMILIES::toSBrickFamily( value );
if(Family==BRICK_FAMILIES::Unknown) if(Family==BRICK_FAMILIES::Unknown)
nlwarning("CStaticBrick::readStaticBrick: Unknown Family %s in sheet %s", value.c_str(), sheetId.toString().c_str()); nlwarning("CStaticBrick::readStaticBrick: Unknown Family %s in sheet %s", value.c_str(), sheetId.toString().c_str());
/* /*
@ -344,7 +344,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
*/ */
} }
else else
{ {
nlwarning("<CStaticBrick::readGeorges> can't get the value 'FamilyId' for sheet %s", sheetId.toString().c_str() ); nlwarning("<CStaticBrick::readGeorges> can't get the value 'FamilyId' for sheet %s", sheetId.toString().c_str() );
} }
@ -374,7 +374,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
{ {
nlwarning("<CStaticBrick::readGeorges> can't get the value 'Skill' for sheet %s", sheetId.toString().c_str() ); nlwarning("<CStaticBrick::readGeorges> can't get the value 'Skill' for sheet %s", sheetId.toString().c_str() );
} }
// SabrinaValue // SabrinaValue
root.getValueByName (SabrinaValue, "Basics.SabrinaCost"); root.getValueByName (SabrinaValue, "Basics.SabrinaCost");
@ -387,9 +387,9 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
// power value // power value
root.getValueByName (PowerValue, "Basics.PowerValue"); root.getValueByName (PowerValue, "Basics.PowerValue");
// IndexInFamily // IndexInFamily
if( ! root.getValueByName (IndexInFamily, "Basics.IndexInFamily") ) if( ! root.getValueByName (IndexInFamily, "Basics.IndexInFamily") )
{ {
nlwarning("<CStaticBrick::readGeorges> can't get the value 'IndexInFamily' for sheet %s", sheetId.toString().c_str() ); nlwarning("<CStaticBrick::readGeorges> can't get the value 'IndexInFamily' for sheet %s", sheetId.toString().c_str() );
} }
@ -403,7 +403,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
{ {
nlwarning("<CStaticBrick::readGeorges> can't get the value 'ForcedLocalisation' for sheet %s", sheetId.toString().c_str() ); nlwarning("<CStaticBrick::readGeorges> can't get the value 'ForcedLocalisation' for sheet %s", sheetId.toString().c_str() );
} }
// LearnRequiresOneOfSkills // LearnRequiresOneOfSkills
if ( ! root.getValueByName (value, "Basics.LearnRequiresOneOfSkills") ) if ( ! root.getValueByName (value, "Basics.LearnRequiresOneOfSkills") )
{ {
@ -464,7 +464,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
brickSheet += string(".sbrick"); brickSheet += string(".sbrick");
} }
} }
CSheetId brickSheetId( NLMISC::strlwr( brickSheet ) ); CSheetId brickSheetId( NLMISC::strlwr( brickSheet ) );
if ( brickSheetId == CSheetId::Unknown ) if ( brickSheetId == CSheetId::Unknown )
nlwarning( "<CStaticBrick::readGeorges> LearnRequireBricks: unknown sheet %s in %s", brickSheet.c_str(), sheetId.toString().c_str() ); nlwarning( "<CStaticBrick::readGeorges> LearnRequireBricks: unknown sheet %s in %s", brickSheet.c_str(), sheetId.toString().c_str() );
@ -513,7 +513,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
{ {
addParam(StringParams[i], Params); addParam(StringParams[i], Params);
} }
// Load Faber tools // Load Faber tools
if( Family >= BRICK_FAMILIES::BeginFaberRoot && Family <= BRICK_FAMILIES::EndFaberRoot ) if( Family >= BRICK_FAMILIES::BeginFaberRoot && Family <= BRICK_FAMILIES::EndFaberRoot )
{ {
@ -521,7 +521,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
} }
// crafting duration // crafting duration
if ( !root.getValueByName(CraftingDuration , "faber.Crafting Duration" ) ) if ( !root.getValueByName(CraftingDuration , "faber.Crafting Duration" ) )
{ {
nlwarning("<CStaticBrick::readGeorges> can't get the value 'faber.Crafting Duration' for sheet %s", sheetId.toString().c_str() ); nlwarning("<CStaticBrick::readGeorges> can't get the value 'faber.Crafting Duration' for sheet %s", sheetId.toString().c_str() );
} }
@ -564,7 +564,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
nlwarning("Unknown Mandatory family %s",value.c_str()); nlwarning("Unknown Mandatory family %s",value.c_str());
} }
} }
// Optional families // Optional families
OptionalFamilies.clear(); OptionalFamilies.clear();
for( uint i = 0 ; i < SBRICK_MAX_OPTIONAL ; ++i ) for( uint i = 0 ; i < SBRICK_MAX_OPTIONAL ; ++i )
@ -580,7 +580,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
nlwarning("Unknown optional family %s",value.c_str()); nlwarning("Unknown optional family %s",value.c_str());
} }
} }
// Parameter families // Parameter families
// ParameterFamilies.clear(); // ParameterFamilies.clear();
for( uint i = 0 ; i < SBRICK_MAX_PARAMETER ; ++i ) for( uint i = 0 ; i < SBRICK_MAX_PARAMETER ; ++i )
@ -596,7 +596,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
nlwarning("Unknown Parameter family %s",value.c_str()); nlwarning("Unknown Parameter family %s",value.c_str());
} }
} }
// Credit families // Credit families
CreditFamilies.clear(); CreditFamilies.clear();
for( uint i = 0 ; i < SBRICK_MAX_CREDIT ; ++i ) for( uint i = 0 ; i < SBRICK_MAX_CREDIT ; ++i )
@ -610,12 +610,12 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
CreditFamilies.insert( bf ); CreditFamilies.insert( bf );
} }
} }
root.getValueByName (ForbiddenDef, "Basics.ForbiddenDef" ); root.getValueByName (ForbiddenDef, "Basics.ForbiddenDef" );
root.getValueByName (ForbiddenExclude, "Basics.ForbiddenExclude" ); root.getValueByName (ForbiddenExclude, "Basics.ForbiddenExclude" );
root.getValueByName (UsableWithEmptyHands, "Basics.UsableWithEmptyHands"); root.getValueByName (UsableWithEmptyHands, "Basics.UsableWithEmptyHands");
} // readStaticBrick // } // readStaticBrick //
@ -648,7 +648,7 @@ bool CPlayerSkill::initFromString( const string& skillAndValue )
// string if the brick properties. // string if the brick properties.
// //
//-------------------------------------------------------------- //--------------------------------------------------------------
// addParam() // addParam()
//-------------------------------------------------------------- //--------------------------------------------------------------
void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Params) void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Params)
{ {
@ -665,52 +665,52 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::SAP: case TBrickParam::SAP:
// $*STRUCT CSBrickParamSap TBrickParam::SAP // $*STRUCT CSBrickParamSap TBrickParam::SAP
// $*-i unsigned Sap=0 // quantity of SAP to use // $*-i unsigned Sap=0 // quantity of SAP to use
Params.push_back(new CSBrickParamSap(tail)); Params.push_back(new CSBrickParamSap(tail));
break; break;
case TBrickParam::HP: case TBrickParam::HP:
// $*STRUCT CSBrickParamHp TBrickParam::HP // $*STRUCT CSBrickParamHp TBrickParam::HP
// $*-i unsigned Hp=0 // quantity of HP to use // $*-i unsigned Hp=0 // quantity of HP to use
Params.push_back(new CSBrickParamHp(tail)); Params.push_back(new CSBrickParamHp(tail));
break; break;
case TBrickParam::STA: case TBrickParam::STA:
// $*STRUCT CSBrickParamSta TBrickParam::STA // $*STRUCT CSBrickParamSta TBrickParam::STA
// $*-i unsigned Sta=0 // quantity of STA to use // $*-i unsigned Sta=0 // quantity of STA to use
Params.push_back(new CSBrickParamSta(tail)); Params.push_back(new CSBrickParamSta(tail));
break; break;
case TBrickParam::STA_WEIGHT_FACTOR: case TBrickParam::STA_WEIGHT_FACTOR:
// $*STRUCT CSBrickParamStaWeightFactor TBrickParam::STA_WEIGHT_FACTOR // $*STRUCT CSBrickParamStaWeightFactor TBrickParam::STA_WEIGHT_FACTOR
// $*-i float StaFactor=0 // quantity of STA FACTOR of WEIGHT to use // $*-i float StaFactor=0 // quantity of STA FACTOR of WEIGHT to use
// $*-i unsigned StaConst=0 // quantity of STA Constante to use, used STA = StaFactor * (weight of equipped weapons) + StaConst // $*-i unsigned StaConst=0 // quantity of STA Constante to use, used STA = StaFactor * (weight of equipped weapons) + StaConst
Params.push_back(new CSBrickParamStaWeightFactor(tail)); Params.push_back(new CSBrickParamStaWeightFactor(tail));
break; break;
case TBrickParam::FOCUS: case TBrickParam::FOCUS:
// $*STRUCT CSBrickParamFocus TBrickParam::FOCUS // $*STRUCT CSBrickParamFocus TBrickParam::FOCUS
// $*-i unsigned Focus=0 // quantity of FOCUS to use // $*-i unsigned Focus=0 // quantity of FOCUS to use
Params.push_back(new CSBrickParamFocus(tail)); Params.push_back(new CSBrickParamFocus(tail));
break; break;
case TBrickParam::SET_BEHAVIOUR: case TBrickParam::SET_BEHAVIOUR:
// $*STRUCT CSBrickParamSetBehaviour TBrickParam::SET_BEHAVIOUR // $*STRUCT CSBrickParamSetBehaviour TBrickParam::SET_BEHAVIOUR
// $*-s std::string Behaviour // the new behaviour to use // $*-s std::string Behaviour // the new behaviour to use
Params.push_back(new CSBrickParamSetBehaviour(tail)); Params.push_back(new CSBrickParamSetBehaviour(tail));
break; break;
case TBrickParam::DEFINE_FLAG: case TBrickParam::DEFINE_FLAG:
// $*STRUCT CSBrickParamDefineFlag TBrickParam::DEFINE_FLAG // $*STRUCT CSBrickParamDefineFlag TBrickParam::DEFINE_FLAG
// $*-s std::string Flag // the defined flag // $*-s std::string Flag // the defined flag
Params.push_back(new CSBrickParamDefineFlag(tail)); Params.push_back(new CSBrickParamDefineFlag(tail));
break; break;
case TBrickParam::BYPASS_CHECK: case TBrickParam::BYPASS_CHECK:
// $*STRUCT CSBrickParamBypassCheck TBrickParam::BYPASS_CHECK // $*STRUCT CSBrickParamBypassCheck TBrickParam::BYPASS_CHECK
// $*-s std::string FlagType // the check flag to bypass // $*-s std::string FlagType // the check flag to bypass
Params.push_back(new CSBrickParamBypassCheck(tail)); Params.push_back(new CSBrickParamBypassCheck(tail));
break; break;
/************************************************************************/ /************************************************************************/
/* COMBAT Params */ /* COMBAT Params */
/************************************************************************/ /************************************************************************/
@ -719,7 +719,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamLatencyFactor TBrickParam::LATENCY_FACTOR // $*STRUCT CSBrickParamLatencyFactor TBrickParam::LATENCY_FACTOR
// $*-f float MinLatencyFactor = 1 // min factor on weapon latency // $*-f float MinLatencyFactor = 1 // min factor on weapon latency
// $*-f float MaxLatencyFactor = 0.5 // max factor on weapon latency // $*-f float MaxLatencyFactor = 0.5 // max factor on weapon latency
Params.push_back(new CSBrickParamLatencyFactor(tail)); Params.push_back(new CSBrickParamLatencyFactor(tail));
} }
break; break;
@ -739,16 +739,16 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration = 0.0 // duration in seconds // $*-f float Duration = 0.0 // duration in seconds
// $*-f float MinFactor = 0.0 // min factor of regen debuff // $*-f float MinFactor = 0.0 // min factor of regen debuff
// $*-f float MaxFactor = 0.0 // max factor of regen debuff // $*-f float MaxFactor = 0.0 // max factor of regen debuff
Params.push_back(new CSBrickParamDebuffRegen(tail)); Params.push_back(new CSBrickParamDebuffRegen(tail));
} }
break; break;
case TBrickParam::SAP_LOSS_FACTOR: case TBrickParam::SAP_LOSS_FACTOR:
{ {
// $*STRUCT CSBrickParamSapLossFactor TBrickParam::SAP_LOSS_FACTOR // $*STRUCT CSBrickParamSapLossFactor TBrickParam::SAP_LOSS_FACTOR
// $*-f float MinFactor = 0.0 // min factor of damage also applied to sap // $*-f float MinFactor = 0.0 // min factor of damage also applied to sap
// $*-f float MaxFactor = 0.0 // max factor of damage also applied to sap // $*-f float MaxFactor = 0.0 // max factor of damage also applied to sap
Params.push_back(new CSBrickParamSapLossFactor(tail)); Params.push_back(new CSBrickParamSapLossFactor(tail));
} }
break; break;
@ -757,7 +757,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamAim TBrickParam::AIM // $*STRUCT CSBrickParamAim TBrickParam::AIM
// $*-s std::string BodyType // Homin, kitin (=land kitin), bird, flying_kitin....(see body.h) // $*-s std::string BodyType // Homin, kitin (=land kitin), bird, flying_kitin....(see body.h)
// $*-s std::string AimedSlot // head, body, arms... (see slot_equipment.cpp) // $*-s std::string AimedSlot // head, body, arms... (see slot_equipment.cpp)
Params.push_back(new CSBrickParamAim(tail)); Params.push_back(new CSBrickParamAim(tail));
} }
break; break;
@ -784,7 +784,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
{ {
// $*STRUCT CSBrickParamThrowOffBalance TBrickParam::THROW_OFF_BALANCE // $*STRUCT CSBrickParamThrowOffBalance TBrickParam::THROW_OFF_BALANCE
// $*-f float MinDuration = 0.0f // effect min duration // $*-f float MinDuration = 0.0f // effect min duration
// $*-f float MaxDuration = 5.0f // effect max duration // $*-f float MaxDuration = 5.0f // effect max duration
Params.push_back(new CSBrickParamThrowOffBalance(tail)); Params.push_back(new CSBrickParamThrowOffBalance(tail));
} }
break; break;
@ -794,7 +794,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncreaseDamage TBrickParam::INC_DMG // $*STRUCT CSBrickParamIncreaseDamage TBrickParam::INC_DMG
// $*-f float MinFactor = 1.0f //min factor on damage // $*-f float MinFactor = 1.0f //min factor on damage
// $*-f float MaxFactor = 2.0f //max factor on damage // $*-f float MaxFactor = 2.0f //max factor on damage
Params.push_back(new CSBrickParamIncreaseDamage(tail)); Params.push_back(new CSBrickParamIncreaseDamage(tail));
} }
break; break;
@ -803,7 +803,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgTypeRestriction TBrickParam::INC_DMG_TYPE_RSTR // $*STRUCT CSBrickParamIncDmgTypeRestriction TBrickParam::INC_DMG_TYPE_RSTR
// $*-s std::string TypeRestriction //type restriction // $*-s std::string TypeRestriction //type restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor // $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgTypeRestriction(tail)); Params.push_back(new CSBrickParamIncDmgTypeRestriction(tail));
} }
break; break;
@ -812,7 +812,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgRaceRestriction TBrickParam::INC_DMG_RACE_RSTR // $*STRUCT CSBrickParamIncDmgRaceRestriction TBrickParam::INC_DMG_RACE_RSTR
// $*-s std::string RaceRestriction //race restriction // $*-s std::string RaceRestriction //race restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor // $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgRaceRestriction(tail)); Params.push_back(new CSBrickParamIncDmgRaceRestriction(tail));
} }
break; break;
@ -821,7 +821,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgEcosystemRestriction TBrickParam::INC_DMG_ECOS_RSTR // $*STRUCT CSBrickParamIncDmgEcosystemRestriction TBrickParam::INC_DMG_ECOS_RSTR
// $*-s std::string EcosystemRestriction //Ecosystem restriction // $*-s std::string EcosystemRestriction //Ecosystem restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor // $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgEcosystemRestriction(tail)); Params.push_back(new CSBrickParamIncDmgEcosystemRestriction(tail));
} }
break; break;
@ -830,7 +830,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgSeasonRestriction TBrickParam::INC_DMG_SEASON_RSTR // $*STRUCT CSBrickParamIncDmgSeasonRestriction TBrickParam::INC_DMG_SEASON_RSTR
// $*-s std::string SeasonRestriction //Season restriction // $*-s std::string SeasonRestriction //Season restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor // $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgSeasonRestriction(tail)); Params.push_back(new CSBrickParamIncDmgSeasonRestriction(tail));
} }
break; break;
@ -840,7 +840,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string DamageType // damage type // $*-s std::string DamageType // damage type
// $*-f float MinFactor = 0.0f //min factor of damage // $*-f float MinFactor = 0.0f //min factor of damage
// $*-f float MaxFactor = 1.0f //max factor of damage // $*-f float MaxFactor = 1.0f //max factor of damage
Params.push_back(new CSBrickParamSpecialDamage(tail)); Params.push_back(new CSBrickParamSpecialDamage(tail));
} }
break; break;
@ -850,7 +850,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string ArmorType // affected armor type (light, medium, heavy, kitin etc..) // $*-s std::string ArmorType // affected armor type (light, medium, heavy, kitin etc..)
// $*-f float MinFactor = 1.0f //max factor applied on armor absorption // $*-f float MinFactor = 1.0f //max factor applied on armor absorption
// $*-f float MaxFactor = 0.5f //max factor applied on armor absorption (< min as smaller is better) // $*-f float MaxFactor = 0.5f //max factor applied on armor absorption (< min as smaller is better)
Params.push_back(new CSBrickParamArmorMod(tail)); Params.push_back(new CSBrickParamArmorMod(tail));
} }
break; break;
@ -861,16 +861,16 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration of the slow in seconds // $*-f float Duration // duration of the slow in seconds
// $*-f float MinFactor = 1.0f // min factor applied on cast time // $*-f float MinFactor = 1.0f // min factor applied on cast time
// $*-f float MaxFactor = 2.0f // max factor applied on cast time // $*-f float MaxFactor = 2.0f // max factor applied on cast time
Params.push_back(new CSBrickParamSlowCast(tail)); Params.push_back(new CSBrickParamSlowCast(tail));
} }
break; break;
case TBrickParam::OPENING_1: case TBrickParam::OPENING_1:
{ {
// $*STRUCT CSBrickParamOpening1 TBrickParam::OPENING_1 // $*STRUCT CSBrickParamOpening1 TBrickParam::OPENING_1
// $*-s std::string EventFlag // $*-s std::string EventFlag
Params.push_back(new CSBrickParamOpening1(tail)); Params.push_back(new CSBrickParamOpening1(tail));
} }
break; break;
@ -879,7 +879,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamOpening2 TBrickParam::OPENING_2 // $*STRUCT CSBrickParamOpening2 TBrickParam::OPENING_2
// $*-s std::string EventFlag1 // $*-s std::string EventFlag1
// $*-s std::string EventFlag2 // $*-s std::string EventFlag2
Params.push_back(new CSBrickParamOpening2(tail)); Params.push_back(new CSBrickParamOpening2(tail));
} }
break; break;
@ -889,7 +889,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string EventFlag1 // $*-s std::string EventFlag1
// $*-s std::string EventFlag2 // $*-s std::string EventFlag2
// $*-s std::string EventFlag3 // $*-s std::string EventFlag3
Params.push_back(new CSBrickParamOpening3(tail)); Params.push_back(new CSBrickParamOpening3(tail));
} }
break; break;
@ -899,7 +899,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration of the effect in seconds // $*-f float Duration // duration of the effect in seconds
// $*-i sint32 MinFactor // min factor applied on target attack latency (+50 = +50%) // $*-i sint32 MinFactor // min factor applied on target attack latency (+50 = +50%)
// $*-i sint32 MaxFactor // max factor applied on target attack latency (+50 = +50%) // $*-i sint32 MaxFactor // max factor applied on target attack latency (+50 = +50%)
Params.push_back(new CSBrickParamCombatSlowAttack(tail)); Params.push_back(new CSBrickParamCombatSlowAttack(tail));
break; break;
case TBrickParam::COMBAT_SLOW: case TBrickParam::COMBAT_SLOW:
@ -907,46 +907,46 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration of the effect in seconds // $*-f float Duration // duration of the effect in seconds
// $*-i sint32 MinFactor // min factor applied on target attack latency or casting time (+50 = +50%) // $*-i sint32 MinFactor // min factor applied on target attack latency or casting time (+50 = +50%)
// $*-i sint32 MaxFactor // max factor applied on target attack latency or casting time (+50 = +50%) // $*-i sint32 MaxFactor // max factor applied on target attack latency or casting time (+50 = +50%)
Params.push_back(new CSBrickParamCombatSlow(tail)); Params.push_back(new CSBrickParamCombatSlow(tail));
break; break;
case TBrickParam::BLEED_FACTOR: case TBrickParam::BLEED_FACTOR:
// $*STRUCT CSBrickParamBleedFactor TBrickParam::BLEED_FACTOR // $*STRUCT CSBrickParamBleedFactor TBrickParam::BLEED_FACTOR
// $*-f float Duration // duration of the effect in seconds // $*-f float Duration // duration of the effect in seconds
// $*-f float MinFactor // min factor of dealt damage also lost in bleed // $*-f float MinFactor // min factor of dealt damage also lost in bleed
// $*-f float MaxFactor // max factor of dealt damage also lost in bleed // $*-f float MaxFactor // max factor of dealt damage also lost in bleed
Params.push_back(new CSBrickParamBleedFactor(tail)); Params.push_back(new CSBrickParamBleedFactor(tail));
break; break;
case TBrickParam::SPECIAL_HIT: case TBrickParam::SPECIAL_HIT:
// $*STRUCT CSBrickParamSpecialHit TBrickParam::SPECIAL_HIT // $*STRUCT CSBrickParamSpecialHit TBrickParam::SPECIAL_HIT
// no param // no param
Params.push_back(new CSBrickParamSpecialHit(tail)); Params.push_back(new CSBrickParamSpecialHit(tail));
break; break;
case TBrickParam::HIT_ALL_AGGRESSORS: case TBrickParam::HIT_ALL_AGGRESSORS:
// $*STRUCT CSBrickParamHitAllAggressors TBrickParam::HIT_ALL_AGGRESSORS // $*STRUCT CSBrickParamHitAllAggressors TBrickParam::HIT_ALL_AGGRESSORS
// $*-f float MinFactor // min factor on dealt damage (total damage divided among targets) // $*-f float MinFactor // min factor on dealt damage (total damage divided among targets)
// $*-f float MaxFactor // max factor on dealt damage (total damage divided among targets) // $*-f float MaxFactor // max factor on dealt damage (total damage divided among targets)
Params.push_back(new CSBrickParamHitAllAggressors(tail)); Params.push_back(new CSBrickParamHitAllAggressors(tail));
break; break;
case TBrickParam::WEAPON_WEAR_MOD: case TBrickParam::WEAPON_WEAR_MOD:
// $*STRUCT CSBrickParamWeaponWearMod TBrickParam::WEAPON_WEAR_MOD // $*STRUCT CSBrickParamWeaponWearMod TBrickParam::WEAPON_WEAR_MOD
// $*-f float MinModifier // min weapon wear modifier // $*-f float MinModifier // min weapon wear modifier
// $*-f float MaxModifier // max weapon wear modifier // $*-f float MaxModifier // max weapon wear modifier
Params.push_back(new CSBrickParamWeaponWearMod(tail)); Params.push_back(new CSBrickParamWeaponWearMod(tail));
break; break;
case TBrickParam::CRITICAL_HIT_MOD: case TBrickParam::CRITICAL_HIT_MOD:
// $*STRUCT CSBrickParamCriticalHitMod TBrickParam::CRITICAL_HIT_MOD // $*STRUCT CSBrickParamCriticalHitMod TBrickParam::CRITICAL_HIT_MOD
// $*-i uint8 MinModifier // min critical hit chance modifier // $*-i uint8 MinModifier // min critical hit chance modifier
// $*-i uint8 MaxModifier // max critical hit chance modifier // $*-i uint8 MaxModifier // max critical hit chance modifier
Params.push_back(new CSBrickParamCriticalHitMod(tail)); Params.push_back(new CSBrickParamCriticalHitMod(tail));
break; break;
/************************************************************************/ /************************************************************************/
/* MAGIC params */ /* MAGIC params */
/************************************************************************/ /************************************************************************/
@ -954,50 +954,50 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::MA: case TBrickParam::MA:
// $*STRUCT CSBrickParamMaType TBrickParam::MA // $*STRUCT CSBrickParamMaType TBrickParam::MA
// $*-s std::string Type // type name // $*-s std::string Type // type name
Params.push_back(new CSBrickParamMaType(tail)); Params.push_back(new CSBrickParamMaType(tail));
break; break;
case TBrickParam::MA_END: case TBrickParam::MA_END:
// $*STRUCT CSBrickParamMaEnd TBrickParam::MA_END // $*STRUCT CSBrickParamMaEnd TBrickParam::MA_END
Params.push_back(new CSBrickParamMaEnd(tail)); Params.push_back(new CSBrickParamMaEnd(tail));
break; break;
case TBrickParam::MA_EFFECT: case TBrickParam::MA_EFFECT:
// $*STRUCT CSBrickParamMagicEffect TBrickParam::MA_EFFECT // $*STRUCT CSBrickParamMagicEffect TBrickParam::MA_EFFECT
// $*-s std::string Effect // effect name // $*-s std::string Effect // effect name
Params.push_back(new CSBrickParamMagicEffect(tail)); Params.push_back(new CSBrickParamMagicEffect(tail));
break; break;
case TBrickParam::MA_STAT: case TBrickParam::MA_STAT:
// $*STRUCT CSBrickParamMagicStat TBrickParam::MA_STAT // $*STRUCT CSBrickParamMagicStat TBrickParam::MA_STAT
// $*-s std::string Stat // affected stat // $*-s std::string Stat // affected stat
// $*-s std::string Type // affected stat type // $*-s std::string Type // affected stat type
Params.push_back(new CSBrickParamMagicStat(tail)); Params.push_back(new CSBrickParamMagicStat(tail));
break; break;
case TBrickParam::MA_EFFECT_MOD: case TBrickParam::MA_EFFECT_MOD:
// $*STRUCT CSBrickParamMagicEffectMod TBrickParam::MA_EFFECT_MOD // $*STRUCT CSBrickParamMagicEffectMod TBrickParam::MA_EFFECT_MOD
// $*-i sint32 EffectMod // effect modifier // $*-i sint32 EffectMod // effect modifier
Params.push_back(new CSBrickParamMagicEffectMod(tail)); Params.push_back(new CSBrickParamMagicEffectMod(tail));
break; break;
case TBrickParam::MA_EFFECT_MULT: case TBrickParam::MA_EFFECT_MULT:
// $*STRUCT CSBrickParamMagicEffectMult TBrickParam::MA_EFFECT_MULT // $*STRUCT CSBrickParamMagicEffectMult TBrickParam::MA_EFFECT_MULT
// $*-f float EffectMult // effect modifier // $*-f float EffectMult // effect modifier
Params.push_back(new CSBrickParamMagicEffectMult(tail)); Params.push_back(new CSBrickParamMagicEffectMult(tail));
break; break;
case TBrickParam::MA_CASTING_TIME: case TBrickParam::MA_CASTING_TIME:
// $*STRUCT CSBrickParamCastingTime TBrickParam::MA_CASTING_TIME // $*STRUCT CSBrickParamCastingTime TBrickParam::MA_CASTING_TIME
// $*-f float CastingTime= 0 // casting modifier in seconds // $*-f float CastingTime= 0 // casting modifier in seconds
Params.push_back(new CSBrickParamCastingTime(tail)); Params.push_back(new CSBrickParamCastingTime(tail));
break; break;
case TBrickParam::MA_DMG_TYPE: case TBrickParam::MA_DMG_TYPE:
// $*STRUCT CSBrickParamMagicDmgType TBrickParam::MA_DMG_TYPE // $*STRUCT CSBrickParamMagicDmgType TBrickParam::MA_DMG_TYPE
// $*-s std::string DmgType // magic damage type // $*-s std::string DmgType // magic damage type
Params.push_back(new CSBrickParamMagicDmgType(tail)); Params.push_back(new CSBrickParamMagicDmgType(tail));
break; break;
case TBrickParam::MA_DMG: case TBrickParam::MA_DMG:
@ -1005,62 +1005,62 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-i sint32 Hp = 0 // fixed modifier on energy // $*-i sint32 Hp = 0 // fixed modifier on energy
// $*-i sint32 Sap = 0 // fixed modifier on energy // $*-i sint32 Sap = 0 // fixed modifier on energy
// $*-i sint32 Sta = 0 // fixed modifier on energy // $*-i sint32 Sta = 0 // fixed modifier on energy
Params.push_back(new CSBrickParamMagicDmg(tail)); Params.push_back(new CSBrickParamMagicDmg(tail));
break; break;
case TBrickParam::MA_HEAL: case TBrickParam::MA_HEAL:
// $*STRUCT CSBrickParamMagicHeal TBrickParam::MA_HEAL // $*STRUCT CSBrickParamMagicHeal TBrickParam::MA_HEAL
// $*-i sint32 Hp = 0 // fixed modifier on energy // $*-i sint32 Hp = 0 // fixed modifier on energy
// $*-i sint32 Sap = 0 // fixed modifier on energy // $*-i sint32 Sap = 0 // fixed modifier on energy
// $*-i sint32 Sta = 0 // fixed modifier on energy // $*-i sint32 Sta = 0 // fixed modifier on energy
Params.push_back(new CSBrickParamMagicHeal(tail)); Params.push_back(new CSBrickParamMagicHeal(tail));
break; break;
case TBrickParam::MA_RANGE: case TBrickParam::MA_RANGE:
// $*STRUCT CSBrickParamMagicRanges TBrickParam::MA_RANGE // $*STRUCT CSBrickParamMagicRanges TBrickParam::MA_RANGE
// $*-i sint8 RangeIndex // $*-i sint8 RangeIndex
Params.push_back(new CSBrickParamMagicRanges(tail)); Params.push_back(new CSBrickParamMagicRanges(tail));
break; break;
case TBrickParam::MA_LINK_COST: case TBrickParam::MA_LINK_COST:
// $*STRUCT CSBrickParamMagicLinkCost TBrickParam::MA_LINK_COST // $*STRUCT CSBrickParamMagicLinkCost TBrickParam::MA_LINK_COST
// $*-i sint32 Cost // $*-i sint32 Cost
Params.push_back(new CSBrickParamMagicLinkCost(tail)); Params.push_back(new CSBrickParamMagicLinkCost(tail));
break; break;
case TBrickParam::MA_LINK_PERIOD: case TBrickParam::MA_LINK_PERIOD:
// $*STRUCT CSBrickParamMagicLinkPeriod TBrickParam::MA_LINK_PERIOD // $*STRUCT CSBrickParamMagicLinkPeriod TBrickParam::MA_LINK_PERIOD
// $*-i uint32 Period // $*-i uint32 Period
Params.push_back(new CSBrickParamMagicLinkPeriod(tail)); Params.push_back(new CSBrickParamMagicLinkPeriod(tail));
break; break;
case TBrickParam::MA_CURE: case TBrickParam::MA_CURE:
// $*STRUCT CSBrickParamMagicCure TBrickParam::MA_CURE // $*STRUCT CSBrickParamMagicCure TBrickParam::MA_CURE
// $*-s std::string Cure // $*-s std::string Cure
Params.push_back(new CSBrickParamMagicCure(tail)); Params.push_back(new CSBrickParamMagicCure(tail));
break; break;
case TBrickParam::MA_LINK_POWER: case TBrickParam::MA_LINK_POWER:
// $*STRUCT CSBrickParamMagicLinkPower TBrickParam::MA_LINK_POWER // $*STRUCT CSBrickParamMagicLinkPower TBrickParam::MA_LINK_POWER
// $*-i uint16 Power // $*-i uint16 Power
Params.push_back(new CSBrickParamMagicLinkPower(tail)); Params.push_back(new CSBrickParamMagicLinkPower(tail));
break; break;
case TBrickParam::MA_BREAK_RES: case TBrickParam::MA_BREAK_RES:
// $*STRUCT CSBrickParamMagicBreakResist TBrickParam::MA_BREAK_RES // $*STRUCT CSBrickParamMagicBreakResist TBrickParam::MA_BREAK_RES
// $*-i uint16 BreakResist // $*-i uint16 BreakResist
// $*-i uint16 BreakResistPower // $*-i uint16 BreakResistPower
Params.push_back(new CSBrickParamMagicBreakResist(tail)); Params.push_back(new CSBrickParamMagicBreakResist(tail));
break; break;
case TBrickParam::MA_ARMOR_COMP: case TBrickParam::MA_ARMOR_COMP:
// $*STRUCT CSBrickParamMagicArmorComp TBrickParam::MA_ARMOR_COMP // $*STRUCT CSBrickParamMagicArmorComp TBrickParam::MA_ARMOR_COMP
// $*-i uint16 ArmorComp // $*-i uint16 ArmorComp
Params.push_back(new CSBrickParamMagicArmorComp(tail)); Params.push_back(new CSBrickParamMagicArmorComp(tail));
break; break;
case TBrickParam::MA_VAMPIRISE: case TBrickParam::MA_VAMPIRISE:
// $*STRUCT CSBrickParamMagicVampirise TBrickParam::MA_VAMPIRISE // $*STRUCT CSBrickParamMagicVampirise TBrickParam::MA_VAMPIRISE
// $*-i sint32 Vampirise // $*-i sint32 Vampirise
Params.push_back(new CSBrickParamMagicVampirise(tail)); Params.push_back(new CSBrickParamMagicVampirise(tail));
break; break;
case TBrickParam::MA_VAMPIRISE_RATIO: case TBrickParam::MA_VAMPIRISE_RATIO:
// $*STRUCT CSBrickParamMagicVampiriseRatio TBrickParam::MA_VAMPIRISE_RATIO // $*STRUCT CSBrickParamMagicVampiriseRatio TBrickParam::MA_VAMPIRISE_RATIO
// $*-f float VampiriseRatio // $*-f float VampiriseRatio
Params.push_back(new CSBrickParamMagicVampiriseRatio(tail)); Params.push_back(new CSBrickParamMagicVampiriseRatio(tail));
break; break;
/************************************************************************/ /************************************************************************/
@ -1070,67 +1070,67 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::CR_RECOMMENDED: case TBrickParam::CR_RECOMMENDED:
// $*STRUCT CSBrickParamCraftRecommended TBrickParam::CR_RECOMMENDED // $*STRUCT CSBrickParamCraftRecommended TBrickParam::CR_RECOMMENDED
// $*-i uint32 Recommended // $*-i uint32 Recommended
Params.push_back(new CSBrickParamCraftRecommended(tail)); Params.push_back(new CSBrickParamCraftRecommended(tail));
break; break;
case TBrickParam::CR_HP: case TBrickParam::CR_HP:
// $*STRUCT CSBrickParamCraftHP TBrickParam::CR_HP // $*STRUCT CSBrickParamCraftHP TBrickParam::CR_HP
// $*-i sint32 HitPoint // $*-i sint32 HitPoint
Params.push_back(new CSBrickParamCraftHP(tail)); Params.push_back(new CSBrickParamCraftHP(tail));
break; break;
case TBrickParam::CR_SAP: case TBrickParam::CR_SAP:
// $*STRUCT CSBrickParamCraftSap TBrickParam::CR_SAP // $*STRUCT CSBrickParamCraftSap TBrickParam::CR_SAP
// $*-i sint32 Sap // $*-i sint32 Sap
Params.push_back(new CSBrickParamCraftSap(tail)); Params.push_back(new CSBrickParamCraftSap(tail));
break; break;
case TBrickParam::CR_STA: case TBrickParam::CR_STA:
// $*STRUCT CSBrickParamCraftSta TBrickParam::CR_STA // $*STRUCT CSBrickParamCraftSta TBrickParam::CR_STA
// $*-i sint32 Stamina // $*-i sint32 Stamina
Params.push_back(new CSBrickParamCraftSta(tail)); Params.push_back(new CSBrickParamCraftSta(tail));
break; break;
case TBrickParam::CR_FOCUS: case TBrickParam::CR_FOCUS:
// $*STRUCT CSBrickParamCraftFocus TBrickParam::CR_FOCUS // $*STRUCT CSBrickParamCraftFocus TBrickParam::CR_FOCUS
// $*-i uint32 Focus // $*-i uint32 Focus
Params.push_back(new CSBrickParamCraftFocus(tail)); Params.push_back(new CSBrickParamCraftFocus(tail));
break; break;
case TBrickParam::CR_QUALITY: case TBrickParam::CR_QUALITY:
// $*STRUCT CSBrickParamCraftQuality TBrickParam::CR_QUALITY // $*STRUCT CSBrickParamCraftQuality TBrickParam::CR_QUALITY
// $*-i sint32 Quality // $*-i sint32 Quality
Params.push_back(new CSBrickParamCraftQuality(tail)); Params.push_back(new CSBrickParamCraftQuality(tail));
break; break;
case TBrickParam::CR_DURABILITY: case TBrickParam::CR_DURABILITY:
// $*STRUCT CSBrickParamCraftDurability TBrickParam::CR_DURABILITY // $*STRUCT CSBrickParamCraftDurability TBrickParam::CR_DURABILITY
// $*-f float Durability // $*-f float Durability
Params.push_back(new CSBrickParamCraftDurability(tail)); Params.push_back(new CSBrickParamCraftDurability(tail));
break; break;
case TBrickParam::CR_DAMAGE: case TBrickParam::CR_DAMAGE:
// $*STRUCT CSBrickParamCraftDamage TBrickParam::CR_DAMAGE // $*STRUCT CSBrickParamCraftDamage TBrickParam::CR_DAMAGE
// $*-f float Damage // $*-f float Damage
Params.push_back(new CSBrickParamCraftDamage(tail)); Params.push_back(new CSBrickParamCraftDamage(tail));
break; break;
case TBrickParam::CR_HITRATE: case TBrickParam::CR_HITRATE:
// $*STRUCT CSBrickParamCraftHitRate TBrickParam::CR_HITRATE // $*STRUCT CSBrickParamCraftHitRate TBrickParam::CR_HITRATE
// $*-f float HitRate // $*-f float HitRate
Params.push_back(new CSBrickParamCraftHitRate(tail)); Params.push_back(new CSBrickParamCraftHitRate(tail));
break; break;
case TBrickParam::CR_RANGE: case TBrickParam::CR_RANGE:
// $*STRUCT CSBrickParamCraftRange TBrickParam::CR_RANGE // $*STRUCT CSBrickParamCraftRange TBrickParam::CR_RANGE
// $*-f float Range // $*-f float Range
Params.push_back(new CSBrickParamCraftRange(tail)); Params.push_back(new CSBrickParamCraftRange(tail));
break; break;
case TBrickParam::CR_DMG_PROTECTION: case TBrickParam::CR_DMG_PROTECTION:
// $*STRUCT CSBrickParamCraftDmgProtection TBrickParam::CR_DMG_PROTECTION // $*STRUCT CSBrickParamCraftDmgProtection TBrickParam::CR_DMG_PROTECTION
// $*-f float DmgProtection // $*-f float DmgProtection
Params.push_back(new CSBrickParamCraftDmgProtection(tail)); Params.push_back(new CSBrickParamCraftDmgProtection(tail));
break; break;
case TBrickParam::CR_SAPLOAD: case TBrickParam::CR_SAPLOAD:
// $*STRUCT CSBrickParamCraftSapload TBrickParam::CR_SAPLOAD // $*STRUCT CSBrickParamCraftSapload TBrickParam::CR_SAPLOAD
// $*-f float Sapload // $*-f float Sapload
Params.push_back(new CSBrickParamCraftSapload(tail)); Params.push_back(new CSBrickParamCraftSapload(tail));
break; break;
case TBrickParam::CR_WEIGHT: case TBrickParam::CR_WEIGHT:
// $*STRUCT CSBrickParamCraftWeight TBrickParam::CR_WEIGHT // $*STRUCT CSBrickParamCraftWeight TBrickParam::CR_WEIGHT
// $*-f float Weight // $*-f float Weight
Params.push_back(new CSBrickParamCraftWeight(tail)); Params.push_back(new CSBrickParamCraftWeight(tail));
break; break;
/************************************************************************/ /************************************************************************/
@ -1301,7 +1301,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-i uint16 TauntPower // entities of higher level cannot be taunt // $*-i uint16 TauntPower // entities of higher level cannot be taunt
// $*-f float Range // effective range in meters // $*-f float Range // effective range in meters
// $*-f float DisableTime // disable taunt powers for x seconds // $*-f float DisableTime // disable taunt powers for x seconds
Params.push_back(new CSBrickParamPowerTaunt(tail)); Params.push_back(new CSBrickParamPowerTaunt(tail));
break; break;
case TBrickParam::SP_SHIELDING: case TBrickParam::SP_SHIELDING:
@ -1313,8 +1313,8 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-i uint8 ShieldProtectionFactor // granted protection in % with a shield // $*-i uint8 ShieldProtectionFactor // granted protection in % with a shield
// $*-i uint16 ShieldProtectionMax // max protection with a shield // $*-i uint16 ShieldProtectionMax // max protection with a shield
// $*-f float Duration // power duration // $*-f float Duration // power duration
// $*-f float DisableTime // disable power for x seconds // $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamShielding(tail)); Params.push_back(new CSBrickParamShielding(tail));
break; break;
case TBrickParam::SP_LIFE_AURA: case TBrickParam::SP_LIFE_AURA:
@ -1324,7 +1324,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Radius // aura radius in meters // $*-f float Radius // aura radius in meters
// $*-f float TargetDisableTime // disable life aura for x seconds on targets // $*-f float TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user // $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamLifeAura(tail)); Params.push_back(new CSBrickParamLifeAura(tail));
break; break;
case TBrickParam::SP_LIFE_AURA2: case TBrickParam::SP_LIFE_AURA2:
@ -1344,7 +1344,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Radius // aura radius in meters // $*-f float Radius // aura radius in meters
// $*-f float TargetDisableTime // disable life aura for x seconds on targets // $*-f float TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user // $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamStaminaAura(tail)); Params.push_back(new CSBrickParamStaminaAura(tail));
break; break;
case TBrickParam::SP_STAMINA_AURA2: case TBrickParam::SP_STAMINA_AURA2:
@ -1354,7 +1354,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Radius // aura radius in meters // $*-f float Radius // aura radius in meters
// $*-f float TargetDisableTime // disable life aura for x seconds on targets // $*-f float TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user // $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamStaminaAura2(tail)); Params.push_back(new CSBrickParamStaminaAura2(tail));
break; break;
case TBrickParam::SP_SAP_AURA: case TBrickParam::SP_SAP_AURA:
@ -1364,7 +1364,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Radius // aura radius in meters // $*-f float Radius // aura radius in meters
// $*-f float TargetDisableTime // disable life aura for x seconds on targets // $*-f float TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user // $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamSapAura(tail)); Params.push_back(new CSBrickParamSapAura(tail));
break; break;
case TBrickParam::SP_SAP_AURA2: case TBrickParam::SP_SAP_AURA2:
@ -1374,21 +1374,21 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Radius // aura radius in meters // $*-f float Radius // aura radius in meters
// $*-f float TargetDisableTime // disable life aura for x seconds on targets // $*-f float TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user // $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamSapAura2(tail)); Params.push_back(new CSBrickParamSapAura2(tail));
break; break;
case TBrickParam::SP_SPEEDING_UP: case TBrickParam::SP_SPEEDING_UP:
// $*STRUCT CSBrickParamSpeedingUp TBrickParam::SP_SPEEDING_UP // $*STRUCT CSBrickParamSpeedingUp TBrickParam::SP_SPEEDING_UP
// $*-i uint16 SpeedMod // speed modifier (in %) // $*-i uint16 SpeedMod // speed modifier (in %)
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float DisableTime // disable power for x seconds // $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamSpeedingUp(tail)); Params.push_back(new CSBrickParamSpeedingUp(tail));
break; break;
case TBrickParam::SP_INVULNERABILITY: case TBrickParam::SP_INVULNERABILITY:
// $*STRUCT CSBrickParamInvulnerability TBrickParam::SP_INVULNERABILITY // $*STRUCT CSBrickParamInvulnerability TBrickParam::SP_INVULNERABILITY
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float DisableTime // disable power for x seconds // $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamInvulnerability(tail)); Params.push_back(new CSBrickParamInvulnerability(tail));
break; break;
@ -1435,7 +1435,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets // $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user // $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage // $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamFireWall(tail)); Params.push_back(new CSBrickParamFireWall(tail));
break; break;
@ -1445,7 +1445,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets // $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user // $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage // $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamThornWall(tail)); Params.push_back(new CSBrickParamThornWall(tail));
break; break;
@ -1455,7 +1455,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets // $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user // $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage // $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamWaterWall(tail)); Params.push_back(new CSBrickParamWaterWall(tail));
break; break;
@ -1465,7 +1465,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds // $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets // $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user // $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage // $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamLightningWall(tail)); Params.push_back(new CSBrickParamLightningWall(tail));
break; break;
@ -1478,7 +1478,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-i uint16 DamageBonus // damage bonus (20 = +20 damage points before success factor) // $*-i uint16 DamageBonus // damage bonus (20 = +20 damage points before success factor)
Params.push_back(new CSBrickParamBerserk(tail)); Params.push_back(new CSBrickParamBerserk(tail));
break; break;
case TBrickParam::SP_ENCHANT_WEAPON: case TBrickParam::SP_ENCHANT_WEAPON:
// $*STRUCT CSBrickParamEnchantWeapon TBrickParam::SP_ENCHANT_WEAPON // $*STRUCT CSBrickParamEnchantWeapon TBrickParam::SP_ENCHANT_WEAPON
// $*-f float DisableTime // disable berserker power for x seconds // $*-f float DisableTime // disable berserker power for x seconds
@ -1497,25 +1497,25 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float DisableTime // duration in seconds // $*-f float DisableTime // duration in seconds
Params.push_back(new CSBrickParamCalmAnimal(tail)); Params.push_back(new CSBrickParamCalmAnimal(tail));
break; break;
case TBrickParam::NEEDED_BRICK_FLAG: case TBrickParam::NEEDED_BRICK_FLAG:
// $*STRUCT CSBrickParamNeededBrickFlag TBrickParam::NEEDED_BRICK_FLAG // $*STRUCT CSBrickParamNeededBrickFlag TBrickParam::NEEDED_BRICK_FLAG
// $*-s std::string Flag // $*-s std::string Flag
Params.push_back(new CSBrickParamNeededBrickFlag(tail)); Params.push_back(new CSBrickParamNeededBrickFlag(tail));
break; break;
case TBrickParam::SP_BALANCE: case TBrickParam::SP_BALANCE:
// $*STRUCT CSBrickParamBalance TBrickParam::SP_BALANCE // $*STRUCT CSBrickParamBalance TBrickParam::SP_BALANCE
// $*-f float DisableTime // disable power for x seconds // $*-f float DisableTime // disable power for x seconds
// $*-s std::string AffectedScore // affected score // $*-s std::string AffectedScore // affected score
// $*-f float Range // power range // $*-f float Range // power range
// $*-f float LossFactor // score loss factor in % // $*-f float LossFactor // score loss factor in %
Params.push_back(new CSBrickParamBalance(tail)); Params.push_back(new CSBrickParamBalance(tail));
break; break;
case TBrickParam::SP_HEAL: case TBrickParam::SP_HEAL:
// $*STRUCT CSBrickParamHeal TBrickParam::SP_HEAL // $*STRUCT CSBrickParamHeal TBrickParam::SP_HEAL
// $*-s std::string AffectedScore // affected score // $*-s std::string AffectedScore // affected score
// $*-i sint32 HealValue // value added to affected score // $*-i sint32 HealValue // value added to affected score
// $*-f float HealFactorValue // value added to affected score in % of max target score // $*-f float HealFactorValue // value added to affected score in % of max target score
// $*-f float DisableTime // disable power for x seconds // $*-f float DisableTime // disable power for x seconds
@ -1626,27 +1626,27 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamAreaBomb TBrickParam::AREA_BOMB // $*STRUCT CSBrickParamAreaBomb TBrickParam::AREA_BOMB
// $*-f float Radius // Radius // $*-f float Radius // Radius
// $*-f float MinFactor // MinFactor when we are at extreme range // $*-f float MinFactor // MinFactor when we are at extreme range
Params.push_back(new CSBrickParamAreaBomb(tail)); Params.push_back(new CSBrickParamAreaBomb(tail));
break; break;
case TBrickParam::AREA_SPRAY: case TBrickParam::AREA_SPRAY:
// $*STRUCT CSBrickParamAreaSpray TBrickParam::AREA_SPRAY // $*STRUCT CSBrickParamAreaSpray TBrickParam::AREA_SPRAY
// $*-i uint8 Angle // angle in degree // $*-i uint8 Angle // angle in degree
// $*-f float Height // height of the trapezoid // $*-f float Height // height of the trapezoid
// $*-f float Base // little base length // $*-f float Base // little base length
Params.push_back(new CSBrickParamAreaSpray(tail)); Params.push_back(new CSBrickParamAreaSpray(tail));
break; break;
case TBrickParam::AREA_CHAIN: case TBrickParam::AREA_CHAIN:
// $*STRUCT CSBrickParamAreaChain TBrickParam::AREA_CHAIN // $*STRUCT CSBrickParamAreaChain TBrickParam::AREA_CHAIN
// $*-f float Range // range between 2 targets // $*-f float Range // range between 2 targets
// $*-i uint8 MaxTargets // max nb targets // $*-i uint8 MaxTargets // max nb targets
// $*-f float Factor // damage factor // $*-f float Factor // damage factor
Params.push_back(new CSBrickParamAreaChain(tail)); Params.push_back(new CSBrickParamAreaChain(tail));
break; break;
case TBrickParam::AREA_TARGETS: case TBrickParam::AREA_TARGETS:
// $*STRUCT CSBrickParamAreaTargets TBrickParam::AREA_TARGETS // $*STRUCT CSBrickParamAreaTargets TBrickParam::AREA_TARGETS
// $*-f float TargetFactor // each target count as 'TargetFactor' for damage or heal division among targets // $*-f float TargetFactor // each target count as 'TargetFactor' for damage or heal division among targets
// $*-i uint8 MaxTargets // max nb targets // $*-i uint8 MaxTargets // max nb targets
Params.push_back(new CSBrickParamAreaTargets(tail)); Params.push_back(new CSBrickParamAreaTargets(tail));
break; break;
/************************************************************************/ /************************************************************************/
@ -1655,7 +1655,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::MA_RECHARGE: case TBrickParam::MA_RECHARGE:
// $*STRUCT CSBrickParamMagicRecharge TBrickParam::MA_RECHARGE // $*STRUCT CSBrickParamMagicRecharge TBrickParam::MA_RECHARGE
// $*-i uint32 SapLoad // sap load // $*-i uint32 SapLoad // sap load
Params.push_back(new CSBrickParamMagicRecharge(tail)); Params.push_back(new CSBrickParamMagicRecharge(tail));
break; break;
/************************************************************************/ /************************************************************************/
@ -1665,14 +1665,14 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamCharacUpgrade TBrickParam::CHARAC_UPGRADE // $*STRUCT CSBrickParamCharacUpgrade TBrickParam::CHARAC_UPGRADE
// $*-s std::string Characteristic // affected characteristic // $*-s std::string Characteristic // affected characteristic
// $*-i uint32 Modifier // bonus on charac // $*-i uint32 Modifier // bonus on charac
Params.push_back(new CSBrickParamCharacUpgrade(tail)); Params.push_back(new CSBrickParamCharacUpgrade(tail));
break; break;
case TBrickParam::SCORE_UPGRADE: case TBrickParam::SCORE_UPGRADE:
// $*STRUCT CSBrickParamScoreUpgrade TBrickParam::SCORE_UPGRADE // $*STRUCT CSBrickParamScoreUpgrade TBrickParam::SCORE_UPGRADE
// $*-s std::string Score // affected score // $*-s std::string Score // affected score
// $*-i sint32 Modifier // modifier on score // $*-i sint32 Modifier // modifier on score
Params.push_back(new CSBrickParamScoreUpgrade(tail)); Params.push_back(new CSBrickParamScoreUpgrade(tail));
break; break;
/************************************************************************/ /************************************************************************/
@ -1680,27 +1680,27 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
/************************************************************************/ /************************************************************************/
case TBrickParam::TA_TELEPORT: case TBrickParam::TA_TELEPORT:
// $*STRUCT CSBrickParamTeleport TBrickParam::TA_TELEPORT // $*STRUCT CSBrickParamTeleport TBrickParam::TA_TELEPORT
Params.push_back(new CSBrickParamTeleport(tail)); Params.push_back(new CSBrickParamTeleport(tail));
break; break;
case TBrickParam::TA_DISCONNECT: case TBrickParam::TA_DISCONNECT:
// $*STRUCT CSBrickParamDisconnect TBrickParam::TA_DISCONNECT // $*STRUCT CSBrickParamDisconnect TBrickParam::TA_DISCONNECT
Params.push_back(new CSBrickParamDisconnect(tail)); Params.push_back(new CSBrickParamDisconnect(tail));
break; break;
case TBrickParam::TA_MOUNT: case TBrickParam::TA_MOUNT:
// $*STRUCT CSBrickParamMount TBrickParam::TA_MOUNT // $*STRUCT CSBrickParamMount TBrickParam::TA_MOUNT
Params.push_back(new CSBrickParamMount(tail)); Params.push_back(new CSBrickParamMount(tail));
break; break;
case TBrickParam::TA_UNMOUNT: case TBrickParam::TA_UNMOUNT:
// $*STRUCT CSBrickParamUnmount TBrickParam::TA_UNMOUNT // $*STRUCT CSBrickParamUnmount TBrickParam::TA_UNMOUNT
Params.push_back(new CSBrickParamUnmount(tail)); Params.push_back(new CSBrickParamUnmount(tail));
break; break;
case TBrickParam::TA_CONSUME: case TBrickParam::TA_CONSUME:
// $*STRUCT CSBrickParamConsumeItem TBrickParam::TA_CONSUME // $*STRUCT CSBrickParamConsumeItem TBrickParam::TA_CONSUME
Params.push_back(new CSBrickParamConsumeItem(tail)); Params.push_back(new CSBrickParamConsumeItem(tail));
break; break;
case TBrickParam::JEWEL_ATTRS: case TBrickParam::JEWEL_ATTRS:
@ -1708,26 +1708,28 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string Attribute // attribute name // $*-s std::string Attribute // attribute name
// $*-s std::string Value // attribute value // $*-s std::string Value // attribute value
// $*-i uint32 Charge // initial charge of sapload // $*-i uint32 Charge // initial charge of sapload
// $*-i uint32 Modifier // onus on attribute // $*-i uint32 Modifier // Bonus on attribute
Params.push_back(new CSBrickParamJewelAttrs(tail)); // $*-i uint32 Faction // Required faction
// $*-i uint32 Fame // Required fame in faction (if fame >= 30, require the rite too)
Params.push_back(new CSBrickParamJewelAttrs(tail));
break; break;
} }
} // addParam // } // addParam //
//-------------------------------------------------------------- //--------------------------------------------------------------
// loadFaber() // loadFaber()
//-------------------------------------------------------------- //--------------------------------------------------------------
void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId ) void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId )
{ {
if ( Faber == NULL) Faber = new CFaber(); if ( Faber == NULL) Faber = new CFaber();
const UFormElm *faber = NULL; const UFormElm *faber = NULL;
string value; string value;
string groupFamily; string groupFamily;
string propName; string propName;
uint16 quantity = 0; uint16 quantity = 0;
root.getValueByName( value, "faber.Create.Crafted Item" ); root.getValueByName( value, "faber.Create.Crafted Item" );
Faber->CraftedItem = CSheetId(value); Faber->CraftedItem = CSheetId(value);
@ -1777,12 +1779,12 @@ void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId )
root.getValueByName( Faber->FocusBonusPerLevel, "faber.FocusBonusPerLevel" ); root.getValueByName( Faber->FocusBonusPerLevel, "faber.FocusBonusPerLevel" );
root.getValueByName( Faber->AllowPartialSuccess, "faber.AllowPartialSuccess" ); root.getValueByName( Faber->AllowPartialSuccess, "faber.AllowPartialSuccess" );
for (uint i = 1 ; i <= 5 ; ++i) for (uint i = 1 ; i <= 5 ; ++i)
{ {
propName = "faber.Create.MP "+toString(i); propName = "faber.Create.MP "+toString(i);
if (root.getValueByName( value, propName.c_str() ) && !value.empty() ) if (root.getValueByName( value, propName.c_str() ) && !value.empty() )
{ {
propName = "faber.Create.Quantity "+toString(i); propName = "faber.Create.Quantity "+toString(i);
if ( root.getValueByName( quantity, propName.c_str() ) && quantity > 0) if ( root.getValueByName( quantity, propName.c_str() ) && quantity > 0)
{ {
@ -1798,9 +1800,9 @@ void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId )
{ {
propName = "faber.Create.MP formula "+toString(i); propName = "faber.Create.MP formula "+toString(i);
if (root.getValueByName( value, propName.c_str() ) && !value.empty() ) if (root.getValueByName( value, propName.c_str() ) && !value.empty() )
{ {
propName = "faber.Create.Quantity formula "+toString(i); propName = "faber.Create.Quantity formula "+toString(i);
if( root.getValueByName( quantity, propName.c_str() ) && quantity > 0) if( root.getValueByName( quantity, propName.c_str() ) && quantity > 0)
{ {
CFaber::TRawMaterialFormula mpFormula; CFaber::TRawMaterialFormula mpFormula;
mpFormula.MpType = CSheetId(value); mpFormula.MpType = CSheetId(value);
@ -1813,7 +1815,7 @@ void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId )
//-------------------------------------------------------------- //--------------------------------------------------------------
// getBrickFromFamilyIndex() // getBrickFromFamilyIndex()
//-------------------------------------------------------------- //--------------------------------------------------------------
const CStaticBrick *CStaticBrick::getBrickFromFamilyIndex(uint16 family, uint16 index) const CStaticBrick *CStaticBrick::getBrickFromFamilyIndex(uint16 family, uint16 index)
{ {

@ -306,7 +306,7 @@ public:
if (copyOfStr=="sp_life_aura2") {_Value=SP_LIFE_AURA2; return *this;} if (copyOfStr=="sp_life_aura2") {_Value=SP_LIFE_AURA2; return *this;}
if (copyOfStr=="sp_stamina_aura") {_Value=SP_STAMINA_AURA; return *this;} if (copyOfStr=="sp_stamina_aura") {_Value=SP_STAMINA_AURA; return *this;}
if (copyOfStr=="sp_stamina_aura2") {_Value=SP_STAMINA_AURA2; return *this;} if (copyOfStr=="sp_stamina_aura2") {_Value=SP_STAMINA_AURA2; return *this;}
if (copyOfStr=="sp_sap_aura") {_Value=SP_SAP_AURA; return *this;} if (copyOfStr=="sp_sap_aura") {_Value=SP_SAP_AURA; return *this;}
if (copyOfStr=="sp_sap_aura2") {_Value=SP_SAP_AURA2; return *this;} if (copyOfStr=="sp_sap_aura2") {_Value=SP_SAP_AURA2; return *this;}
if (copyOfStr=="sp_speeding_up") {_Value=SP_SPEEDING_UP; return *this;} if (copyOfStr=="sp_speeding_up") {_Value=SP_SPEEDING_UP; return *this;}
if (copyOfStr=="sp_invulnerability") {_Value=SP_INVULNERABILITY; return *this;} if (copyOfStr=="sp_invulnerability") {_Value=SP_INVULNERABILITY; return *this;}
@ -492,25 +492,25 @@ struct CSBrickParamStaWeightFactor : public TBrickParam::IId
{ {
_Id = TBrickParam::STA_WEIGHT_FACTOR; _Id = TBrickParam::STA_WEIGHT_FACTOR;
} }
CSBrickParamStaWeightFactor(const std::string&str) CSBrickParamStaWeightFactor(const std::string&str)
{ {
*this=CSBrickParamStaWeightFactor(); *this=CSBrickParamStaWeightFactor();
*this=str; *this=str;
} }
const CSBrickParamStaWeightFactor& operator=(const std::string& input) const CSBrickParamStaWeightFactor& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()!=2) if (args.size()!=2)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
StaFactor=(float)atof(args[0].c_str()); StaFactor=(float)atof(args[0].c_str());
NLMISC::fromString(args[1], StaConst); NLMISC::fromString(args[1], StaConst);
return *this; return *this;
} }
}; };
@ -919,7 +919,7 @@ struct CSBrickParamThrowOffBalance : public TBrickParam::IId
{ {
// effect min duration // effect min duration
float MinDuration; float MinDuration;
// effect max duration // effect max duration
float MaxDuration; float MaxDuration;
CSBrickParamThrowOffBalance(): CSBrickParamThrowOffBalance():
@ -1262,7 +1262,7 @@ struct CSBrickParamSlowCast : public TBrickParam::IId
struct CSBrickParamOpening1 : public TBrickParam::IId struct CSBrickParamOpening1 : public TBrickParam::IId
{ {
std::string EventFlag; std::string EventFlag;
CSBrickParamOpening1(): CSBrickParamOpening1():
@ -1295,9 +1295,9 @@ struct CSBrickParamOpening1 : public TBrickParam::IId
struct CSBrickParamOpening2 : public TBrickParam::IId struct CSBrickParamOpening2 : public TBrickParam::IId
{ {
std::string EventFlag1; std::string EventFlag1;
std::string EventFlag2; std::string EventFlag2;
CSBrickParamOpening2(): CSBrickParamOpening2():
@ -1332,11 +1332,11 @@ struct CSBrickParamOpening2 : public TBrickParam::IId
struct CSBrickParamOpening3 : public TBrickParam::IId struct CSBrickParamOpening3 : public TBrickParam::IId
{ {
std::string EventFlag1; std::string EventFlag1;
std::string EventFlag2; std::string EventFlag2;
std::string EventFlag3; std::string EventFlag3;
CSBrickParamOpening3(): CSBrickParamOpening3():
@ -1982,7 +1982,7 @@ struct CSBrickParamMagicHeal : public TBrickParam::IId
struct CSBrickParamMagicRanges : public TBrickParam::IId struct CSBrickParamMagicRanges : public TBrickParam::IId
{ {
sint8 RangeIndex; sint8 RangeIndex;
CSBrickParamMagicRanges(): CSBrickParamMagicRanges():
@ -2015,7 +2015,7 @@ struct CSBrickParamMagicRanges : public TBrickParam::IId
struct CSBrickParamMagicLinkCost : public TBrickParam::IId struct CSBrickParamMagicLinkCost : public TBrickParam::IId
{ {
sint32 Cost; sint32 Cost;
CSBrickParamMagicLinkCost(): CSBrickParamMagicLinkCost():
@ -2048,7 +2048,7 @@ struct CSBrickParamMagicLinkCost : public TBrickParam::IId
struct CSBrickParamMagicLinkPeriod : public TBrickParam::IId struct CSBrickParamMagicLinkPeriod : public TBrickParam::IId
{ {
uint32 Period; uint32 Period;
CSBrickParamMagicLinkPeriod(): CSBrickParamMagicLinkPeriod():
@ -2081,7 +2081,7 @@ struct CSBrickParamMagicLinkPeriod : public TBrickParam::IId
struct CSBrickParamMagicCure : public TBrickParam::IId struct CSBrickParamMagicCure : public TBrickParam::IId
{ {
std::string Cure; std::string Cure;
CSBrickParamMagicCure(): CSBrickParamMagicCure():
@ -2114,7 +2114,7 @@ struct CSBrickParamMagicCure : public TBrickParam::IId
struct CSBrickParamMagicLinkPower : public TBrickParam::IId struct CSBrickParamMagicLinkPower : public TBrickParam::IId
{ {
uint16 Power; uint16 Power;
CSBrickParamMagicLinkPower(): CSBrickParamMagicLinkPower():
@ -2147,9 +2147,9 @@ struct CSBrickParamMagicLinkPower : public TBrickParam::IId
struct CSBrickParamMagicBreakResist : public TBrickParam::IId struct CSBrickParamMagicBreakResist : public TBrickParam::IId
{ {
uint16 BreakResist; uint16 BreakResist;
uint16 BreakResistPower; uint16 BreakResistPower;
CSBrickParamMagicBreakResist(): CSBrickParamMagicBreakResist():
@ -2184,7 +2184,7 @@ struct CSBrickParamMagicBreakResist : public TBrickParam::IId
struct CSBrickParamMagicArmorComp : public TBrickParam::IId struct CSBrickParamMagicArmorComp : public TBrickParam::IId
{ {
uint16 ArmorComp; uint16 ArmorComp;
CSBrickParamMagicArmorComp(): CSBrickParamMagicArmorComp():
@ -2217,7 +2217,7 @@ struct CSBrickParamMagicArmorComp : public TBrickParam::IId
struct CSBrickParamMagicVampirise : public TBrickParam::IId struct CSBrickParamMagicVampirise : public TBrickParam::IId
{ {
sint32 Vampirise; sint32 Vampirise;
CSBrickParamMagicVampirise(): CSBrickParamMagicVampirise():
@ -2250,7 +2250,7 @@ struct CSBrickParamMagicVampirise : public TBrickParam::IId
struct CSBrickParamMagicVampiriseRatio : public TBrickParam::IId struct CSBrickParamMagicVampiriseRatio : public TBrickParam::IId
{ {
float VampiriseRatio; float VampiriseRatio;
CSBrickParamMagicVampiriseRatio(): CSBrickParamMagicVampiriseRatio():
@ -2283,7 +2283,7 @@ struct CSBrickParamMagicVampiriseRatio : public TBrickParam::IId
struct CSBrickParamCraftRecommended : public TBrickParam::IId struct CSBrickParamCraftRecommended : public TBrickParam::IId
{ {
uint32 Recommended; uint32 Recommended;
CSBrickParamCraftRecommended(): CSBrickParamCraftRecommended():
@ -2316,7 +2316,7 @@ struct CSBrickParamCraftRecommended : public TBrickParam::IId
struct CSBrickParamCraftHP : public TBrickParam::IId struct CSBrickParamCraftHP : public TBrickParam::IId
{ {
sint32 HitPoint; sint32 HitPoint;
CSBrickParamCraftHP(): CSBrickParamCraftHP():
@ -2349,7 +2349,7 @@ struct CSBrickParamCraftHP : public TBrickParam::IId
struct CSBrickParamCraftSap : public TBrickParam::IId struct CSBrickParamCraftSap : public TBrickParam::IId
{ {
sint32 Sap; sint32 Sap;
CSBrickParamCraftSap(): CSBrickParamCraftSap():
@ -2382,7 +2382,7 @@ struct CSBrickParamCraftSap : public TBrickParam::IId
struct CSBrickParamCraftSta : public TBrickParam::IId struct CSBrickParamCraftSta : public TBrickParam::IId
{ {
sint32 Stamina; sint32 Stamina;
CSBrickParamCraftSta(): CSBrickParamCraftSta():
@ -2415,7 +2415,7 @@ struct CSBrickParamCraftSta : public TBrickParam::IId
struct CSBrickParamCraftFocus : public TBrickParam::IId struct CSBrickParamCraftFocus : public TBrickParam::IId
{ {
uint32 Focus; uint32 Focus;
CSBrickParamCraftFocus(): CSBrickParamCraftFocus():
@ -2448,7 +2448,7 @@ struct CSBrickParamCraftFocus : public TBrickParam::IId
struct CSBrickParamCraftQuality : public TBrickParam::IId struct CSBrickParamCraftQuality : public TBrickParam::IId
{ {
sint32 Quality; sint32 Quality;
CSBrickParamCraftQuality(): CSBrickParamCraftQuality():
@ -2481,7 +2481,7 @@ struct CSBrickParamCraftQuality : public TBrickParam::IId
struct CSBrickParamCraftDurability : public TBrickParam::IId struct CSBrickParamCraftDurability : public TBrickParam::IId
{ {
float Durability; float Durability;
CSBrickParamCraftDurability(): CSBrickParamCraftDurability():
@ -2514,7 +2514,7 @@ struct CSBrickParamCraftDurability : public TBrickParam::IId
struct CSBrickParamCraftDamage : public TBrickParam::IId struct CSBrickParamCraftDamage : public TBrickParam::IId
{ {
float Damage; float Damage;
CSBrickParamCraftDamage(): CSBrickParamCraftDamage():
@ -2547,7 +2547,7 @@ struct CSBrickParamCraftDamage : public TBrickParam::IId
struct CSBrickParamCraftHitRate : public TBrickParam::IId struct CSBrickParamCraftHitRate : public TBrickParam::IId
{ {
float HitRate; float HitRate;
CSBrickParamCraftHitRate(): CSBrickParamCraftHitRate():
@ -2580,7 +2580,7 @@ struct CSBrickParamCraftHitRate : public TBrickParam::IId
struct CSBrickParamCraftRange : public TBrickParam::IId struct CSBrickParamCraftRange : public TBrickParam::IId
{ {
float Range; float Range;
CSBrickParamCraftRange(): CSBrickParamCraftRange():
@ -2613,7 +2613,7 @@ struct CSBrickParamCraftRange : public TBrickParam::IId
struct CSBrickParamCraftDmgProtection : public TBrickParam::IId struct CSBrickParamCraftDmgProtection : public TBrickParam::IId
{ {
float DmgProtection; float DmgProtection;
CSBrickParamCraftDmgProtection(): CSBrickParamCraftDmgProtection():
@ -2646,7 +2646,7 @@ struct CSBrickParamCraftDmgProtection : public TBrickParam::IId
struct CSBrickParamCraftSapload : public TBrickParam::IId struct CSBrickParamCraftSapload : public TBrickParam::IId
{ {
float Sapload; float Sapload;
CSBrickParamCraftSapload(): CSBrickParamCraftSapload():
@ -2679,7 +2679,7 @@ struct CSBrickParamCraftSapload : public TBrickParam::IId
struct CSBrickParamCraftWeight : public TBrickParam::IId struct CSBrickParamCraftWeight : public TBrickParam::IId
{ {
float Weight; float Weight;
CSBrickParamCraftWeight(): CSBrickParamCraftWeight():
@ -2712,7 +2712,7 @@ struct CSBrickParamCraftWeight : public TBrickParam::IId
struct CSBrickParamForageRange : public TBrickParam::IId struct CSBrickParamForageRange : public TBrickParam::IId
{ {
float Range; float Range;
CSBrickParamForageRange(): CSBrickParamForageRange():
@ -2745,7 +2745,7 @@ struct CSBrickParamForageRange : public TBrickParam::IId
struct CSBrickParamForageLocateDepositRange : public TBrickParam::IId struct CSBrickParamForageLocateDepositRange : public TBrickParam::IId
{ {
float Range; float Range;
CSBrickParamForageLocateDepositRange(): CSBrickParamForageLocateDepositRange():
@ -2778,7 +2778,7 @@ struct CSBrickParamForageLocateDepositRange : public TBrickParam::IId
struct CSBrickParamForageAngle : public TBrickParam::IId struct CSBrickParamForageAngle : public TBrickParam::IId
{ {
uint32 Angle; uint32 Angle;
CSBrickParamForageAngle(): CSBrickParamForageAngle():
@ -2811,7 +2811,7 @@ struct CSBrickParamForageAngle : public TBrickParam::IId
struct CSBrickParamForageMulti : public TBrickParam::IId struct CSBrickParamForageMulti : public TBrickParam::IId
{ {
uint32 Limit; uint32 Limit;
CSBrickParamForageMulti(): CSBrickParamForageMulti():
@ -2844,7 +2844,7 @@ struct CSBrickParamForageMulti : public TBrickParam::IId
struct CSBrickParamForageKnowledge : public TBrickParam::IId struct CSBrickParamForageKnowledge : public TBrickParam::IId
{ {
uint8 Know; uint8 Know;
CSBrickParamForageKnowledge(): CSBrickParamForageKnowledge():
@ -2877,7 +2877,7 @@ struct CSBrickParamForageKnowledge : public TBrickParam::IId
struct CSBrickParamForageTime : public TBrickParam::IId struct CSBrickParamForageTime : public TBrickParam::IId
{ {
float Time; float Time;
CSBrickParamForageTime(): CSBrickParamForageTime():
@ -2910,7 +2910,7 @@ struct CSBrickParamForageTime : public TBrickParam::IId
struct CSBrickParamForageSourceTime : public TBrickParam::IId struct CSBrickParamForageSourceTime : public TBrickParam::IId
{ {
float Time; float Time;
CSBrickParamForageSourceTime(): CSBrickParamForageSourceTime():
@ -2943,7 +2943,7 @@ struct CSBrickParamForageSourceTime : public TBrickParam::IId
struct CSBrickParamForageStatEnergy : public TBrickParam::IId struct CSBrickParamForageStatEnergy : public TBrickParam::IId
{ {
float StatEnergy; float StatEnergy;
CSBrickParamForageStatEnergy(): CSBrickParamForageStatEnergy():
@ -2976,7 +2976,7 @@ struct CSBrickParamForageStatEnergy : public TBrickParam::IId
struct CSBrickParamStatEnergyOnly : public TBrickParam::IId struct CSBrickParamStatEnergyOnly : public TBrickParam::IId
{ {
uint8 StatEnergyExact; uint8 StatEnergyExact;
CSBrickParamStatEnergyOnly(): CSBrickParamStatEnergyOnly():
@ -3009,7 +3009,7 @@ struct CSBrickParamStatEnergyOnly : public TBrickParam::IId
struct CSBrickParamForageVisDist : public TBrickParam::IId struct CSBrickParamForageVisDist : public TBrickParam::IId
{ {
float Dist; float Dist;
CSBrickParamForageVisDist(): CSBrickParamForageVisDist():
@ -3042,7 +3042,7 @@ struct CSBrickParamForageVisDist : public TBrickParam::IId
struct CSBrickParamForageVisStealth : public TBrickParam::IId struct CSBrickParamForageVisStealth : public TBrickParam::IId
{ {
uint8 Mode; uint8 Mode;
CSBrickParamForageVisStealth(): CSBrickParamForageVisStealth():
@ -3075,7 +3075,7 @@ struct CSBrickParamForageVisStealth : public TBrickParam::IId
struct CSBrickParamForageSourceLocator : public TBrickParam::IId struct CSBrickParamForageSourceLocator : public TBrickParam::IId
{ {
uint8 Flag; uint8 Flag;
CSBrickParamForageSourceLocator(): CSBrickParamForageSourceLocator():
@ -3108,7 +3108,7 @@ struct CSBrickParamForageSourceLocator : public TBrickParam::IId
struct CSBrickParamForageAttempts : public TBrickParam::IId struct CSBrickParamForageAttempts : public TBrickParam::IId
{ {
uint16 Nb; uint16 Nb;
CSBrickParamForageAttempts(): CSBrickParamForageAttempts():
@ -3141,7 +3141,7 @@ struct CSBrickParamForageAttempts : public TBrickParam::IId
struct CSBrickParamForageAbsorptionS : public TBrickParam::IId struct CSBrickParamForageAbsorptionS : public TBrickParam::IId
{ {
float Absorption; float Absorption;
CSBrickParamForageAbsorptionS(): CSBrickParamForageAbsorptionS():
@ -3174,7 +3174,7 @@ struct CSBrickParamForageAbsorptionS : public TBrickParam::IId
struct CSBrickParamForageAbsorptionA : public TBrickParam::IId struct CSBrickParamForageAbsorptionA : public TBrickParam::IId
{ {
float Absorption; float Absorption;
CSBrickParamForageAbsorptionA(): CSBrickParamForageAbsorptionA():
@ -3207,7 +3207,7 @@ struct CSBrickParamForageAbsorptionA : public TBrickParam::IId
struct CSBrickParamForageAbsorptionQ : public TBrickParam::IId struct CSBrickParamForageAbsorptionQ : public TBrickParam::IId
{ {
float Absorption; float Absorption;
CSBrickParamForageAbsorptionQ(): CSBrickParamForageAbsorptionQ():
@ -3240,7 +3240,7 @@ struct CSBrickParamForageAbsorptionQ : public TBrickParam::IId
struct CSBrickParamForagePeriod : public TBrickParam::IId struct CSBrickParamForagePeriod : public TBrickParam::IId
{ {
float Period; float Period;
CSBrickParamForagePeriod(): CSBrickParamForagePeriod():
@ -3273,7 +3273,7 @@ struct CSBrickParamForagePeriod : public TBrickParam::IId
struct CSBrickParamForageAperture : public TBrickParam::IId struct CSBrickParamForageAperture : public TBrickParam::IId
{ {
float Aperture; float Aperture;
CSBrickParamForageAperture(): CSBrickParamForageAperture():
@ -3306,7 +3306,7 @@ struct CSBrickParamForageAperture : public TBrickParam::IId
struct CSBrickParamForageQuality : public TBrickParam::IId struct CSBrickParamForageQuality : public TBrickParam::IId
{ {
float Quality; float Quality;
CSBrickParamForageQuality(): CSBrickParamForageQuality():
@ -3339,7 +3339,7 @@ struct CSBrickParamForageQuality : public TBrickParam::IId
struct CSBrickParamForagePreservation : public TBrickParam::IId struct CSBrickParamForagePreservation : public TBrickParam::IId
{ {
float Pres; float Pres;
CSBrickParamForagePreservation(): CSBrickParamForagePreservation():
@ -3372,7 +3372,7 @@ struct CSBrickParamForagePreservation : public TBrickParam::IId
struct CSBrickParamForageStability : public TBrickParam::IId struct CSBrickParamForageStability : public TBrickParam::IId
{ {
float Stab; float Stab;
CSBrickParamForageStability(): CSBrickParamForageStability():
@ -3405,7 +3405,7 @@ struct CSBrickParamForageStability : public TBrickParam::IId
struct CSBrickParamForageCreatureStealth : public TBrickParam::IId struct CSBrickParamForageCreatureStealth : public TBrickParam::IId
{ {
float Stealth; float Stealth;
CSBrickParamForageCreatureStealth(): CSBrickParamForageCreatureStealth():
@ -3438,7 +3438,7 @@ struct CSBrickParamForageCreatureStealth : public TBrickParam::IId
struct CSBrickParamForageAbsorbSourceDmg : public TBrickParam::IId struct CSBrickParamForageAbsorbSourceDmg : public TBrickParam::IId
{ {
uint8 Percent; uint8 Percent;
CSBrickParamForageAbsorbSourceDmg(): CSBrickParamForageAbsorbSourceDmg():
@ -3471,7 +3471,7 @@ struct CSBrickParamForageAbsorbSourceDmg : public TBrickParam::IId
struct CSBrickParamKamiOffering : public TBrickParam::IId struct CSBrickParamKamiOffering : public TBrickParam::IId
{ {
uint32 Num; uint32 Num;
CSBrickParamKamiOffering(): CSBrickParamKamiOffering():
@ -3504,7 +3504,7 @@ struct CSBrickParamKamiOffering : public TBrickParam::IId
struct CSBrickParamKamiAngerDecrease : public TBrickParam::IId struct CSBrickParamKamiAngerDecrease : public TBrickParam::IId
{ {
float Delta; float Delta;
CSBrickParamKamiAngerDecrease(): CSBrickParamKamiAngerDecrease():
@ -3537,7 +3537,7 @@ struct CSBrickParamKamiAngerDecrease : public TBrickParam::IId
struct CSBrickParamForageReduceDamage : public TBrickParam::IId struct CSBrickParamForageReduceDamage : public TBrickParam::IId
{ {
float Ratio; float Ratio;
CSBrickParamForageReduceDamage(): CSBrickParamForageReduceDamage():
@ -3570,7 +3570,7 @@ struct CSBrickParamForageReduceDamage : public TBrickParam::IId
struct CSBrickParamForageEcotypeSpec : public TBrickParam::IId struct CSBrickParamForageEcotypeSpec : public TBrickParam::IId
{ {
std::string Ecotype; std::string Ecotype;
CSBrickParamForageEcotypeSpec(): CSBrickParamForageEcotypeSpec():
@ -3603,7 +3603,7 @@ struct CSBrickParamForageEcotypeSpec : public TBrickParam::IId
struct CSBrickParamForageRMGroupFilter : public TBrickParam::IId struct CSBrickParamForageRMGroupFilter : public TBrickParam::IId
{ {
uint32 Value; uint32 Value;
CSBrickParamForageRMGroupFilter(): CSBrickParamForageRMGroupFilter():
@ -3636,7 +3636,7 @@ struct CSBrickParamForageRMGroupFilter : public TBrickParam::IId
struct CSBrickParamForageRMFamilyFilter : public TBrickParam::IId struct CSBrickParamForageRMFamilyFilter : public TBrickParam::IId
{ {
uint32 Value; uint32 Value;
CSBrickParamForageRMFamilyFilter(): CSBrickParamForageRMFamilyFilter():
@ -3669,7 +3669,7 @@ struct CSBrickParamForageRMFamilyFilter : public TBrickParam::IId
struct CSBrickParamForageItemPartFilter : public TBrickParam::IId struct CSBrickParamForageItemPartFilter : public TBrickParam::IId
{ {
uint32 ItemPartIndex; uint32 ItemPartIndex;
CSBrickParamForageItemPartFilter(): CSBrickParamForageItemPartFilter():
@ -3757,7 +3757,7 @@ struct CSBrickParamShielding : public TBrickParam::IId
uint16 ShieldProtectionMax; uint16 ShieldProtectionMax;
// power duration // power duration
float Duration; float Duration;
// disable power for x seconds // disable power for x seconds
float DisableTime; float DisableTime;
CSBrickParamShielding(): CSBrickParamShielding():
@ -4095,7 +4095,7 @@ struct CSBrickParamSpeedingUp : public TBrickParam::IId
uint16 SpeedMod; uint16 SpeedMod;
// duration in seconds // duration in seconds
float Duration; float Duration;
// disable power for x seconds // disable power for x seconds
float DisableTime; float DisableTime;
CSBrickParamSpeedingUp(): CSBrickParamSpeedingUp():
@ -4134,7 +4134,7 @@ struct CSBrickParamInvulnerability : public TBrickParam::IId
{ {
// duration in seconds // duration in seconds
float Duration; float Duration;
// disable power for x seconds // disable power for x seconds
float DisableTime; float DisableTime;
CSBrickParamInvulnerability(): CSBrickParamInvulnerability():
@ -4361,7 +4361,7 @@ struct CSBrickParamFireWall : public TBrickParam::IId
float TargetDisableTime; float TargetDisableTime;
// disable aura for x seconds on user // disable aura for x seconds on user
float UserDisableTime; float UserDisableTime;
// damage // damage
sint16 Damage; sint16 Damage;
CSBrickParamFireWall(): CSBrickParamFireWall():
@ -4410,7 +4410,7 @@ struct CSBrickParamThornWall : public TBrickParam::IId
float TargetDisableTime; float TargetDisableTime;
// disable aura for x seconds on user // disable aura for x seconds on user
float UserDisableTime; float UserDisableTime;
// damage // damage
sint16 Damage; sint16 Damage;
CSBrickParamThornWall(): CSBrickParamThornWall():
@ -4459,7 +4459,7 @@ struct CSBrickParamWaterWall : public TBrickParam::IId
float TargetDisableTime; float TargetDisableTime;
// disable aura for x seconds on user // disable aura for x seconds on user
float UserDisableTime; float UserDisableTime;
// damage // damage
sint16 Damage; sint16 Damage;
CSBrickParamWaterWall(): CSBrickParamWaterWall():
@ -4508,7 +4508,7 @@ struct CSBrickParamLightningWall : public TBrickParam::IId
float TargetDisableTime; float TargetDisableTime;
// disable aura for x seconds on user // disable aura for x seconds on user
float UserDisableTime; float UserDisableTime;
// damage // damage
sint16 Damage; sint16 Damage;
CSBrickParamLightningWall(): CSBrickParamLightningWall():
@ -4688,7 +4688,7 @@ struct CSBrickParamCalmAnimal : public TBrickParam::IId
struct CSBrickParamNeededBrickFlag : public TBrickParam::IId struct CSBrickParamNeededBrickFlag : public TBrickParam::IId
{ {
std::string Flag; std::string Flag;
CSBrickParamNeededBrickFlag(): CSBrickParamNeededBrickFlag():
@ -4723,7 +4723,7 @@ struct CSBrickParamBalance : public TBrickParam::IId
{ {
// disable power for x seconds // disable power for x seconds
float DisableTime; float DisableTime;
// affected score // affected score
std::string AffectedScore; std::string AffectedScore;
// power range // power range
float Range; float Range;
@ -4766,7 +4766,7 @@ struct CSBrickParamBalance : public TBrickParam::IId
struct CSBrickParamHeal : public TBrickParam::IId struct CSBrickParamHeal : public TBrickParam::IId
{ {
// affected score // affected score
std::string AffectedScore; std::string AffectedScore;
// value added to affected score // value added to affected score
sint32 HealValue; sint32 HealValue;
@ -4848,7 +4848,7 @@ struct CSBrickParamRecastTime : public TBrickParam::IId
struct CSBrickParamBonusFgExtractionTimeGC : public TBrickParam::IId struct CSBrickParamBonusFgExtractionTimeGC : public TBrickParam::IId
{ {
float AdditionalTimeGC; float AdditionalTimeGC;
CSBrickParamBonusFgExtractionTimeGC(): CSBrickParamBonusFgExtractionTimeGC():
@ -4881,7 +4881,7 @@ struct CSBrickParamBonusFgExtractionTimeGC : public TBrickParam::IId
struct CSBrickParamBonusCrDurability : public TBrickParam::IId struct CSBrickParamBonusCrDurability : public TBrickParam::IId
{ {
float Bonus; float Bonus;
CSBrickParamBonusCrDurability(): CSBrickParamBonusCrDurability():
@ -4914,7 +4914,7 @@ struct CSBrickParamBonusCrDurability : public TBrickParam::IId
struct CSBrickParamBonusLandmarkNumber : public TBrickParam::IId struct CSBrickParamBonusLandmarkNumber : public TBrickParam::IId
{ {
float Nb; float Nb;
CSBrickParamBonusLandmarkNumber(): CSBrickParamBonusLandmarkNumber():
@ -5188,14 +5188,17 @@ struct CSBrickParamJewelAttrs : public TBrickParam::IId
uint32 Modifier; uint32 Modifier;
// required Faction // required Faction
std::string RequiredFaction; std::string RequiredFaction;
// required Fame
sint32 RequiredFame;
CSBrickParamJewelAttrs(): CSBrickParamJewelAttrs():
Attribute(), Attribute(),
Value(), Value(),
Charge(), Charge(),
Modifier(), Modifier(),
RequiredFaction() RequiredFaction(),
RequiredFame()
{ {
_Id = TBrickParam::JEWEL_ATTRS; _Id = TBrickParam::JEWEL_ATTRS;
} }
@ -5223,7 +5226,12 @@ struct CSBrickParamJewelAttrs : public TBrickParam::IId
RequiredFaction = args[4].c_str(); RequiredFaction = args[4].c_str();
else else
RequiredFaction = ""; RequiredFaction = "";
if (!RequiredFaction.empty() && args.size() > 5)
NLMISC::fromString(args[5], RequiredFame);
else
RequiredFame = -200;
return *this; return *this;
} }
}; };
@ -5413,7 +5421,7 @@ struct CSBrickParamConsumeItem : public TBrickParam::IId
struct CSBrickParamChgCharac : public TBrickParam::IId struct CSBrickParamChgCharac : public TBrickParam::IId
{ {
// affected characteristic // affected characteristic
std::string AffectedCharac; std::string AffectedCharac;
// coefficient to modify characteristic proportionally to item level // coefficient to modify characteristic proportionally to item level
float ModifierCoefficient; float ModifierCoefficient;
@ -5421,7 +5429,7 @@ struct CSBrickParamChgCharac : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamChgCharac(): CSBrickParamChgCharac():
AffectedCharac(), AffectedCharac(),
ModifierCoefficient(), ModifierCoefficient(),
@ -5430,21 +5438,21 @@ struct CSBrickParamChgCharac : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_CHG_CHARAC; _Id = TBrickParam::SP_CHG_CHARAC;
} }
CSBrickParamChgCharac(const std::string&str) CSBrickParamChgCharac(const std::string&str)
{ {
*this=CSBrickParamChgCharac(); *this=CSBrickParamChgCharac();
*this=str; *this=str;
} }
const CSBrickParamChgCharac& operator=(const std::string& input) const CSBrickParamChgCharac& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()!=4 && args.size()!=5) if (args.size()!=4 && args.size()!=5)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
AffectedCharac=args[0].c_str(); AffectedCharac=args[0].c_str();
ModifierCoefficient=(float)atof(args[1].c_str()); ModifierCoefficient=(float)atof(args[1].c_str());
@ -5466,7 +5474,7 @@ struct CSBrickParamModDefense : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModDefense(): CSBrickParamModDefense():
DefenseMode(), DefenseMode(),
ModifierCoefficient(), ModifierCoefficient(),
@ -5475,21 +5483,21 @@ struct CSBrickParamModDefense : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_DEFENSE; _Id = TBrickParam::SP_MOD_DEFENSE;
} }
CSBrickParamModDefense(const std::string&str) CSBrickParamModDefense(const std::string&str)
{ {
*this=CSBrickParamModDefense(); *this=CSBrickParamModDefense();
*this=str; *this=str;
} }
const CSBrickParamModDefense& operator=(const std::string& input) const CSBrickParamModDefense& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<4) if (args.size()<4)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
DefenseMode=args[0].c_str(); DefenseMode=args[0].c_str();
ModifierCoefficient=(float)atof(args[1].c_str()); ModifierCoefficient=(float)atof(args[1].c_str());
@ -5509,7 +5517,7 @@ struct CSBrickParamModCraftSuccess : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModCraftSuccess(): CSBrickParamModCraftSuccess():
ModifierCoefficient(), ModifierCoefficient(),
ModifierConstant(), ModifierConstant(),
@ -5517,21 +5525,21 @@ struct CSBrickParamModCraftSuccess : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_CRAFT_SUCCESS; _Id = TBrickParam::SP_MOD_CRAFT_SUCCESS;
} }
CSBrickParamModCraftSuccess(const std::string&str) CSBrickParamModCraftSuccess(const std::string&str)
{ {
*this=CSBrickParamModCraftSuccess(); *this=CSBrickParamModCraftSuccess();
*this=str; *this=str;
} }
const CSBrickParamModCraftSuccess& operator=(const std::string& input) const CSBrickParamModCraftSuccess& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<3) if (args.size()<3)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
ModifierCoefficient=(float)atof(args[0].c_str()); ModifierCoefficient=(float)atof(args[0].c_str());
ModifierConstant=(float)atof(args[1].c_str()); ModifierConstant=(float)atof(args[1].c_str());
@ -5550,7 +5558,7 @@ struct CSBrickParamModMeleeSuccess : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModMeleeSuccess(): CSBrickParamModMeleeSuccess():
ModifierCoefficient(), ModifierCoefficient(),
ModifierConstant(), ModifierConstant(),
@ -5558,21 +5566,21 @@ struct CSBrickParamModMeleeSuccess : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_MELEE_SUCCESS; _Id = TBrickParam::SP_MOD_MELEE_SUCCESS;
} }
CSBrickParamModMeleeSuccess(const std::string&str) CSBrickParamModMeleeSuccess(const std::string&str)
{ {
*this=CSBrickParamModMeleeSuccess(); *this=CSBrickParamModMeleeSuccess();
*this=str; *this=str;
} }
const CSBrickParamModMeleeSuccess& operator=(const std::string& input) const CSBrickParamModMeleeSuccess& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<3) if (args.size()<3)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
ModifierCoefficient=(float)atof(args[0].c_str()); ModifierCoefficient=(float)atof(args[0].c_str());
ModifierConstant=(float)atof(args[1].c_str()); ModifierConstant=(float)atof(args[1].c_str());
@ -5591,7 +5599,7 @@ struct CSBrickParamModRangeSuccess : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModRangeSuccess(): CSBrickParamModRangeSuccess():
ModifierCoefficient(), ModifierCoefficient(),
ModifierConstant(), ModifierConstant(),
@ -5599,21 +5607,21 @@ struct CSBrickParamModRangeSuccess : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_RANGE_SUCCESS; _Id = TBrickParam::SP_MOD_RANGE_SUCCESS;
} }
CSBrickParamModRangeSuccess(const std::string&str) CSBrickParamModRangeSuccess(const std::string&str)
{ {
*this=CSBrickParamModRangeSuccess(); *this=CSBrickParamModRangeSuccess();
*this=str; *this=str;
} }
const CSBrickParamModRangeSuccess& operator=(const std::string& input) const CSBrickParamModRangeSuccess& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<3) if (args.size()<3)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
ModifierCoefficient=(float)atof(args[0].c_str()); ModifierCoefficient=(float)atof(args[0].c_str());
ModifierConstant=(float)atof(args[1].c_str()); ModifierConstant=(float)atof(args[1].c_str());
@ -5632,7 +5640,7 @@ struct CSBrickParamModMagicSuccess : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModMagicSuccess(): CSBrickParamModMagicSuccess():
ModifierCoefficient(), ModifierCoefficient(),
ModifierConstant(), ModifierConstant(),
@ -5640,21 +5648,21 @@ struct CSBrickParamModMagicSuccess : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_MAGIC_SUCCESS; _Id = TBrickParam::SP_MOD_MAGIC_SUCCESS;
} }
CSBrickParamModMagicSuccess(const std::string&str) CSBrickParamModMagicSuccess(const std::string&str)
{ {
*this=CSBrickParamModMagicSuccess(); *this=CSBrickParamModMagicSuccess();
*this=str; *this=str;
} }
const CSBrickParamModMagicSuccess& operator=(const std::string& input) const CSBrickParamModMagicSuccess& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<3) if (args.size()<3)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
ModifierCoefficient=(float)atof(args[0].c_str()); ModifierCoefficient=(float)atof(args[0].c_str());
ModifierConstant=(float)atof(args[1].c_str()); ModifierConstant=(float)atof(args[1].c_str());
@ -5676,7 +5684,7 @@ struct CSBrickParamModForageSuccess : public TBrickParam::IId
float ModifierConstant; float ModifierConstant;
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModForageSuccess(): CSBrickParamModForageSuccess():
Ecosystem(), Ecosystem(),
ModifierCoefficient(), ModifierCoefficient(),
@ -5685,21 +5693,21 @@ struct CSBrickParamModForageSuccess : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_FORAGE_SUCCESS; _Id = TBrickParam::SP_MOD_FORAGE_SUCCESS;
} }
CSBrickParamModForageSuccess(const std::string&str) CSBrickParamModForageSuccess(const std::string&str)
{ {
*this=CSBrickParamModForageSuccess(); *this=CSBrickParamModForageSuccess();
*this=str; *this=str;
} }
const CSBrickParamModForageSuccess& operator=(const std::string& input) const CSBrickParamModForageSuccess& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()<4) if (args.size()<4)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
Ecosystem=args[0].c_str(); Ecosystem=args[0].c_str();
ModifierCoefficient=(float)atof(args[1].c_str()); ModifierCoefficient=(float)atof(args[1].c_str());
@ -5713,7 +5721,7 @@ struct CSBrickParamModForageSuccess : public TBrickParam::IId
struct CSBrickParamModMagicProtection : public TBrickParam::IId struct CSBrickParamModMagicProtection : public TBrickParam::IId
{ {
// affected magic protection // affected magic protection
std::string AffectedProtection; std::string AffectedProtection;
// coefficient to modify protection proportionally to item level // coefficient to modify protection proportionally to item level
float ModifierCoefficient; float ModifierCoefficient;
@ -5722,7 +5730,7 @@ struct CSBrickParamModMagicProtection : public TBrickParam::IId
// duration in seconds // duration in seconds
float Duration; float Duration;
CSBrickParamModMagicProtection(): CSBrickParamModMagicProtection():
AffectedProtection(), AffectedProtection(),
ModifierCoefficient(), ModifierCoefficient(),
@ -5731,27 +5739,27 @@ struct CSBrickParamModMagicProtection : public TBrickParam::IId
{ {
_Id = TBrickParam::SP_MOD_MAGIC_PROTECTION; _Id = TBrickParam::SP_MOD_MAGIC_PROTECTION;
} }
CSBrickParamModMagicProtection(const std::string&str) CSBrickParamModMagicProtection(const std::string&str)
{ {
*this=CSBrickParamModMagicProtection(); *this=CSBrickParamModMagicProtection();
*this=str; *this=str;
} }
const CSBrickParamModMagicProtection& operator=(const std::string& input) const CSBrickParamModMagicProtection& operator=(const std::string& input)
{ {
std::vector<std::string> args; std::vector<std::string> args;
convertInput(args, input); convertInput(args, input);
if (args.size()!=4) if (args.size()!=4)
return *this; return *this;
ParsedOk=true; ParsedOk=true;
AffectedProtection=args[0].c_str(); AffectedProtection=args[0].c_str();
ModifierCoefficient=(float)atof(args[1].c_str()); ModifierCoefficient=(float)atof(args[1].c_str());
ModifierConstant=(float)atof(args[2].c_str()); ModifierConstant=(float)atof(args[2].c_str());
Duration=(float)atof(args[3].c_str()); Duration=(float)atof(args[3].c_str());
return *this; return *this;
} }
}; };

@ -1631,7 +1631,7 @@ uint32 CCharacter::tickUpdate()
_LastTickNpcStopped = 0; _LastTickNpcStopped = 0;
setStoppedNpc(TDataSetRow()); setStoppedNpc(TDataSetRow());
} }
return nextUpdate; return nextUpdate;
} // tickUpdate // } // tickUpdate //
@ -2030,7 +2030,7 @@ void CCharacter::applyRespawnEffects(bool applyDP)
resetNextDeathPenaltyFactor(); resetNextDeathPenaltyFactor();
} }
_PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Base / 10; _PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Base / 10;
_PhysScores._PhysicalScores[SCORES::stamina].Current = _PhysScores._PhysicalScores[SCORES::stamina].Base / 10; _PhysScores._PhysicalScores[SCORES::stamina].Current = _PhysScores._PhysicalScores[SCORES::stamina].Base / 10;
_PhysScores._PhysicalScores[SCORES::sap].Current = _PhysScores._PhysicalScores[SCORES::sap].Base / 10; _PhysScores._PhysicalScores[SCORES::sap].Current = _PhysScores._PhysicalScores[SCORES::sap].Base / 10;
@ -5693,7 +5693,7 @@ void CCharacter::teleportCharacter(sint32 x, sint32 y, sint32 z, bool teleportWi
inCell = true; inCell = true;
} }
} }
// Teleport as well pets that are following or mounted or a pet and in the neighbourhood or... in a Powo/indoor // Teleport as well pets that are following or mounted or a pet and in the neighbourhood or... in a Powo/indoor
if ((((isNearPetTpIsAllowed() || form->Type == ITEM_TYPE::ANIMAL_TICKET) && (_PlayerPets[i].IsFollowing || _PlayerPets[i].IsMounted) if ((((isNearPetTpIsAllowed() || form->Type == ITEM_TYPE::ANIMAL_TICKET) && (_PlayerPets[i].IsFollowing || _PlayerPets[i].IsMounted)
&& squareDistance <= 50.0f * 50.0f)) || inCell) && squareDistance <= 50.0f * 50.0f)) || inCell)
@ -5715,7 +5715,7 @@ void CCharacter::teleportCharacter(sint32 x, sint32 y, sint32 z, bool teleportWi
if (_IntangibleEndDate != ~0 && !fromVortex) // Don't save Last Tp Tick if player respawns or teleport from Vortex if (_IntangibleEndDate != ~0 && !fromVortex) // Don't save Last Tp Tick if player respawns or teleport from Vortex
_LastTpTick = CTickEventHandler::getGameCycle(); _LastTpTick = CTickEventHandler::getGameCycle();
_TpCoordinate.X = x; _TpCoordinate.X = x;
_TpCoordinate.Y = y; _TpCoordinate.Y = y;
_TpCoordinate.Z = z; _TpCoordinate.Z = z;
@ -5917,7 +5917,7 @@ string CCharacter::getPets()
pets += "P"; pets += "P";
else if (form->Type == ITEM_TYPE::ANIMAL_TICKET) else if (form->Type == ITEM_TYPE::ANIMAL_TICKET)
pets += "A"; pets += "A";
CPetAnimal::TStatus status = _PlayerPets[i].PetStatus; CPetAnimal::TStatus status = _PlayerPets[i].PetStatus;
if (status != CPetAnimal::db_unknown) if (status != CPetAnimal::db_unknown)
pets += toString("%d", (uint32)(status)); pets += toString("%d", (uint32)(status));
@ -6451,7 +6451,7 @@ void CCharacter::onAnimalSpawned(CPetSpawnConfirmationMsg::TSpawnError SpawnStat
CMirrorPropValue< SAltLookProp2, CPropLocationPacked<2> > visualPropertyB( TheDataset, PetMirrorRow, DSPropertyVPB ); CMirrorPropValue< SAltLookProp2, CPropLocationPacked<2> > visualPropertyB( TheDataset, PetMirrorRow, DSPropertyVPB );
SET_STRUCT_MEMBER( visualPropertyB, PropertySubData.Scale, animal.Size ); SET_STRUCT_MEMBER( visualPropertyB, PropertySubData.Scale, animal.Size );
} }
} }
if (animal.PetStatus != CPetAnimal::death) if (animal.PetStatus != CPetAnimal::death)
@ -7246,7 +7246,7 @@ void CCharacter::removePetCharacterAfterDeath(uint32 index)
const CStaticItem* form = _PlayerPets[index].ItemPtr->getStaticForm(); const CStaticItem* form = _PlayerPets[index].ItemPtr->getStaticForm();
if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET) if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastFreeMount = CTickEventHandler::getGameCycle(); _LastFreeMount = CTickEventHandler::getGameCycle();
uint32 slot = _PlayerPets[index].ItemPtr->getInventorySlot(); uint32 slot = _PlayerPets[index].ItemPtr->getInventorySlot();
// release our ref before we destroy the item // release our ref before we destroy the item
_PlayerPets[index].ItemPtr = 0; _PlayerPets[index].ItemPtr = 0;
@ -7623,7 +7623,7 @@ void CCharacter::sendAnimalCommand(uint8 petIndexCode, uint8 command)
_PlayerPets[petIndex].IsInBag = false; _PlayerPets[petIndex].IsInBag = false;
// no petCommand setup here so continue instead of break // no petCommand setup here so continue instead of break
continue; continue;
case ANIMALS_ORDERS::ENTER_STABLE: case ANIMALS_ORDERS::ENTER_STABLE:
if (_PlayerPets[petIndex].IsMounted) if (_PlayerPets[petIndex].IsMounted)
continue; continue;
@ -7888,11 +7888,11 @@ double CCharacter::addXpToSkillInternal(double XpGain, const std::string &ContSk
string skillInitial = SKILLS::toString(skillEnum).substr(1, 1); string skillInitial = SKILLS::toString(skillEnum).substr(1, 1);
//// GUILDS POINTS //// GUILDS POINTS
CGuild* guild = CGuildManager::getInstance()->getGuildFromId(_GuildId); CGuild* guild = CGuildManager::getInstance()->getGuildFromId(_GuildId);
if (EnableGuildPoints.get() && guild) if (EnableGuildPoints.get() && guild)
{ {
uint32 guildpoints = 0; uint32 guildpoints = 0;
if (skill->MaxLvlReached >= 250) // when max level : quantity of points is different for each skill if (skill->MaxLvlReached >= 250) // when max level : quantity of points is different for each skill
{ {
@ -8312,7 +8312,7 @@ double CCharacter::addXpToSkillInternal(double XpGain, const std::string &ContSk
_BaseParryLevel = skill->Base; _BaseParryLevel = skill->Base;
if (p->isTrialPlayer() && _BaseParryLevel > 125) if (p->isTrialPlayer() && _BaseParryLevel > 125)
_BaseParryLevel = 125; _BaseParryLevel = 125;
_CurrentParryLevel = max(sint32(0), _BaseParryLevel + _ParryModifier); _CurrentParryLevel = max(sint32(0), _BaseParryLevel + _ParryModifier);
// _PropertyDatabase.setProp(_DataIndexReminder->CHARACTER_INFO.ParryBase, // _PropertyDatabase.setProp(_DataIndexReminder->CHARACTER_INFO.ParryBase,
//_BaseParryLevel); //_BaseParryLevel);
@ -11674,30 +11674,29 @@ void CCharacter::setNewTitle(const string &title)
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CCharacter::setTagPvPA(const string &tag) void CCharacter::setTagA(const string &tag)
{ {
_TagPvPA = tag; _TagA = tag;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CCharacter::setTagPvPB(const string &tag) void CCharacter::setTagB(const string &tag)
{ {
_TagPvPB = tag; _TagB = tag;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CCharacter::setTagA(const string &tag) void CCharacter::setTagPvPA(const string &tag)
{ {
_TagA = tag; _TagPvPA = tag;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CCharacter::setTagB(const string &tag) void CCharacter::setTagPvPB(const string &tag)
{ {
_TagB = tag; _TagPvPB = tag;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CCharacter::setDontTranslate(const string &langs) void CCharacter::setDontTranslate(const string &langs)
{ {
@ -11708,7 +11707,7 @@ void CCharacter::setDontTranslate(const string &langs)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_EQUIPMENT::TSlotEquipment slot) CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_EQUIPMENT::TSlotEquipment slot)
{ {
CInventoryPtr inv = getInventory(INVENTORIES::equipment); CInventoryPtr inv = getInventory(INVENTORIES::equipment);
if (inv) if (inv)
{ {
@ -11731,8 +11730,14 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param; CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param;
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute) if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
{ {
if (checkRequiredFaction(sbrickParam->RequiredFaction)) { // Check required fame (if no required faction, check are ok)
return sbrickParam; if (checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
{
// Require a faction/nation/org only for fame up to 30
if (sbrickParam->RequiredFame < 30 || checkRequiredFaction(sbrickParam->RequiredFaction))
{
return sbrickParam;
}
} }
} }
} }
@ -11758,8 +11763,14 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param; CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param;
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute) if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
{ {
if (checkRequiredFaction(sbrickParam->RequiredFaction)) { // Check required fame (if no required faction, check are ok)
return sbrickParam; if (checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
{
// Require a faction/nation/org only for fame up to 30
if (sbrickParam->RequiredFame < 30 || checkRequiredFaction(sbrickParam->RequiredFaction))
{
return sbrickParam;
}
} }
} }
} }
@ -11768,7 +11779,7 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
} }
} }
} }
return NULL; return NULL;
} }
@ -12550,7 +12561,7 @@ void CCharacter::acceptExchange(uint8 exchangeId)
nlwarning("CCharacter::acceptExchange : character %s -> no exchangeView", _Id.toString().c_str()); nlwarning("CCharacter::acceptExchange : character %s -> no exchangeView", _Id.toString().c_str());
return; return;
} }
removeExchangeItems(vect, exchangePlayerPets); removeExchangeItems(vect, exchangePlayerPets);
if (mission) if (mission)
@ -12919,7 +12930,7 @@ void CCharacter::removeExchangeItems(vector<CGameItemPtr> &itemRemoved, vector<C
{ {
if (form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET) if (form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastExchangeMount = CTickEventHandler::getGameCycle(); _LastExchangeMount = CTickEventHandler::getGameCycle();
for (uint p = 0; p < _PlayerPets.size(); p++) for (uint p = 0; p < _PlayerPets.size(); p++)
{ {
if (_PlayerPets[p].ItemPtr == item) if (_PlayerPets[p].ItemPtr == item)
@ -13003,11 +13014,11 @@ void CCharacter::addExchangeItems(
if (item == NULL) if (item == NULL)
continue; continue;
const CStaticItem* form = CSheets::getForm(item->getSheetId()); const CStaticItem* form = CSheets::getForm(item->getSheetId());
if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET) if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastExchangeMount = CTickEventHandler::getGameCycle(); _LastExchangeMount = CTickEventHandler::getGameCycle();
if (!addItemToInventory(INVENTORIES::bag, itemToAdd[i]) if (!addItemToInventory(INVENTORIES::bag, itemToAdd[i])
&& !addItemToInventory(INVENTORIES::temporary, itemToAdd[i])) && !addItemToInventory(INVENTORIES::temporary, itemToAdd[i]))
{ {
@ -13402,7 +13413,7 @@ void CCharacter::removeMission(TAIAlias alias, /*TMissionResult*/ uint32 result,
} }
CMissionTemplate* tpl = CMissionManager::getInstance()->getTemplate(mission->getTemplateId()); CMissionTemplate* tpl = CMissionManager::getInstance()->getTemplate(mission->getTemplateId());
if (mission->getFinished()) if (mission->getFinished())
{ {
if (mission->getMissionSuccess()) if (mission->getMissionSuccess())
@ -14927,7 +14938,7 @@ string CCharacter::getTargetInfos()
double h = cTarget->getState().Heading; double h = cTarget->getState().Heading;
double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y)); double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y));
TDataSetRow dsr = cTarget->getEntityRowId(); TDataSetRow dsr = cTarget->getEntityRowId();
CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL); CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL);
sint32 cell = srcCell; sint32 cell = srcCell;
@ -14943,7 +14954,7 @@ string CCharacter::getTargetInfos()
float x = source->pos().x; float x = source->pos().x;
float y = source->pos().y; float y = source->pos().y;
double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y)); double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y));
msg += toString("%.2f|%.2f|%.2f|", dist, x, y)+source->materialSheet().toString()+"|"+toString("%.2f|%.2f|%.2f|%u|", source->quantity(), source->quality(), source->maxQuality(), source->timeToLive()); msg += toString("%.2f|%.2f|%.2f|", dist, x, y)+source->materialSheet().toString()+"|"+toString("%.2f|%.2f|%.2f|%u|", source->quantity(), source->quality(), source->maxQuality(), source->timeToLive());
if (source->wasProspected()) if (source->wasProspected())
msg += "1"; msg += "1";
@ -14968,14 +14979,14 @@ string CCharacter::getTargetInfos()
string pets = getPets(); string pets = getPets();
msg += toString("PET#%d:%s|", petSlot, pets.c_str()); msg += toString("PET#%d:%s|", petSlot, pets.c_str());
} }
double x = cTarget->getState().X / 1000.; double x = cTarget->getState().X / 1000.;
double y = cTarget->getState().Y / 1000.; double y = cTarget->getState().Y / 1000.;
double z = cTarget->getState().Z / 1000.; double z = cTarget->getState().Z / 1000.;
double h = cTarget->getState().Heading; double h = cTarget->getState().Heading;
double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y)); double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y));
TDataSetRow dsr = cTarget->getEntityRowId(); TDataSetRow dsr = cTarget->getEntityRowId();
CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL); CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL);
sint32 cell = srcCell; sint32 cell = srcCell;
@ -14983,7 +14994,7 @@ string CCharacter::getTargetInfos()
msg += toString("%.2f|%.2f|%.2f|%.2f|%.4f|%d|", dist, x, y, z, h, cell)+cTarget->getType().toString()+"|"+EGSPD::CPeople::toString(cTarget->getRace())+"|"+toString("%d", cTarget->getGender()); msg += toString("%.2f|%.2f|%.2f|%.2f|%.4f|%d|", dist, x, y, z, h, cell)+cTarget->getType().toString()+"|"+EGSPD::CPeople::toString(cTarget->getRace())+"|"+toString("%d", cTarget->getGender());
} }
} }
return msg; return msg;
} }
@ -15675,8 +15686,23 @@ void CCharacter::sendUrl(const string &url)
string targetInfos = getTargetInfos(); string targetInfos = getTargetInfos();
string serverInfos = getServerInfos(getState().X / 1000., getState().Y / 1000.); string serverInfos = getServerInfos(getState().X / 1000., getState().Y / 1000.);
strFindReplace(targetInfos, " ", "%20"); strFindReplace(targetInfos, " ", "%20");
string final_url;
string final_url = url + toString("&urlidx=%d", getUrlIndex())+"&player_pos="+playerPos+"&target_infos="+targetInfos+"&server_infos="+serverInfos;
if (url.find("$(") != string::npos )
{
final_url = url;
strFindReplace(final_url, "$(pos)", playerPos);
strFindReplace(final_url, "$(target)", targetInfos);
strFindReplace(final_url, "$(server)", serverInfos);
strFindReplace(final_url, "$(hands)", getEquipementInfos(INVENTORIES::handling));
strFindReplace(final_url, "$(equiped)", getEquipementInfos(INVENTORIES::equipment));
final_url += toString("&urlidx=%d", getUrlIndex());
}
else
{
final_url = url + toString("&urlidx=%d", getUrlIndex())+"&player_pos="+playerPos+"&target_infos="+targetInfos+"&server_infos="+serverInfos;
}
control = "&hmac="+ getHMacSHA1((uint8*)&final_url[0], (uint32)final_url.size(), (uint8*)&salt[0], (uint32)salt.size()).toString(); control = "&hmac="+ getHMacSHA1((uint8*)&final_url[0], (uint32)final_url.size(), (uint8*)&salt[0], (uint32)salt.size()).toString();
uint32 userId = PlayerManager.getPlayerId(getId()); uint32 userId = PlayerManager.getPlayerId(getId());
@ -16400,7 +16426,7 @@ void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint
{ {
if (fameIdx == marauderIdx) if (fameIdx == marauderIdx)
continue; continue;
sint32 fame = CFameInterface::getInstance().getFameIndexed(_Id, fameIdx); sint32 fame = CFameInterface::getInstance().getFameIndexed(_Id, fameIdx);
if (fame > maxOtherfame) if (fame > maxOtherfame)
@ -16414,7 +16440,7 @@ void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint
CFameManager::getInstance().setEntityFame(_Id, marauderIdx, maxOtherfame, false); CFameManager::getInstance().setEntityFame(_Id, marauderIdx, maxOtherfame, false);
} }
} }
// _PropertyDatabase.setProp( toString("FAME:PLAYER%d:VALUE", fameIndexInDatabase), // _PropertyDatabase.setProp( toString("FAME:PLAYER%d:VALUE", fameIndexInDatabase),
// sint64(float(playerFame)/FameAbsoluteMax*100) ); // sint64(float(playerFame)/FameAbsoluteMax*100) );
CBankAccessor_PLR::getFAME() CBankAccessor_PLR::getFAME()
@ -16928,9 +16954,9 @@ bool CCharacter::removeSabrinaEffect(CSEffect* effect, bool activateSleepingEffe
uint32 CCharacter::getCarriedWeight() uint32 CCharacter::getCarriedWeight()
{ {
// CarriedWeight is bag Weight + all pets in bag // CarriedWeight is bag Weight + all pets in bag
uint32 total = _Inventory[INVENTORIES::bag]->getInventoryWeight(); uint32 total = _Inventory[INVENTORIES::bag]->getInventoryWeight();
for (uint i = 0; i != _PlayerPets.size(); ++i) for (uint i = 0; i != _PlayerPets.size(); ++i)
{ {
if (_PlayerPets[i].IsInBag) // Add 5kg + Weight of Inventory if (_PlayerPets[i].IsInBag) // Add 5kg + Weight of Inventory
@ -18017,7 +18043,7 @@ void CCharacter::clearIgnoreList()
void CCharacter::online(bool onlineStatus) void CCharacter::online(bool onlineStatus)
{ {
_AreOnline = onlineStatus; _AreOnline = onlineStatus;
// send contact list init if goind online // send contact list init if goind online
if (onlineStatus) if (onlineStatus)
sendContactListInit(); sendContactListInit();
@ -18078,7 +18104,7 @@ void CCharacter::online(bool onlineStatus)
msgout.serial(langs); msgout.serial(langs);
CUnifiedNetwork::getInstance()->send("IOS", msgout); CUnifiedNetwork::getInstance()->send("IOS", msgout);
} }
} // online // } // online //
//-------------------------------------------------------------- //--------------------------------------------------------------
@ -19288,7 +19314,7 @@ void CCharacter::checkCharacAndScoresValues()
} }
} }
} }
{ {
H_AUTO(CheckCharacteristics); H_AUTO(CheckCharacteristics);
// check caracs // check caracs
@ -19308,7 +19334,7 @@ void CCharacter::checkCharacAndScoresValues()
if (player != NULL && player->isTrialPlayer() && bvalue > 140) if (player != NULL && player->isTrialPlayer() && bvalue > 140)
bvalue = 140; bvalue = 140;
// compare // compare
if (_PhysCharacs._PhysicalCharacteristics[charac].Base != tvalue) if (_PhysCharacs._PhysicalCharacteristics[charac].Base != tvalue)
{ {
@ -19330,7 +19356,7 @@ void CCharacter::checkCharacAndScoresValues()
} }
} }
} }
{ {
H_AUTO(CheckScores); H_AUTO(CheckScores);
// Check Scores // Check Scores
@ -19710,7 +19736,7 @@ bool CCharacter::setHairColor(uint32 colorValue, bool sendMessage)
CCharacter::sendDynamicSystemMessage(_Id, "EGS_COSMETIC_USE_WIG"); CCharacter::sendDynamicSystemMessage(_Id, "EGS_COSMETIC_USE_WIG");
return false; return false;
} }
if (colorValue == _HairColor) if (colorValue == _HairColor)
{ {
if (sendMessage) if (sendMessage)
@ -21223,31 +21249,41 @@ void CCharacter::updateJewelsTags(bool remove, bool update)
string tagA = getTagA(); string tagA = getTagA();
string tagB = getTagB(); string tagB = getTagB();
string tagPvPA = getTagPvPA();
string tagPvPB = getTagPvPB();
setTagA(""); setTagA("");
setTagB(""); setTagB("");
setTagPvPA("");
setTagPvPB("");
if (remove) if (remove)
return; return;
CSBrickParamJewelAttrs *sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::HEADDRESS); CSBrickParamJewelAttrs *sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::HEADDRESS);
if (sbrickParam) if (sbrickParam)
{
setTagA(sbrickParam->Value); setTagA(sbrickParam->Value);
}
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::NECKLACE); sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::NECKLACE);
if (sbrickParam) if (sbrickParam)
{
setTagB(sbrickParam->Value); setTagB(sbrickParam->Value);
}
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARL);
if (sbrickParam)
setTagPvPA(sbrickParam->Value);
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARR);
if (sbrickParam)
setTagPvPB(sbrickParam->Value);
if (!update) if (!update)
return; return;
if (getTagA() != tagA || getTagB() != tagB) { if (getTagA() != tagA || getTagB() != tagB || getTagPvPA() != tagPvPA || getTagPvPB() != tagPvPB)
{
registerName(); registerName();
} }
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -23411,5 +23447,5 @@ bool CCharacter::initPetInventory(uint8 index)
void CCharacter::killMe() void CCharacter::killMe()
{ {
kill(_EntityRowId); kill(_EntityRowId);
} }

@ -2592,6 +2592,7 @@ public:
std::string getFullTitle() const; std::string getFullTitle() const;
bool checkRequiredFaction(std::string faction) const; bool checkRequiredFaction(std::string faction) const;
bool checkRequiredFame(std::string faction, sint32 fame) const;
std::string getTagA() const; std::string getTagA() const;
void setTagA(const std::string &tag); void setTagA(const std::string &tag);

Loading…
Cancel
Save