summaryrefslogtreecommitdiff
path: root/src/net/manaserv
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-01-24 14:43:14 -0700
committerJared Adams <jaxad0127@gmail.com>2010-01-24 14:43:14 -0700
commit3730a6028626cfcdab9bd98aecfeadf6c884b505 (patch)
treef78d37fae95f74625a745f5e551c40ae337976d9 /src/net/manaserv
parent889108ea9a75a0591cac7efb49bac65629b6fb86 (diff)
downloadmana-3730a6028626cfcdab9bd98aecfeadf6c884b505.tar.gz
mana-3730a6028626cfcdab9bd98aecfeadf6c884b505.tar.bz2
mana-3730a6028626cfcdab9bd98aecfeadf6c884b505.tar.xz
mana-3730a6028626cfcdab9bd98aecfeadf6c884b505.zip
Remove some more _SUPPORT ifdefs
Diffstat (limited to 'src/net/manaserv')
-rw-r--r--src/net/manaserv/beinghandler.cpp8
-rw-r--r--src/net/manaserv/charhandler.cpp19
-rw-r--r--src/net/manaserv/charhandler.h6
-rw-r--r--src/net/manaserv/gamehandler.h2
-rw-r--r--src/net/manaserv/protocol.h13
5 files changed, 42 insertions, 6 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp
index 585f0823..2db76255 100644
--- a/src/net/manaserv/beinghandler.cpp
+++ b/src/net/manaserv/beinghandler.cpp
@@ -96,8 +96,8 @@ static void handleLooks(Player *being, Net::MessageIn &msg)
// Order of sent slots. Has to be in sync with the server code.
static int const nb_slots = 4;
static int const slots[nb_slots] =
- { Player::WEAPON_SPRITE, Player::HAT_SPRITE, Player::TOPCLOTHES_SPRITE,
- Player::BOTTOMCLOTHES_SPRITE };
+ { SPRITE_WEAPON, SPRITE_HAT, SPRITE_TOPCLOTHES,
+ SPRITE_BOTTOMCLOTHES };
int mask = msg.readInt8();
@@ -145,7 +145,7 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg)
}
Player *p = static_cast< Player * >(being);
int hs = msg.readInt8(), hc = msg.readInt8();
- p->setSprite(Player::HAIR_SPRITE, hs * -1, ColorDB::get(hc));
+ p->setSprite(SPRITE_HAIR, hs * -1, ColorDB::get(hc));
p->setGender(msg.readInt8() == GENDER_MALE ?
GENDER_MALE : GENDER_FEMALE);
handleLooks(p, msg);
@@ -302,7 +302,7 @@ void BeingHandler::handleBeingLooksChangeMessage(Net::MessageIn &msg)
{
int style = msg.readInt16();
int color = msg.readInt16();
- player->setSprite(Player::HAIR_SPRITE, style * -1, ColorDB::get(color));
+ player->setSprite(SPRITE_HAIR, style * -1, ColorDB::get(color));
}
}
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index 622fceaa..916e05b8 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -157,7 +157,7 @@ void CharHandler::handleMessage(Net::MessageIn &msg)
LocalPlayer *tempPlayer = new LocalPlayer();
tempPlayer->setName(info.name);
tempPlayer->setGender(info.gender);
- tempPlayer->setSprite(Player::HAIR_SPRITE, info.hs * -1,
+ tempPlayer->setSprite(SPRITE_HAIR, info.hs * -1,
ColorDB::get(info.hc));
tempPlayer->setLevel(info.level);
tempPlayer->setCharacterPoints(info.charPoints);
@@ -332,7 +332,7 @@ void CharHandler::getCharacters()
tempPlayer = new LocalPlayer();
tempPlayer->setName(info.name);
tempPlayer->setGender(info.gender);
- tempPlayer->setSprite(Player::HAIR_SPRITE, info.hs * -1,
+ tempPlayer->setSprite(SPRITE_HAIR, info.hs * -1,
ColorDB::get(info.hc));
tempPlayer->setLevel(info.level);
tempPlayer->setCharacterPoints(info.charPoints);
@@ -400,4 +400,19 @@ void CharHandler::switchCharacter()
gameHandler->quit(true);
}
+unsigned int CharHandler::baseSprite() const
+{
+ return SPRITE_BASE;
+}
+
+unsigned int CharHandler::hairSprite() const
+{
+ return SPRITE_HAIR;
+}
+
+unsigned int CharHandler::maxSprite() const
+{
+ return SPRITE_VECTOREND;
+}
+
} // namespace ManaServ
diff --git a/src/net/manaserv/charhandler.h b/src/net/manaserv/charhandler.h
index fca2b30a..ff89a639 100644
--- a/src/net/manaserv/charhandler.h
+++ b/src/net/manaserv/charhandler.h
@@ -68,6 +68,12 @@ class CharHandler : public MessageHandler, public Net::CharHandler
void switchCharacter();
+ unsigned int baseSprite() const;
+
+ unsigned int hairSprite() const;
+
+ unsigned int maxSprite() const;
+
protected:
void handleCharCreateResponse(Net::MessageIn &msg);
diff --git a/src/net/manaserv/gamehandler.h b/src/net/manaserv/gamehandler.h
index 85fa7465..6eaa2a95 100644
--- a/src/net/manaserv/gamehandler.h
+++ b/src/net/manaserv/gamehandler.h
@@ -53,6 +53,8 @@ class GameHandler : public MessageHandler, public Net::GameHandler
void quit() { quit(false); }
void ping(int tick);
+
+ bool removeDeadBeings() const { return false; }
void clear();
};
diff --git a/src/net/manaserv/protocol.h b/src/net/manaserv/protocol.h
index c0add694..3aac1955 100644
--- a/src/net/manaserv/protocol.h
+++ b/src/net/manaserv/protocol.h
@@ -313,4 +313,17 @@ enum {
GUILD_EVENT_OFFLINE_PLAYER
};
+
+enum
+{
+ SPRITE_BASE = 0,
+ SPRITE_SHOE,
+ SPRITE_BOTTOMCLOTHES,
+ SPRITE_TOPCLOTHES,
+ SPRITE_HAIR,
+ SPRITE_HAT,
+ SPRITE_WEAPON,
+ SPRITE_VECTOREND
+};
+
#endif // MANASERV_PROTOCOL_H