|
|
|
@ -551,6 +551,11 @@ CCharacter::CCharacter()
|
|
|
|
|
for (uint i = 0; i < SCORES::NUM_SCORES; ++i)
|
|
|
|
|
_ScorePermanentModifiers[i] = 0;
|
|
|
|
|
|
|
|
|
|
// init jewel enchantement
|
|
|
|
|
for (uint i = 0; i < SLOT_EQUIPMENT::NB_SLOT_EQUIPMENT; ++i)
|
|
|
|
|
_JewelEnchants[i] = CSBrickParamJewelAttrs();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// init owner character for CItemsForSale class member
|
|
|
|
|
_ItemsInShopStore = new CItemsForSale;
|
|
|
|
|
_ItemsInShopStore->setOwnerCharacter(this);
|
|
|
|
@ -2022,19 +2027,60 @@ void CCharacter::respawn(sint32 x, sint32 y, sint32 z, float heading, bool apply
|
|
|
|
|
//---------------------------------------------------
|
|
|
|
|
void CCharacter::applyRespawnEffects(bool applyDP)
|
|
|
|
|
{
|
|
|
|
|
CSheetId usedSheet;
|
|
|
|
|
CSBrickParamJewelAttrs sbrickParam = getJewelAttrs("rez", SLOT_EQUIPMENT::NECKLACE, usedSheet);
|
|
|
|
|
SM_STATIC_PARAMS_1(params, STRING_MANAGER::sbrick);
|
|
|
|
|
params[0].SheetId = usedSheet;
|
|
|
|
|
|
|
|
|
|
if (applyDP)
|
|
|
|
|
{
|
|
|
|
|
// Check if in Powo and don't have dp flag
|
|
|
|
|
if (getPowoCell() != 0 && !getPowoFlag("dp"))
|
|
|
|
|
_NextDeathPenaltyFactor = 0;
|
|
|
|
|
|
|
|
|
|
if (sbrickParam.ParsedOk && sbrickParam.Value == "noDP" && (rand() % 100) < sbrickParam.Modifier)
|
|
|
|
|
{
|
|
|
|
|
sendDynamicSystemMessage(_Id, "ALLEGORY_EFFECT_TRIGGERED", params);
|
|
|
|
|
_NextDeathPenaltyFactor = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_NextDeathPenaltyFactor != 0)
|
|
|
|
|
_DeathPenalties->addDeath(*this, _NextDeathPenaltyFactor);
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::focus].Current = _PhysScores._PhysicalScores[SCORES::focus].Base / 10;
|
|
|
|
|
if (sbrickParam.ParsedOk && sbrickParam.Value == "halfLife" && (rand() % 100) < sbrickParam.Modifier)
|
|
|
|
|
{
|
|
|
|
|
sendDynamicSystemMessage(_Id, "ALLEGORY_EFFECT_TRIGGERED", params);
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Base / 2;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::stamina].Current = _PhysScores._PhysicalScores[SCORES::stamina].Base / 2;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::sap].Current = _PhysScores._PhysicalScores[SCORES::sap].Base / 2;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::focus].Current = _PhysScores._PhysicalScores[SCORES::focus].Base / 2;
|
|
|
|
|
}
|
|
|
|
|
else if (sbrickParam.ParsedOk && sbrickParam.Value == "goodLife" && (rand() % 100) < sbrickParam.Modifier)
|
|
|
|
|
{
|
|
|
|
|
sendDynamicSystemMessage(_Id, "ALLEGORY_EFFECT_TRIGGERED", params);
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Base / 1.33333;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::stamina].Current = _PhysScores._PhysicalScores[SCORES::stamina].Base / 1.33333;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::sap].Current = _PhysScores._PhysicalScores[SCORES::sap].Base / 1.33333;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::focus].Current = _PhysScores._PhysicalScores[SCORES::focus].Base / 1.33333;
|
|
|
|
|
}
|
|
|
|
|
else if (sbrickParam.ParsedOk && sbrickParam.Value == "fullLife" && (rand() % 100) < sbrickParam.Modifier)
|
|
|
|
|
{
|
|
|
|
|
sendDynamicSystemMessage(_Id, "ALLEGORY_EFFECT_TRIGGERED", params);
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::hit_points].Current = _PhysScores._PhysicalScores[SCORES::hit_points].Base;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::stamina].Current = _PhysScores._PhysicalScores[SCORES::stamina].Base;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::sap].Current = _PhysScores._PhysicalScores[SCORES::sap].Base;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::focus].Current = _PhysScores._PhysicalScores[SCORES::focus].Base;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_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;
|
|
|
|
|
_PhysScores._PhysicalScores[SCORES::focus].Current = _PhysScores._PhysicalScores[SCORES::focus].Base / 10;
|
|
|
|
|
}
|
|
|
|
|
_Mode = MBEHAV::NORMAL;
|
|
|
|
|
_Behaviour = MBEHAV::IDLE;
|
|
|
|
|
_IsDead = false;
|
|
|
|
@ -11801,9 +11847,22 @@ 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, CSheetId &usedSheet)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
string contName;
|
|
|
|
|
string regionName;
|
|
|
|
|
const CRegion* region = NULL;
|
|
|
|
|
const CContinent * cont = NULL;
|
|
|
|
|
CZoneManager::getInstance().getRegion(getState().X ,getState().Y, ®ion, &cont);
|
|
|
|
|
if (region)
|
|
|
|
|
regionName = region->getName();
|
|
|
|
|
if (cont)
|
|
|
|
|
contName = cont->getName();
|
|
|
|
|
|
|
|
|
|
CSBrickParamJewelAttrs returnSBrickParam;
|
|
|
|
|
CSBrickParamJewelAttrs* boostSBrickParam = NULL;
|
|
|
|
|
|
|
|
|
|
CInventoryPtr inv = getInventory(INVENTORIES::equipment);
|
|
|
|
|
if (inv)
|
|
|
|
|
{
|
|
|
|
@ -11818,22 +11877,51 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
|
|
|
|
|
for (uint i = 0; i < enchant.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
const CStaticBrick * brick = CSheets::getSBrickForm(enchant[i]);
|
|
|
|
|
if (brick && brick->Family == BRICK_FAMILIES::BSGMC)
|
|
|
|
|
|
|
|
|
|
if (brick && brick->Family == BRICK_FAMILIES::BSGMCB)
|
|
|
|
|
{
|
|
|
|
|
if (brick->Params.size() > 0)
|
|
|
|
|
{
|
|
|
|
|
const TBrickParam::IId* param = brick->Params[0];
|
|
|
|
|
boostSBrickParam = (CSBrickParamJewelAttrs*)param;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (brick && brick->Family == BRICK_FAMILIES::BSGMC)
|
|
|
|
|
{
|
|
|
|
|
if (brick->Params.size() > 0)
|
|
|
|
|
{
|
|
|
|
|
const TBrickParam::IId* param = brick->Params[0];
|
|
|
|
|
CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param;
|
|
|
|
|
|
|
|
|
|
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
|
|
|
|
|
{
|
|
|
|
|
bool valid = true;
|
|
|
|
|
// Check required fame (if no required faction, check are ok)
|
|
|
|
|
if (checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
|
|
|
|
|
if (!checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
|
|
|
|
|
valid = false;
|
|
|
|
|
// Require a faction/nation/org only for fame up to 30
|
|
|
|
|
else if (sbrickParam->RequiredFame >= 30 && !checkRequiredFaction(sbrickParam->RequiredFaction))
|
|
|
|
|
valid = false;
|
|
|
|
|
|
|
|
|
|
if (!sbrickParam->RequiredZones.empty())
|
|
|
|
|
{
|
|
|
|
|
// Require a faction/nation/org only for fame up to 30
|
|
|
|
|
if (sbrickParam->RequiredFame < 30 || checkRequiredFaction(sbrickParam->RequiredFaction))
|
|
|
|
|
bool zoneValid = false;
|
|
|
|
|
vector<string> zones;
|
|
|
|
|
NLMISC::splitString(sbrickParam->RequiredZones, ",", zones);
|
|
|
|
|
for (uint z = 0; z < zones.size(); z++)
|
|
|
|
|
{
|
|
|
|
|
return sbrickParam;
|
|
|
|
|
if (zones[z] == contName || zones[z] == regionName)
|
|
|
|
|
zoneValid = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!zoneValid)
|
|
|
|
|
valid = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (valid)
|
|
|
|
|
{
|
|
|
|
|
usedSheet = enchant[i];
|
|
|
|
|
returnSBrickParam.copy(*sbrickParam);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -11850,24 +11938,60 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
|
|
|
|
|
vector< CSheetId > enchant = item->getEnchantment();
|
|
|
|
|
for (uint i = 0; i < enchant.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const CStaticBrick * brick = CSheets::getSBrickForm(enchant[i]);
|
|
|
|
|
if (brick && brick->Family == BRICK_FAMILIES::BSGMC)
|
|
|
|
|
|
|
|
|
|
if (brick && brick->Family == BRICK_FAMILIES::BSGMCB)
|
|
|
|
|
{
|
|
|
|
|
if (brick->Params.size() > 0)
|
|
|
|
|
{
|
|
|
|
|
const TBrickParam::IId* param = brick->Params[0];
|
|
|
|
|
boostSBrickParam = (CSBrickParamJewelAttrs*)param;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (brick && brick->Family == BRICK_FAMILIES::BSGMC)
|
|
|
|
|
{
|
|
|
|
|
if (brick->Params.size() > 0)
|
|
|
|
|
{
|
|
|
|
|
const TBrickParam::IId* param = brick->Params[0];
|
|
|
|
|
CSBrickParamJewelAttrs *sbrickParam = (CSBrickParamJewelAttrs*)param;
|
|
|
|
|
|
|
|
|
|
if (param->id() == TBrickParam::JEWEL_ATTRS && sbrickParam->Attribute == attribute)
|
|
|
|
|
{
|
|
|
|
|
bool valid = true;
|
|
|
|
|
// Check required fame (if no required faction, check are ok)
|
|
|
|
|
if (checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
|
|
|
|
|
if (!checkRequiredFame(sbrickParam->RequiredFaction, sbrickParam->RequiredFame))
|
|
|
|
|
{
|
|
|
|
|
// Require a faction/nation/org only for fame up to 30
|
|
|
|
|
if (sbrickParam->RequiredFame < 30 || checkRequiredFaction(sbrickParam->RequiredFaction))
|
|
|
|
|
valid = false;
|
|
|
|
|
}
|
|
|
|
|
else if (sbrickParam->RequiredFame >= 30 && !checkRequiredFaction(sbrickParam->RequiredFaction))
|
|
|
|
|
{
|
|
|
|
|
valid = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!sbrickParam->RequiredZones.empty())
|
|
|
|
|
{
|
|
|
|
|
bool zoneValid = false;
|
|
|
|
|
vector<string> zones;
|
|
|
|
|
NLMISC::splitString(sbrickParam->RequiredZones, ",", zones);
|
|
|
|
|
for (uint z = 0; z < zones.size(); z++)
|
|
|
|
|
{
|
|
|
|
|
return sbrickParam;
|
|
|
|
|
if (zones[z] == contName || zones[z] == regionName)
|
|
|
|
|
{
|
|
|
|
|
zoneValid = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!zoneValid) {
|
|
|
|
|
valid = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (valid)
|
|
|
|
|
{
|
|
|
|
|
usedSheet = enchant[i];
|
|
|
|
|
returnSBrickParam.copy(*sbrickParam);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -11876,7 +12000,10 @@ CSBrickParamJewelAttrs *CCharacter::getJewelAttrs(const string &attribute, SLOT_
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
if (boostSBrickParam)
|
|
|
|
|
returnSBrickParam.Modifier *= boostSBrickParam->Modifier;
|
|
|
|
|
|
|
|
|
|
return returnSBrickParam;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
@ -15184,6 +15311,7 @@ void CCharacter::setCurrentRegion(uint16 region)
|
|
|
|
|
{
|
|
|
|
|
_CurrentRegion = region;
|
|
|
|
|
updateMagicProtectionAndResistance();
|
|
|
|
|
updateJewelsModifiers();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//-----------------------------------------------
|
|
|
|
@ -18484,11 +18612,15 @@ void CCharacter::onDisconnection(bool bCrashed)
|
|
|
|
|
// Remove handledAIGroups for all missions of the player
|
|
|
|
|
despawnAllHandledAIGroup();
|
|
|
|
|
|
|
|
|
|
updateJewelsModifiers(true);
|
|
|
|
|
|
|
|
|
|
// update for the unified entity locator
|
|
|
|
|
if (IShardUnifierEvent::getInstance() != NULL && _Enter)
|
|
|
|
|
{
|
|
|
|
|
IShardUnifierEvent::getInstance()->charDisconnected(_Id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
@ -21039,6 +21171,7 @@ void CPetAnimal::clear()
|
|
|
|
|
IsTpAllowed = false;
|
|
|
|
|
spawnFlag = false;
|
|
|
|
|
IsInBag = false;
|
|
|
|
|
LockedByOwner = false;
|
|
|
|
|
Cell = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -21181,6 +21314,9 @@ uint32 CPetAnimal::getAnimalMaxBulk()
|
|
|
|
|
|
|
|
|
|
if (formBag)
|
|
|
|
|
{
|
|
|
|
|
// zig inventories have bulk proportionnal to size (size is 1->250)
|
|
|
|
|
if (creatureBagSheet == CSheetId("zig_inventory.sitem"))
|
|
|
|
|
return formBag->BulkMax*1.5;
|
|
|
|
|
return formBag->BulkMax;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -21409,7 +21545,7 @@ void CCharacter::updateParry(ITEMFAMILY::EItemFamily family, SKILLS::ESkills ski
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
void CCharacter::updateJewelsTags(bool remove, bool update)
|
|
|
|
|
void CCharacter::updateJewelsTags(bool justRemove, bool update)
|
|
|
|
|
{
|
|
|
|
|
if (!getEnterFlag() || !getOnLineStatus())
|
|
|
|
|
return;
|
|
|
|
@ -21424,24 +21560,25 @@ void CCharacter::updateJewelsTags(bool remove, bool update)
|
|
|
|
|
setTagPvPA("");
|
|
|
|
|
setTagPvPB("");
|
|
|
|
|
|
|
|
|
|
if (remove)
|
|
|
|
|
if (justRemove)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
CSBrickParamJewelAttrs *sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::HEADDRESS);
|
|
|
|
|
if (sbrickParam)
|
|
|
|
|
setTagA(sbrickParam->Value);
|
|
|
|
|
CSheetId usedSheet;
|
|
|
|
|
CSBrickParamJewelAttrs sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::HEADDRESS, usedSheet);
|
|
|
|
|
if (sbrickParam.ParsedOk)
|
|
|
|
|
setTagA(sbrickParam.Value);
|
|
|
|
|
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::NECKLACE);
|
|
|
|
|
if (sbrickParam)
|
|
|
|
|
setTagB(sbrickParam->Value);
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::NECKLACE, usedSheet);
|
|
|
|
|
if (sbrickParam.ParsedOk)
|
|
|
|
|
setTagB(sbrickParam.Value);
|
|
|
|
|
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARL);
|
|
|
|
|
if (sbrickParam)
|
|
|
|
|
setTagPvPA(sbrickParam->Value);
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARL, usedSheet);
|
|
|
|
|
if (sbrickParam.ParsedOk)
|
|
|
|
|
setTagPvPA(sbrickParam.Value);
|
|
|
|
|
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARR);
|
|
|
|
|
if (sbrickParam)
|
|
|
|
|
setTagPvPB(sbrickParam->Value);
|
|
|
|
|
sbrickParam = getJewelAttrs("tag", SLOT_EQUIPMENT::EARR, usedSheet);
|
|
|
|
|
if (sbrickParam.ParsedOk)
|
|
|
|
|
setTagPvPB(sbrickParam.Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!update)
|
|
|
|
@ -21453,6 +21590,59 @@ void CCharacter::updateJewelsTags(bool remove, bool update)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
void CCharacter::updateJewelsModifiers(bool justRemove)
|
|
|
|
|
{
|
|
|
|
|
if (!getEnterFlag())
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
// Remove previous effects
|
|
|
|
|
if (_JewelEnchants[SLOT_EQUIPMENT::WRISTL].ParsedOk && _JewelEnchants[SLOT_EQUIPMENT::WRISTL].Attribute == "mod") {
|
|
|
|
|
CHARACTERISTICS::TCharacteristics ModifiedCharac = CHARACTERISTICS::toCharacteristic(_JewelEnchants[SLOT_EQUIPMENT::WRISTL].Value);
|
|
|
|
|
getCharacteristics()._PhysicalCharacteristics[ModifiedCharac].Modifier -= _JewelEnchants[SLOT_EQUIPMENT::WRISTL].Modifier;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_JewelEnchants[SLOT_EQUIPMENT::WRISTR].ParsedOk && _JewelEnchants[SLOT_EQUIPMENT::WRISTR].Attribute == "mod") {
|
|
|
|
|
CHARACTERISTICS::TCharacteristics ModifiedCharac = CHARACTERISTICS::toCharacteristic(_JewelEnchants[SLOT_EQUIPMENT::WRISTR].Value);
|
|
|
|
|
getCharacteristics()._PhysicalCharacteristics[ModifiedCharac].Modifier -= _JewelEnchants[SLOT_EQUIPMENT::WRISTR].Modifier;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (justRemove)
|
|
|
|
|
{
|
|
|
|
|
_JewelEnchants[SLOT_EQUIPMENT::WRISTL].ParsedOk = false;
|
|
|
|
|
_JewelEnchants[SLOT_EQUIPMENT::WRISTR].ParsedOk = false;
|
|
|
|
|
computeMaxValue();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CHARACTERISTICS::TCharacteristics ModifiedCharacL = CHARACTERISTICS::Unknown;
|
|
|
|
|
|
|
|
|
|
CSheetId usedSheet;
|
|
|
|
|
|
|
|
|
|
CSBrickParamJewelAttrs sbrickParamL = getJewelAttrs("mod", SLOT_EQUIPMENT::WRISTL, usedSheet);
|
|
|
|
|
if (sbrickParamL.ParsedOk)
|
|
|
|
|
{
|
|
|
|
|
ModifiedCharacL = CHARACTERISTICS::toCharacteristic(sbrickParamL.Value);
|
|
|
|
|
getCharacteristics()._PhysicalCharacteristics[ModifiedCharacL].Modifier += sbrickParamL.Modifier;
|
|
|
|
|
}
|
|
|
|
|
_JewelEnchants[SLOT_EQUIPMENT::WRISTL] = sbrickParamL;
|
|
|
|
|
|
|
|
|
|
CSBrickParamJewelAttrs sbrickParamR = getJewelAttrs("mod", SLOT_EQUIPMENT::WRISTR, usedSheet);
|
|
|
|
|
if (sbrickParamR.ParsedOk)
|
|
|
|
|
{
|
|
|
|
|
CHARACTERISTICS::TCharacteristics ModifiedCharac = CHARACTERISTICS::toCharacteristic(sbrickParamR.Value);
|
|
|
|
|
if (ModifiedCharacL != ModifiedCharac)
|
|
|
|
|
{
|
|
|
|
|
getCharacteristics()._PhysicalCharacteristics[ModifiedCharac].Modifier += sbrickParamR.Modifier;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
sbrickParamR = NULL;
|
|
|
|
|
}
|
|
|
|
|
_JewelEnchants[SLOT_EQUIPMENT::WRISTR] = sbrickParamR;
|
|
|
|
|
|
|
|
|
|
computeMaxValue();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
void CCharacter::updateMagicProtectionAndResistance()
|
|
|
|
|
{
|
|
|
|
|