diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-12-22 22:26:42 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-09 07:00:17 +0100 |
commit | bb94a1c1906de4b7d71690f15f05f5fe9fbdb444 (patch) | |
tree | c3d886d4e6d6bdcb74e548ecf4dd346cd425c173 /src/net/tmwa | |
parent | 9a702e64449ba54fab28706c5b9c5ff9f2a41f8a (diff) | |
download | mana-bb94a1c1906de4b7d71690f15f05f5fe9fbdb444.tar.gz mana-bb94a1c1906de4b7d71690f15f05f5fe9fbdb444.tar.bz2 mana-bb94a1c1906de4b7d71690f15f05f5fe9fbdb444.tar.xz mana-bb94a1c1906de4b7d71690f15f05f5fe9fbdb444.zip |
Changed INT and DELETE enum names to fix C::B compilation.
This was introduced since Crush updated his mana lib pack.
I simply changed the names to avoid a collision.
Reviewed-by: Ablu.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 13 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 50 | ||||
-rw-r--r-- | src/net/tmwa/protocol.h | 12 |
4 files changed, 39 insertions, 38 deletions
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 1df84b84..2b7d5381 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -247,7 +247,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, Net::Character *char character->dummy = tempPlayer; for (int i = 0; i < 6; i++) - character->data.mStats[i + STR].base = msg.readInt8(); + character->data.mStats[i + STRENGTH].base = msg.readInt8(); character->slot = msg.readInt8(); // character slot msg.readInt8(); // unknown diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index d8ce7955..aad9a5eb 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -227,12 +227,13 @@ void GeneralHandler::event(Event::Channel channel, inventoryWindow->setSplitAllowed(false); skillDialog->loadSkills(); - statusWindow->addAttribute(STR, _("Strength"), true, ""); - statusWindow->addAttribute(AGI, _("Agility"), true, ""); - statusWindow->addAttribute(VIT, _("Vitality"), true, ""); - statusWindow->addAttribute(INT, _("Intelligence"), true, ""); - statusWindow->addAttribute(DEX, _("Dexterity"), true, ""); - statusWindow->addAttribute(LUK, _("Luck"), true, ""); + statusWindow->addAttribute(STRENGTH, _("Strength"), true, ""); + statusWindow->addAttribute(AGILITY, _("Agility"), true, ""); + statusWindow->addAttribute(VITALITY, _("Vitality"), true, ""); + statusWindow->addAttribute(INTELLIGENCE, _("Intelligence"), + true, ""); + statusWindow->addAttribute(DEXTERITY, _("Dexterity"), true, ""); + statusWindow->addAttribute(LUCK, _("Luck"), true, ""); statusWindow->addAttribute(ATK, _("Attack"), false, ""); statusWindow->addAttribute(DEF, _("Defense"), false, ""); diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index dd228f11..a6f80d0b 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -377,75 +377,75 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) { int val = msg.readInt8(); - PlayerInfo::setStatBase(STR, val); + PlayerInfo::setStatBase(STRENGTH, val); if (val >= 99) { - statusWindow->setPointsNeeded(STR, 0); + statusWindow->setPointsNeeded(STRENGTH, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(STR, msg.readInt8()); + statusWindow->setPointsNeeded(STRENGTH, msg.readInt8()); } val = msg.readInt8(); - PlayerInfo::setStatBase(AGI, val); + PlayerInfo::setStatBase(AGILITY, val); if (val >= 99) { - statusWindow->setPointsNeeded(AGI, 0); + statusWindow->setPointsNeeded(AGILITY, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(AGI, msg.readInt8()); + statusWindow->setPointsNeeded(AGILITY, msg.readInt8()); } val = msg.readInt8(); - PlayerInfo::setStatBase(VIT, val); + PlayerInfo::setStatBase(VITALITY, val); if (val >= 99) { - statusWindow->setPointsNeeded(VIT, 0); + statusWindow->setPointsNeeded(VITALITY, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(VIT, msg.readInt8()); + statusWindow->setPointsNeeded(VITALITY, msg.readInt8()); } val = msg.readInt8(); - PlayerInfo::setStatBase(INT, val); + PlayerInfo::setStatBase(INTELLIGENCE, val); if (val >= 99) { - statusWindow->setPointsNeeded(INT, 0); + statusWindow->setPointsNeeded(INTELLIGENCE, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(INT, msg.readInt8()); + statusWindow->setPointsNeeded(INTELLIGENCE, msg.readInt8()); } val = msg.readInt8(); - PlayerInfo::setStatBase(DEX, val); + PlayerInfo::setStatBase(DEXTERITY, val); if (val >= 99) { - statusWindow->setPointsNeeded(DEX, 0); + statusWindow->setPointsNeeded(DEXTERITY, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(DEX, msg.readInt8()); + statusWindow->setPointsNeeded(DEXTERITY, msg.readInt8()); } val = msg.readInt8(); - PlayerInfo::setStatBase(LUK, val); + PlayerInfo::setStatBase(LUCK, val); if (val >= 99) { - statusWindow->setPointsNeeded(LUK, 0); + statusWindow->setPointsNeeded(LUCK, 0); msg.readInt8(); } else { - statusWindow->setPointsNeeded(LUK, msg.readInt8()); + statusWindow->setPointsNeeded(LUCK, msg.readInt8()); } PlayerInfo::setStatBase(ATK, msg.readInt16(), false); @@ -476,22 +476,22 @@ void PlayerHandler::handleMessage(Net::MessageIn &msg) switch (msg.readInt16()) { case 0x0020: - statusWindow->setPointsNeeded(STR, msg.readInt8()); + statusWindow->setPointsNeeded(STRENGTH, msg.readInt8()); break; case 0x0021: - statusWindow->setPointsNeeded(AGI, msg.readInt8()); + statusWindow->setPointsNeeded(AGILITY, msg.readInt8()); break; case 0x0022: - statusWindow->setPointsNeeded(VIT, msg.readInt8()); + statusWindow->setPointsNeeded(VITALITY, msg.readInt8()); break; case 0x0023: - statusWindow->setPointsNeeded(INT, msg.readInt8()); + statusWindow->setPointsNeeded(INTELLIGENCE, msg.readInt8()); break; case 0x0024: - statusWindow->setPointsNeeded(DEX, msg.readInt8()); + statusWindow->setPointsNeeded(DEXTERITY, msg.readInt8()); break; case 0x0025: - statusWindow->setPointsNeeded(LUK, msg.readInt8()); + statusWindow->setPointsNeeded(LUCK, msg.readInt8()); break; } break; @@ -531,7 +531,7 @@ void PlayerHandler::emote(int emoteId) void PlayerHandler::increaseAttribute(int attr) { - if (attr >= STR && attr <= LUK) + if (attr >= STRENGTH && attr <= LUCK) { MessageOut outMsg(CMSG_STAT_UPDATE_REQUEST); outMsg.writeInt16(attr); diff --git a/src/net/tmwa/protocol.h b/src/net/tmwa/protocol.h index 0624ad2f..2714634b 100644 --- a/src/net/tmwa/protocol.h +++ b/src/net/tmwa/protocol.h @@ -25,12 +25,12 @@ enum { JOB = 0xa, - STR = 0xd, - AGI, - VIT, - INT, - DEX, - LUK, + STRENGTH = 0xd, + AGILITY, + VITALITY, + INTELLIGENCE, + DEXTERITY, + LUCK, ATK, DEF, |