diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/gui/char_select.cpp | 16 | ||||
-rw-r--r-- | src/gui/char_select.h | 8 | ||||
-rw-r--r-- | src/gui/status.cpp | 17 | ||||
-rw-r--r-- | src/gui/status.h | 8 | ||||
-rw-r--r-- | src/localplayer.h | 1 | ||||
-rw-r--r-- | src/net/accountserver/account.cpp | 3 | ||||
-rw-r--r-- | src/net/accountserver/account.h | 2 | ||||
-rw-r--r-- | src/net/beinghandler.cpp | 1 |
9 files changed, 33 insertions, 32 deletions
@@ -1,3 +1,12 @@ +2007-12-18 Philipp Sehmisch <tmw@crushnet.org> + + * src/gui/char_select.cpp, src/gui/char_select.h, + src/gui/status.cpp, src/gui/status.h, src/localplayer.h, + src/net/accountserver/account.cpp, + src/net/accountserver/account.h, src/net/beinghandler.cpp: + Updated attribute system to the latest design decisions + (removed charisma, kept agility in) + 2007-12-09 Björn Steinbrink <B.Steinbrink@gmx.de> * src/CMakeLists.txt: Add missing source files. diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index ccdf20c8..96140bb5 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -264,8 +264,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): mAttributeLabel[3] = new gcn::Label(_("Vitality:")); mAttributeLabel[4] = new gcn::Label(_("Intelligence:")); mAttributeLabel[5] = new gcn::Label(_("Willpower:")); - mAttributeLabel[6] = new gcn::Label(_("Charisma:")); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { mAttributeLabel[i]->setWidth(70); mAttributeSlider[i] = new Slider(1, 20); @@ -289,7 +288,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): mPrevHairStyleButton->setPosition(90, 64); mNextHairStyleButton->setPosition(165, 64); mHairStyleLabel->setPosition(5, 70); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { mAttributeSlider[i]->setValue(10); mAttributeSlider[i]->setDimension(gcn::Rectangle( 75, 140 + i*20, @@ -319,7 +318,7 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): add(mNextHairStyleButton); add(mPrevHairStyleButton); add(mHairStyleLabel); - for (int i=0; i<7; i++) + for (int i=0; i<6; i++) { add(mAttributeSlider[i]); add(mAttributeValue[i]); @@ -359,8 +358,7 @@ CharCreateDialog::action(const gcn::ActionEvent &event) (int) mAttributeSlider[2]->getValue(), // DEX (int) mAttributeSlider[3]->getValue(), // VIT (int) mAttributeSlider[4]->getValue(), // INT - (int) mAttributeSlider[5]->getValue(), // WILL - (int) mAttributeSlider[6]->getValue() // CHAR + (int) mAttributeSlider[5]->getValue() // WILL ); } else { @@ -398,7 +396,7 @@ CharCreateDialog::getName() void CharCreateDialog::UpdateSliders() { - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { // Update captions mAttributeValue[i]->setCaption( @@ -407,7 +405,7 @@ void CharCreateDialog::UpdateSliders() } // Update distributed points - int pointsLeft = 70 - getDistributedPoints(); + int pointsLeft = 60 - getDistributedPoints(); if (pointsLeft == 0) { mAttributesLeft->setCaption(_("Character stats OK")); @@ -439,7 +437,7 @@ int CharCreateDialog::getDistributedPoints() { int points = 0; - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { points += (int) mAttributeSlider[i]->getValue(); } diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 5d0b42fa..f2d6cbc4 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -140,9 +140,9 @@ class CharCreateDialog : public Window, public gcn::ActionListener gcn::Button *mPrevHairStyleButton; gcn::Label *mHairStyleLabel; - gcn::Slider *mAttributeSlider[7]; - gcn::Label *mAttributeLabel[7]; - gcn::Label *mAttributeValue[7]; + gcn::Slider *mAttributeSlider[6]; + gcn::Label *mAttributeLabel[6]; + gcn::Label *mAttributeValue[6]; gcn::Label *mAttributesLeft; gcn::Button *mCreateButton; @@ -153,7 +153,7 @@ class CharCreateDialog : public Window, public gcn::ActionListener int mSlot; - static const int mMaxPoints = 70; + static const int mMaxPoints = 60; int mUsedPoints; }; diff --git a/src/gui/status.cpp b/src/gui/status.cpp index 323a6b16..b0a92665 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -108,7 +108,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): mStatsReflexPoints = new gcn::Label("% Reflex:"); */ // New labels - for (int i = 0; i < 7; i++) { + for (int i = 0; i < 6; i++) { mStatsLabel[i] = new gcn::Label(); mStatsDisplayLabel[i] = new gcn::Label(); mPointsLabel[i] = new gcn::Label("0"); @@ -131,7 +131,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): int totalLabelY = mStatsTotalLabel->getY(); mStatsCostLabel->setPosition(170, totalLabelY); - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { mStatsLabel[i]->setPosition(5, mStatsTotalLabel->getY() + (i * 23) + 15); @@ -163,7 +163,7 @@ StatusWindow::StatusWindow(LocalPlayer *player): add(mStatsTitleLabel); add(mStatsTotalLabel); add(mStatsCostLabel); - for(int i = 0; i < 7; i++) + for(int i = 0; i < 6; i++) { add(mStatsLabel[i]); add(mStatsDisplayLabel[i]); @@ -224,19 +224,18 @@ void StatusWindow::update() // Stats Part // ---------- - const std::string attrNames[7] = { + const std::string attrNames[6] = { "Strength", "Agility", "Dexterity", "Vitality", "Intelligence", - "Willpower", - "Charisma" + "Willpower" }; int statusPoints = mPlayer->getAttributeIncreasePoints(); // Update labels - for (int i = 0; i < 7; i++) + for (int i = 0; i < 6; i++) { mStatsLabel[i]->setCaption(attrNames[i]); mStatsDisplayLabel[i]->setCaption( @@ -331,9 +330,5 @@ void StatusWindow::action(const gcn::ActionEvent &event) { mPlayer->raiseAttribute(LocalPlayer::WIL); } - else if (eventId == "CHR") - { - mPlayer->raiseAttribute(LocalPlayer::CHR); - } } } diff --git a/src/gui/status.h b/src/gui/status.h index 62cd8805..f3475263 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -90,15 +90,15 @@ class StatusWindow : public Window, public gcn::ActionListener /** * Stats captions. */ - gcn::Label *mStatsLabel[7]; - gcn::Label *mPointsLabel[7]; - gcn::Label *mStatsDisplayLabel[7]; + gcn::Label *mStatsLabel[6]; + gcn::Label *mPointsLabel[6]; + gcn::Label *mStatsDisplayLabel[6]; gcn::Label *mRemainingStatsPointsLabel; /** * Stats buttons. */ - gcn::Button *mStatsButton[7]; + gcn::Button *mStatsButton[6]; }; extern StatusWindow *statusWindow; diff --git a/src/localplayer.h b/src/localplayer.h index ddf5878e..b72438da 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -76,7 +76,6 @@ enum CHAR_ATTR_VITALITY, CHAR_ATTR_INTELLIGENCE, CHAR_ATTR_WILLPOWER, - CHAR_ATTR_CHARISMA, CHAR_ATTR_END, CHAR_ATTR_NB = CHAR_ATTR_END - CHAR_ATTR_BEGIN, diff --git a/src/net/accountserver/account.cpp b/src/net/accountserver/account.cpp index f0778b1d..9f3bfe5c 100644 --- a/src/net/accountserver/account.cpp +++ b/src/net/accountserver/account.cpp @@ -32,7 +32,7 @@ void Net::AccountServer::Account::createCharacter( const std::string &name, char hairStyle, char hairColor, char gender, short strength, short agility, short vitality, - short intelligence, short dexterity, short willpower, short charisma) + short intelligence, short dexterity, short willpower) { MessageOut msg(PAMSG_CHAR_CREATE); @@ -46,7 +46,6 @@ void Net::AccountServer::Account::createCharacter( msg.writeInt16(intelligence); msg.writeInt16(dexterity); msg.writeInt16(willpower); - msg.writeInt16(charisma); Net::AccountServer::connection->send(msg); } diff --git a/src/net/accountserver/account.h b/src/net/accountserver/account.h index 8af75eb9..6a8c4e08 100644 --- a/src/net/accountserver/account.h +++ b/src/net/accountserver/account.h @@ -35,7 +35,7 @@ namespace Net void createCharacter(const std::string &name, char hairStyle, char hairColor, char gender, short strength, short agility, short vitality, - short intelligence, short dexterity, short willpower, short charisma); + short intelligence, short dexterity, short willpower); void deleteCharacter(char slot); diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index a9f992af..37c02dc3 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -101,6 +101,7 @@ void BeingHandler::handleMessage(MessageIn &msg) handleBeingLooksChangeMessage(msg); break; + /* case SMSG_BEING_VISIBLE: case SMSG_BEING_MOVE: |