From 3818b6db81341b840201996c186bdc8ad5e456e9 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Wed, 4 Feb 2009 18:29:58 -0700 Subject: Moved mEquipment to the LocalPlayer class, since it's the only place that uses it anyways. Signed-off-by: Ira Rice --- src/being.cpp | 2 -- src/being.h | 3 --- src/localplayer.cpp | 1 + src/localplayer.h | 3 +++ 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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 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 mEquipment; + protected: void walk(unsigned char dir); -- cgit v1.2.3-70-g09d2