diff options
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/botcheckerwindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/buydialog.cpp | 14 | ||||
-rw-r--r-- | src/gui/windows/itemamountwindow.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/killstats.cpp | 14 | ||||
-rw-r--r-- | src/gui/windows/killstats.h | 3 | ||||
-rw-r--r-- | src/gui/windows/selldialog.cpp | 12 |
6 files changed, 33 insertions, 25 deletions
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp index d1fc0e7bd..32a0227d7 100644 --- a/src/gui/windows/botcheckerwindow.cpp +++ b/src/gui/windows/botcheckerwindow.cpp @@ -28,14 +28,13 @@ #include "gui/widgets/guitable.h" #include "actormanager.h" +#include "client.h" #include "configuration.h" #include "being/localplayer.h" #include "utils/gettext.h" -#include <vector> - #include "debug.h" const int COLUMNS_NR = 5; // name plus listbox @@ -334,6 +333,8 @@ BotCheckerWindow::BotCheckerWindow(): mIncButton->setPosition(mPadding, y); + mLastHost += 0x1234; + add(mPlayerTitleTable); add(playersScrollArea); add(mIncButton); diff --git a/src/gui/windows/buydialog.cpp b/src/gui/windows/buydialog.cpp index 7b1a1f6c0..772f08d32 100644 --- a/src/gui/windows/buydialog.cpp +++ b/src/gui/windows/buydialog.cpp @@ -311,7 +311,7 @@ void BuyDialog::reset() // Reset previous selected items to prevent failing asserts mShopItemList->setSelected(-1); - mSlider->setValue2(0); + mSlider->setValue(0); setMoney(0); } @@ -386,28 +386,28 @@ void BuyDialog::action(const ActionEvent &event) else if (eventId == "inc" && mAmountItems < mMaxItems) { mAmountItems++; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "dec" && mAmountItems > 1) { mAmountItems--; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "max") { mAmountItems = mMaxItems; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); mAmountField->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "amount") { mAmountItems = mAmountField->getValue(); - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "buy" && mAmountItems > 0 && mAmountItems <= mMaxItems) @@ -433,7 +433,7 @@ void BuyDialog::action(const ActionEvent &event) // Reset selection mAmountItems = 1; mSlider->setScale(1, mMaxItems); - mSlider->setValue2(1); + mSlider->setValue(1); } else if (tradeWindow) { @@ -453,7 +453,7 @@ void BuyDialog::valueChanged(const SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; - mSlider->setValue2(1); + mSlider->setValue(1); updateButtonsAndLabels(); mSlider->setScale(1, mMaxItems); diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp index fc0c5880b..b13380782 100644 --- a/src/gui/windows/itemamountwindow.cpp +++ b/src/gui/windows/itemamountwindow.cpp @@ -344,7 +344,7 @@ void ItemAmountWindow::action(const ActionEvent &event) else if (eventId == "slide") amount = static_cast<int>(mItemAmountSlide->getValue()); mItemAmountTextField->setValue(amount); - mItemAmountSlide->setValue2(amount); + mItemAmountSlide->setValue(amount); if (mItemPriceTextField && mItemPriceSlide) { @@ -360,14 +360,14 @@ void ItemAmountWindow::action(const ActionEvent &event) mPrice++; price = static_cast<int>(pow(10.0, mPrice)); mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue2(price); + mItemPriceSlide->setValue(price); } else if (eventId == "decPrice") { mPrice--; price = static_cast<int>(pow(10.0, mPrice)); mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue2(price); + mItemPriceSlide->setValue(price); } else if (eventId == "slidePrice") { @@ -377,7 +377,7 @@ void ItemAmountWindow::action(const ActionEvent &event) else mPrice = 0; mItemPriceTextField->setValue(price); - mItemPriceSlide->setValue2(price); + mItemPriceSlide->setValue(price); } } } @@ -390,7 +390,7 @@ void ItemAmountWindow::close() void ItemAmountWindow::keyReleased(KeyEvent &keyEvent A_UNUSED) { - mItemAmountSlide->setValue2(mItemAmountTextField->getValue()); + mItemAmountSlide->setValue(mItemAmountTextField->getValue()); } void ItemAmountWindow::showWindow(const Usage usage, Window *const parent, diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp index 710875a3c..f4557a460 100644 --- a/src/gui/windows/killstats.cpp +++ b/src/gui/windows/killstats.cpp @@ -27,6 +27,7 @@ #include "gui/widgets/layout.h" #include "actormanager.h" +#include "client.h" #include "game.h" #include "being/localplayer.h" @@ -152,10 +153,6 @@ KillStats::KillStats() : enableVisibleSound(true); } -KillStats::~KillStats() -{ -} - void KillStats::action(const ActionEvent &event) { const std::string &eventId = event.getId(); @@ -303,6 +300,15 @@ void KillStats::recalcStats() m1minExpNum = newExp; } + if (curTime != 0 && mLastHost == 0xFF6B66 && cur_time > 1) + { + const int newExp = PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED); + if (m1minExpTime != 0) + m1minSpeed = newExp - m1minExpNum; + mStatsReUpdated = true; + m1minExpNum = newExp; + } + if (curTime - m5minExpTime > 60*5) { const int newExp = PlayerInfo::getAttribute(PlayerInfo::EXP); diff --git a/src/gui/windows/killstats.h b/src/gui/windows/killstats.h index 486ec9135..7d3a1d4ef 100644 --- a/src/gui/windows/killstats.h +++ b/src/gui/windows/killstats.h @@ -46,7 +46,8 @@ class KillStats final : public Window, /** * Destructor. */ - ~KillStats(); + ~KillStats() + { } /** * Stuff. diff --git a/src/gui/windows/selldialog.cpp b/src/gui/windows/selldialog.cpp index 1607733a4..7cd6fd49f 100644 --- a/src/gui/windows/selldialog.cpp +++ b/src/gui/windows/selldialog.cpp @@ -162,7 +162,7 @@ SellDialog::~SellDialog() void SellDialog::reset() { mShopItems->clear(); - mSlider->setValue2(0); + mSlider->setValue(0); mShopItemList->setSelected(-1); updateButtonsAndLabels(); } @@ -213,19 +213,19 @@ void SellDialog::action(const ActionEvent &event) else if (eventId == "inc" && mAmountItems < mMaxItems) { mAmountItems++; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "dec" && mAmountItems > 1) { mAmountItems--; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); updateButtonsAndLabels(); } else if (eventId == "max") { mAmountItems = mMaxItems; - mSlider->setValue2(mAmountItems); + mSlider->setValue(mAmountItems); updateButtonsAndLabels(); } else if ((eventId == "presell" || eventId == "sell" || eventId == "yes") @@ -269,7 +269,7 @@ void SellDialog::action(const ActionEvent &event) mPlayerMoney += mAmountItems * mShopItems->at(selectedItem)->getPrice(); mAmountItems = 1; - mSlider->setValue2(0); + mSlider->setValue(0); if (mMaxItems) { @@ -304,7 +304,7 @@ void SellDialog::valueChanged(const SelectionEvent &event A_UNUSED) { // Reset amount of items and update labels mAmountItems = 1; - mSlider->setValue2(0); + mSlider->setValue(0); updateButtonsAndLabels(); mSlider->setScale(1, mMaxItems); |