diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 14:03:04 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-15 14:03:04 +0000 |
commit | 806dd2ec3cdb39c8ae528b65f93984ed66496709 (patch) | |
tree | 6f654774ee4e0e6275f5904093dea0147ead9edf /src/gui/skill.cpp | |
parent | aa42c03c8a6b10d4fac03143f06811d94a253270 (diff) | |
download | mana-client-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.gz mana-client-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.bz2 mana-client-806dd2ec3cdb39c8ae528b65f93984ed66496709.tar.xz mana-client-806dd2ec3cdb39c8ae528b65f93984ed66496709.zip |
Fixing crash on death. Death handling could still be improved though.
Diffstat (limited to 'src/gui/skill.cpp')
-rw-r--r-- | src/gui/skill.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 88e16047..65214e4a 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -107,11 +107,12 @@ void SkillListModel::addSkill(int id, int lv, int sp) void SkillListModel::setSkill(int id, int lv, int sp) { - if (!hasSkill(id)) { - return; + for (unsigned int i = 0; i < skillList.size(); i++) { + if (skillList[i]->id == id) { + skillList[i]->lv = lv; + skillList[i]->sp = sp; + } } - skillList[id]->lv = lv; - skillList[id]->sp = sp; } |