aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Guild.h16
-rw-r--r--src/game/GuildHandler.cpp2
-rw-r--r--src/game/ObjectMgr.cpp8
-rw-r--r--src/game/ObjectMgr.h5
-rw-r--r--src/game/SpellAuras.cpp2
5 files changed, 18 insertions, 15 deletions
diff --git a/src/game/Guild.h b/src/game/Guild.h
index 12dea1feb1f..9f832260f14 100644
--- a/src/game/Guild.h
+++ b/src/game/Guild.h
@@ -191,6 +191,22 @@ enum GuildEmblem
ERR_GUILDEMBLEM_INVALIDVENDOR = 5
};
+inline uint32 GetGuildBankTabPrice(uint8 Index)
+{
+ switch(Index)
+ {
+ case 0: return 100;
+ case 1: return 250;
+ case 2: return 500;
+ case 3: return 1000;
+ case 4: return 2500;
+ case 5: return 5000;
+ default:
+ return 0;
+ }
+ return 0;
+}
+
struct GuildBankEvent
{
uint32 LogGuid;
diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp
index ef59a67ceae..4055497c730 100644
--- a/src/game/GuildHandler.cpp
+++ b/src/game/GuildHandler.cpp
@@ -1574,7 +1574,7 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
if(!pGuild)
return;
- uint32 TabCost = objmgr.GetGuildBankTabPrice(TabId) * GOLD;
+ uint32 TabCost = GetGuildBankTabPrice(TabId) * GOLD;
if (!TabCost)
return;
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 4ed4c282e33..a2af970e9f3 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -127,14 +127,6 @@ ObjectMgr::ObjectMgr()
m_arenaTeamId = 1;
m_auctionid = 1;
- mGuildBankTabPrice.resize(GUILD_BANK_MAX_TABS);
- mGuildBankTabPrice[0] = 100;
- mGuildBankTabPrice[1] = 250;
- mGuildBankTabPrice[2] = 500;
- mGuildBankTabPrice[3] = 1000;
- mGuildBankTabPrice[4] = 2500;
- mGuildBankTabPrice[5] = 5000;
-
// Only zero condition left, others will be added while loading DB tables
mConditions.resize(1);
}
diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h
index 626869b7e3e..e655d122e41 100644
--- a/src/game/ObjectMgr.h
+++ b/src/game/ObjectMgr.h
@@ -745,8 +745,6 @@ class ObjectMgr
int GetIndexForLocale(LocaleConstant loc);
LocaleConstant GetLocaleForIndex(int i);
- // guild bank tabs
- uint32 GetGuildBankTabPrice(uint8 Index) const { return Index < GUILD_BANK_MAX_TABS ? mGuildBankTabPrice[Index] : 0; }
uint16 GetConditionId(ConditionType condition, uint32 value1, uint32 value2);
bool IsPlayerMeetToCondition(Player const* player, uint16 condition_id) const
@@ -919,9 +917,6 @@ class ObjectMgr
RespawnTimes mCreatureRespawnTimes;
RespawnTimes mGORespawnTimes;
- typedef std::vector<uint32> GuildBankTabPriceMap;
- GuildBankTabPriceMap mGuildBankTabPrice;
-
// Storage for Conditions. First element (index 0) is reserved for zero-condition (nothing required)
typedef std::vector<PlayerCondition> ConditionStore;
ConditionStore mConditions;
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b1b2e487214..b3bc24ec17b 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4488,7 +4488,7 @@ void AuraEffect::HandlePeriodicDamage(bool apply, bool Real)
//3 points: ${($m1+$b1*3+0.03*$AP)*6} damage over 12 secs
//4 points: ${($m1+$b1*4+0.03428571*$AP)*7} damage over 14 secs
//5 points: ${($m1+$b1*5+0.0375*$AP)*8} damage over 16 secs
- float AP_per_combo[] = {0, 0.015f, 0.024, 0.03, 0.03428571, 0.0375};
+ float AP_per_combo[6] = {0.0f, 0.015f, 0.024f, 0.03f, 0.03428571f, 0.0375f};
uint8 cp = ((Player*)caster)->GetComboPoints();
if (cp > 5) cp = 5;
m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * AP_per_combo[cp]);