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);
//--------------------------------------------------------------
// constructor
// constructor
//--------------------------------------------------------------
CStaticBrick::CStaticBrick()
{
@ -79,7 +79,7 @@ CStaticBrick::CStaticBrick()
//--------------------------------------------------------------
// destructor
// destructor
//--------------------------------------------------------------
CStaticBrick::~CStaticBrick()
{
@ -88,7 +88,7 @@ CStaticBrick::~CStaticBrick()
//--------------------------------------------------------------
// serial()
// serial()
//--------------------------------------------------------------
void CStaticBrick::serial(class NLMISC::IStream &f)
{
@ -104,7 +104,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
f.serial(MinCastTime);
f.serial(MaxCastTime);
f.serial(MinRange);
f.serial(MaxRange);
f.serial(MaxRange);
f.serialCont( StringParams );
f.serial(ForbiddenDef);
f.serial(ForbiddenExclude);
@ -137,11 +137,11 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
addParam(StringParams[i], Params);
}
// Grammar
// Grammar
// mandatory
f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i)
{
{
f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -156,7 +156,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// optional
f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i)
{
{
f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -171,7 +171,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// credit
f.serial(size);
for ( uint16 i = 0 ; i < size ; ++i)
{
{
f.serial(str);
BRICK_FAMILIES::TBrickFamily family = BRICK_FAMILIES::toSBrickFamily(str);
@ -217,7 +217,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
}
}
else
{
{
// family
string str = BRICK_FAMILIES::toString(Family);
f.serial( str );
@ -225,7 +225,7 @@ void CStaticBrick::serial(class NLMISC::IStream &f)
// localisation
str = SLOT_EQUIPMENT::toString(ForcedLocalisation);
f.serial( str );
// params
// 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)
{
@ -324,11 +324,11 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
// 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") )
{
Family = BRICK_FAMILIES::toSBrickFamily( value );
Family = BRICK_FAMILIES::toSBrickFamily( value );
if(Family==BRICK_FAMILIES::Unknown)
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
{
{
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() );
}
// SabrinaValue
root.getValueByName (SabrinaValue, "Basics.SabrinaCost");
@ -387,9 +387,9 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
// power value
root.getValueByName (PowerValue, "Basics.PowerValue");
// 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() );
}
@ -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() );
}
// LearnRequiresOneOfSkills
if ( ! root.getValueByName (value, "Basics.LearnRequiresOneOfSkills") )
{
@ -464,7 +464,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
brickSheet += string(".sbrick");
}
}
CSheetId brickSheetId( NLMISC::strlwr( brickSheet ) );
if ( brickSheetId == CSheetId::Unknown )
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);
}
// Load Faber tools
if( Family >= BRICK_FAMILIES::BeginFaberRoot && Family <= BRICK_FAMILIES::EndFaberRoot )
{
@ -521,7 +521,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
}
// 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() );
}
@ -564,7 +564,7 @@ void CStaticBrick::readStaticBrick( const NLGEORGES::UFormElm &root, const NLMIS
nlwarning("Unknown Mandatory family %s",value.c_str());
}
}
// Optional families
OptionalFamilies.clear();
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());
}
}
// Parameter families
// ParameterFamilies.clear();
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());
}
}
// Credit families
CreditFamilies.clear();
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 );
}
}
root.getValueByName (ForbiddenDef, "Basics.ForbiddenDef" );
root.getValueByName (ForbiddenExclude, "Basics.ForbiddenExclude" );
root.getValueByName (UsableWithEmptyHands, "Basics.UsableWithEmptyHands");
} // readStaticBrick //
@ -648,7 +648,7 @@ bool CPlayerSkill::initFromString( const string& skillAndValue )
// string if the brick properties.
//
//--------------------------------------------------------------
// addParam()
// addParam()
//--------------------------------------------------------------
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:
// $*STRUCT CSBrickParamSap TBrickParam::SAP
// $*-i unsigned Sap=0 // quantity of SAP to use
Params.push_back(new CSBrickParamSap(tail));
Params.push_back(new CSBrickParamSap(tail));
break;
case TBrickParam::HP:
// $*STRUCT CSBrickParamHp TBrickParam::HP
// $*-i unsigned Hp=0 // quantity of HP to use
Params.push_back(new CSBrickParamHp(tail));
Params.push_back(new CSBrickParamHp(tail));
break;
case TBrickParam::STA:
// $*STRUCT CSBrickParamSta TBrickParam::STA
// $*-i unsigned Sta=0 // quantity of STA to use
Params.push_back(new CSBrickParamSta(tail));
Params.push_back(new CSBrickParamSta(tail));
break;
case TBrickParam::STA_WEIGHT_FACTOR:
// $*STRUCT CSBrickParamStaWeightFactor TBrickParam::STA_WEIGHT_FACTOR
// $*-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
Params.push_back(new CSBrickParamStaWeightFactor(tail));
Params.push_back(new CSBrickParamStaWeightFactor(tail));
break;
case TBrickParam::FOCUS:
// $*STRUCT CSBrickParamFocus TBrickParam::FOCUS
// $*-i unsigned Focus=0 // quantity of FOCUS to use
Params.push_back(new CSBrickParamFocus(tail));
Params.push_back(new CSBrickParamFocus(tail));
break;
case TBrickParam::SET_BEHAVIOUR:
// $*STRUCT CSBrickParamSetBehaviour TBrickParam::SET_BEHAVIOUR
// $*-s std::string Behaviour // the new behaviour to use
Params.push_back(new CSBrickParamSetBehaviour(tail));
Params.push_back(new CSBrickParamSetBehaviour(tail));
break;
case TBrickParam::DEFINE_FLAG:
// $*STRUCT CSBrickParamDefineFlag TBrickParam::DEFINE_FLAG
// $*-s std::string Flag // the defined flag
Params.push_back(new CSBrickParamDefineFlag(tail));
Params.push_back(new CSBrickParamDefineFlag(tail));
break;
case TBrickParam::BYPASS_CHECK:
// $*STRUCT CSBrickParamBypassCheck TBrickParam::BYPASS_CHECK
// $*-s std::string FlagType // the check flag to bypass
Params.push_back(new CSBrickParamBypassCheck(tail));
Params.push_back(new CSBrickParamBypassCheck(tail));
break;
/************************************************************************/
/* COMBAT Params */
/************************************************************************/
@ -719,7 +719,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamLatencyFactor TBrickParam::LATENCY_FACTOR
// $*-f float MinLatencyFactor = 1 // min 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;
@ -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 MinFactor = 0.0 // min 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;
case 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 MaxFactor = 0.0 // max factor of damage also applied to sap
Params.push_back(new CSBrickParamSapLossFactor(tail));
Params.push_back(new CSBrickParamSapLossFactor(tail));
}
break;
@ -757,7 +757,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamAim TBrickParam::AIM
// $*-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)
Params.push_back(new CSBrickParamAim(tail));
Params.push_back(new CSBrickParamAim(tail));
}
break;
@ -784,7 +784,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
{
// $*STRUCT CSBrickParamThrowOffBalance TBrickParam::THROW_OFF_BALANCE
// $*-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));
}
break;
@ -794,7 +794,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncreaseDamage TBrickParam::INC_DMG
// $*-f float MinFactor = 1.0f //min 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;
@ -803,7 +803,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgTypeRestriction TBrickParam::INC_DMG_TYPE_RSTR
// $*-s std::string TypeRestriction //type restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgTypeRestriction(tail));
Params.push_back(new CSBrickParamIncDmgTypeRestriction(tail));
}
break;
@ -812,7 +812,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgRaceRestriction TBrickParam::INC_DMG_RACE_RSTR
// $*-s std::string RaceRestriction //race restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgRaceRestriction(tail));
Params.push_back(new CSBrickParamIncDmgRaceRestriction(tail));
}
break;
@ -821,7 +821,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgEcosystemRestriction TBrickParam::INC_DMG_ECOS_RSTR
// $*-s std::string EcosystemRestriction //Ecosystem restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgEcosystemRestriction(tail));
Params.push_back(new CSBrickParamIncDmgEcosystemRestriction(tail));
}
break;
@ -830,7 +830,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamIncDmgSeasonRestriction TBrickParam::INC_DMG_SEASON_RSTR
// $*-s std::string SeasonRestriction //Season restriction
// $*-f float FactorModifier = 0.0f //bonus on damage factor
Params.push_back(new CSBrickParamIncDmgSeasonRestriction(tail));
Params.push_back(new CSBrickParamIncDmgSeasonRestriction(tail));
}
break;
@ -840,7 +840,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string DamageType // damage type
// $*-f float MinFactor = 0.0f //min 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;
@ -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..)
// $*-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)
Params.push_back(new CSBrickParamArmorMod(tail));
Params.push_back(new CSBrickParamArmorMod(tail));
}
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 MinFactor = 1.0f // min 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;
case TBrickParam::OPENING_1:
{
// $*STRUCT CSBrickParamOpening1 TBrickParam::OPENING_1
// $*-s std::string EventFlag
Params.push_back(new CSBrickParamOpening1(tail));
Params.push_back(new CSBrickParamOpening1(tail));
}
break;
@ -879,7 +879,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamOpening2 TBrickParam::OPENING_2
// $*-s std::string EventFlag1
// $*-s std::string EventFlag2
Params.push_back(new CSBrickParamOpening2(tail));
Params.push_back(new CSBrickParamOpening2(tail));
}
break;
@ -889,7 +889,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-s std::string EventFlag1
// $*-s std::string EventFlag2
// $*-s std::string EventFlag3
Params.push_back(new CSBrickParamOpening3(tail));
Params.push_back(new CSBrickParamOpening3(tail));
}
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
// $*-i sint32 MinFactor // min 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;
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
// $*-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%)
Params.push_back(new CSBrickParamCombatSlow(tail));
Params.push_back(new CSBrickParamCombatSlow(tail));
break;
case TBrickParam::BLEED_FACTOR:
// $*STRUCT CSBrickParamBleedFactor TBrickParam::BLEED_FACTOR
// $*-f float Duration // duration of the effect in seconds
// $*-f float MinFactor // min 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;
case TBrickParam::SPECIAL_HIT:
// $*STRUCT CSBrickParamSpecialHit TBrickParam::SPECIAL_HIT
// no param
Params.push_back(new CSBrickParamSpecialHit(tail));
Params.push_back(new CSBrickParamSpecialHit(tail));
break;
case 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 MaxFactor // max factor on dealt damage (total damage divided among targets)
Params.push_back(new CSBrickParamHitAllAggressors(tail));
Params.push_back(new CSBrickParamHitAllAggressors(tail));
break;
case TBrickParam::WEAPON_WEAR_MOD:
// $*STRUCT CSBrickParamWeaponWearMod TBrickParam::WEAPON_WEAR_MOD
// $*-f float MinModifier // min weapon wear modifier
// $*-f float MaxModifier // max weapon wear modifier
Params.push_back(new CSBrickParamWeaponWearMod(tail));
Params.push_back(new CSBrickParamWeaponWearMod(tail));
break;
case TBrickParam::CRITICAL_HIT_MOD:
// $*STRUCT CSBrickParamCriticalHitMod TBrickParam::CRITICAL_HIT_MOD
// $*-i uint8 MinModifier // min 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;
/************************************************************************/
/* MAGIC params */
/************************************************************************/
@ -954,50 +954,50 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::MA:
// $*STRUCT CSBrickParamMaType TBrickParam::MA
// $*-s std::string Type // type name
Params.push_back(new CSBrickParamMaType(tail));
Params.push_back(new CSBrickParamMaType(tail));
break;
case TBrickParam::MA_END:
// $*STRUCT CSBrickParamMaEnd TBrickParam::MA_END
Params.push_back(new CSBrickParamMaEnd(tail));
Params.push_back(new CSBrickParamMaEnd(tail));
break;
case TBrickParam::MA_EFFECT:
// $*STRUCT CSBrickParamMagicEffect TBrickParam::MA_EFFECT
// $*-s std::string Effect // effect name
Params.push_back(new CSBrickParamMagicEffect(tail));
Params.push_back(new CSBrickParamMagicEffect(tail));
break;
case TBrickParam::MA_STAT:
// $*STRUCT CSBrickParamMagicStat TBrickParam::MA_STAT
// $*-s std::string Stat // affected stat
// $*-s std::string Type // affected stat type
Params.push_back(new CSBrickParamMagicStat(tail));
Params.push_back(new CSBrickParamMagicStat(tail));
break;
case TBrickParam::MA_EFFECT_MOD:
// $*STRUCT CSBrickParamMagicEffectMod TBrickParam::MA_EFFECT_MOD
// $*-i sint32 EffectMod // effect modifier
Params.push_back(new CSBrickParamMagicEffectMod(tail));
Params.push_back(new CSBrickParamMagicEffectMod(tail));
break;
case TBrickParam::MA_EFFECT_MULT:
// $*STRUCT CSBrickParamMagicEffectMult TBrickParam::MA_EFFECT_MULT
// $*-f float EffectMult // effect modifier
Params.push_back(new CSBrickParamMagicEffectMult(tail));
Params.push_back(new CSBrickParamMagicEffectMult(tail));
break;
case TBrickParam::MA_CASTING_TIME:
// $*STRUCT CSBrickParamCastingTime TBrickParam::MA_CASTING_TIME
// $*-f float CastingTime= 0 // casting modifier in seconds
Params.push_back(new CSBrickParamCastingTime(tail));
Params.push_back(new CSBrickParamCastingTime(tail));
break;
case TBrickParam::MA_DMG_TYPE:
// $*STRUCT CSBrickParamMagicDmgType TBrickParam::MA_DMG_TYPE
// $*-s std::string DmgType // magic damage type
Params.push_back(new CSBrickParamMagicDmgType(tail));
Params.push_back(new CSBrickParamMagicDmgType(tail));
break;
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 Sap = 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;
case TBrickParam::MA_HEAL:
// $*STRUCT CSBrickParamMagicHeal TBrickParam::MA_HEAL
// $*-i sint32 Hp = 0 // fixed modifier on energy
// $*-i sint32 Sap = 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;
case TBrickParam::MA_RANGE:
// $*STRUCT CSBrickParamMagicRanges TBrickParam::MA_RANGE
// $*-i sint8 RangeIndex
Params.push_back(new CSBrickParamMagicRanges(tail));
Params.push_back(new CSBrickParamMagicRanges(tail));
break;
case TBrickParam::MA_LINK_COST:
// $*STRUCT CSBrickParamMagicLinkCost TBrickParam::MA_LINK_COST
// $*-i sint32 Cost
Params.push_back(new CSBrickParamMagicLinkCost(tail));
Params.push_back(new CSBrickParamMagicLinkCost(tail));
break;
case TBrickParam::MA_LINK_PERIOD:
// $*STRUCT CSBrickParamMagicLinkPeriod TBrickParam::MA_LINK_PERIOD
// $*-i uint32 Period
Params.push_back(new CSBrickParamMagicLinkPeriod(tail));
Params.push_back(new CSBrickParamMagicLinkPeriod(tail));
break;
case TBrickParam::MA_CURE:
// $*STRUCT CSBrickParamMagicCure TBrickParam::MA_CURE
// $*-s std::string Cure
Params.push_back(new CSBrickParamMagicCure(tail));
Params.push_back(new CSBrickParamMagicCure(tail));
break;
case TBrickParam::MA_LINK_POWER:
// $*STRUCT CSBrickParamMagicLinkPower TBrickParam::MA_LINK_POWER
// $*-i uint16 Power
Params.push_back(new CSBrickParamMagicLinkPower(tail));
Params.push_back(new CSBrickParamMagicLinkPower(tail));
break;
case TBrickParam::MA_BREAK_RES:
// $*STRUCT CSBrickParamMagicBreakResist TBrickParam::MA_BREAK_RES
// $*-i uint16 BreakResist
// $*-i uint16 BreakResistPower
Params.push_back(new CSBrickParamMagicBreakResist(tail));
Params.push_back(new CSBrickParamMagicBreakResist(tail));
break;
case TBrickParam::MA_ARMOR_COMP:
// $*STRUCT CSBrickParamMagicArmorComp TBrickParam::MA_ARMOR_COMP
// $*-i uint16 ArmorComp
Params.push_back(new CSBrickParamMagicArmorComp(tail));
Params.push_back(new CSBrickParamMagicArmorComp(tail));
break;
case TBrickParam::MA_VAMPIRISE:
// $*STRUCT CSBrickParamMagicVampirise TBrickParam::MA_VAMPIRISE
// $*-i sint32 Vampirise
Params.push_back(new CSBrickParamMagicVampirise(tail));
Params.push_back(new CSBrickParamMagicVampirise(tail));
break;
case TBrickParam::MA_VAMPIRISE_RATIO:
// $*STRUCT CSBrickParamMagicVampiriseRatio TBrickParam::MA_VAMPIRISE_RATIO
// $*-f float VampiriseRatio
Params.push_back(new CSBrickParamMagicVampiriseRatio(tail));
Params.push_back(new CSBrickParamMagicVampiriseRatio(tail));
break;
/************************************************************************/
@ -1070,67 +1070,67 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::CR_RECOMMENDED:
// $*STRUCT CSBrickParamCraftRecommended TBrickParam::CR_RECOMMENDED
// $*-i uint32 Recommended
Params.push_back(new CSBrickParamCraftRecommended(tail));
Params.push_back(new CSBrickParamCraftRecommended(tail));
break;
case TBrickParam::CR_HP:
// $*STRUCT CSBrickParamCraftHP TBrickParam::CR_HP
// $*-i sint32 HitPoint
Params.push_back(new CSBrickParamCraftHP(tail));
Params.push_back(new CSBrickParamCraftHP(tail));
break;
case TBrickParam::CR_SAP:
// $*STRUCT CSBrickParamCraftSap TBrickParam::CR_SAP
// $*-i sint32 Sap
Params.push_back(new CSBrickParamCraftSap(tail));
Params.push_back(new CSBrickParamCraftSap(tail));
break;
case TBrickParam::CR_STA:
// $*STRUCT CSBrickParamCraftSta TBrickParam::CR_STA
// $*-i sint32 Stamina
Params.push_back(new CSBrickParamCraftSta(tail));
Params.push_back(new CSBrickParamCraftSta(tail));
break;
case TBrickParam::CR_FOCUS:
// $*STRUCT CSBrickParamCraftFocus TBrickParam::CR_FOCUS
// $*-i uint32 Focus
Params.push_back(new CSBrickParamCraftFocus(tail));
Params.push_back(new CSBrickParamCraftFocus(tail));
break;
case TBrickParam::CR_QUALITY:
// $*STRUCT CSBrickParamCraftQuality TBrickParam::CR_QUALITY
// $*-i sint32 Quality
Params.push_back(new CSBrickParamCraftQuality(tail));
Params.push_back(new CSBrickParamCraftQuality(tail));
break;
case TBrickParam::CR_DURABILITY:
// $*STRUCT CSBrickParamCraftDurability TBrickParam::CR_DURABILITY
// $*-f float Durability
Params.push_back(new CSBrickParamCraftDurability(tail));
Params.push_back(new CSBrickParamCraftDurability(tail));
break;
case TBrickParam::CR_DAMAGE:
// $*STRUCT CSBrickParamCraftDamage TBrickParam::CR_DAMAGE
// $*-f float Damage
Params.push_back(new CSBrickParamCraftDamage(tail));
Params.push_back(new CSBrickParamCraftDamage(tail));
break;
case TBrickParam::CR_HITRATE:
// $*STRUCT CSBrickParamCraftHitRate TBrickParam::CR_HITRATE
// $*-f float HitRate
Params.push_back(new CSBrickParamCraftHitRate(tail));
Params.push_back(new CSBrickParamCraftHitRate(tail));
break;
case TBrickParam::CR_RANGE:
// $*STRUCT CSBrickParamCraftRange TBrickParam::CR_RANGE
// $*-f float Range
Params.push_back(new CSBrickParamCraftRange(tail));
Params.push_back(new CSBrickParamCraftRange(tail));
break;
case TBrickParam::CR_DMG_PROTECTION:
// $*STRUCT CSBrickParamCraftDmgProtection TBrickParam::CR_DMG_PROTECTION
// $*-f float DmgProtection
Params.push_back(new CSBrickParamCraftDmgProtection(tail));
Params.push_back(new CSBrickParamCraftDmgProtection(tail));
break;
case TBrickParam::CR_SAPLOAD:
// $*STRUCT CSBrickParamCraftSapload TBrickParam::CR_SAPLOAD
// $*-f float Sapload
Params.push_back(new CSBrickParamCraftSapload(tail));
Params.push_back(new CSBrickParamCraftSapload(tail));
break;
case TBrickParam::CR_WEIGHT:
// $*STRUCT CSBrickParamCraftWeight TBrickParam::CR_WEIGHT
// $*-f float Weight
Params.push_back(new CSBrickParamCraftWeight(tail));
Params.push_back(new CSBrickParamCraftWeight(tail));
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
// $*-f float Range // effective range in meters
// $*-f float DisableTime // disable taunt powers for x seconds
Params.push_back(new CSBrickParamPowerTaunt(tail));
Params.push_back(new CSBrickParamPowerTaunt(tail));
break;
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 uint16 ShieldProtectionMax // max protection with a shield
// $*-f float Duration // power duration
// $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamShielding(tail));
// $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamShielding(tail));
break;
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 TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamLifeAura(tail));
Params.push_back(new CSBrickParamLifeAura(tail));
break;
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 TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamStaminaAura(tail));
Params.push_back(new CSBrickParamStaminaAura(tail));
break;
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 TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamStaminaAura2(tail));
Params.push_back(new CSBrickParamStaminaAura2(tail));
break;
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 TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamSapAura(tail));
Params.push_back(new CSBrickParamSapAura(tail));
break;
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 TargetDisableTime // disable life aura for x seconds on targets
// $*-f float UserDisableTime // disable life aura for x seconds on user
Params.push_back(new CSBrickParamSapAura2(tail));
Params.push_back(new CSBrickParamSapAura2(tail));
break;
case TBrickParam::SP_SPEEDING_UP:
// $*STRUCT CSBrickParamSpeedingUp TBrickParam::SP_SPEEDING_UP
// $*-i uint16 SpeedMod // speed modifier (in %)
// $*-f float Duration // duration in seconds
// $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamSpeedingUp(tail));
// $*-f float DisableTime // disable power for x seconds
Params.push_back(new CSBrickParamSpeedingUp(tail));
break;
case TBrickParam::SP_INVULNERABILITY:
// $*STRUCT CSBrickParamInvulnerability TBrickParam::SP_INVULNERABILITY
// $*-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));
break;
@ -1435,7 +1435,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage
// $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamFireWall(tail));
break;
@ -1445,7 +1445,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage
// $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamThornWall(tail));
break;
@ -1455,7 +1455,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage
// $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamWaterWall(tail));
break;
@ -1465,7 +1465,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*-f float Duration // duration in seconds
// $*-f float TargetDisableTime // disable aura for x seconds on targets
// $*-f float UserDisableTime // disable aura for x seconds on user
// $*-i sint16 Damage // damage
// $*-i sint16 Damage // damage
Params.push_back(new CSBrickParamLightningWall(tail));
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)
Params.push_back(new CSBrickParamBerserk(tail));
break;
case TBrickParam::SP_ENCHANT_WEAPON:
// $*STRUCT CSBrickParamEnchantWeapon TBrickParam::SP_ENCHANT_WEAPON
// $*-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
Params.push_back(new CSBrickParamCalmAnimal(tail));
break;
case TBrickParam::NEEDED_BRICK_FLAG:
// $*STRUCT CSBrickParamNeededBrickFlag TBrickParam::NEEDED_BRICK_FLAG
// $*-s std::string Flag
Params.push_back(new CSBrickParamNeededBrickFlag(tail));
Params.push_back(new CSBrickParamNeededBrickFlag(tail));
break;
case TBrickParam::SP_BALANCE:
// $*STRUCT CSBrickParamBalance TBrickParam::SP_BALANCE
// $*-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 LossFactor // score loss factor in %
Params.push_back(new CSBrickParamBalance(tail));
break;
case 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
// $*-f float HealFactorValue // value added to affected score in % of max target score
// $*-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
// $*-f float Radius // Radius
// $*-f float MinFactor // MinFactor when we are at extreme range
Params.push_back(new CSBrickParamAreaBomb(tail));
Params.push_back(new CSBrickParamAreaBomb(tail));
break;
case TBrickParam::AREA_SPRAY:
// $*STRUCT CSBrickParamAreaSpray TBrickParam::AREA_SPRAY
// $*-i uint8 Angle // angle in degree
// $*-f float Height // height of the trapezoid
// $*-f float Base // little base length
Params.push_back(new CSBrickParamAreaSpray(tail));
Params.push_back(new CSBrickParamAreaSpray(tail));
break;
case TBrickParam::AREA_CHAIN:
// $*STRUCT CSBrickParamAreaChain TBrickParam::AREA_CHAIN
// $*-f float Range // range between 2 targets
// $*-i uint8 MaxTargets // max nb targets
// $*-f float Factor // damage factor
Params.push_back(new CSBrickParamAreaChain(tail));
Params.push_back(new CSBrickParamAreaChain(tail));
break;
case TBrickParam::AREA_TARGETS:
// $*STRUCT CSBrickParamAreaTargets TBrickParam::AREA_TARGETS
// $*-f float TargetFactor // each target count as 'TargetFactor' for damage or heal division among targets
// $*-i uint8 MaxTargets // max nb targets
Params.push_back(new CSBrickParamAreaTargets(tail));
Params.push_back(new CSBrickParamAreaTargets(tail));
break;
/************************************************************************/
@ -1655,7 +1655,7 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
case TBrickParam::MA_RECHARGE:
// $*STRUCT CSBrickParamMagicRecharge TBrickParam::MA_RECHARGE
// $*-i uint32 SapLoad // sap load
Params.push_back(new CSBrickParamMagicRecharge(tail));
Params.push_back(new CSBrickParamMagicRecharge(tail));
break;
/************************************************************************/
@ -1665,14 +1665,14 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
// $*STRUCT CSBrickParamCharacUpgrade TBrickParam::CHARAC_UPGRADE
// $*-s std::string Characteristic // affected characteristic
// $*-i uint32 Modifier // bonus on charac
Params.push_back(new CSBrickParamCharacUpgrade(tail));
Params.push_back(new CSBrickParamCharacUpgrade(tail));
break;
case TBrickParam::SCORE_UPGRADE:
// $*STRUCT CSBrickParamScoreUpgrade TBrickParam::SCORE_UPGRADE
// $*-s std::string Score // affected score
// $*-i sint32 Modifier // modifier on score
Params.push_back(new CSBrickParamScoreUpgrade(tail));
Params.push_back(new CSBrickParamScoreUpgrade(tail));
break;
/************************************************************************/
@ -1680,27 +1680,27 @@ void addParam(const std::string &paramStr, std::vector<TBrickParam::IIdPtr> &Par
/************************************************************************/
case TBrickParam::TA_TELEPORT:
// $*STRUCT CSBrickParamTeleport TBrickParam::TA_TELEPORT
Params.push_back(new CSBrickParamTeleport(tail));
Params.push_back(new CSBrickParamTeleport(tail));
break;
case TBrickParam::TA_DISCONNECT:
// $*STRUCT CSBrickParamDisconnect TBrickParam::TA_DISCONNECT
Params.push_back(new CSBrickParamDisconnect(tail));
Params.push_back(new CSBrickParamDisconnect(tail));
break;
case TBrickParam::TA_MOUNT:
// $*STRUCT CSBrickParamMount TBrickParam::TA_MOUNT
Params.push_back(new CSBrickParamMount(tail));
Params.push_back(new CSBrickParamMount(tail));
break;
case TBrickParam::TA_UNMOUNT:
// $*STRUCT CSBrickParamUnmount TBrickParam::TA_UNMOUNT
Params.push_back(new CSBrickParamUnmount(tail));
Params.push_back(new CSBrickParamUnmount(tail));
break;
case TBrickParam::TA_CONSUME:
// $*STRUCT CSBrickParamConsumeItem TBrickParam::TA_CONSUME
Params.push_back(new CSBrickParamConsumeItem(tail));
Params.push_back(new CSBrickParamConsumeItem(tail));
break;
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 Value // attribute value
// $*-i uint32 Charge // initial charge of sapload
// $*-i uint32 Modifier // onus on attribute
Params.push_back(new CSBrickParamJewelAttrs(tail));
// $*-i uint32 Modifier // Bonus on attribute
// $*-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;
}
} // addParam //
//--------------------------------------------------------------
// loadFaber()
// loadFaber()
//--------------------------------------------------------------
void CStaticBrick::loadFaber( const UFormElm &root, const CSheetId &sheetId )
{
if ( Faber == NULL) Faber = new CFaber();
const UFormElm *faber = NULL;
string value;
string groupFamily;
string propName;
uint16 quantity = 0;
root.getValueByName( value, "faber.Create.Crafted Item" );
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->AllowPartialSuccess, "faber.AllowPartialSuccess" );
for (uint i = 1 ; i <= 5 ; ++i)
{
propName = "faber.Create.MP "+toString(i);
if (root.getValueByName( value, propName.c_str() ) && !value.empty() )
{
{
propName = "faber.Create.Quantity "+toString(i);
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);
if (root.getValueByName( value, propName.c_str() ) && !value.empty() )
{
{
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;
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)
{

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

@ -1631,7 +1631,7 @@ uint32 CCharacter::tickUpdate()
_LastTickNpcStopped = 0;
setStoppedNpc(TDataSetRow());
}
return nextUpdate;
} // tickUpdate //
@ -2030,7 +2030,7 @@ void CCharacter::applyRespawnEffects(bool applyDP)
resetNextDeathPenaltyFactor();
}
_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::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;
}
}
// 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)
&& 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
_LastTpTick = CTickEventHandler::getGameCycle();
_TpCoordinate.X = x;
_TpCoordinate.Y = y;
_TpCoordinate.Z = z;
@ -5917,7 +5917,7 @@ string CCharacter::getPets()
pets += "P";
else if (form->Type == ITEM_TYPE::ANIMAL_TICKET)
pets += "A";
CPetAnimal::TStatus status = _PlayerPets[i].PetStatus;
if (status != CPetAnimal::db_unknown)
pets += toString("%d", (uint32)(status));
@ -6451,7 +6451,7 @@ void CCharacter::onAnimalSpawned(CPetSpawnConfirmationMsg::TSpawnError SpawnStat
CMirrorPropValue< SAltLookProp2, CPropLocationPacked<2> > visualPropertyB( TheDataset, PetMirrorRow, DSPropertyVPB );
SET_STRUCT_MEMBER( visualPropertyB, PropertySubData.Scale, animal.Size );
}
}
if (animal.PetStatus != CPetAnimal::death)
@ -7246,7 +7246,7 @@ void CCharacter::removePetCharacterAfterDeath(uint32 index)
const CStaticItem* form = _PlayerPets[index].ItemPtr->getStaticForm();
if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastFreeMount = CTickEventHandler::getGameCycle();
uint32 slot = _PlayerPets[index].ItemPtr->getInventorySlot();
// release our ref before we destroy the item
_PlayerPets[index].ItemPtr = 0;
@ -7623,7 +7623,7 @@ void CCharacter::sendAnimalCommand(uint8 petIndexCode, uint8 command)
_PlayerPets[petIndex].IsInBag = false;
// no petCommand setup here so continue instead of break
continue;
case ANIMALS_ORDERS::ENTER_STABLE:
if (_PlayerPets[petIndex].IsMounted)
continue;
@ -7888,11 +7888,11 @@ double CCharacter::addXpToSkillInternal(double XpGain, const std::string &ContSk
string skillInitial = SKILLS::toString(skillEnum).substr(1, 1);
//// GUILDS POINTS
//// GUILDS POINTS
CGuild* guild = CGuildManager::getInstance()->getGuildFromId(_GuildId);
if (EnableGuildPoints.get() && guild)
{
uint32 guildpoints = 0;
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;
if (p->isTrialPlayer() && _BaseParryLevel > 125)
_BaseParryLevel = 125;
_CurrentParryLevel = max(sint32(0), _BaseParryLevel + _ParryModifier);
// _PropertyDatabase.setProp(_DataIndexReminder->CHARACTER_INFO.ParryBase,
//_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)
{
@ -11708,7 +11707,7 @@ void CCharacter::setDontTranslate(const string &langs)
//-----------------------------------------------------------------------------
CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_EQUIPMENT::TSlotEquipment slot)
{
CInventoryPtr inv = getInventory(INVENTORIES::equipment);
if (inv)
{
@ -11731,8 +11730,14 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param;
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
{
if (checkRequiredFaction(sbrickParam->RequiredFaction)) {
return sbrickParam;
// Check required fame (if no required faction, check are ok)
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;
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
{
if (checkRequiredFaction(sbrickParam->RequiredFaction)) {
return sbrickParam;
// Check required fame (if no required faction, check are ok)
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;
}
@ -12550,7 +12561,7 @@ void CCharacter::acceptExchange(uint8 exchangeId)
nlwarning("CCharacter::acceptExchange : character %s -> no exchangeView", _Id.toString().c_str());
return;
}
removeExchangeItems(vect, exchangePlayerPets);
if (mission)
@ -12919,7 +12930,7 @@ void CCharacter::removeExchangeItems(vector<CGameItemPtr> &itemRemoved, vector<C
{
if (form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastExchangeMount = CTickEventHandler::getGameCycle();
for (uint p = 0; p < _PlayerPets.size(); p++)
{
if (_PlayerPets[p].ItemPtr == item)
@ -13003,11 +13014,11 @@ void CCharacter::addExchangeItems(
if (item == NULL)
continue;
const CStaticItem* form = CSheets::getForm(item->getSheetId());
if (form && form->Type == ITEM_TYPE::MEKTOUB_MOUNT_TICKET)
_LastExchangeMount = CTickEventHandler::getGameCycle();
if (!addItemToInventory(INVENTORIES::bag, 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());
if (mission->getFinished())
{
if (mission->getMissionSuccess())
@ -14927,7 +14938,7 @@ string CCharacter::getTargetInfos()
double h = cTarget->getState().Heading;
double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y));
TDataSetRow dsr = cTarget->getEntityRowId();
CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL);
sint32 cell = srcCell;
@ -14943,7 +14954,7 @@ string CCharacter::getTargetInfos()
float x = source->pos().x;
float y = source->pos().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());
if (source->wasProspected())
msg += "1";
@ -14968,14 +14979,14 @@ string CCharacter::getTargetInfos()
string pets = getPets();
msg += toString("PET#%d:%s|", petSlot, pets.c_str());
}
double x = cTarget->getState().X / 1000.;
double y = cTarget->getState().Y / 1000.;
double z = cTarget->getState().Z / 1000.;
double h = cTarget->getState().Heading;
double dist = sqrt((p_x-x)*(p_x-x)+(p_y-y)*(p_y-y));
TDataSetRow dsr = cTarget->getEntityRowId();
CMirrorPropValueRO<TYPE_CELL> srcCell(TheDataset, dsr, DSPropertyCELL);
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());
}
}
return msg;
}
@ -15675,8 +15686,23 @@ void CCharacter::sendUrl(const string &url)
string targetInfos = getTargetInfos();
string serverInfos = getServerInfos(getState().X / 1000., getState().Y / 1000.);
strFindReplace(targetInfos, " ", "%20");
string final_url = url + toString("&urlidx=%d", getUrlIndex())+"&player_pos="+playerPos+"&target_infos="+targetInfos+"&server_infos="+serverInfos;
string final_url;
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();
uint32 userId = PlayerManager.getPlayerId(getId());
@ -16400,7 +16426,7 @@ void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint
{
if (fameIdx == marauderIdx)
continue;
sint32 fame = CFameInterface::getInstance().getFameIndexed(_Id, fameIdx);
if (fame > maxOtherfame)
@ -16414,7 +16440,7 @@ void CCharacter::setFameValuePlayer(uint32 factionIndex, sint32 playerFame, sint
CFameManager::getInstance().setEntityFame(_Id, marauderIdx, maxOtherfame, false);
}
}
// _PropertyDatabase.setProp( toString("FAME:PLAYER%d:VALUE", fameIndexInDatabase),
// sint64(float(playerFame)/FameAbsoluteMax*100) );
CBankAccessor_PLR::getFAME()
@ -16928,9 +16954,9 @@ bool CCharacter::removeSabrinaEffect(CSEffect* effect, bool activateSleepingEffe
uint32 CCharacter::getCarriedWeight()
{
// CarriedWeight is bag Weight + all pets in bag
uint32 total = _Inventory[INVENTORIES::bag]->getInventoryWeight();
for (uint i = 0; i != _PlayerPets.size(); ++i)
{
if (_PlayerPets[i].IsInBag) // Add 5kg + Weight of Inventory
@ -18017,7 +18043,7 @@ void CCharacter::clearIgnoreList()
void CCharacter::online(bool onlineStatus)
{
_AreOnline = onlineStatus;
// send contact list init if goind online
if (onlineStatus)
sendContactListInit();
@ -18078,7 +18104,7 @@ void CCharacter::online(bool onlineStatus)
msgout.serial(langs);
CUnifiedNetwork::getInstance()->send("IOS", msgout);
}
} // online //
//--------------------------------------------------------------
@ -19288,7 +19314,7 @@ void CCharacter::checkCharacAndScoresValues()
}
}
}
{
H_AUTO(CheckCharacteristics);
// check caracs
@ -19308,7 +19334,7 @@ void CCharacter::checkCharacAndScoresValues()
if (player != NULL && player->isTrialPlayer() && bvalue > 140)
bvalue = 140;
// compare
if (_PhysCharacs._PhysicalCharacteristics[charac].Base != tvalue)
{
@ -19330,7 +19356,7 @@ void CCharacter::checkCharacAndScoresValues()
}
}
}
{
H_AUTO(CheckScores);
// Check Scores
@ -19710,7 +19736,7 @@ bool CCharacter::setHairColor(uint32 colorValue, bool sendMessage)
CCharacter::sendDynamicSystemMessage(_Id, "EGS_COSMETIC_USE_WIG");
return false;
}
if (colorValue == _HairColor)
{
if (sendMessage)
@ -21223,31 +21249,41 @@ void CCharacter::updateJewelsTags(bool remove, bool update)
string tagA = getTagA();
string tagB = getTagB();
string tagPvPA = getTagPvPA();
string tagPvPB = getTagPvPB();
setTagA("");
setTagB("");
setTagPvPA("");
setTagPvPB("");
if (remove)
return;
CSBrickParamJewelAttrs *sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::HEADDRESS);
if (sbrickParam)
{
setTagA(sbrickParam->Value);
}
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::NECKLACE);
if (sbrickParam)
{
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)
return;
if (getTagA() != tagA || getTagB() != tagB) {
if (getTagA() != tagA || getTagB() != tagB || getTagPvPA() != tagPvPA || getTagPvPB() != tagPvPB)
{
registerName();
}
}
}
//----------------------------------------------------------------------------
@ -23411,5 +23447,5 @@ bool CCharacter::initPetInventory(uint8 index)
void CCharacter::killMe()
{
kill(_EntityRowId);
kill(_EntityRowId);
}

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

Loading…
Cancel
Save