*Merge required after backout.
--HG-- branch : trunk
This commit is contained in:
@@ -489,7 +489,6 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "spell_linked_spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellLinkedSpellCommand, "", NULL },
|
||||
{ "spell_pet_auras", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellPetAurasCommand, "", NULL },
|
||||
{ "spell_proc_event", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcEventCommand, "", NULL },
|
||||
{ "spell_proc_item_enchant", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellProcItemEnchantCommand, "", NULL },
|
||||
{ "spell_script_target", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellScriptTargetCommand, "", NULL },
|
||||
{ "spell_scripts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellScriptsCommand, "", NULL },
|
||||
{ "spell_target_position", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadSpellTargetPositionCommand, "", NULL },
|
||||
|
||||
@@ -405,7 +405,6 @@ class ChatHandler
|
||||
bool HandleReloadSpellLearnSpellCommand(const char* args);
|
||||
bool HandleReloadSpellLinkedSpellCommand(const char* args);
|
||||
bool HandleReloadSpellProcEventCommand(const char* args);
|
||||
bool HandleReloadSpellProcItemEnchantCommand(const char* args);
|
||||
bool HandleReloadSpellBonusesCommand(const char* args);
|
||||
bool HandleReloadSpellScriptTargetCommand(const char* args);
|
||||
bool HandleReloadSpellScriptsCommand(const char* args);
|
||||
|
||||
@@ -651,7 +651,6 @@ bool ChatHandler::HandleReloadAllSpellCommand(const char*)
|
||||
HandleReloadSpellLinkedSpellCommand("a");
|
||||
HandleReloadSpellProcEventCommand("a");
|
||||
HandleReloadSpellBonusesCommand("a");
|
||||
HandleReloadSpellProcItemEnchantCommand("a");
|
||||
HandleReloadSpellScriptTargetCommand("a");
|
||||
HandleReloadSpellTargetPositionCommand("a");
|
||||
HandleReloadSpellThreatsCommand("a");
|
||||
@@ -1048,14 +1047,6 @@ bool ChatHandler::HandleReloadSpellBonusesCommand(const char*)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadSpellProcItemEnchantCommand(const char*)
|
||||
{
|
||||
sLog.outString( "Re-Loading Spell Proc Item Enchant..." );
|
||||
spellmgr.LoadSpellProcItemEnchant();
|
||||
SendGlobalSysMessage("DB table `spell_proc_item_enchant` (item enchantment ppm) reloaded.");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleReloadSpellScriptTargetCommand(const char*)
|
||||
{
|
||||
sLog.outString( "Re-Loading SpellsScriptTarget..." );
|
||||
|
||||
@@ -7222,7 +7222,6 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
|
||||
|
||||
// Apply spell mods
|
||||
ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance);
|
||||
//ApplySpellMod(spellInfo->Id,SPELLMOD_FREQUENCY_OF_SUCCESS,chance);
|
||||
|
||||
if (roll_chance_f(chance))
|
||||
{
|
||||
|
||||
+1
-60
@@ -1217,65 +1217,6 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
sLog.outString( ">> Loaded %u extra spell proc event conditions", count );
|
||||
}
|
||||
|
||||
/*
|
||||
void SpellMgr::LoadSpellProcItemEnchant()
|
||||
{
|
||||
mSpellProcItemEnchantMap.clear(); // need for reload case
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
// 0 1
|
||||
QueryResult *result = WorldDatabase.Query("SELECT entry, ppmRate FROM spell_proc_item_enchant");
|
||||
if( !result )
|
||||
{
|
||||
|
||||
barGoLink bar( 1 );
|
||||
|
||||
bar.step();
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %u proc item enchant definitions", count );
|
||||
return;
|
||||
}
|
||||
|
||||
barGoLink bar( result->GetRowCount() );
|
||||
|
||||
do
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
bar.step();
|
||||
|
||||
uint32 entry = fields[0].GetUInt32();
|
||||
float ppmRate = fields[1].GetFloat();
|
||||
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(entry);
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog.outErrorDb("Spell %u listed in `spell_proc_item_enchant` does not exist", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( GetFirstSpellInChain(entry) != entry )
|
||||
{
|
||||
sLog.outErrorDb("Spell %u listed in `spell_proc_item_enchant` is not first rank in chain", entry);
|
||||
// prevent loading since it won't have an effect anyway
|
||||
continue;
|
||||
}
|
||||
|
||||
mSpellProcItemEnchantMap[entry] = ppmRate;
|
||||
|
||||
++count;
|
||||
} while( result->NextRow() );
|
||||
|
||||
delete result;
|
||||
|
||||
sLog.outString();
|
||||
sLog.outString( ">> Loaded %u proc item enchant definitions", count );
|
||||
}
|
||||
*/
|
||||
|
||||
void SpellMgr::LoadSpellBonusess()
|
||||
{
|
||||
mSpellBonusMap.clear(); // need for reload case
|
||||
@@ -3323,7 +3264,7 @@ bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool de
|
||||
return def;
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellProcItemEnchant()
|
||||
void SpellMgr::LoadSpellEnchantProcData()
|
||||
{
|
||||
mSpellEnchantProcEventMap.clear(); // need for reload case
|
||||
|
||||
|
||||
+3
-5
@@ -524,7 +524,6 @@ typedef UNORDERED_MAP<uint32, SpellBonusEntry> SpellBonusMap;
|
||||
#define ELIXIR_SHATTRATH_MASK 0x8
|
||||
|
||||
typedef std::map<uint32, uint8> SpellElixirMap;
|
||||
typedef std::map<uint32, float> SpellProcItemEnchantMap;
|
||||
typedef std::map<uint32, uint16> SpellThreatMap;
|
||||
|
||||
// Spell script target related declarations (accessed using SpellMgr functions)
|
||||
@@ -781,6 +780,8 @@ class SpellMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active);
|
||||
|
||||
SpellEnchantProcEntry const* GetSpellEnchantProcEvent(uint32 enchId) const
|
||||
{
|
||||
SpellEnchantProcEventMap::const_iterator itr = mSpellEnchantProcEventMap.find(enchId);
|
||||
@@ -789,8 +790,6 @@ class SpellMgr
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool IsSpellProcEventCanTriggeredBy( SpellProcEventEntry const * spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active);
|
||||
|
||||
// Spell bonus data
|
||||
SpellBonusEntry const* GetSpellBonusData(uint32 spellId) const
|
||||
{
|
||||
@@ -1065,7 +1064,6 @@ class SpellMgr
|
||||
void LoadSpellScriptTarget();
|
||||
void LoadSpellElixirs();
|
||||
void LoadSpellProcEvents();
|
||||
void LoadSpellProcItemEnchant();
|
||||
void LoadSpellBonusess();
|
||||
void LoadSpellTargetPositions();
|
||||
void LoadSpellThreats();
|
||||
@@ -1073,6 +1071,7 @@ class SpellMgr
|
||||
void LoadSpellPetAuras();
|
||||
void LoadSpellCustomAttr();
|
||||
void LoadEnchantCustomAttr();
|
||||
void LoadSpellEnchantProcData();
|
||||
void LoadSpellLinked();
|
||||
void LoadPetLevelupSpellMap();
|
||||
void LoadPetDefaultSpells();
|
||||
@@ -1091,7 +1090,6 @@ class SpellMgr
|
||||
SpellElixirMap mSpellElixirs;
|
||||
SpellThreatMap mSpellThreatMap;
|
||||
SpellProcEventMap mSpellProcEventMap;
|
||||
SpellProcItemEnchantMap mSpellProcItemEnchantMap;
|
||||
SpellBonusMap mSpellBonusMap;
|
||||
SkillLineAbilityMap mSkillLineAbilityMap;
|
||||
SpellPetAuraMap mSpellPetAuraMap;
|
||||
|
||||
@@ -13686,9 +13686,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura * aura, SpellEntry co
|
||||
if(Player* modOwner = GetSpellModOwner())
|
||||
{
|
||||
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_CHANCE_OF_SUCCESS,chance);
|
||||
//modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_FREQUENCY_OF_SUCCESS,chance);
|
||||
}
|
||||
|
||||
return roll_chance_f(chance);
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -111,7 +111,7 @@ enum SpellModOp
|
||||
SPELLMOD_CRIT_DAMAGE_BONUS = 15,
|
||||
SPELLMOD_RESIST_MISS_CHANCE = 16,
|
||||
SPELLMOD_JUMP_TARGETS = 17,
|
||||
SPELLMOD_CHANCE_OF_SUCCESS = 18, // Only used with SPELL_AURA_ADD_FLAT_MODIFIER and affects proc spells
|
||||
SPELLMOD_CHANCE_OF_SUCCESS = 18,
|
||||
SPELLMOD_ACTIVATION_TIME = 19,
|
||||
SPELLMOD_EFFECT_PAST_FIRST = 20,
|
||||
SPELLMOD_GLOBAL_COOLDOWN = 21, //TODO: GCD is not checked by server currently
|
||||
@@ -120,7 +120,6 @@ enum SpellModOp
|
||||
SPELLMOD_SPELL_BONUS_DAMAGE = 24,
|
||||
// spellmod 25
|
||||
SPELLMOD_PROC_PER_MINUTE = 26,
|
||||
//SPELLMOD_FREQUENCY_OF_SUCCESS = 26, // Only used with SPELL_AURA_ADD_PCT_MODIFIER and affects used on proc spells
|
||||
SPELLMOD_MULTIPLE_VALUE = 27,
|
||||
SPELLMOD_RESIST_DISPEL_CHANCE = 28,
|
||||
SPELLMOD_CRIT_DAMAGE_BONUS_2 = 29, //one not used spell
|
||||
|
||||
+3
-3
@@ -1250,15 +1250,15 @@ void World::SetInitialWorldSettings()
|
||||
sLog.outString( "Loading Spell Bonus Data..." );
|
||||
spellmgr.LoadSpellBonusess();
|
||||
|
||||
sLog.outString( "Loading Spell Proc Item Enchant..." );
|
||||
spellmgr.LoadSpellProcItemEnchant(); // must be after LoadSpellChains
|
||||
|
||||
sLog.outString( "Loading Aggro Spells Definitions...");
|
||||
spellmgr.LoadSpellThreats();
|
||||
|
||||
sLog.outString( "Loading NPC Texts..." );
|
||||
objmgr.LoadGossipText();
|
||||
|
||||
sLog.outString( "Loading Enchant Spells Proc datas...");
|
||||
spellmgr.LoadSpellEnchantProcData();
|
||||
|
||||
sLog.outString( "Loading Item Random Enchantments Table..." );
|
||||
LoadRandomEnchantmentsTable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user