summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-04 18:29:58 -0700
committerIra Rice <irarice@gmail.com>2009-02-04 18:29:58 -0700
commit3818b6db81341b840201996c186bdc8ad5e456e9 (patch)
treebb8d8418aee35877d260078b1b340ccf2c371930
parentd05b238a3c100ed0b5b31093f3d15bb039dde8d6 (diff)
downloadmana-3818b6db81341b840201996c186bdc8ad5e456e9.tar.gz
mana-3818b6db81341b840201996c186bdc8ad5e456e9.tar.bz2
mana-3818b6db81341b840201996c186bdc8ad5e456e9.tar.xz
mana-3818b6db81341b840201996c186bdc8ad5e456e9.zip
Moved mEquipment to the LocalPlayer class, since it's the only place
that uses it anyways. Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r--src/being.cpp2
-rw-r--r--src/being.h3
-rw-r--r--src/localplayer.cpp1
-rw-r--r--src/localplayer.h3
4 files changed, 4 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index dc36adc2..dc843e43 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -25,7 +25,6 @@
#include "animatedsprite.h"
#include "being.h"
#include "configuration.h"
-#include "equipment.h"
#include "game.h"
#include "graphics.h"
#include "localplayer.h"
@@ -67,7 +66,6 @@ Being::Being(int id, int job, Map *map):
mWalkTime(0),
mEmotion(0), mEmotionTime(0),
mAttackSpeed(350),
- mEquipment(new Equipment()),
mId(id),
mWalkSpeed(150),
mDirection(DOWN),
diff --git a/src/being.h b/src/being.h
index b4508661..812ffdd3 100644
--- a/src/being.h
+++ b/src/being.h
@@ -44,7 +44,6 @@
#define STATUS_EFFECTS 32
class AnimatedSprite;
-class Equipment;
class ItemInfo;
class Item;
class Map;
@@ -362,8 +361,6 @@ class Being : public Sprite
// Target cursor being used by the being
Image *mTargetCursor;
- const std::auto_ptr<Equipment> mEquipment;
-
static int getHairColorsNr(void);
static int getHairStylesNr(void);
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index c6fde7a8..bc0b2b81 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -63,6 +63,7 @@ LocalPlayer::LocalPlayer(Uint32 id, Uint16 job, Map *map):
ATK_BONUS(0), MATK_BONUS(0), DEF_BONUS(0), MDEF_BONUS(0), FLEE_BONUS(0),
mStatPoint(0), mSkillPoint(0),
mStatsPointsToAttribute(0),
+ mEquipment(new Equipment()),
mXp(0), mNetwork(0),
mTarget(NULL), mPickUpTarget(NULL),
mTrading(false), mGoingToTarget(false),
diff --git a/src/localplayer.h b/src/localplayer.h
index 4e0b205f..7f5596e4 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -31,6 +31,7 @@
#define INVENTORY_SIZE 102
#define STORAGE_SIZE 301
+class Equipment;
class FloorItem;
class ImageSet;
class Inventory;
@@ -234,6 +235,8 @@ class LocalPlayer : public Player
/** Animated out of range target cursor. */
SimpleAnimation *mTargetCursorOutRange[NUM_TC];
+ const std::auto_ptr<Equipment> mEquipment;
+
protected:
void walk(unsigned char dir);