|
|
@ -493,7 +493,7 @@ void Player::setAttribute(unsigned short id, int base, int current)
|
|
|
|
creatureStats.mAttributes[id].mBase = base;
|
|
|
|
creatureStats.mAttributes[id].mBase = base;
|
|
|
|
creatureStats.mAttributes[id].mCurrent = current;
|
|
|
|
creatureStats.mAttributes[id].mCurrent = current;
|
|
|
|
|
|
|
|
|
|
|
|
if (std::find(attributeChanges.attributeIndexes.begin(), attributeChanges.attributeIndexes.end(), id) == attributeChanges.attributeIndexes.end())
|
|
|
|
if (!Utils::vectorContains(&attributeChanges.attributeIndexes, id))
|
|
|
|
attributeChanges.attributeIndexes.push_back(id);
|
|
|
|
attributeChanges.attributeIndexes.push_back(id);
|
|
|
|
|
|
|
|
|
|
|
|
attributesChanged = true;
|
|
|
|
attributesChanged = true;
|
|
|
@ -519,6 +519,7 @@ void Player::setSkill(unsigned short id, int base, int current, float progress)
|
|
|
|
skill.mCurrent = current;
|
|
|
|
skill.mCurrent = current;
|
|
|
|
skill.mProgress = progress;
|
|
|
|
skill.mProgress = progress;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Utils::vectorContains(&skillChanges.skillIndexes, id))
|
|
|
|
skillChanges.skillIndexes.push_back(id);
|
|
|
|
skillChanges.skillIndexes.push_back(id);
|
|
|
|
|
|
|
|
|
|
|
|
skillsChanged = true;
|
|
|
|
skillsChanged = true;
|
|
|
@ -536,7 +537,7 @@ void Player::setSkillIncrease(unsigned short attributeId, int increase)
|
|
|
|
|
|
|
|
|
|
|
|
npcStats.mSkillIncrease[attributeId] = increase;
|
|
|
|
npcStats.mSkillIncrease[attributeId] = increase;
|
|
|
|
|
|
|
|
|
|
|
|
if (std::find(attributeChanges.attributeIndexes.begin(), attributeChanges.attributeIndexes.end(), attributeId) == attributeChanges.attributeIndexes.end())
|
|
|
|
if (!Utils::vectorContains(&attributeChanges.attributeIndexes, attributeId))
|
|
|
|
attributeChanges.attributeIndexes.push_back(attributeId);
|
|
|
|
attributeChanges.attributeIndexes.push_back(attributeId);
|
|
|
|
|
|
|
|
|
|
|
|
attributesChanged = true;
|
|
|
|
attributesChanged = true;
|
|
|
|