summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-12 09:03:24 -0600
committerIra Rice <irarice@gmail.com>2009-03-12 09:03:24 -0600
commitf9a06a168a4c4354dcffdba7243b4eff783adb5b (patch)
tree900523bb32b72446d8408966cf8f98758463e8d5 /src/being.cpp
parent37b812f2892a9b11a88abcbcde0b47aca76f4a71 (diff)
downloadmana-f9a06a168a4c4354dcffdba7243b4eff783adb5b.tar.gz
mana-f9a06a168a4c4354dcffdba7243b4eff783adb5b.tar.bz2
mana-f9a06a168a4c4354dcffdba7243b4eff783adb5b.tar.xz
mana-f9a06a168a4c4354dcffdba7243b4eff783adb5b.zip
Made hair load again (commit e2d60401eaf55abe9e2251854f3174ffe0f4ad9e
from TMW broke this, as it deleted the Being::load() method, which also loaded the hair styles). Also removed some unused variables in the being class. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 54908b07..64972912 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -83,8 +83,7 @@ Being::Being(int id, int job, Map *map):
mSprites(VECTOREND_SPRITE, NULL),
mSpriteIDs(VECTOREND_SPRITE, 0),
mSpriteColors(VECTOREND_SPRITE, ""),
- mStatusParticleEffects(&mStunParticleEffects, false),
- mChildParticleEffects(&mStatusParticleEffects, false),
+ mChildParticleEffects(),
mUsedTargetCursor(NULL)
{
setMap(map);
@@ -578,3 +577,16 @@ void Being::setTargetAnimation(SimpleAnimation* animation)
mUsedTargetCursor->reset();
}
+void Being::load()
+{
+ // Hairstyles are encoded as negative numbers. Count how far negative
+ // we can go.
+ int hairstyles = 1;
+
+ while (ItemDB::get(-hairstyles).getSprite(GENDER_MALE) != "error.xml")
+ {
+ hairstyles++;
+ }
+ mNumberOfHairstyles = hairstyles;
+}
+