mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-16 04:49:38 -04:00
*Fix a typo in xp bonus auras.
--HG-- branch : trunk
This commit is contained in:
@@ -165,13 +165,13 @@ static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, const std::string& f
|
||||
}
|
||||
|
||||
template<class T>
|
||||
inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename)
|
||||
inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename, uint32 customEntriesCount = 0)
|
||||
{
|
||||
// compatibility format and C++ structure sizes
|
||||
assert(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFileLoader::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename));
|
||||
|
||||
std::string dbc_filename = dbc_path + filename;
|
||||
if(storage.Load(dbc_filename.c_str()))
|
||||
if(storage.Load(dbc_filename.c_str()), customEntriesCount)
|
||||
{
|
||||
bar.step();
|
||||
for(uint8 i = 0; i < MAX_LOCALE; ++i)
|
||||
@@ -322,12 +322,6 @@ void LoadDBCStores(const std::string& dataPath)
|
||||
SpellEntry const * spell = sSpellStore.LookupEntry(i);
|
||||
if(spell && spell->Category)
|
||||
sSpellCategoryStore[spell->Category].insert(i);
|
||||
|
||||
/*// DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields
|
||||
// uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view
|
||||
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
|
||||
std::swap(*((uint32*)(&spell->SpellFamilyFlags)),*(((uint32*)(&spell->SpellFamilyFlags))+1));
|
||||
#endif*/
|
||||
}
|
||||
|
||||
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
|
||||
|
||||
@@ -13175,7 +13175,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
|
||||
// handle SPELL_AURA_MOD_XP_QUEST_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_QUEST_PCT);
|
||||
for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
|
||||
XP = uint32(XP*(100.0f + (*i)->GetAmount() / 100.0f));
|
||||
XP = uint32(XP*(1.0f + (*i)->GetAmount() / 100.0f));
|
||||
|
||||
if (getLevel() < sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
GiveXP( XP , NULL );
|
||||
@@ -20054,7 +20054,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
|
||||
// handle SPELL_AURA_MOD_XP_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
|
||||
for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
|
||||
itr_xp = uint32(itr_xp*(100.0f + (*i)->GetAmount() / 100.0f));
|
||||
itr_xp = uint32(itr_xp*(1.0f + (*i)->GetAmount() / 100.0f));
|
||||
|
||||
pGroupGuy->GiveXP(itr_xp, pVictim);
|
||||
if(Pet* pet = pGroupGuy->GetPet())
|
||||
@@ -20088,7 +20088,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim)
|
||||
// handle SPELL_AURA_MOD_XP_PCT auras
|
||||
Unit::AuraEffectList const& ModXPPctAuras = GetAurasByType(SPELL_AURA_MOD_XP_PCT);
|
||||
for(Unit::AuraEffectList::const_iterator i = ModXPPctAuras.begin();i != ModXPPctAuras.end(); ++i)
|
||||
xp = uint32(xp*(100.0f + (*i)->GetAmount() / 100.0f));
|
||||
xp = uint32(xp*(1.0f + (*i)->GetAmount() / 100.0f));
|
||||
|
||||
GiveXP(xp, pVictim);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||
&Aura::HandleNoImmediateEffect, // 43 SPELL_AURA_PROC_TRIGGER_DAMAGE implemented in Unit::ProcDamageAndSpellFor
|
||||
&Aura::HandleAuraTrackCreatures, // 44 SPELL_AURA_TRACK_CREATURES
|
||||
&Aura::HandleAuraTrackResources, // 45 SPELL_AURA_TRACK_RESOURCES
|
||||
&Aura::HandleUnused, // 46 SPELL_AURA_46 (used in test spells 54054 and 54058, and spell 48050) (3.0.8a)
|
||||
&Aura::HandleNULL, // 46 SPELL_AURA_46 (used in test spells 54054 and 54058, and spell 48050) (3.0.8a)
|
||||
&Aura::HandleAuraModParryPercent, // 47 SPELL_AURA_MOD_PARRY_PERCENT
|
||||
&Aura::HandleNULL, // 48 SPELL_AURA_48 spell Napalm (area damage spell with additional delayed damage effect)
|
||||
&Aura::HandleAuraModDodgePercent, // 49 SPELL_AURA_MOD_DODGE_PERCENT
|
||||
@@ -116,7 +116,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||
&Aura::HandleAuraModPacifyAndSilence, // 60 SPELL_AURA_MOD_PACIFY_SILENCE
|
||||
&Aura::HandleAuraModScale, // 61 SPELL_AURA_MOD_SCALE
|
||||
&Aura::HandlePeriodicHealthFunnel, // 62 SPELL_AURA_PERIODIC_HEALTH_FUNNEL
|
||||
&Aura::HandleUnused, // 63 unused (3.0.8a) old SPELL_AURA_PERIODIC_MANA_FUNNEL
|
||||
&Aura::HandleNULL, // 63 unused (3.0.8a) old SPELL_AURA_PERIODIC_MANA_FUNNEL
|
||||
&Aura::HandlePeriodicManaLeech, // 64 SPELL_AURA_PERIODIC_MANA_LEECH
|
||||
&Aura::HandleModCastingSpeed, // 65 SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK
|
||||
&Aura::HandleFeignDeath, // 66 SPELL_AURA_FEIGN_DEATH
|
||||
|
||||
@@ -30,7 +30,7 @@ DBCFileLoader::DBCFileLoader()
|
||||
fieldsOffset = NULL;
|
||||
}
|
||||
|
||||
bool DBCFileLoader::Load(const char *filename, const char *fmt)
|
||||
bool DBCFileLoader::Load(const char *filename, const char *fmt, uint32 customEntriesCount)
|
||||
{
|
||||
|
||||
uint32 header;
|
||||
@@ -55,6 +55,8 @@ bool DBCFileLoader::Load(const char *filename, const char *fmt)
|
||||
|
||||
EndianConvert(recordCount);
|
||||
|
||||
recordCount += customEntriesCount;
|
||||
|
||||
if(fread(&fieldCount,4,1,f)!=1) // Number of fields
|
||||
return false;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class DBCFileLoader
|
||||
DBCFileLoader();
|
||||
~DBCFileLoader();
|
||||
|
||||
bool Load(const char *filename, const char *fmt);
|
||||
bool Load(const char *filename, const char *fmt, uint32 customEntriesCount = 0);
|
||||
|
||||
class Record
|
||||
{
|
||||
|
||||
@@ -34,11 +34,11 @@ class DBCStorage
|
||||
char const* GetFormat() const { return fmt; }
|
||||
uint32 GetFieldCount() const { return fieldCount; }
|
||||
|
||||
bool Load(char const* fn)
|
||||
bool Load(char const* fn, uint32 customEntriesCount = 0)
|
||||
{
|
||||
DBCFileLoader dbc;
|
||||
// Check if load was sucessful, only then continue
|
||||
if(!dbc.Load(fn, fmt))
|
||||
if(!dbc.Load(fn, fmt, customEntriesCount))
|
||||
return false;
|
||||
|
||||
fieldCount = dbc.GetCols();
|
||||
|
||||
Reference in New Issue
Block a user