|
|
|
@ -409,8 +409,7 @@ void StatsFunctions::SetAttributeBase(unsigned short pid, unsigned short attribu
|
|
|
|
|
|
|
|
|
|
player->creatureStats.mAttributes[attributeId].mBase = value;
|
|
|
|
|
|
|
|
|
|
if (std::find(player->attributeChanges.attributeIndexes.begin(), player->attributeChanges.attributeIndexes.end(), attributeId) ==
|
|
|
|
|
player->attributeChanges.attributeIndexes.end())
|
|
|
|
|
if (!Utils::vectorContains(&player->attributeChanges.attributeIndexes, attributeId))
|
|
|
|
|
player->attributeChanges.attributeIndexes.push_back(attributeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -424,8 +423,7 @@ void StatsFunctions::ClearAttributeModifier(unsigned short pid, unsigned short a
|
|
|
|
|
|
|
|
|
|
player->creatureStats.mAttributes[attributeId].mMod = 0;
|
|
|
|
|
|
|
|
|
|
if (std::find(player->attributeChanges.attributeIndexes.begin(), player->attributeChanges.attributeIndexes.end(), attributeId) ==
|
|
|
|
|
player->attributeChanges.attributeIndexes.end())
|
|
|
|
|
if (!Utils::vectorContains(&player->attributeChanges.attributeIndexes, attributeId))
|
|
|
|
|
player->attributeChanges.attributeIndexes.push_back(attributeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -439,6 +437,7 @@ void StatsFunctions::SetSkillBase(unsigned short pid, unsigned short skillId, in
|
|
|
|
|
|
|
|
|
|
player->npcStats.mSkills[skillId].mBase = value;
|
|
|
|
|
|
|
|
|
|
if (!Utils::vectorContains(&player->skillChanges.skillIndexes, skillId))
|
|
|
|
|
player->skillChanges.skillIndexes.push_back(skillId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -452,6 +451,7 @@ void StatsFunctions::ClearSkillModifier(unsigned short pid, unsigned short skill
|
|
|
|
|
|
|
|
|
|
player->npcStats.mSkills[skillId].mMod = 0;
|
|
|
|
|
|
|
|
|
|
if (!Utils::vectorContains(&player->skillChanges.skillIndexes, skillId))
|
|
|
|
|
player->skillChanges.skillIndexes.push_back(skillId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -465,6 +465,7 @@ void StatsFunctions::SetSkillProgress(unsigned short pid, unsigned short skillId
|
|
|
|
|
|
|
|
|
|
player->npcStats.mSkills[skillId].mProgress = value;
|
|
|
|
|
|
|
|
|
|
if (!Utils::vectorContains(&player->skillChanges.skillIndexes, skillId))
|
|
|
|
|
player->skillChanges.skillIndexes.push_back(skillId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -478,8 +479,7 @@ void StatsFunctions::SetSkillIncrease(unsigned short pid, unsigned int attribute
|
|
|
|
|
|
|
|
|
|
player->npcStats.mSkillIncrease[attributeId] = value;
|
|
|
|
|
|
|
|
|
|
if (std::find(player->attributeChanges.attributeIndexes.begin(), player->attributeChanges.attributeIndexes.end(), attributeId) ==
|
|
|
|
|
player->attributeChanges.attributeIndexes.end())
|
|
|
|
|
if (!Utils::vectorContains(&player->attributeChanges.attributeIndexes, attributeId))
|
|
|
|
|
player->attributeChanges.attributeIndexes.push_back(attributeId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|