Ru-MaNGOS

Ru-MaNGOS (http://mangos.ytdb.ru/index.php)
-   Принятые патчи (http://mangos.ytdb.ru/forumdisplay.php?f=5)
-   -   Some fix (http://mangos.ytdb.ru/showthread.php?t=6272)

Den 06.10.2012 21:52

Some fix
 
Так будет лучше комментарий.
Функция. Зачем она вообще ?

Код:

diff --git a/src/game/Object.h b/src/game/Object.h
index 59f0ad0..3495cdd 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -355,8 +355,6 @@ class MANGOS_DLL_SPEC Object
 
        uint16 GetValuesCount() const { return m_valuesCount; }
 
-        void InitValues() { _InitValues(); }
-
        virtual bool HasQuest(uint32 /* quest_id */) const { return false; }
        virtual bool HasInvolvedQuest(uint32 /* quest_id */) const { return false; }
 
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 61af19f..00d6925 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -2040,7 +2040,7 @@ void Player::Regenerate(Powers power, uint32 diff)
            float RageDecreaseRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_RAGE_LOSS);
            addvalue = 20 * RageDecreaseRate;              // 2 rage by tick (= 2 seconds => 1 rage/sec)
        }  break;
-        case POWER_ENERGY:                                  // Regenerate energy (rogue)
+        case POWER_ENERGY:                                  // Regenerate energy
        {
            float EnergyRate = sWorld.getConfig(CONFIG_FLOAT_RATE_POWER_ENERGY);
            addvalue = 20 * EnergyRate;

Кто-нибудь поддержит по избавлению от имен функций, которые начинаются с нижнего подчеркивания ?

schmoozerd 06.10.2012 22:26

:)

about the first part:
This looks like public/private change, maybe also something that just was forgotten to remove after removing a use of InitValues() function.

In general.
_functions are a bit ugly, but this is a rather convincing way to forumulate private helper functions.
Like public: Player::Add - private use _Add

schmoozerd 07.10.2012 19:38

In [12204] Remove some not required things
Thank you :)


Текущее время: 22:40. Часовой пояс GMT +3.

ru-mangos.ru - Русское сообщество MaNGOS