aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-01-04 09:54:21 -0600
committermegamage <none@none>2009-01-04 09:54:21 -0600
commit3797d15426846d258075742448858f834259e4c5 (patch)
treeae9770a84bb7a39fe632ed6f56855756dd80d964 /src
parentf1d613432047ad4106f4fbbd5f8875a223b60d15 (diff)
*Mangos [7019] Fix AP/RAP bonus from stat at aura apply/remove. Not use CLASSMASK_WAND_USERS mask for AP bonus. By DiSlord.
*Mangos [7020] Initilize glyph order at loading/reset. This must fix problems with glyph use for old(converted) characters. By VladimirMangos. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp12
-rw-r--r--src/game/SpellAuras.cpp12
-rw-r--r--src/game/StatSystem.cpp20
-rw-r--r--src/realmd/Realmd.rc2
-rw-r--r--src/shared/revision_nr.h2
5 files changed, 21 insertions, 27 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 552b49b481d..1fca0b32067 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -606,13 +606,6 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
SetUInt32Value( PLAYER_FIELD_TODAY_CONTRIBUTION, 0 );
SetUInt32Value( PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0 );
- for(uint32 i = 0; i < sGlyphSlotStore.GetNumRows(); ++i)
- {
- GlyphSlotEntry const * gs = sGlyphSlotStore.LookupEntry(i);
- if(gs && gs->Order)
- SetGlyphSlot(gs->Order - 1, gs->Id);
- }
-
// set starting level
uint32 start_level = getClass() != CLASS_DEATH_KNIGHT
? sWorld.getConfig(CONFIG_START_PLAYER_LEVEL)
@@ -19790,6 +19783,11 @@ uint32 Player::GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 n
void Player::InitGlyphsForLevel()
{
+ for(uint32 i = 0; i < sGlyphSlotStore.GetNumRows(); ++i)
+ if(GlyphSlotEntry const * gs = sGlyphSlotStore.LookupEntry(i))
+ if(gs->Order)
+ SetGlyphSlot(gs->Order - 1, gs->Id);
+
uint32 level = getLevel();
uint32 value = 0;
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6a403e74b86..66a91fbc19b 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4855,11 +4855,9 @@ void Aura::HandleAuraModRangedAttackPowerOfStatPercent(bool apply, bool Real)
if(!Real)
return;
- if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
- return;
-
// Recalculate bonus
- ((Player*)m_target)->UpdateAttackPowerAndDamage(true);
+ if(m_target->GetTypeId() == TYPEID_PLAYER && !(m_target->getClassMask() & CLASSMASK_WAND_USERS))
+ ((Player*)m_target)->UpdateAttackPowerAndDamage(true);
}
void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
@@ -4868,11 +4866,9 @@ void Aura::HandleAuraModAttackPowerOfStatPercent(bool apply, bool Real)
if(!Real)
return;
- if(m_target->GetTypeId() == TYPEID_PLAYER && (m_target->getClassMask() & CLASSMASK_WAND_USERS)!=0)
- return;
-
// Recalculate bonus
- ((Player*)m_target)->UpdateAttackPowerAndDamage(false);
+ if(m_target->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)m_target)->UpdateAttackPowerAndDamage(false);
}
/********************************/
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index fec6d6f9ddb..2cfac58f962 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -320,21 +320,21 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
float attPowerMod = GetModifierValue(unitMod, TOTAL_VALUE);
//add dynamic flat mods
- if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
+ if( ranged )
{
- if( ranged )
+ if ((getClassMask() & CLASSMASK_WAND_USERS)==0)
{
- AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT);
- for(AuraList::const_iterator i = mRAPbyIntellect.begin();i != mRAPbyIntellect.end(); ++i)
- attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
- }
- else
- {
- AuraList const& mRAPbyIntellect = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
- for(AuraList::const_iterator i = mRAPbyIntellect.begin();i != mRAPbyIntellect.end(); ++i)
+ AuraList const& mRAPbyStat = GetAurasByType(SPELL_AURA_MOD_RANGED_ATTACK_POWER_OF_STAT_PERCENT);
+ for(AuraList::const_iterator i = mRAPbyStat.begin();i != mRAPbyStat.end(); ++i)
attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
}
}
+ else
+ {
+ AuraList const& mAPbyStat = GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
+ for(AuraList::const_iterator i = mAPbyStat.begin();i != mAPbyStat.end(); ++i)
+ attPowerMod += int32(GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
+ }
float attPowerMultiplier = GetModifierValue(unitMod, TOTAL_PCT) - 1.0f;
diff --git a/src/realmd/Realmd.rc b/src/realmd/Realmd.rc
index 33c7eef719a..1248caa52cd 100644
--- a/src/realmd/Realmd.rc
+++ b/src/realmd/Realmd.rc
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
+ * Copyright (C) 2005-2009 MaNGOS <http://www.mangosproject.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index f01cb63b64a..49cf38c8714 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7018"
+ #define REVISION_NR "7020"
#endif // __REVISION_NR_H__