summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--README2
-rw-r--r--The Mana World.dev4
-rwxr-xr-xconfigure.ac2
-rw-r--r--src/gui/skill.cpp22
-rw-r--r--src/gui/skill.h1
-rw-r--r--src/gui/stats.cpp12
7 files changed, 35 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 27a2e0b3..83fabc78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-0.0.11a (7 April 2005)
+0.0.11.1 (7 April 2005)
- Buttons are now disabled when appropriate
- Fixed players standing on top of NPCs
- Fixed getting stuck when trying to sell with nothing to sell
diff --git a/README b/README
index 55e80fa2..2f133659 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
THE MANA WORLD
==============
- Version: 0.0.11a Date: 7/4/2005
+ Version: 0.0.11.1 Date: 7/4/2005
Development team:
diff --git a/The Mana World.dev b/The Mana World.dev
index b6ea4747..76b36a90 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -37,14 +37,14 @@ Build=1
LanguageID=1033
CharsetID=1252
CompanyName=The Mana World Development Team
-FileVersion=0.0.11a
+FileVersion=0.0.11.1
FileDescription=The Mana World
InternalName=tmw.exe
LegalCopyright=2004-2005 (C)
LegalTrademarks=
OriginalFilename=tmw.exe
ProductName=The Mana World MMORPG
-ProductVersion=0.0.11a
+ProductVersion=0.0.11.1
AutoIncBuildNr=0
[Unit8]
diff --git a/configure.ac b/configure.ac
index 5290de1d..f23f1590 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.59)
-AC_INIT([The Mana World], [0.0.11a], [umperio@users.sourceforge.net])
+AC_INIT([The Mana World], [0.0.11.1], [umperio@users.sourceforge.net])
AC_CONFIG_HEADERS([config.h:config.h.in])
AC_LANG_CPLUSPLUS
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index c342582f..8c22af55 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -55,7 +55,8 @@ char *skill_db[] = {
SkillDialog::SkillDialog():
- Window("Skills")
+ Window("Skills"),
+ skillPoints(0)
{
skillListBox = new ListBox(this);
skillScrollArea = new ScrollArea(skillListBox);
@@ -63,6 +64,7 @@ SkillDialog::SkillDialog():
incButton = new Button(" Up ");
closeButton = new Button("Close");
+ skillListBox->setEventId("skill");
incButton->setEventId("inc");
closeButton->setEventId("close");
@@ -77,6 +79,7 @@ SkillDialog::SkillDialog():
add(incButton);
add(closeButton);
+ skillListBox->addActionListener(this);
incButton->addActionListener(this);
closeButton->addActionListener(this);
@@ -106,13 +109,20 @@ void SkillDialog::action(const std::string& eventId)
int selectedSkill = skillListBox->getSelected();
std::cout << "SkillDialog::action(" << selectedSkill << ")\n";
if (char_info->skill_point > 0 && selectedSkill >= 0) {
- std::cout << "Sending upgrade of id " << skillList[selectedSkill]->id << "\n";
+ std::cout << "Sending upgrade of id " <<
+ skillList[selectedSkill]->id << "\n";
WFIFOW(0) = net_w_value(0x0112);
WFIFOW(2) = net_w_value(
skillList[selectedSkill]->id);
WFIFOSET(4);
}
}
+ else if (eventId == "skill")
+ {
+ incButton->setEnabled(
+ skillListBox->getSelected() > -1 &&
+ skillPoints > 0);
+ }
else if (eventId == "close")
{
setVisible(false);
@@ -121,11 +131,15 @@ void SkillDialog::action(const std::string& eventId)
void SkillDialog::setPoints(int i)
{
- char tmp[128];
- sprintf(tmp, "Skill points: %i", i);
+ skillPoints = i;
+
if (pointsLabel != NULL) {
+ char tmp[128];
+ sprintf(tmp, "Skill points: %i", skillPoints);
pointsLabel->setCaption(tmp);
}
+
+ incButton->setEnabled(skillListBox->getSelected() > -1 && skillPoints > 0);
}
int SkillDialog::getNumberOfElements()
diff --git a/src/gui/skill.h b/src/gui/skill.h
index 5db90f04..c27f5ad2 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -48,6 +48,7 @@ class SkillDialog : public Window, public gcn::ActionListener,
gcn::Button *closeButton;
std::vector<SKILL*> skillList;
+ int skillPoints;
public:
/**
diff --git a/src/gui/stats.cpp b/src/gui/stats.cpp
index 655e217a..9b134876 100644
--- a/src/gui/stats.cpp
+++ b/src/gui/stats.cpp
@@ -94,7 +94,9 @@ void StatsWindow::update(){
statsStr[5] << "Luck:";
figureStr[5] << (int)char_info->LUK;
- remainingStatsPointsStr << "Remaining Status Points : " << char_info->statsPointsToAttribute;
+ int statusPoints = char_info->statsPointsToAttribute;
+
+ remainingStatsPointsStr << "Remaining Status Points: " << statusPoints;
pointsStr[0] << (int)char_info->STRUp;
pointsStr[1] << (int)char_info->AGIUp;
@@ -103,6 +105,14 @@ void StatsWindow::update(){
pointsStr[4] << (int)char_info->DEXUp;
pointsStr[5] << (int)char_info->LUKUp;
+ // Enable buttons for which there are enough status points
+ statsButton[0]->setEnabled(char_info->STRUp <= statusPoints);
+ statsButton[1]->setEnabled(char_info->AGIUp <= statusPoints);
+ statsButton[2]->setEnabled(char_info->VITUp <= statusPoints);
+ statsButton[3]->setEnabled(char_info->INTUp <= statusPoints);
+ statsButton[4]->setEnabled(char_info->DEXUp <= statusPoints);
+ statsButton[5]->setEnabled(char_info->LUKUp <= statusPoints);
+
// Update labels
for (i = 0; i < 6; i++) {
statsLabel[i]->setCaption(statsStr[i].str());